论文标题
DeepSumm-使用神经变压器体系结构的深层代码摘要
DeepSumm -- Deep Code Summaries using Neural Transformer Architecture
论文作者
论文摘要
源代码汇总是在运行时间内编写简短的自然语言描述的任务。这样的摘要对于软件开发和维护非常有用,但对于手动作者来说是昂贵的,因此,它是针对生产并经常被忽略的代码的一小部分完成的。自动代码文档可能以低成本解决此问题。因此,这是一个新兴的研究领域,具有进一步的程序理解和软件维护。传统方法通常依赖于以模板和启发式形式构建的认知模型,并且开发人员社区的采用程度不同。但是,随着最近的进步,基于神经技术的端到端数据驱动的方法在很大程度上取消了传统技术。当前的许多景观都采用基于神经翻译的架构,并重复进行和关注,这是资源和时间密集型培训程序。在本文中,我们采用神经技术来解决源代码汇总的任务,并专门将基于NMT的技术与Java方法和评论数据集中的更简化和吸引人的变压器体系结构进行比较。我们提出一个论点,以消除培训程序中的重复需要。据我们所知,基于变压器的模型以前尚未用于任务。有了超过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.