A Convolutional Attention Network for Extreme Summarization of Source Code

被引:0
|
作者
Allamanis, Miltiadis [1 ]
Peng, Hao [2 ]
Sutton, Charles [3 ]
机构
[1] Univ Edinburgh, Sch Informat, Edinburgh EH8 9AB, Midlothian, Scotland
[2] Peking Univ, Sch Elect Engn & Comp Sci, Beijing 100871, Peoples R China
[3] Univ Edinburgh, Sch Informat, Edinburgh EH8 9AB, Midlothian, Scotland
基金
英国工程与自然科学研究理事会;
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
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.
引用
收藏
页数:10
相关论文
共 50 条
  • [1] A Convolutional Neural Network for Language-Agnostic Source Code Summarization
    Moore, Jessica
    Ben Gelman
    Slater, David
    [J]. PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING (ENASE), 2019, : 15 - 26
  • [2] Pyramid Attention For Source Code Summarization
    Chai, Lei
    Li, Ming
    [J]. ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 35 (NEURIPS 2022), 2022,
  • [3] Video summarization with a graph convolutional attention network
    Li, Ping
    Tang, Chao
    Xu, Xianghua
    [J]. FRONTIERS OF INFORMATION TECHNOLOGY & ELECTRONIC ENGINEERING, 2021, 22 (06) : 902 - 913
  • [4] Automatic source code summarization with graph attention networks
    Zhou, Yu
    Shen, Juanjuan
    Zhang, Xiaoqing
    Yang, Wenhua
    Han, Tingting
    Chen, Taolue
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2022, 188
  • [5] Convolutional Hierarchical Attention Network for Query-Focused Video Summarization
    Xiao, Shuwen
    Zhao, Zhou
    Zhang, Zijian
    Yan, Xiaohui
    Yang, Min
    [J]. THIRTY-FOURTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, THE THIRTY-SECOND INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE CONFERENCE AND THE TENTH AAAI SYMPOSIUM ON EDUCATIONAL ADVANCES IN ARTIFICIAL INTELLIGENCE, 2020, 34 : 12426 - 12433
  • [6] Source Code Summarization Using Attention-based Keyword Memory Networks
    Choi, YunSeok
    Kim, Suah
    Lee, Jee-Hyong
    [J]. 2020 IEEE INTERNATIONAL CONFERENCE ON BIG DATA AND SMART COMPUTING (BIGCOMP 2020), 2020, : 564 - 570
  • [7] Reinforcement-Learning-Guided Source Code Summarization Using Hierarchical Attention
    Wang, Wenhua
    Zhang, Yuqun
    Sui, Yulei
    Wan, Yao
    Zhao, Zhou
    Wu, Jian
    Yu, Philip S.
    Xu, Guandong
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2022, 48 (01) : 102 - 119
  • [8] Autofolding for Source Code Summarization
    Fowkes, Jaroslav
    Chanthirasegaran, Pankajan
    Ranca, Razvan
    Allamanis, Miltiadis
    Lapata, Mirella
    Sutton, Charles
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2017, 43 (12) : 1095 - 1109
  • [9] Transformer-XL With Graph Neural Network for Source Code Summarization
    Zhang, Xiaoling
    Yang, Shouguo
    Duan, Luqian
    Lang, Zhe
    Shi, Zhiqiang
    Sun, Limin
    [J]. 2021 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN, AND CYBERNETICS (SMC), 2021, : 3436 - 3441
  • [10] Towards Modeling Human Attention from Eye Movements for Neural Source Code Summarization
    Bansal, Aakash
    Sharif, Bonita
    McMillan, Collin
    [J]. Proceedings of the ACM on Human-Computer Interaction, 2023, 7 (ETRA):