MGF-ESE: An Enhanced Semantic Extractor with Multi-Granularity Feature Fusion for Code Summarization

自动汇总 计算机科学 粒度 提取器 编码(集合论) 特征(语言学) 程序设计语言 自然语言处理 情报检索 人工智能 工程类 语言学 集合(抽象数据类型) 哲学 工艺工程
作者
Xiaolong Xu,Yuxin Cao,Hongsheng Hu,Haolong Xiang,Lianyong Qi,Junqun Xiong,Wanchun Dou
标识
DOI:10.1145/3696410.3714544
摘要

Code summarization aims to generate concise natural language descriptions of source code, helping developers to acquaint with software systems and reduce maintenance costs. Existing code summarization approaches widely employ attention mechanisms to assess the relevance between nodes in the Abstract Syntax Tree (AST), which generates context vectors that reflect the semantics of the source code. However, these approaches solely relying on AST lack the extraction of features at other levels of granularity, such as code tokens and Control Flow Graph (CFG), which suffer from severe semantic gaps when capturing data and control dependencies. To address this issue, we design an enhanced semantic extractor with multi-granularity feature fusion (MGF-ESE) to improve the model capability in comprehending and processing the overall semantics of the code. Specifically, we present a novel AST generation method that, based on controlling the scale of nodes, introduces syntactic description nodes to raise the semantic density of AST feature. Then we perform both local and global encoding of CFG after embedding the statement nodes. Moreover, through a cross-attention mechanism, we fuse code tokens and CFG with AST to enhance the model's capacity to capture both syntactic and structural information from source code. Finally, extensive experiments on two open-source datasets show that MGF-ESE outperforms the state-of-the-arts with higher-quality code summaries on key metrics, including BLEU, METEOR, and ROUGE-L.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
顾矜应助code_Z采纳,获得10
1秒前
2秒前
冯俊杰发布了新的文献求助10
3秒前
领导范儿应助cong采纳,获得10
3秒前
眯眯眼的黎昕完成签到 ,获得积分10
4秒前
愉快小凝完成签到,获得积分10
4秒前
科研通AI6.2应助左右脑采纳,获得10
4秒前
5秒前
6秒前
SciGPT应助ziiiiiii7采纳,获得10
6秒前
Ava应助hh采纳,获得10
8秒前
zzz发布了新的文献求助10
8秒前
9秒前
魔幻的惜灵完成签到 ,获得积分10
9秒前
9秒前
9秒前
9秒前
FashionBoy应助科研通管家采纳,获得10
10秒前
SunGuangkai发布了新的文献求助10
10秒前
10秒前
顾矜应助科研通管家采纳,获得10
10秒前
10秒前
乐乐应助科研通管家采纳,获得10
10秒前
10秒前
11秒前
11秒前
11秒前
桐桐应助科研通管家采纳,获得10
11秒前
NexusExplorer应助隐形便当采纳,获得10
11秒前
Lucas应助科研通管家采纳,获得10
11秒前
JamesPei应助科研通管家采纳,获得10
12秒前
桐桐应助科研通管家采纳,获得10
12秒前
传奇3应助科研通管家采纳,获得10
12秒前
李健的小迷弟应助lin采纳,获得10
13秒前
小蘑菇应助冯俊杰采纳,获得10
13秒前
卓奕雯完成签到 ,获得积分10
13秒前
淡定小懒猪完成签到,获得积分10
14秒前
西西弗完成签到 ,获得积分10
14秒前
15秒前
水凤A发布了新的文献求助10
16秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
HYDROLYSE ACIDE DE QUELQUES DIOXASPIROCYCLANES 1314
Essentials of Carbohydrate Chemistry and Biochemistry, 4th Edition 800
Navigating Normative Orders. Interdisciplinary Perspectives 800
1 Peter and Christ's Descent to the Dead in Its Early Christian Reception 700
Organizational Behavior 510
Management and the Arts 510
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7747863
求助须知:如何正确求助?哪些是违规求助? 9296136
关于积分的说明 20233622
捐赠科研通 7329210
什么是DOI,文献DOI怎么找? 3308722
关于科研通互助平台的介绍 2460470
邀请新用户注册赠送积分活动 2320668