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 条
  • [1] Leveraging Code Generation to Improve Code Retrieval and Summarization via Dual Learning
    Ye, Wei
    Xie, Rui
    Zhang, Jinglei
    Hu, Tianxiang
    Wang, Xiaoyin
    Zhang, Shikun
    [J]. WEB CONFERENCE 2020: PROCEEDINGS OF THE WORLD WIDE WEB CONFERENCE (WWW 2020), 2020, : 2309 - 2319
  • [2] Retrieval Augmented Code Generation and Summarization
    Parvez, Md Rizwan
    Ahmad, Wasi Uddin
    Chakraborty, Saikat
    Ray, Baishakhi
    Chang, Kai-Wei
    [J]. FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, EMNLP 2021, 2021, : 2719 - 2734
  • [3] Retrieval augmented code generation and summarization
    University of California, Los Angeles, United States
    不详
    [J]. arXiv,
  • [4] A Semantic and Structural Transformer for Code Summarization Generation
    Ji, Ruyi
    Tong, Zhenyu
    Luo, Tiejian
    Liu, Jing
    Zhang, Libo
    [J]. 2023 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS, IJCNN, 2023,
  • [5] 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
  • [6] Neural Comment Generation for Source Code with Auxiliary Code Classification Task
    Chen, Minghao
    Wan, Xiaojun
    [J]. 2019 26TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC), 2019, : 522 - 529
  • [7] Advances in Code Summarization
    Desai, Utkarsh
    Sridhara, Giriprasad
    Tamilselvam, Srikanth
    [J]. 2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2021), 2021, : 330 - 331
  • [8] Interpretable Code Summarization
    Kamal, Md Sarwar
    Nimmy, Sonia Farhana
    Dey, Nilanjan
    [J]. IEEE TRANSACTIONS ON RELIABILITY, 2024,
  • [9] Learning a holistic and comprehensive code representation for code summarization
    Yang, Kaiyuan
    Wang, Junfeng
    Song, Zihua
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2023, 203
  • [10] On the Evaluation of Neural Code Summarization
    Shi, Ensheng
    Wang, Yanlin
    Du, Lun
    Chen, Junjie
    Han, Shi
    Zhang, Hongyu
    Zhang, Dongmei
    Sun, Hongbin
    [J]. 2022 ACM/IEEE 44TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2022), 2022, : 1597 - 1608