Skip to main content
QUICK REVIEW

[论文解读] Attention-based model for predicting question relatedness on Stack Overflow

Jiayan Pei, Yimin Wu|arXiv (Cornell University)|Mar 19, 2021
Topic Modeling参考文献 34被引用 6
一句话总结

本文提出了一种基于注意力机制的句子对交互模型(ASIM),利用自注意力机制捕捉 Stack Overflow 上问题对之间的语义交互,显著提升了问题相关性预测性能。该模型在 Stack Overflow 知识单元数据集和 AskUbuntu 重复问题检测任务上均取得了最先进(SOTA)的性能,Micro-F1 达到 0.892,准确率高达 0.9625。

ABSTRACT

Stack Overflow is one of the most popular Programming Community-based Question Answering (PCQA) websites that has attracted more and more users in recent years. When users raise or inquire questions in Stack Overflow, providing related questions can help them solve problems. Although there are many approaches based on deep learning that can automatically predict the relatedness between questions, those approaches are limited since interaction information between two questions may be lost. In this paper, we adopt the deep learning technique, propose an Attention-based Sentence pair Interaction Model (ASIM) to predict the relatedness between questions on Stack Overflow automatically. We adopt the attention mechanism to capture the semantic interaction information between the questions. Besides, we have pre-trained and released word embeddings specific to the software engineering domain for this task, which may also help other related tasks. The experiment results demonstrate that ASIM has made significant improvement over the baseline approaches in Precision, Recall, and Micro-F1 evaluation metrics, achieving state-of-the-art performance in this task. Our model also performs well in the duplicate question detection task of AskUbuntu, which is a similar but different task, proving its generalization and robustness.

研究动机与目标

  • 为解决在 Stack Overflow 上人工识别相关或重复问题的低效与不准确问题。
  • 通过捕捉句子间交互来提升问题之间的语义相关性预测性能,而现有方法往往忽略这一点。
  • 开发面向软件工程领域的专用词嵌入,以提升模型性能。
  • 在另一项相关但不同的软件工程任务——AskUbuntu 上的重复问题检测中,评估模型的泛化能力。

提出的方法

  • ASIM 模型采用双编码器架构,并结合自注意力机制,学习单个问题的上下文表征。
  • 通过计算词级相似度矩阵,应用句间注意力机制以捕捉两个问题之间的语义交互。
  • 模型采用多头注意力机制,对问题对之间语义相关的词和短语进行对齐。
  • 基于从 Stack Overflow 数据转储中提取的大规模软件工程语料库,预训练领域特定的词嵌入。
  • 最终通过全连接神经网络对注意力表征进行分类,采用交叉熵损失函数进行多分类。
  • 模型在知识单元数据集上端到端训练,该数据集将问题对划分为四个相关性等级:重复、直接、间接和孤立。

实验结果

研究问题

  • RQ1基于注意力的模型能否有效捕捉问题对之间的语义交互,从而提升在 Stack Overflow 上的相关性预测性能?
  • RQ2使用领域特定的词嵌入是否能提升在软件工程问题相关性任务中的性能?
  • RQ3与现有 SOTA 模型(如 SOFTSVM 和 DOTBILSTM)相比,ASIM 在精确率、召回率和 F1 分数方面表现如何?
  • RQ4ASIM 是否能泛化到其他软件工程任务,例如 AskUbuntu 上的重复问题检测?

主要发现

  • 在 Stack Overflow 知识单元数据集上,ASIM 的 Micro-F1 得分为 0.892,优于先前的 SOTA 模型 DOTBILSTM(0.87)和 SOFTSVM(0.85)。
  • 在 AskUbuntu 重复问题检测数据集上,ASIM 的准确率达到 0.9625,超过 SOTA 模型 SOFTSVM。
  • 注意力可视化结果表明,ASIM 成功对齐了语义相似的词和短语,即使在词汇重叠极少的情况下亦然。
  • 使用领域特定的词嵌入显著提升了性能,尤其在捕捉软件开发问题中的技术术语和句法模式方面。
  • 模型展现出强大的鲁棒性与泛化能力,在不同但相关的软件工程 NLP 任务中均表现优异。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。