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 条
  • [41] Code Generation from Supervised Code Embeddings
    Hu, Han
    Chen, Qiuyuan
    Liu, Zhaoyi
    NEURAL INFORMATION PROCESSING (ICONIP 2019), PT IV, 2019, 1142 : 388 - 396
  • [42] Who Wrote this Code? Watermarking for Code Generation
    Lee, Taehyun
    Hong, Seokhee
    Ahn, Jaewoo
    Hong, Ilgee
    Lee, Hwaran
    Yun, Sangdoo
    Shin, Jamin
    Kim, Gunhee
    PROCEEDINGS OF THE 62ND ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, VOL 1: LONG PAPERS, 2024, : 4890 - 4911
  • [43] Test-Driven Multi-Task Learning with Functionally Equivalent Code Transformation for Neural Code Generation
    Wang, Xin
    Liu, Xiao
    Zhou, Pingyi
    Liu, Qixia
    Liu, Jin
    Wu, Hao
    Cui, Xiaohui
    PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
  • [44] Code Summarization with Structure-induced Transformer
    Wu, Hongqiu
    Zhao, Hai
    Zhang, Min
    FINDINGS OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, ACL-IJCNLP 2021, 2021, : 1078 - 1090
  • [45] Code Summarization with Project-Specific Features
    Wang, Yu
    Liu, Xin
    Lu, Xuesong
    Zhou, Aoying
    MACHINE LEARNING AND KNOWLEDGE DISCOVERY IN DATABASES-APPLIED DATA SCIENCE TRACK, PT IX, ECML PKDD 2024, 2024, 14949 : 190 - 206
  • [46] Contextual Information Enhanced Source Code Summarization
    Hu T.-X.
    Xie R.
    Ye W.
    Zhang S.-K.
    Ruan Jian Xue Bao/Journal of Software, 2023, 34 (04): : 1695 - 1710
  • [47] Keyword-Based Source Code Summarization
    Zhang S.
    Xie R.
    Ye W.
    Hen L.
    Jisuanji Yanjiu yu Fazhan/Computer Research and Development, 2020, 57 (09): : 1987 - 2000
  • [48] A Code Summarization Approach for Object Oriented Programs
    Mohsin, Ali Hameed
    Hammad, Mustafa
    2019 INTERNATIONAL CONFERENCE ON INNOVATION AND INTELLIGENCE FOR INFORMATICS, COMPUTING, AND TECHNOLOGIES (3ICT), 2019,
  • [49] Enhancing code summarization with action word prediction
    Li, Mingchen
    Yu, Huiqun
    Fan, Guisheng
    Zhou, Ziyi
    Huang, Zijie
    Neurocomputing, 2024, 563
  • [50] CoSS: Leveraging Statement Semantics for Code Summarization
    Shi, Chaochen
    Cai, Borui
    Zhao, Yao
    Gao, Longxiang
    Sood, Keshav
    Xiang, Yong
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (06) : 3472 - 3486