mlsanityData to 7 Oct 2026

GN-Transformer: Fusing Sequence and Graph Representation for Improved Code Summarization

arXiv 2111.08874 ↗First posted 17 Nov 2021cs.LG cs.PLcited by 3

Not on the map. Why?

Abstract (arXiv)

As opposed to natural languages, source code understanding is influenced by grammatical relationships between tokens regardless of their identifier name. Graph representations of source code such as Abstract Syntax Tree (AST) can capture relationships between tokens that are not obvious from the source code. We propose a novel method, GN-Transformer to learn end-to-end on a fused sequence and graph modality we call Syntax-Code-Graph (SCG). GN-Transformer expands on Graph Networks (GN) framework using a self-attention mechanism. SCG is the result of the early fusion between a source code snippet and the AST representation. We perform experiments on the structure of SCG, an ablation study on the model design, and the hyper-parameters to conclude that the performance advantage is from the fused representation. The proposed methods achieve state-of-the-art performance in two code summarization datasets and across three automatic code summarization metrics (BLEU, METEOR, ROUGE-L). We further evaluate the human perceived quality of our model and previous work with an expert-user study. Our model outperforms the state-of-the-art in human perceived quality and accuracy.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 32 of its 45 references that are in the map. First posted on arXiv 17 Nov 2021.

Builds on

32 of 45 references.

References · 32

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  3. 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
  4. 2017Graph Attention Networkscited by 8,854
  5. 2017Inductive Representation Learning on Large Graphscited by 6,284
  6. 2018How Powerful are Graph Neural Networks?cited by 4,355
  7. 2017Neural Message Passing for Quantum Chemistrycited by 3,460
  8. 2017Non-local Neural Networkscited by 2,290
  9. 2018Dynamic Graph CNN for Learning on Point Cloudscited by 2,220
  10. 2014DeepWalk: Online Learning of Social Representationscited by 1,543
  11. 2018Relational inductive biases, deep learning, and graph networkscited by 1,341
  12. 2017Get To The Point: Summarization with Pointer-Generator Networkscited by 1,281
20 more
  1. 2018Self-Attention with Relative Position Representationscited by 1,112
  2. 2018Deeper Insights into Graph Convolutional Networks for Semi-Supervised Learningcited by 1,099
  3. 2017Multimodal Machine Learning: A Survey and Taxonomycited by 1,004
  4. 2019DeepGCNs: Can GCNs Go as Deep as CNNs?cited by 527
  5. 2018Graph Convolutional Networks for Text Classificationcited by 345
  6. 2015Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networkscited by 305
  7. 2018code2vec: Learning Distributed Representations of Codecited by 249
  8. 2017Learning to Represent Programs with Graphscited by 219
  9. 2019Position-aware Graph Neural Networkscited by 203
  10. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  11. 2020A Transformer-based Approach for Source Code Summarizationcited by 129
  12. 2016A Compositional Object-Based Approach to Learning Physical Dynamicscited by 119
  13. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
  14. 2020Improved Code Summarization via a Graph Neural Networkcited by 79
  15. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 68
  16. 2019Code Generation as a Dual Task of Code Summarizationcited by 62
  17. 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 56
  18. 2020Tree-structured Attention with Hierarchical Accumulationcited by 30
  19. 2020Learning to Update Natural Language Comments Based on Code Changescited by 30
  20. 2020Generating Question Titles for Stack Overflow from Mined Code Snippetscited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 1; 2023: 1; 2024: 0; 2025: 0; 2026: 1.

3 papers.