Pith. sign in

Code Structure Guided Transformer for Source Code Summarization

1 Pith paper cite this work. Polarity classification is still indexing.

1 Pith paper citing it
abstract

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 sequence-to-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 paper, 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., data flow 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% in terms of METEOR score, a metric widely used for measuring generation quality, respectively on two benchmark datasets.

citation-role summary

background 1

citation-polarity summary

fields

cs.SE 1

years

2024 1

verdicts

REJECT 1

roles

background 1

polarities

unclear 1

representative citing papers

Analysis on LLMs Performance for Code Summarization

cs.SE · 2024-12-22 · reject · novelty 4.0

A comparative benchmark of four open-source LLMs for code summarization finds Mistral and Phi-3 leading, but the reported score tables contain implausible identical values.

citing papers explorer

Showing 1 of 1 citing paper.

  • Analysis on LLMs Performance for Code Summarization cs.SE · 2024-12-22 · reject · none · ref 10 · internal anchor

    A comparative benchmark of four open-source LLMs for code summarization finds Mistral and Phi-3 leading, but the reported score tables contain implausible identical values.