Treffer: GNPSum: A code summarization enhancement framework based on Graph Node Position.

Title:
GNPSum: A code summarization enhancement framework based on Graph Node Position.
Authors:
Cheng, Haogang1,2 (AUTHOR) chg@cqu.edu.cn, Xu, Ling1,2 (AUTHOR) xuling@cqu.edu.cn, Huangfu, Luwen3 (AUTHOR) lhuangfu@sdsu.edu, Liu, Chao1,2 (AUTHOR) liu.chao@cqu.edu.cn, Yan, Meng1,2 (AUTHOR) mengy@cqu.edu.cn, Lei, Yan1,2 (AUTHOR) yanlei@cqu.edu.cn
Source:
Information & Software Technology. Nov2025, Vol. 187, pN.PAG-N.PAG. 1p.
Database:
Business Source Premier

Weitere Informationen

Code summarization is essential for effectively communicating a code's core functionality and logic, enhancing software development efficiency, collaboration, and code quality. Traditional work has focused on generating summaries from textual information extracted from the source code. However, these approaches often fail to capture the hierarchical structure critical for effective summarization. To effectively capture the hierarchical structure of the code, which is crucial for accurate summarization, researchers often integrate structural elements such as Syntax Trees (AST) into their models. However, conventional embedding methods struggle to accurately discern the semantic nuances within the code, particularly for nodes with similar content but distinct structural roles. The relative positional information of these nodes, which often conveys semantics absent from the source code itself, is frequently overlooked, limiting the model's ability to fully exploit the hierarchical and contextual richness inherent in the code structure. To overcome these limitations, we propose GNPSum, a code summarization enhancement framework based on the position of the graph node. GNPSum employs a structural combinatorial graph approach (SCG), which extends the AST edges with CFG and DFG to aggregate multimodal information. We introduce a novel positional embedding technique that leverages distances between nodes to reduce semantic ambiguity and guide effective summary generation. Evaluations on extensive Java and Python datasets demonstrate that GNPSum improves 3.30% and 1.82% in the BLEU score, compared to the highest performance baseline. Furthermore, our validation shows that GNPSum significantly enhances the structural comprehension for pre-trained models, resulting in a 1.93% performance boost over models fine-tuned without our framework. [ABSTRACT FROM AUTHOR]

Copyright of Information & Software Technology is the property of Elsevier B.V. and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.)