arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2004.00998cs.LGcs.CL
收藏

DeepSumm --使用神经Transformer架构的深度代码摘要

DeepSumm -- Deep Code Summaries using Neural Transformer Architecture

Vivek Gupta

摘要:

源代码摘要是编写源代码在运行时间期间的行为的简短、自然语言描述的任务。这样的摘要对于软件开发和维护非常有用,但是手动编写成本很高,因此它只针对生成的一小部分代码完成,并且经常被忽略。自动化的代码文档可能以较低的成本解决这个问题。因此,这是一个新兴的研究领域,进一步应用程序的理解,软件维护。传统的方法通常依赖于以模板形式构建的认知模型,这些模型由开发人员社区在不同程度上采用。但随着最近的进步,基于神经技术的端到端数据驱动方法已经在很大程度上超过了传统技术。目前的大部分景观采用基于神经翻译的架构,具有递归和注意力,这是资源和时间密集型的训练过程。在本文中,我们采用神经技术来解决源代码总结的任务,并具体比较基于NMT的技术,更简化和吸引人的Transformer架构上的Java方法和注释的数据集。我们提出了一个论点,以免除在培训过程中的需要递归。据我们所知,基于Transformer的模型以前没有用于该任务。通过超过210万条评论和代码的监督样本,我们将训练时间减少了50%以上,并在测试样本集上获得了17.99的BLEU分数。

英文摘要:

Source code summarizing is a task of writing short, natural language descriptions of source code behavior during run time. Such summaries are extremely useful for software development and maintenance but are expensive to manually author,hence it is done for small fraction of the code that is produced and is often ignored. Automatic code documentation can possibly solve this at a low cost. This is thus an emerging research field with further applications to program comprehension, and software maintenance. Traditional methods often relied on cognitive models that were built in the form of templates and by heuristics and had varying degree of adoption by the developer community. But with recent advancements, end to end data-driven approaches based on neural techniques have largely overtaken the traditional techniques. Much of the current landscape employs neural translation based architectures with recurrence and attention which is resource and time intensive training procedure. In this paper, we employ neural techniques to solve the task of source code summarizing and specifically compare NMT based techniques to more simplified and appealing Transformer architecture on a dataset of Java methods and comments. We bring forth an argument to dispense the need of recurrence in the training procedure. To the best of our knowledge, transformer based models have not been used for the task before. With supervised samples of more than 2.1m comments and code, we reduce the training time by more than 50% and achieve the BLEU score of 17.99 for the test set of examples.

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

↑