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.
翻译:子例程的源代码摘要是该子例程的简单描述。 摘要是程序员所消费的大多数文件, 例如 JavaDocs 的方法摘要。 源代码总和是写这些摘要的任务。 目前, 代码总和的大多数最先进的方法都是神经网络解决方案, 类似于后代、 图2Seq 和其他编码解码结构。 对编码器的输入是源代码, 而解码器有助于预测自然语言摘要。 虽然这些模型在结构上往往相似, 但正在出现不同模型对预测质量做出不同贡献的证据 -- -- 模型性能差异是或纵向的,而且对整个数据集来说是互补的,而不是统一的。 在本文件中,我们探索不同神经代码总和图解的神经网络解决方案的或多变性质, 并提出利用这种或多变的模型来提高总体性能。 我们证明简单的编码战略可以将性能提升到14.8%, 并且为这种推力提供了解释。 从模型到神经化中, 多数质量技术的改进是相对小的。 从这个预测过程到微的改进过程。