arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2107.11423cs.SE
收藏

子程序的神经Source Code概括的包围模型

Ensemble Models for Neural Source Code Summarization of Subroutines

Alexander LeClair, Aakash Bansal, Collin McMillan

摘要:

子例程的源代码摘要是对该子例程的简要描述。摘要是程序员使用的大部分文档的基础,例如JavaBean中的方法摘要。源代码摘要是编写这些摘要的任务。目前,用于代码摘要的大多数最先进的方法是基于神经网络的解决方案,类似于seq 2seq、graph 2seq和其他编码器-解码器架构。编码器的输入是源代码,而解码器帮助预测自然语言摘要。虽然这些模型在结构上趋于相似,但有证据表明,不同的模型对预测质量的贡献不同-模型性能的差异是正交和互补的,而不是整个数据集的统一。在本文中,我们探讨了不同的神经代码摘要方法的正交性,并提出了集成模型,以利用这种正交性,以获得更好的整体性能。我们证明,一个简单的合奏策略提高性能高达14.8%,并提供了这种提升的解释。这项工作的收获是,在大多数神经代码摘要技术中,对推理过程的相对较小的改变会导致预测质量的大幅提高。

英文摘要:

A source code summary of a subroutine is a brief description of that subroutine. Summaries underpin a majority of documentation consumed by programmers, such as the method summaries in JavaDocs. Source code summarization is the task of writing these summaries. At present, most state-of-the-art approaches for code summarization are neural network-based solutions akin to seq2seq, graph2seq, and other encoder-decoder architectures. The input to the encoder is source code, while the decoder helps predict the natural language summary. While these models tend to be similar in structure, evidence is emerging that different models make different contributions to prediction quality -- differences in model performance are orthogonal and complementary rather than uniform over the entire dataset. In this paper, we explore the orthogonal nature of different neural code summarization approaches and propose ensemble models to exploit this orthogonality for better overall performance. We demonstrate that a simple ensemble strategy boosts performance by up to 14.8%, and provide an explanation for this boost. The takeaway from this work is that a relatively small change to the inference procedure in most neural code summarization techniques leads to outsized improvements in prediction quality.

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

↑