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 条
  • [41] Learning Sequential and Structural Information for Source Code Summarization
    Choi, YunSeok
    Bak, JinYeong
    Na, CheolWon
    Lee, Jee-Hyong
    [J]. FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, ACL-IJCNLP 2021, 2021, : 2842 - 2851
  • [42] Ensemble Models for Neural Source Code Summarization of Subroutines
    LeClair, Alexander
    Bansal, Aakash
    McMillan, Collin
    [J]. 2021 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2021), 2021, : 286 - 297
  • [43] Naturalness in Source Code Summarization. How Significant is it?
    Ferretti, Claudio
    Saletta, Martina
    [J]. 2023 IEEE/ACM 31ST INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC, 2023, : 125 - 134
  • [44] Automatic Documentation Generation via Source Code Summarization
    McBurney, Paul W.
    [J]. 2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 2, 2015, : 903 - 906
  • [45] Action Word Prediction for Neural Source Code Summarization
    Haque, Sakib
    Bansal, Aakash
    Wu, Lingfei
    McMillan, Collin
    [J]. 2021 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER 2021), 2021, : 330 - 341
  • [46] Ensemble models for neural source code summarization of subroutines
    LeClair, Alexander
    Bansal, Aakash
    McMillan, Collin
    [J]. arXiv, 2021,
  • [47] Label Smoothing Improves Neural Source Code Summarization
    Haque, Sakib
    Bansal, Aakash
    McMillan, Collin
    [J]. 2023 IEEE/ACM 31ST INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC, 2023, : 101 - 112
  • [48] Action word prediction for neural source code summarization
    Haque, Sakib
    Bansal, Aakash
    Wu, Lingfei
    McMillan, Collin
    [J]. arXiv, 2021,
  • [49] Semantic Similarity Metrics for Evaluating Source Code Summarization
    Haque, Sakib
    Eberhart, Zachary
    Bansal, Aakash
    McMillan, Collin
    [J]. 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2022), 2022, : 36 - 47
  • [50] Semantic Similarity Metrics for Evaluating Source Code Summarization
    Haque, Sakib
    Eberhart, Zachary
    Bansal, Aakash
    McMillan, Collin
    [J]. IEEE International Conference on Program Comprehension, 2022, 2022-March : 36 - 47