arrow
返回

Esale: Enhancing Code-Summary Alignment Learning for Source Code Summarization

Esale: 用于源代码摘要的增强代码摘要对齐学习

delete2024-08-01
delete2
PRE
AI
房
房春荣 (Chunrong Fang)
W
Weisong Sun *
Y
Yuchen Chen
X
Xiao Chen
Z
Zhao Wei
Q
Quanjun Zhang
Y
Yudu You
B
Bin Luo
刘洋 封面图
刘洋 (Yang Liu)
陈
陈振宇 (Zhenyu Chen)
DOI:10.1109/TSE.2024.3422274delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
(Source) code summarization aims to automatically generate succinct natural language summaries for given code snippets. Such summaries play a significant role in promoting developers to understand and maintain code. Inspired by neural machine translation, deep learning-based code summarization techniques widely adopt an encoder-decoder framework, where the encoder transforms given code snippets into context vectors, and the decoder decodes context vectors into summaries. Recently, large-scale pre-trained models for source code (e.g., CodeBERT and UniXcoder) are equipped with encoders capable of producing general context vectors and have achieved substantial improvements on the code summarization task. However, although they are usually trained mainly on code-focused tasks and can capture general code features, they still fall short in capturing specific features that need to be summarized. In a nutshell, they fail to learn the alignment between code snippets and summaries (code-summary alignment for short). In this paper, we propose a novel approach to improve code summarization based on summary-focused tasks. Specifically, we exploit a multi-task learning paradigm to train the encoder on three summary-focused tasks to enhance its ability to learn code-summary alignment, including unidirectional language modeling (ULM), masked language modeling (MLM), and action word prediction (AWP). Unlike pre-trained models that mainly predict masked tokens in code snippets, we design ULM and MLM to predict masked words in summaries. Intuitively, predicting words based on given code snippets would help learn the code-summary alignment. In addition, existing work shows that AWP affects the prediction of the entire summary. Therefore, we further introduce the domain-specific task AWP to enhance the ability of the encoder to learn the alignment between action words and code snippets. We evaluate the effectiveness of our approach, called Esale, by conducting extensive experiments on four datasets, including two widely used datasets JCSD and PCSD, a cross-project Java dataset CPJD, and a multilingual language dataset CodeSearchNet. Experimental results show that Esale significantly outperforms state-of-the-art baselines in all three widely used metrics, including BLEU, METEOR, and ROUGE-L. Moreover, the human evaluation proves that the summaries generated by Esale are more informative and closer to the ground-truth summaries.
Keyword:
Source code summarization
deep learning
multi-task learning
Source code summarization
deep learning
multi-task learning
Enhancing code summarization with action word prediction用动作词预测增强代码摘要
err2024-01-01
err5
PREAI
errLi, Mingchen; Yu, Huiqun; Fan, Guisheng; Zhou, Ziyi; Huang, Zijie
err分享
err收藏
Learning to Generate Structured Code Summaries From Hybrid Code Context
err2024-10-01
err0
PREAI
errZhou, Ziyi; Li, Mingchen; Yu, Huiqun; Fan, Guisheng; Yang, Penghui; Huang, Zijie
err分享
err收藏
err分享
err收藏
Summarizing source code with hierarchical code representation用分层代码表示总结源代码
err2022-03-01
err14
PREAI
errZhou, Ziyi; Yu, Huiqun; Fan, Guisheng; Huang, Zijie; Yang, Xingguang
err分享
err收藏
Towards Retrieval-Based Neural Code Summarization: A Meta-Learning Approach
err2023-04-01
err6
PREAI
errZhou, Ziyi; Yu, Huiqun; Fan, Guisheng; Huang, Zijie; Yang, Kang
err分享
err收藏
err分享
err收藏
Reinforcement-Learning-Guided Source Code Summarization Using Hierarchical Attention
err2022-01-01
err61
errOAAI
errWang, Wenhua; Zhang, Yuqun; Sui, Yulei; Wan, Yao; Zhao, Zhou; Wu, Jian; Yu, Philip S.; Xu, Guandong
err分享
err收藏

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
3.0K
被引数:
1.3W

机构

南
南洋理工大学
学者数:
4.5K
论文数: 2.1K
被引数: 5.3W
T
Tencent
学者数:
197
论文数: 105
被引数: 1.4K
南京大学 封面图
南京大学
学者数:
6.8K
论文数: 1.9K
被引数: 4.4W
学者 查看更多机构
引用论文

引用论文

Clinical outcome of Taiwanese men with clinically localized prostate cancer post-radical prostatectomy: a comparison with other ethnic groups
err2009-11-03
err0
PREAI
errShu-pin Huang; Chao-Yuan Huang; Chia-Chu Liu; Chia-Cheng Yu; Yeong-Shiau Pu; Shih-Chieh Chueh; Hong-Jeng Yu; Tony T. Wu; Ching-Chia Li; Chun-Hsiung Huang; Wen-Jeng Wu
err分享
err收藏
err
IF0
err
err0
errOAAI
err
err分享
err收藏
err分享
err收藏
Study on Oxygen Control of Large Diameter N-type Monocrystalline Silicon with Large Thermal Field
err2023-10-19
err0
PREAI
errYang Yang; Huimin Li; Zechen Hu; Jinwei Guo; Xiangyu Li; Peidong Liu; Xuegong Yu
err分享
err收藏
Innovative pulmonary preservation of non-heart-beating donor grafts in experimental lung transplantation1
err2004-07-01
err0
errOAAI
errT WITTWER; U FRANKE; A FEHRENBACH; M OCHS; T SANDHAUS; N DREYER; J RICHTER; T WAHLERS
err分享
err收藏
Ninety-six suspected transfusion related acute lung injury cases: Investigation findings and clinical outcome
err2013-09-04
err0
errOAAI
errNay Win; Edwin Massey; Geoff Lucas; Deborah Sage; Colin Brown; Ann Green; Marcela Contreras; Cristina Navarrete
err分享
err收藏
Homeobox Gene Involvement in Normal Hematopoiesis and in the Pathogenesis of Childhood Leukemias
err2017-01-01
err0
PREAI
errMaria Adamaki; Maria Goulielmaki; Ioannis Christodoulou; Spiros Vlahopoulos; Vassilis Zoumpourlis
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
学者 查看更多内容