arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1602.03001cs.LGcs.CLcs.SE
收藏

基于卷积注意力网络的Source Code极端摘要算法

A Convolutional Attention Network for Extreme Summarization of Source Code

University of Edinburgh(爱丁堡大学);Peking University(北京大学)

Miltiadis Allamanis, Hao Peng, Charles Sutton

摘要:

神经网络中的注意力机制已被证明对于输入和输出不具有固定维数的问题是有用的。通常存在局部平移不变的特征,并且对于引导模型的注意力是有价值的,但是以前的注意力架构并不是专门为了学习这些特征而构建的。我们引入了一个注意力神经网络,它采用卷积的输入令牌检测本地时不变和长距离的主题注意力特征的上下文相关的方式。我们将这种架构应用于将源代码片段极端总结成简短的、描述性的函数名称之类的摘要的问题。使用这些功能,该模型通过边缘化两个注意力机制来顺序生成摘要:一个基于输入标记的注意力权重预测下一个摘要标记,另一个能够将代码标记直接复制到摘要中。我们在10个流行的Java项目上展示了我们的卷积注意力神经网络的性能,表明与以前的注意力机制相比,它实现了更好的性能。

英文摘要:

Attention mechanisms in neural networks have proved useful for problems in which the input and output do not have fixed dimension. Often there exist features that are locally translation invariant and would be valuable for directing the model's attention, but previous attentional architectures are not constructed to learn such features specifically. We introduce an attentional neural network that employs convolution on the input tokens to detect local time-invariant and long-range topical attention features in a context-dependent way. We apply this architecture to the problem of extreme summarization of source code snippets into short, descriptive function name-like summaries. Using those features, the model sequentially generates a summary by marginalizing over two attention mechanisms: one that predicts the next summary token based on the attention weights of the input tokens and another that is able to copy a code token as-is directly into the summary. We demonstrate our convolutional attention neural network's performance on 10 popular Java projects showing that it achieves better performance compared to previous attentional mechanisms.

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

↑