arrow
返回

Code Structure-Guided Transformer for Source Code Summarization

delete2023-02-13
delete33
delete
OA
AI
G
Gao, Shuzheng
C
Cuiyun Gao *
Y
Yulan He
J
Jichuan Zeng
L
Lunyiu Nie
X
Xin Xia
M
Michael R. Lyu
DOI:10.1145/3522674delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
Code summaries help developers comprehend programs and reduce their time to infer the program functionalities during software maintenance. Recent efforts resort to deep learning techniques such as sequenceto-sequence models for generating accurate code summaries, among which Transformer-based approaches have achieved promising performance. However, effectively integrating the code structure information into the Transformer is under-explored in this task domain. In this article, we propose a novel approach named SG-Trans to incorporate code structural properties into Transformer. Specifically, we inject the local symbolic information (e.g., code tokens and statements) and global syntactic structure (e.g., dataflow graph) into the self-attention module of Transformer as inductive bias. To further capture the hierarchical characteristics of code, the local information and global structure are designed to distribute in the attention heads of lower layers and high layers of Transformer. Extensive evaluation shows the superior performance of SG-Trans over the state-of-the-art approaches. Compared with the best-performing baseline, SG-Trans still improves 1.4% and 2.0% on two benchmark datasets, respectively, in terms of METEOR score, a metric widely used for measuring generation quality.
Keyword:
Code summary
Transformer
multi-head attention
code structure
An data augmentation method for source code summarization
err2023-09-01
err2
PREAI
errSong, Zixuan; Zeng, Hui; Shang, Xiuwei; Li, Guanxi; Li, Hui; Guo, Shikai
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收藏
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收藏
An Eye-Tracking Study of Java Programmers and Application to Source Code Summarization
err2015-11-01
err47
PREAI
errRodeghero, Paige; Liu, Cheng; McBurney, Paul W.; McMillan, Collin
err分享
err收藏
READSUM: Retrieval-Augmented Adaptive Transformer for Source Code Summarization
err2023-01-01
err4
errOAAI
errChoi, Yunseok; Na, Cheolwon; Kim, Hyojun; Lee, Jee-Hyong
err分享
err收藏
Esale: Enhancing Code-Summary Alignment Learning for Source Code SummarizationEsale: 用于源代码摘要的增强代码摘要对齐学习
err2024-08-01
err2
PREAI
errFang, Chunrong; Sun, Weisong; Chen, Yuchen; Chen, Xiao; Wei, Zhao; Zhang, Quanjun; You, Yudu; Luo, Bin; Liu, Yang; Chen, Zhenyu
err分享
err收藏
An Extractive-and-Abstractive Framework for Source Code Summarization用于源代码摘要的提取和抽象框架
err2024-03-14
err5
errOAAI
errSun, Weisong; Fang, Chunrong; Chen, Yuchen; Zhang, Quanjun; Tao, Guanhong; You, Yudu; Han, Tingxu; Ge, Yifei; Hu, Yuling; Luo, Bin; Chen, Zhenyu
err分享
err收藏
FMCF: A fusing multiple code features approach based on Transformer for Solidity smart contracts source code summarization
err2024-11-01
err0
PREAI
errLei, Gang; Zhang, Donghua; Xiao, Jianmao; Fan, Guodong; Cao, Yuanlong; Feng, Zhiyong
err分享
err收藏

期刊

A
ACM Transactions on Software Engineering and Methodology
IF:
6.2
论文数:
1.4K
被引数:
4.5K

机构

H
huawei technologies
学者数:
104
论文数: 62
被引数: 3.2K
U
university of warwick
学者数:
1.4K
论文数: 616
被引数: 1.7W
哈尔滨工业大学 封面图
哈尔滨工业大学
学者数:
1.1W
论文数: 3.1K
被引数: 5.7W
清华大学 封面图
清华大学
学者数:
1.2W
论文数: 4.2K
被引数: 9.9W
香
香港中文大學
学者数:
110
论文数: 48
被引数: 2.6W
学者 查看更多机构
引用论文

引用论文

Usage and usefulness of technical software documentation: An industrial case study
err2015-01-01
err45
PREAI
errGarousi, Golara; Garousi-Yusifoglu, Vahid; Ruhe, Guenther; Zhi, Junji; Moussavi, Mahmoud; Smith, Brian
err分享
err收藏
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收藏
err分享
err收藏
CRaDLe: Deep code retrieval based on semantic Dependency LearningCRaDLe: 基于语义依赖学习的深度代码检索
err2021-09-01
err34
errOAAI
errGu, Wenchao; Li, Zongjie; Gao, Cuiyun; Wang, Chaozheng; Zhang, Hongyu; Xu, Zenglin; Lyu, Michael R.
err分享
err收藏
The Modern Rhytidectomy
err1992-04-01
err0
PREAI
errIvan M. Turpin
err分享
err收藏
没有更多内容