Retrieval-Augmented Generation for Code Summarization via Hybrid GNN
On the map: Retrieval-augmented generation → RAG for code
Abstract (arXiv)
Source code summarization aims to generate natural language summaries from structured code snippets for better understanding code functionalities. However, automatic code summarization is challenging due to the complexity of the source code and the language gap between the source code and natural language summaries. Most previous approaches either rely on retrieval-based (which can take advantage of similar examples seen from the retrieval database, but have low generalization performance) or generation-based methods (which have better generalization performance, but cannot take advantage of similar examples). This paper proposes a novel retrieval-augmented mechanism to combine the benefits of both worlds. Furthermore, to mitigate the limitation of Graph Neural Networks (GNNs) on capturing global graph structure information of source code, we propose a novel attention-based dynamic graph to complement the static graph representation of the source code, and design a hybrid message passing GNN for capturing both the local and global structural information. To evaluate the proposed approach, we release a new challenging benchmark, crawled from diversified large-scale open-source C projects (total 95k+ unique functions in the dataset). Our method achieves the state-of-the-art performance, improving existing methods by 1.42, 2.44 and 1.29 in terms of BLEU-4, ROUGE-L and METEOR.
Key facts. Cited by 89 papers in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 34 of its 56 references that are in the map. First posted on arXiv 9 Jun 2020.
Builds on
34 of 56 references.
References · 34
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2016Semi-Supervised Classification with Graph Convolutional Networkscited by 11,282
- 2017Graph Attention Networkscited by 8,854
- 2017Inductive Representation Learning on Large Graphscited by 6,284
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2015Gated Graph Sequence Neural Networkscited by 792
- 2015Scheduled Sampling for Sequence Prediction with Recurrent Neural Networkscited by 779
- 2019Measuring and Relieving the Over-smoothing Problem for Graph Neural Networks from the Topological Viewcited by 544
- 2019DeepGCNs: Can GCNs Go as Deep as CNNs?cited by 527
- 2019PairNorm: Tackling Oversmoothing in GNNscited by 297
22 more
- 2019Devign: Effective Vulnerability Identification by Learning Comprehensive Program Semantics via Graph Neural Networkscited by 266
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
- 2017Learning to Represent Programs with Graphscited by 219
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2018DeepGauge: Multi-Granularity Testing Criteria for Deep Learning Systemscited by 144
- 2020A Transformer-based Approach for Source Code Summarizationcited by 129
- 2018The Adverse Effects of Code Duplication in Machine Learning Models of Codecited by 123
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2019Code Generation as a Dual Task of Code Summarizationcited by 62
- 2018Graph-to-Sequence Learning using Gated Graph Neural Networkscited by 61
- 2019Reinforcement Learning Based Graph-to-Sequence Model for Natural Question Generationcited by 57
- 2017A parallel corpus of Python functions and documentation strings for automated code documentation and code generationcited by 56
- 2018Structured Neural Summarizationcited by 53
- 2018Learning Conditioned Graph Structures for Interpretable Visual Question Answeringcited by 45
- 2017Automatically Generating Commit Messages from Diffs using Neural Machine Translationcited by 42
- 2019GraphFlow: Exploiting Conversation Flow with Graph Neural Networks for Conversational Machine Comprehensioncited by 41
- 2018Graph2Seq: Graph to Sequence Learning with Attention-based Neural Networkscited by 36
- 2019Modeling Graph Structure in Transformer for Better AMR-to-Text Generationcited by 35
- 2018SQL-to-Text Generation with Graph-to-Sequence Modelcited by 31
- 2019ATOM: Commit Message Generation Based on Abstract Syntax Tree and Hybrid Rankingcited by 25
- 2019CORE: Automating Review Recommendation for Code Changescited by 14
Built on by
Citing papers per year: 2021: 7; 2022: 18; 2023: 23; 2024: 29; 2025: 7; 2026: 5.
89 papers.
Sort:
By area:
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 142
- 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 84
- 2023Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Modelscited by 67
- 2024LitLLM: A Toolkit for Scientific Literature Reviewcited by 61
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
- 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 46
- 2022ASIF: Coupled Data Turns Unimodal Models to Multimodal Without Trainingcited by 45
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
38 more
- 2022What is it like to program with artificial intelligence?cited by 39
- 2024OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scalecited by 37
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 33
- 2022On the Transferability of Pre-trained Language Models for Low-Resource Programming Languagescited by 30
- 2023Distilled GPT for Source Code Summarizationcited by 30
- 2024Source Code Summarization in the Era of Large Language Modelscited by 30
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
- 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processingcited by 25
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2023Data-centric Graph Learning: A Surveycited by 22
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
- 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
- 2023Object-Centric Multiple Object Trackingcited by 15
- 2022Source Code Summarization with Structural Relative Position Guided Transformercited by 14
- 2024Accelerating Retrieval-Augmented Generationcited by 14
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answeringcited by 13
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Codecited by 11
- 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Testscited by 11
- 2024Locally-Adaptive Quantization for Streaming Vector Searchcited by 10
- 2025DH-RAG: A Dynamic Historical Context-Powered Retrieval-Augmented Generation Method for Multi-Turn Dialoguecited by 10
- 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
- 2021Programming Knowledge Tracing: A Comprehensive Dataset and A New Modelcited by 9
- 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERTcited by 9
- 2022Unveiling Code Pre-Trained Models: Investigating Syntax and Semantics Capacitiescited by 9
- 2024A Fine-tuning Enhanced RAG System with Quantized Influence Measure as AI Judgecited by 9
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
- 2023Towards Modeling Human Attention from Eye Movements for Neural Source Code Summarizationcited by 8
- 2024A Survey of Large Language Models in Cybersecuritycited by 8
- 2023LExecutor: Learning-Guided Executioncited by 7
- 2025ChatVis: Large Language Model Agent for Generating Scientific Visualizationscited by 7
- 2021Code to Comment Translation: A Comparative Study on Model Effectiveness & Errorscited by 6
- 2022Learning Program Semantics with Code Representations: An Empirical Studycited by 6
- 2022Learning Program Representations with a Tree-Structured Transformercited by 6
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarizationcited by 6
- 2024RAM: Towards an Ever-Improving Memory System by Learning from Communicationscited by 6
- 2024Retrieval Augmented Generation for Dynamic Graph Modelingcited by 6
50 most cited of 89 All 89 (JSON)
- 2026Mapping the RAG Landscape: A Four Axis Taxonomy of Efficiency, Defense, Interactivity, and Reasoning1 Oct 2026
- 2026Agent4cs: A Multi-agent System for Code Summarization in Large Hierarchical Codebases1 Jul 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2026HCAG: Hierarchical Abstraction and Retrieval-Augmented Generation on Theoretical Repositories with LLMs19 Mar 2026
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answering16 Jan 2026
- 2025C-ing Clearly: Enhanced Binary Code Explanations using C code16 Dec 2025
- 2025Scale or Reason? A Compute-Equivalent Analysis of Reasoning Distillation26 Sep 2025
- 2025ChatVis: Large Language Model Agent for Generating Scientific Visualizations30 Jul 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2025DH-RAG: A Dynamic Historical Context-Powered Retrieval-Augmented Generation Method for Multi-Turn Dialogue19 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2025Leveraging In-Context Learning and Retrieval-Augmented Generation for Automatic Question Generation in Educational Domains29 Jan 2025
38 more
- 2024Accelerating Retrieval-Augmented Generation14 Dec 2024
- 2024Leveraging Large Language Models for Comparative Literature Summarization with Reflective Incremental Mechanisms3 Dec 2024
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval19 Nov 2024
- 2024Building A Coding Assistant via the Retrieval-Augmented Language Model21 Oct 2024
- 2024Reference Trustable Decoding: A Training-Free Augmentation Paradigm for Large Language Models30 Sep 2024
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024RepoGenReflex: Enhancing Repository-Level Code Completion with Verbal Reinforcement and Retrieval-Augmented Generation19 Sep 2024
- 2024Automatic Detection of LLM-Generated Code: A Comparative Case Study of Contemporary Models Across Function and Class Granularities2 Sep 2024
- 2024Retrieval Augmented Generation for Dynamic Graph Modeling26 Aug 2024
- 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Tests21 Aug 2024
- 2024Enhanced document retrieval with topic embeddings19 Aug 2024
- 2024ViC: Virtual Compiler Is All You Need For Assembly Code Search10 Aug 2024
- 2024OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scale29 Jul 2024
- 2024UF-HOBI at "Discharge Me!": A Hybrid Solution for Discharge Summary Generation Through Prompt-based Tuning of GatorTronGPT Models22 Jul 2024
- 2024Source Code Summarization in the Era of Large Language Models9 Jul 2024
- 2024Analysing the Behaviour of Tree-Based Neural Networks in Regression Tasks17 Jun 2024
- 2024A Survey on Large Language Models for Code Generation1 Jun 2024
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion30 May 2024
- 2024Refining Joint Text and Source Code Embeddings for Retrieval Task with Parameter-Efficient Fine-Tuning7 May 2024
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing30 Apr 2024
- 2024RAM: Towards an Ever-Improving Memory System by Learning from Communications18 Apr 2024
- 2024CSA-Trans: Code Structure Aware Transformer for AST7 Apr 2024
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion2 Apr 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024A Fine-tuning Enhanced RAG System with Quantized Influence Measure as AI Judge26 Feb 2024
- 2024A Survey of Large Language Models in Cybersecurity26 Feb 2024
- 2024Locally-Adaptive Quantization for Streaming Vector Search3 Feb 2024
- 2024LitLLM: A Toolkit for Scientific Literature Review2 Feb 2024
- 2024CONCORD: Towards a DSL for Configurable Graph Code Representation31 Jan 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformation10 Nov 2023
- 2023Constructing Temporal Dynamic Knowledge Graphs from Interactive Text-based Games3 Nov 2023
- 2023CP-BCS: Binary Code Summarization Guided by Control Flow Graph and Pseudo Code24 Oct 2023
- 2023GASCOM: Graph-based Attentive Semantic Context Modeling for Online Conversation Understanding21 Oct 2023
- 2023Data-centric Graph Learning: A Survey8 Oct 2023
- 2023Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models6 Oct 2023
- 2023Controllable Multi-document Summarization: Coverage & Coherence Intuitive Policy with Large Language Model Based Rewards5 Oct 2023
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulation25 Sep 2023
50 newest of 89 All 89 (JSON)
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2023Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Modelscited by 67
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processingcited by 25
- 2024Accelerating Retrieval-Augmented Generationcited by 14
- 2025DH-RAG: A Dynamic Historical Context-Powered Retrieval-Augmented Generation Method for Multi-Turn Dialoguecited by 10
- 2022BashExplainer: Retrieval-Augmented Bash Code Comment Generation based on Fine-tuned CodeBERTcited by 9
- 2024A Fine-tuning Enhanced RAG System with Quantized Influence Measure as AI Judgecited by 9
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
- 2023Tram: A Token-level Retrieval-augmented Mechanism for Source Code Summarizationcited by 6
- 2024Retrieval Augmented Generation for Dynamic Graph Modelingcited by 6
- 2024RepoGenReflex: Enhancing Repository-Level Code Completion with Verbal Reinforcement and Retrieval-Augmented Generationcited by 6
12 most cited of 17 All 17 (JSON)
- 2026HCAG: Hierarchical Abstraction and Retrieval-Augmented Generation on Theoretical Repositories with LLMs19 Mar 2026
- 2025DH-RAG: A Dynamic Historical Context-Powered Retrieval-Augmented Generation Method for Multi-Turn Dialogue19 Feb 2025
- 2025Improving Retrieval-Augmented Deep Assertion Generation via Joint Training15 Feb 2025
- 2025Leveraging In-Context Learning and Retrieval-Augmented Generation for Automatic Question Generation in Educational Domains29 Jan 2025
- 2024Accelerating Retrieval-Augmented Generation14 Dec 2024
- 2024Building A Coding Assistant via the Retrieval-Augmented Language Model21 Oct 2024
- 2024RepoGenReflex: Enhancing Repository-Level Code Completion with Verbal Reinforcement and Retrieval-Augmented Generation19 Sep 2024
- 2024Retrieval Augmented Generation for Dynamic Graph Modeling26 Aug 2024
- 2024Enhanced document retrieval with topic embeddings19 Aug 2024
- 2024RAG and RAU: A Survey on Retrieval-Augmented Language Model in Natural Language Processing30 Apr 2024
- 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completion2 Apr 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
12 newest of 17 All 17 (JSON)
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answeringcited by 13
- 2025Scale or Reason? A Compute-Equivalent Analysis of Reasoning Distillationcited by 3
- 2026Mapping the RAG Landscape: A Four Axis Taxonomy of Efficiency, Defense, Interactivity, and Reasoningcited by 0
- 2026Mapping the RAG Landscape: A Four Axis Taxonomy of Efficiency, Defense, Interactivity, and Reasoning1 Oct 2026
- 2026Reasoning in Trees: Improving Retrieval-Augmented Generation for Multi-Hop Question Answering16 Jan 2026
- 2025Scale or Reason? A Compute-Equivalent Analysis of Reasoning Distillation26 Sep 2025
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2023Physics of Language Models: Part 3.2, Knowledge Manipulationcited by 142
- 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 84
- 2024LitLLM: A Toolkit for Scientific Literature Reviewcited by 61
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
- 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 46
- 2022ASIF: Coupled Data Turns Unimodal Models to Multimodal Without Trainingcited by 45
- 2022No More Fine-Tuning? An Experimental Evaluation of Prompt Tuning in Code Intelligencecited by 41
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2022What is it like to program with artificial intelligence?cited by 39
- 2024OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scalecited by 37
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 33
12 most cited of 67 All 67 (JSON)
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2025C-ing Clearly: Enhanced Binary Code Explanations using C code16 Dec 2025
- 2025Towards an Understanding of Context Utilization in Code Intelligence11 Apr 2025
- 2024Leveraging Large Language Models for Comparative Literature Summarization with Reflective Incremental Mechanisms3 Dec 2024
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval19 Nov 2024
- 2024Reference Trustable Decoding: A Training-Free Augmentation Paradigm for Large Language Models30 Sep 2024
- 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embedding23 Sep 2024
- 2024Automatic Detection of LLM-Generated Code: A Comparative Case Study of Contemporary Models Across Function and Class Granularities2 Sep 2024
- 2024Leveraging Large Language Models for Enhancing the Understandability of Generated Unit Tests21 Aug 2024
- 2024ViC: Virtual Compiler Is All You Need For Assembly Code Search10 Aug 2024
- 2024OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scale29 Jul 2024
- 2024UF-HOBI at "Discharge Me!": A Hybrid Solution for Discharge Summary Generation Through Prompt-based Tuning of GatorTronGPT Models22 Jul 2024
12 newest of 67 All 67 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarization
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
- 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
- 2025GRACE: Graph-Guided Repository-Aware Code Completion through Hierarchical Code Fusion
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Model
- 2026Deep Graph-Language Fusion for Structure-Aware Code Generation ↗