Learning to Represent Programs with Graphs
Not on the map. Why?
Abstract (arXiv)
Learning tasks on source code (i.e., formal languages) have been considered recently, but most work has tried to transfer natural language methods and does not capitalize on the unique opportunities offered by code's known syntax. For example, long-range dependencies induced by using the same variable or function in distant locations are often not considered. We propose to use graphs to represent both the syntactic and semantic structure of code and use graph-based deep learning methods to learn to reason over program structures. In this work, we present how to construct graphs from source code and how to scale Gated Graph Neural Networks training to such large graphs. We evaluate our method on two tasks: VarNaming, in which a network attempts to predict the name of a variable given its usage, and VarMisuse, in which the network learns to reason about selecting the correct variable that should be used at a given program location. Our comparison to methods that use less structured program representations shows the advantages of modeling known structure, and suggests that our models learn to infer meaningful names and to solve the VarMisuse task in many cases. Additionally, our testing showed that VarMisuse identifies a number of bugs in mature open-source projects.
Key facts. Cited by 220 papers in the map (data through 14 Oct 2026). First posted on arXiv 1 Nov 2017.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2020: 1; 2021: 59; 2022: 47; 2023: 53; 2024: 26; 2025: 19; 2026: 15.
220 papers.
Sort:
By area:
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2021How Attentive are Graph Attention Networks?cited by 835
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2023A Comprehensive Survey of AI-Generated Content (AIGC): A History of Generative AI from GAN to ChatGPTcited by 224
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 194
- 2021Two Sides of the Same Coin: Heterophily and Oversmoothing in Graph Convolutional Neural Networkscited by 182
- 2021Graph Learning: A Surveycited by 141
- 2021Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patternscited by 95
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
38 more
- 2021LTL2Action: Generalizing LTL Instructions for Multi-Task RLcited by 74
- 2022A Survey on Deep Graph Generation: Methods and Applicationscited by 69
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
- 2021Self-Supervised Bug Detection and Repaircited by 59
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 54
- 2021Dorylus: Affordable, Scalable, and Accurate GNN Training with Distributed CPU Servers and Serverless Threadscited by 51
- 2023Stealthy Backdoor Attack for Code Modelscited by 49
- 2023Transformers Meet Directed Graphscited by 40
- 2021What do pre-trained code models know about code?cited by 36
- 2021Combining Graph Neural Networks with Expert Knowledge for Smart Contract Vulnerability Detectioncited by 34
- 2024AST-T5: Structure-Aware Pretraining for Code Generation and Understandingcited by 33
- 2023Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Reviewcited by 32
- 2023Distilled GPT for Source Code Summarizationcited by 31
- 2021Code Completion by Modeling Flattened Abstract Syntax Trees as Graphscited by 30
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 30
- 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 29
- 2021How could Neural Networks understand Programs?cited by 26
- 2021Project-Level Encoding for Neural Source Code Summarization of Subroutinescited by 24
- 2021A Survey on Machine Learning Techniques for Source Code Analysiscited by 24
- 2023InstructABSA: Instruction Learning for Aspect Based Sentiment Analysiscited by 23
- 2021Understanding Neural Code Intelligence Through Program Simplificationcited by 22
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2024CodePori: Large-Scale System for Autonomous Software Development Using Multi-Agent Technologycited by 22
- 2021VELVET: a noVel Ensemble Learning approach to automatically locate VulnErable sTatementscited by 20
- 2023Graph Meets LLMs: Towards Large Graph Modelscited by 20
- 2024Can Large Language Models Serve as Data Analysts? A Multi-Agent Assisted Approach for Qualitative Data Analysiscited by 20
- 2021Improving Code Summarization with Block-wise Abstract Syntax Tree Splittingcited by 19
- 2021Memorization and Generalization in Neural Code Intelligence Modelscited by 19
- 2022Dataflow Analysis-Inspired Deep Learning for Efficient Vulnerability Detectioncited by 19
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)cited by 19
- 2021Do We Need Anisotropic Graph Neural Networks?cited by 18
- 2021DeepDebug: Fixing Python Bugs Using Stack Traces, Backtranslation, and Code Skeletonscited by 17
- 2021Towards Learning (Dis)-Similarity of Source Code from Program Contrastscited by 17
- 2022Assemble Foundation Models for Automatic Code Summarizationcited by 17
- 2021Learning Structural Edits via Incremental Tree Transformationscited by 16
- 2024Stable Code Technical Reportcited by 16
- 2021GraphSearchNet: Enhancing GNNs via Capturing Global Dependencies for Semantic Code Searchcited by 15
50 most cited of 220 All 220 (JSON)
- 2026On the Expressive Power of Implicit Line-Graph Higher-Order Weisfeiler--Leman14 Sep 2026
- 2026GraphK: Variable-Size Graph Generation with Efficient Edge Construction19 Aug 2026
- 2026Syntax vs. Semantics: How Transformers Learn Deep Dependencies26 Jun 2026
- 2026GRADE: Graph Representation of LLM Agent Dependency and Execution22 Jun 2026
- 2026LEDGER: Scaling Agentic Document Editing with Dependency-aware Graph Retrieval19 Jun 2026
- 2026Protein Representation Learning with Secondary-Structure and Energy-Filtered Hydrogen-Bond Graphs12 Jun 2026
- 2026CODEBLOCK: Learning to Supervise Code at the Right Granularity10 Jun 2026
- 2026Bounded Path Context: A Controlled Study of Visible Path History in LLM-Based Knowledge Graph Question Answering26 May 2026
- 2026Fine-Grained Graph Generation through Latent Mixture Scheduling4 May 2026
- 2026PLMGH: What Matters in PLM-GNN Hybrids for Code Classification and Vulnerability Detection28 Apr 2026
- 2026Neural Structure Embedding for Symbolic Regression via Continuous Structure Search and Coefficient Optimization23 Mar 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
38 more
- 2026Distilling Formal Logic into Neural Spaces: A Kernel Alignment Approach for Signal Temporal Logic5 Mar 2026
- 2026RTLocating: Intent-aware RTL Localization for Hardware Design Iteration28 Feb 2026
- 2026MemGovern: Enhancing Code Agents through Learning from Governed Human Experiences11 Jan 2026
- 2025Schrodinger AI: A Unified Spectral-Dynamical Framework for Classification, Reasoning, and Operator-Based Generalization28 Dec 2025
- 2025Citation-Grounded Code Comprehension: Preventing LLM Hallucination Through Hybrid Retrieval and Graph-Augmented Context13 Dec 2025
- 2025Generalizable Insights for Graph Transformers in Theory and Practice11 Nov 2025
- 2025ScaleDL: Towards Scalable and Efficient Runtime Prediction for Distributed Deep Learning Workloads6 Nov 2025
- 2025EvoEngineer: Mastering Automated CUDA Kernel Code Evolution with Large Language Models4 Oct 2025
- 2025RANGER -- Repository-Level Agent for Graph-Enhanced Retrieval27 Sep 2025
- 2025CCrepairBench: A High-Fidelity Benchmark and Reinforcement Learning Framework for C++ Compilation Repair19 Sep 2025
- 2025Benchmark Dataset Generation and Evaluation for Excel Formula Repair with LLMs14 Aug 2025
- 2025Interpreting Performance Profiles with Deep Learning1 Aug 2025
- 2025SAFT: Structure-Aware Fine-Tuning of LLMs for AMR-to-Text Generation15 Jul 2025
- 2025Modeling Code: Is Text All You Need?15 Jul 2025
- 2025Kodezi Chronos: A Debugging-First Language Model for Repository-Scale Code Understanding14 Jul 2025
- 2025Seamlessly Integrating Tree-Based Positional Embeddings into Transformer Models for Source Code Representation5 Jul 2025
- 2025Call Me Maybe: Enhancing JavaScript Call Graph Construction using Graph Neural Networks22 Jun 2025
- 2025A Benchmark Dataset for Graph Regression with Homogeneous and Multi-Relational Variants29 May 2025
- 2025LEANCODE: Understanding Models Better for Code Simplification of Pre-trained Large Language Models20 May 2025
- 2025Bringing Structure to Naturalness: On the Naturalness of ASTs11 Apr 2025
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scale23 Feb 2025
- 2025TCProF: Time-Complexity Prediction SSL Framework10 Feb 2025
- 2024Adaptable and Precise: Enterprise-Scenario LLM Function-Calling Capability Training Pipeline20 Dec 2024
- 2024Transducer Tuning: Efficient Model Adaptation for Software Tasks Using Code Property Graphs18 Dec 2024
- 2024The Power of Types: Exploring the Impact of Type Checking on Neural Bug Detection in Dynamically Typed Languages22 Nov 2024
- 2024Guiding Word Equation Solving using Graph Neural Networks (Extended Technical Report)19 Nov 2024
- 2024Logic Error Localization in Student Programming Assignments Using Pseudocode and Graph Neural Networks11 Oct 2024
- 2024PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)19 Sep 2024
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generation7 Aug 2024
- 2024CogNarr Ecosystem: Facilitating Group Cognition at Scale11 Jul 2024
- 2024FuncEvalGMN: Evaluating Functional Correctness of SQL via Graph Matching Network9 Jul 2024
- 2024MIREncoder: Multi-modal IR-based Pretrained Embeddings for Performance Optimizations2 Jul 2024
- 2024AbstractBeam: Enhancing Bottom-Up Program Synthesis using Library Learning27 May 2024
- 2024Generated Contents Enrichment6 May 2024
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation3 May 2024
- 2024On Unified Prompt Tuning for Request Quality Assurance in Public Code Review11 Apr 2024
- 2024Stable Code Technical Report1 Apr 2024
- 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completion10 Mar 2024
50 newest of 220 All 220 (JSON)
- 2024CodePori: Large-Scale System for Autonomous Software Development Using Multi-Agent Technologycited by 22
- 2024Can Large Language Models Serve as Data Analysts? A Multi-Agent Assisted Approach for Qualitative Data Analysiscited by 20
- 2026GRADE: Graph Representation of LLM Agent Dependency and Executioncited by 4
- 2024Adaptable and Precise: Enterprise-Scenario LLM Function-Calling Capability Training Pipelinecited by 1
- 2026LEDGER: Scaling Agentic Document Editing with Dependency-aware Graph Retrievalcited by 1
- 2026GRADE: Graph Representation of LLM Agent Dependency and Execution22 Jun 2026
- 2026LEDGER: Scaling Agentic Document Editing with Dependency-aware Graph Retrieval19 Jun 2026
- 2024Adaptable and Precise: Enterprise-Scenario LLM Function-Calling Capability Training Pipeline20 Dec 2024
- 2024CodePori: Large-Scale System for Autonomous Software Development Using Multi-Agent Technology2 Feb 2024
- 2024Can Large Language Models Serve as Data Analysts? A Multi-Agent Assisted Approach for Qualitative Data Analysis2 Feb 2024
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNNcited by 89
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generationcited by 4
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generationcited by 4
- 2024Improving Retrieval-Augmented Code Comment Generation by Retrieving for Generation7 Aug 2024
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation3 May 2024
- 2020Retrieval-Augmented Generation for Code Summarization via Hybrid GNN9 Jun 2020
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 886
- 2024Stable Code Technical Reportcited by 16
- 2024Stable Code Technical Report1 Apr 2024
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Models30 Nov 2021
- 2023Stealthy Backdoor Attack for Code Modelscited by 49
- 2023Stealthy Backdoor Attack for Code Models6 Jan 2023
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
- 2021How Attentive are Graph Attention Networks?cited by 835
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2023A Comprehensive Survey of AI-Generated Content (AIGC): A History of Generative AI from GAN to ChatGPTcited by 224
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 194
- 2021Two Sides of the Same Coin: Heterophily and Oversmoothing in Graph Convolutional Neural Networkscited by 182
- 2021Graph Learning: A Surveycited by 141
- 2021Breaking the Limit of Graph Neural Networks by Improving the Assortativity of Graphs with Local Mixing Patternscited by 95
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2021LTL2Action: Generalizing LTL Instructions for Multi-Task RLcited by 74
- 2022A Survey on Deep Graph Generation: Methods and Applicationscited by 69
12 most cited of 207 All 207 (JSON)
- 2026On the Expressive Power of Implicit Line-Graph Higher-Order Weisfeiler--Leman14 Sep 2026
- 2026GraphK: Variable-Size Graph Generation with Efficient Edge Construction19 Aug 2026
- 2026Syntax vs. Semantics: How Transformers Learn Deep Dependencies26 Jun 2026
- 2026Protein Representation Learning with Secondary-Structure and Energy-Filtered Hydrogen-Bond Graphs12 Jun 2026
- 2026CODEBLOCK: Learning to Supervise Code at the Right Granularity10 Jun 2026
- 2026Bounded Path Context: A Controlled Study of Visible Path History in LLM-Based Knowledge Graph Question Answering26 May 2026
- 2026Fine-Grained Graph Generation through Latent Mixture Scheduling4 May 2026
- 2026PLMGH: What Matters in PLM-GNN Hybrids for Code Classification and Vulnerability Detection28 Apr 2026
- 2026Neural Structure Embedding for Symbolic Regression via Continuous Structure Search and Coefficient Optimization23 Mar 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2026Distilling Formal Logic into Neural Spaces: A Kernel Alignment Approach for Signal Temporal Logic5 Mar 2026
- 2026RTLocating: Intent-aware RTL Localization for Hardware Design Iteration28 Feb 2026
12 newest of 207 All 207 (JSON)