arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2109.13073cs.CLcs.AIcs.PLcs.SE
收藏

利用复制增强的CodeBERT模型和双模态信息改进Stack Overflow问题标题生成

Improving Stack Overflow question title generation with copying enhanced CodeBERT model and bi-modal information

Wuhan University of Technology(武汉理工大学);Wuhan University(武汉大学);Wuhan University of Technology Chongqing Research Institute(武汉理工大学重庆研究院);Sanya Science and Education Innovation Park of Wuhan University of Technology(武汉理工大学三亚科教创新园);City University of Hong Kong(香港城市大学)

Fengji Zhang, Xiao Yu, Jacky Keung, Fuyang Li, Zhiwen Xie, Zhen Yang, Caoyuan Ma, Zhimin Zhang

摘要:

上下文:Stack Overflow对于寻求编程问题答案的软件开发人员非常有帮助。以往的研究表明,越来越多的问题是低质量的,从而获得较少的关注,从潜在的回答。Gao等人提出了一种基于LSTM的模型(即,BiLSTM-CC)从代码片段自动生成问题标题,以提高问题质量。但是,仅使用问题主体中的代码片段无法为标题生成提供足够的信息,并且LSTM无法捕获令牌之间的长范围依赖关系。目的:本文提出了一种基于深度学习的新模型CCBERT,通过充分利用整个问题体的双模态信息来提高问题标题生成的性能。方法:CCBERT遵循编码器-解码器范式,并使用CodeBERT将问题主体编码为隐藏表示,使用堆栈Transformer解码器生成预测令牌,并使用额外的复制注意力层优化输出分布。编码器和解码器都执行多头自注意操作以更好地捕获长程依赖性。本文从Stack Overflow官方发布的数据中筛选出约20万个高质量问题,构建了一个数据集,以验证CCBERT模型的有效性。结果:CCBERT在数据集上优于所有基线模型。在纯代码和低资源数据集上的实验表明了CCBERT的优越性,性能下降较小。人工评估也显示了CCBERT在可读性和相关性标准方面的出色表现。

英文摘要:

Context: Stack Overflow is very helpful for software developers who are seeking answers to programming problems. Previous studies have shown that a growing number of questions are of low quality and thus obtain less attention from potential answerers. Gao et al. proposed an LSTM-based model (i.e., BiLSTM-CC) to automatically generate question titles from the code snippets to improve the question quality. However, only using the code snippets in the question body cannot provide sufficient information for title generation, and LSTMs cannot capture the long-range dependencies between tokens. Objective: This paper proposes CCBERT, a deep learning based novel model to enhance the performance of question title generation by making full use of the bi-modal information of the entire question body. Method: CCBERT follows the encoder-decoder paradigm and uses CodeBERT to encode the question body into hidden representations, a stacked Transformer decoder to generate predicted tokens, and an additional copy attention layer to refine the output distribution. Both the encoder and decoder perform the multi-head self-attention operation to better capture the long-range dependencies. This paper builds a dataset containing around 200,000 high-quality questions filtered from the data officially published by Stack Overflow to verify the effectiveness of the CCBERT model. Results: CCBERT outperforms all the baseline models on the dataset. Experiments on both code-only and low-resource datasets show the superiority of CCBERT with less performance degradation. The human evaluation also shows the excellent performance of CCBERT concerning both readability and correlation criteria.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑