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 条
  • [31] A Survey of Automatic Source Code Summarization
    Zhang, Chunyan
    Wang, Junchao
    Zhou, Qinglei
    Xu, Ting
    Tang, Ke
    Gui, Hairen
    Liu, Fudong
    SYMMETRY-BASEL, 2022, 14 (03):
  • [32] Text to Code: Pseudo Code Generation
    Din, Altaf U.
    Adnan, Awais
    CONTEXT-AWARE SYSTEMS AND APPLICATIONS, AND NATURE OF COMPUTATION AND COMMUNICATION, 2019, 298 : 20 - 37
  • [33] Process interference and code overlap in dual-task performance
    Koch, I
    Prinz, W
    JOURNAL OF EXPERIMENTAL PSYCHOLOGY-HUMAN PERCEPTION AND PERFORMANCE, 2002, 28 (01) : 192 - 201
  • [34] Code-Centric Code Generation
    Busch, Daniel
    Smyth, Steven
    Tegeler, Tim
    Steffen, Bernhard
    LEVERAGING APPLICATIONS OF FORMAL METHODS, VERIFICATION AND VALIDATION: REOCAS COLLOQUIUM IN HONOR OF ROCCO DE NICOLA, PT I, ISOLA 2024, 2025, 15219 : 340 - 355
  • [35] CogCol: Code Graph-Based Contrastive Learning Model for Code Summarization
    Shi, Yucen
    Yin, Ying
    Yu, Mingqian
    Chu, Liangyu
    ELECTRONICS, 2024, 13 (10)
  • [36] Leveraging meta-data of code for adapting prompt tuning for code summarization
    Jiang, Zhihua
    Wang, Di
    Rao, Dongning
    APPLIED INTELLIGENCE, 2025, 55 (02)
  • [37] Esale: Enhancing Code-Summary Alignment Learning for Source Code Summarization
    Fang, Chunrong
    Sun, Weisong
    Chen, Yuchen
    Chen, Xiao
    Wei, Zhao
    Zhang, Quanjun
    You, Yudu
    Luo, Bin
    Liu, Yang
    Chen, Zhenyu
    IEEE Transactions on Software Engineering, 2024, 50 (08) : 2077 - 2095
  • [38] Robot control code generation by task demonstration in a dynamic environment
    Gardiner, B.
    Coleman, S. A.
    McGinnity, T. M.
    He, H.
    ROBOTICS AND AUTONOMOUS SYSTEMS, 2012, 60 (12) : 1508 - 1519
  • [39] Code generation
    Firth, Niall
    NEW SCIENTIST, 2014, 223 (2985) : 38 - 41
  • [40] Exploiting Method Names to Improve Code Summarization: A Deliberation Multi-Task Learning Approach
    Xie, Rui
    Ye, Wei
    Sun, Jinan
    Zhang, Shikun
    2021 IEEE/ACM 29TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2021), 2021, : 138 - 148