Bridging Code Graphs and Large Language Models for Better Code Understanding
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have demonstrated remarkable performance in code intelligence tasks such as code generation, summarization, and translation. However, their reliance on linearized token sequences limits their ability to understand the structural semantics of programs. While prior studies have explored graphaugmented prompting and structure-aware pretraining, they either suffer from prompt length constraints or require task-specific architectural changes that are incompatible with large-scale instructionfollowing LLMs. To address these limitations, this paper proposes CGBridge, a novel plug-and-play method that enhances LLMs with Code Graph information through an external, trainable Bridge module. CGBridge first pre-trains a code graph encoder via selfsupervised learning on a large-scale dataset of 270K code graphs to learn structural code semantics. It then trains an external module to bridge the modality gap among code, graph, and text by aligning their semantics through cross-modal attention mechanisms. Finally, the bridge module generates structure-informed prompts, which are injected into a frozen LLM, and is fine-tuned for downstream code intelligence tasks. Experiments show that CGBridge achieves notable improvements over both the original model and the graphaugmented prompting method. Specifically, it yields a 16.19% and 9.12% relative gain in LLM-as-a-Judge on code summarization, and a 9.84% and 38.87% relative gain in Execution Accuracy on code translation. Moreover, CGBridge achieves over 4x faster inference than LoRA-tuned models, demonstrating both effectiveness and efficiency in structure-aware code understanding.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 39 of its 65 references that are in the map. First posted on arXiv 8 Dec 2025.
Builds on
39 of 65 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
- 2017Inductive Representation Learning on Large Graphscited by 6,284
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2016node2vec: Scalable Feature Learning for Networkscited by 1,913
- 2024A Survey on LLM-as-a-Judgecited by 1,384
27 more
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2020Graph Contrastive Learning with Augmentationscited by 1,203
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2018Deeper Insights into Graph Convolutional Networks for Semi-Supervised Learningcited by 1,099
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2023Vision Transformers Need Registerscited by 844
- 2020Contrastive Multi-View Representation Learning on Graphscited by 651
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2020Masked Label Prediction: Unified Message Passing Model for Semi-Supervised Classificationcited by 500
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2020Unsupervised Translation of Programming Languagescited by 262
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2023GraphText: Graph Reasoning in Text Spacecited by 110
- 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2025Can LLMs Replace Human Evaluators? An Empirical Study of LLM-as-a-Judge in Software Engineeringcited by 64
- 2022XLCoST: A Benchmark Dataset for Cross-lingual Code Intelligencecited by 54
- 2025PyG 2.0: Scalable Learning on Real World Graphscited by 49
- 2024Can Large Language Models Serve as Evaluators for Code Summarization?cited by 12
- 2022HierarchyNet: Learning to Summarize Source Code with Heterogeneous Representationscited by 9
- 2018Convolutional Neural Networks over Control Flow Graphs for Software Defect Predictioncited by 8
- 2020MISIM: A Neural Code Semantics Similarity System Using the Context-Aware Semantics Structurecited by 6
- 2023COMEX: A Tool for Generating Customized Source Code Representationscited by 3
Built on by
Citing papers per year: 2026: 2.
2 papers.