Code Generation as a Dual Task of Code Summarization

被引:0
|
作者
Wei, Bolin [1 ,2 ]
Li, Ge [1 ,2 ]
Xia, Xin [3 ]
Fu, Zhiyi [1 ,2 ]
Jin, Zhi [1 ,2 ]
机构
[1] Peking Univ, Minist Educ, Key Lab High Confidence Software Technol, Beijing, Peoples R China
[2] Peking Univ, Software Inst, Beijing, Peoples R China
[3] Monash Univ, Fac Informat Technol, Clayton, Vic, Australia
基金
中国国家自然科学基金;
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Code summarization (CS) and code generation (CG) are two crucial tasks in the field of automatic software development. Various neural network-based approaches are proposed to solve these two tasks separately. However, there exists a specific intuitive correlation between CS and CG, which has not been exploited in previous work. In this paper, we apply the relations between two tasks to improve the performance of both tasks. In other words, exploiting the duality between the two tasks, we propose a dual training framework to train the two tasks simultaneously. In this framework, we consider the dualities on probability and attention weights, and design corresponding regularization terms to constrain the duality. We evaluate our approach on two datasets collected from GitHub, and experimental results show that our dual framework can improve the performance of CS and CG tasks over baselines.
引用
收藏
页数:11
相关论文
共 50 条
  • [21] A Human Study of Comprehension and Code Summarization
    Stapleton, Sean
    Gambhir, Yashmeet
    LeClair, Alexander
    Eberhart, Zachary
    Weimer, Westley
    Leach, Kevin
    Huang, Yu
    2020 IEEE/ACM 28TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC, 2020, : 2 - 13
  • [22] A human study of comprehension and code summarization
    Stapleton, Sean
    Gambhir, Yashmeet
    LeClair, Alexander
    Eberhart, Zachary
    Weimer, Westley
    Leach, Kevin
    Huang, Yu
    IEEE International Conference on Program Comprehension, 2020, : 2 - 13
  • [23] Code Summarization with Abstract Syntax Tree
    Chen, Qiuyuan
    Hu, Han
    Liu, Zhaoyi
    NEURAL INFORMATION PROCESSING, ICONIP 2019, PT V, 2019, 1143 : 652 - 660
  • [24] Recommendations for Datasets for Source Code Summarization
    LeClair, Alex
    McMillan, Collin
    2019 CONFERENCE OF THE NORTH AMERICAN CHAPTER OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS: HUMAN LANGUAGE TECHNOLOGIES (NAACL HLT 2019), VOL. 1, 2019, : 3931 - 3937
  • [25] Pyramid Attention For Source Code Summarization
    Chai, Lei
    Li, Ming
    ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 35 (NEURIPS 2022), 2022,
  • [26] Impact of Evaluation Methodologies on Code Summarization
    Nie, Pengyu
    Zhang, Jiyang
    Li, Junyi Jessy
    Mooney, Raymond J.
    Gligoric, Milos
    PROCEEDINGS OF THE 60TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS (ACL 2022), VOL 1: (LONG PAPERS), 2022, : 4936 - 4960
  • [27] Leveraging Comment Retrieval for Code Summarization
    Hou, Shifu
    Chen, Lingwei
    Ju, Mingxuan
    Ye, Yanfang
    ADVANCES IN INFORMATION RETRIEVAL, ECIR 2023, PT II, 2023, 13981 : 439 - 447
  • [28] Interpretation-based Code Summarization
    Geng, Mingyang
    Wang, Shangwen
    Dong, Dezun
    Wang, Haotian
    Cao, Shaomeng
    Zhang, Kechi
    Jin, Zhi
    2023 IEEE/ACM 31ST INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC, 2023, : 113 - 124
  • [29] Distilled GPT for source code summarization
    Su, Chia-Yi
    McMillan, Collin
    AUTOMATED SOFTWARE ENGINEERING, 2024, 31 (01)
  • [30] Recommendations for Datasets for Source Code Summarization
    LeClair, Alex
    McMillan, Collin
    arXiv, 2019,