arrow
返回

Enhancing code summarization with action word prediction

delete2024-01-01
delete5
PRE
AI
M
Mingchen Li
余
余慧群 (Huiqun Yu) *
G
Guisheng Fan
Z
Ziyi Zhou
Z
Zijie Huang
DOI:10.1016/j.neucom.2023.126777delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Code summarization refers to automatically generating concise description in natural language from a code snippet. Good code summaries could effectively facilitate program comprehension and software maintenance. In recent years, various learning-based code summarization techniques have achieved impressive performance. Most of these models treat code summarization as an end-to-end model and directly generate the summaries, which ignores the fact that action words are crucial to code summaries. An essential characteristic of code summaries is the concentration of action word distribution. For instance, in the Funcom dataset, the top forty most-common action words account for 72% of all samples. To incorporate this valuable prior domain knowledge into code summarization models, we develop a method for assisting code summarization through an additional action word prediction module, where an action predictor is employed to predict the primary action in the code summary, which is then used as a prompt to enhance the performance of the summary generation model. Our approach can be conveniently integrated into the existing models. We evaluate our approach on two Java datasets and a C/C++ dataset. The results show that our approach can efficiently improve the performance of the code summarization models. Furthermore, our action word prediction module can enhance the performance of a large pre-trained language model by prompting it with the predicted action words. This work suggests that a precise action word prediction model can significantly improve the performance of code summarization through the proposed action word guidance mechanism.
Keyword:
Code summarization
Action word prediction
Multi-task learning
Deep learning

期刊

Neurocomputing 封面图
Neurocomputing
IF:
6.5
论文数:
2.5W
被引数:
6.5W

机构

暂无机构信息
引用论文

引用论文

err分享
err收藏
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
err2018-10-01
err195
errOAAI
errXia, Xin; Bao, Lingfeng; Lo, David; Xing, Zhenchang; Hassan, Ahmed E.; Li, Shanping
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收藏
学者 查看更多内容