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
    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
    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
    不详
    arXiv,
  • [4] A Semantic and Structural Transformer for Code Summarization Generation
    Ji, Ruyi
    Tong, Zhenyu
    Luo, Tiejian
    Liu, Jing
    Zhang, Libo
    2023 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS, IJCNN, 2023,
  • [5] Chain-of-Descriptions: Improving Code LLMs for VHDL Code Generation and Summarization
    Vijayaraghavan, Prashanth
    Nitsure, Apoorva
    Mackin, Charles
    Shi, Luyao
    Ambrogio, Stefano
    Haran, Arvind
    Paruthi, Viresh
    Elzein, Ali
    Coops, Dan
    Beymer, David
    Baldwin, Tyler
    Degan, Ehsan
    PROCEEDINGS OF THE 2024 ACM/IEEE INTERNATIONAL SYMPOSIUM ON MACHINE LEARNING FOR CAD, MLCAD 2024, 2024,
  • [6] Automatic Documentation Generation via Source Code Summarization
    McBurney, Paul W.
    2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 2, 2015, : 903 - 906
  • [7] CORES: COde REpresentation Summarization for Code Search
    Zhang, Xu
    Hu, Xiaoyu
    Zhou, Deyu
    IEEE TRANSACTIONS ON CONSUMER ELECTRONICS, 2024, 70 (03) : 6095 - 6104
  • [8] Neural Comment Generation for Source Code with Auxiliary Code Classification Task
    Chen, Minghao
    Wan, Xiaojun
    2019 26TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC), 2019, : 522 - 529
  • [9] Advances in Code Summarization
    Desai, Utkarsh
    Sridhara, Giriprasad
    Tamilselvam, Srikanth
    2021 IEEE/ACM 43RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2021), 2021, : 330 - 331
  • [10] Interpretable Code Summarization
    Kamal, Md Sarwar
    Nimmy, Sonia Farhana
    Dey, Nilanjan
    IEEE TRANSACTIONS ON RELIABILITY, 2024, : 1 - 10