GraphCodeBERT: Pre-training Code Representations with Data Flow
Not on the map. Why?
Cited by 34 in LLM agents and tool use, but placed by its own abstract, which didn’t fit.
Abstract (arXiv)
Pre-trained models for programming language have achieved dramatic empirical improvements on a variety of code-related tasks such as code search, code completion, code summarization, etc. However, existing pre-trained models regard a code snippet as a sequence of tokens, while ignoring the inherent structure of code, which provides crucial code semantics and would enhance the code understanding process. We present GraphCodeBERT, a pre-trained model for programming language that considers the inherent structure of code. Instead of taking syntactic-level structure of code like abstract syntax tree (AST), we use data flow in the pre-training stage, which is a semantic-level structure of code that encodes the relation of "where-the-value-comes-from" between variables. Such a semantic-level structure is neat and does not bring an unnecessarily deep hierarchy of AST, the property of which makes the model more efficient. We develop GraphCodeBERT based on Transformer. In addition to using the task of masked language modeling, we introduce two structure-aware pre-training tasks. One is to predict code structure edges, and the other is to align representations between source code and code structure. We implement the model in an efficient way with a graph-guided masked attention function to incorporate the code structure. We evaluate our model on four tasks, including code search, clone detection, code translation, and code refinement. Results show that code structure and newly introduced pre-training tasks can improve GraphCodeBERT and achieves state-of-the-art performance on the four downstream tasks. We further show that the model prefers structure-level attentions over token-level attentions in the task of code search.
Key facts. Cited by 600 papers in the map (data through 7 Oct 2026). First posted on arXiv 17 Sep 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 36; 2022: 93; 2023: 136; 2024: 108; 2025: 125; 2026: 102.
600 papers.
Sort:
By area:
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 705
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2022Multimodal Learning with Transformers: A Surveycited by 399
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 358
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
38 more
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 179
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 133
- 2021AMMUS : A Survey of Transformer-based Pretrained Models in Natural Language Processingcited by 131
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
- 2023ChipGPT: How far are we from natural language hardware designcited by 101
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
- 2022Automating Code Review Activities by Large-Scale Pre-trainingcited by 98
- 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 98
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 95
- 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 92
- 2022CERT: Continual Pre-Training on Sketches for Library-Oriented Code Generationcited by 87
- 2021Adversarial Retriever-Ranker for dense text retrievalcited by 82
- 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
- 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2022Fengshenbang 1.0: Being the Foundation of Chinese Cognitive Intelligencecited by 70
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
- 2024EffiBench: Benchmarking the Efficiency of Automatically Generated Codecited by 62
- 2021CoTexT: Multi-task Learning with Code-Text Transformercited by 61
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
- 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
- 2023Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repaircited by 55
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 55
- 2022When Language Model Meets Private Librarycited by 54
- 2022NatGen: Generative pre-training by "Naturalizing" source codecited by 53
- 2023Bias Testing and Mitigation in LLM-based Code Generationcited by 53
- 2023CodeLMSec Benchmark: Systematically Evaluating and Finding Security Vulnerabilities in Black-Box Code Language Modelscited by 52
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2022VulBERTa: Simplified Source Code Pre-Training for Vulnerability Detectioncited by 51
- 2022What Do They Capture? -- A Structural Analysis of Pre-Trained Language Models for Source Codecited by 50
50 most cited of 600 All 600 (JSON)
- 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality22 Sep 2026
- 2026Externalizing Requirement-to-Repair Artifacts as Observable Traces for LLM-Based Program Repair14 Sep 2026
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification7 Sep 2026
- 2026Grounded Skill Synthesis from Code at Scale for Agentic Intelligence4 Sep 2026
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval1 Sep 2026
- 2026Probing the Prefill: Detecting Code Vulnerabilities via Latent Activations17 Aug 2026
- 2026ATLAS: Scaffold-Free Algorithm Synthesis by LLMs via Embedding-Guided Quality-Diversity Search16 Aug 2026
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026CodeGrep: An RL-Trained Retrieval Agent for LLM Coding Agents6 Aug 2026
- 2026The Order Is the Guarantee: Verifier-Budgeted Code Deletion with Static-First Learned Proposals5 Aug 2026
- 2026A Unified Model for Cross-Domain Clone Detection via Model Merging4 Aug 2026
38 more
- 2026HyperFL: Query-Adaptive Representation Learning for Software Fault Localization4 Aug 2026
- 2026Stylometric Defenses Against Author Impersonation in Software Repositories3 Aug 2026
- 2026SCOPE: Synthetic Conditional Objectives for Policy Evolution in Black-Box Combinatorial Optimization30 Jul 2026
- 2026CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents28 Jul 2026
- 2026AssumptionMiner: Extracting, Tracing, and Revising Implicit Assumptions in LLM Code Generation24 Jul 2026
- 2026SynH-Rank: Quality-Aware Code Search via Diverse Data Synthesis and Hierarchical Ranking Training19 Jul 2026
- 2026Dependency-Guided Code Generation: Structured Matrix Decomposition and Consistency-Guided Refinement18 Jul 2026
- 2026BadQubits: An LLM-Based Framework for Static Pre-Execution Detection of Structurally Harmful Quantum Circuits16 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026XRFormer: Multiscale Tokenization for XRF Representation Learning7 Jul 2026
- 2026Beyond Refusal: A Same-Lineage Study of Aligned and Abliterated LLMs for Vulnerability Analysis7 Jul 2026
- 2026LLM-Enhanced Hierarchical Heterogeneous Graph Representation Learning for Malicious Python Package Detection3 Jul 2026
- 2026JavaVulBench: A Java Vulnerability Benchmark with Realistic Splits, a Unified Multi-Backend Harness, and a Leakage-Aware Evaluation Mode2 Jul 2026
- 2026The Decomposition Is the Fingerprint: Per-Component Identity for Agent Skills30 Jun 2026
- 2026KnowsTFM: Knowledge-Informed Fine-Tuning of Small Tabular Foundation Models29 Jun 2026
- 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents26 Jun 2026
- 2026Recall Before Rerank: Benchmarking Deep Learning Models for Large-Scale Code-to-Code Retrieval24 Jun 2026
- 2026JupOtter: Cell-Level Bug Detection in Jupyter Notebooks22 Jun 2026
- 2026Text2DSL: LLM-Based Code Generation for Domain-Specific Languages21 Jun 2026
- 2026Context-Aware Distillation and Ablation for Text2DSL21 Jun 2026
- 2026LEDGER: Scaling Agentic Document Editing with Dependency-aware Graph Retrieval19 Jun 2026
- 2026Calibration Without Comprehension: Diagnosing the Limits of Fine-Tuning LLMs for Vulnerability Detection in Systems Software18 Jun 2026
- 2026CODEBLOCK: Learning to Supervise Code at the Right Granularity10 Jun 2026
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Coding10 Jun 2026
- 2026Beyond Pass Rate: A Multilingual, Execution-Grounded Evaluation of Open Code LLMs7 Jun 2026
- 2026FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinement2 Jun 2026
- 2026Separating Secrets from Placeholders: A Hybrid CNN-CodeBERT Framework for Three-Class Credential Leakage Detection29 May 2026
- 2026UniRTL: Unifying Code and Graph for Robust RTL Representation Learning29 May 2026
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migration27 May 2026
- 2026Tool-Call Dependency Structure is Linearly Decodable in LLM Agent Residual Streams25 May 2026
- 2026Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolution24 May 2026
- 2026PromptAudit: Auditing Prompt Sensitivity in LLM-Based Vulnerability Detection22 May 2026
- 2026FML-bench: A Controlled Study of AI Research Agent Strategies from the Perspective of Search Dynamics17 May 2026
- 2026Improving Code Translation with Syntax-Guided and Semantic-aware Preference Optimization13 May 2026
- 2026SemChunk-C: Semantic Segmentation for C Code12 May 2026
- 2026MARGIN: Margin-Aware Regularized Geometry for Imbalanced Vulnerability Detection11 May 2026
- 2026DCVD: Dual-Channel Cross-Modal Fusion for Joint Vulnerability Detection and Localization10 May 2026
- 2026Kernel Foundry: A Diagnosis-driven Evolutionary Kernel Optimizer with Multi-Experts8 May 2026
50 newest of 600 All 600 (JSON)
- 2024HyperAgent: Generalist Software Engineering Agents to Solve Coding Tasks at Scalecited by 61
- 2024Combining Fine-Tuning and LLM-based Agents for Intuitive Smart Contract Auditing with Justificationscited by 41
- 2024CodeAgent: Autonomous Communicative Agents for Code Reviewcited by 33
- 2023AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisationcited by 31
- 2025DocAgent: A Multi-Agent System for Automated Code Documentation Generationcited by 16
- 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agentscited by 12
- 2024CoSQA+: Pioneering the Multi-Choice Code Search Benchmark with Test-Driven Agentscited by 11
- 2025AdaCoder: An Adaptive Planning and Multi-Agent Framework for Function-Level Code Generationcited by 8
- 2025VulAgent: Hypothesis-Validation based Multi-Agent Vulnerability Detectioncited by 8
- 2024LLM Agents Improve Semantic Code Searchcited by 7
- 2026How AI Coding Agents Modify Code: A Large-Scale Study of GitHub Pull Requestscited by 7
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Codingcited by 7
12 most cited of 31 All 31 (JSON)
- 2026Grounded Skill Synthesis from Code at Scale for Agentic Intelligence4 Sep 2026
- 2026CodeGrep: An RL-Trained Retrieval Agent for LLM Coding Agents6 Aug 2026
- 2026CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents28 Jul 2026
- 2026Multi-Agent LLM Collaboration for Unit Test Generation via Human-Testing-Inspired Workflows10 Jul 2026
- 2026SWE-MeM: Learning Adaptive Memory Management for Long-Horizon Coding Agents26 Jun 2026
- 2026LEDGER: Scaling Agentic Document Editing with Dependency-aware Graph Retrieval19 Jun 2026
- 2026CORE-Bench: A Comprehensive Benchmark for Code Retrieval in the Era of Agentic Coding10 Jun 2026
- 2026Tool-Call Dependency Structure is Linearly Decodable in LLM Agent Residual Streams25 May 2026
- 2026FML-bench: A Controlled Study of AI Research Agent Strategies from the Perspective of Search Dynamics17 May 2026
- 2026ARISE: A Repository-level Graph Representation and Toolset for Agentic Program Repair and Fault Localization4 May 2026
- 2026Verify Before You Fix: Agentic Execution Grounding for Trustworthy Cross-Language Code Analysis12 Apr 2026
- 2026Latent Reuse in Agent Skills: Multi-modal Clone Detection at Ecosystem Scale23 Mar 2026
12 newest of 31 All 31 (JSON)
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
- 2021Retrieval Augmented Code Generation and Summarizationcited by 148
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 117
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 43
- 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunitiescited by 17
- 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Treecited by 17
- 2025Retrieval-Augmented Code Review Comment Generationcited by 6
- 2026MulVul: Retrieval-augmented Multi-Agent Code Vulnerability Detection via Cross-Model Prompt Evolutioncited by 6
- 2024Building A Coding Assistant via the Retrieval-Augmented Language Modelcited by 5
- 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generationcited by 4
12 most cited of 23 All 23 (JSON)
- 2026ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval1 Sep 2026
- 2026RAVEN: Retrieval-Augmented Vulnerability Exploration Network for Memory Corruption Analysis in User Code and Binary Programs20 Apr 2026
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoning28 Jan 2026
- 2026MulVul: Retrieval-augmented Multi-Agent Code Vulnerability Detection via Cross-Model Prompt Evolution26 Jan 2026
- 2025CoRoVA: Compressed Representations for Vector-Augmented Code Completion22 Oct 2025
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approaches6 Oct 2025
- 2025SaraCoder: Orchestrating Semantic and Structural Cues for Resource-Optimized Repository-Level Code Completion13 Aug 2025
- 2025Contextual Graph Transformer: A Small Language Model for Enhanced Engineering Document Information Extraction4 Aug 2025
- 2025Accelerating Automatic Program Repair with Dual Retrieval-Augmented Fine-Tuning and Patch Generation on Large Language Models14 Jul 2025
- 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree18 Jun 2025
- 2025Retrieval-Augmented Code Review Comment Generation13 Jun 2025
- 2025Improving Deep Assertion Generation via Fine-Tuning Retrieval-Augmented Pre-trained Language Models22 Feb 2025
12 newest of 23 All 23 (JSON)
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
- 2025On the Eligibility of LLMs for Counterfactual Reasoning: A Decompositional Studycited by 5
- 2025ExLM: Rethinking the Impact of [MASK] Tokens in Masked Language Modelscited by 2
- 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programmingcited by 2
- 2025Automated Code Review Using Large Language Models with Symbolic Reasoningcited by 0
- 2025LLaVul: A Multimodal LLM for Interpretable Vulnerability Reasoning about Source Codecited by 0
- 2026Structural Anchors and Reasoning Fragility:Understanding CoT Robustness in LLM4Codecited by 0
- 2026Think it, Run it: Autonomous ML pipeline generation via self-healing multi-agent AIcited by 0
- 2026Think it, Run it: Autonomous ML pipeline generation via self-healing multi-agent AI29 Apr 2026
- 2026Structural Anchors and Reasoning Fragility:Understanding CoT Robustness in LLM4Code14 Apr 2026
- 2025LLaVul: A Multimodal LLM for Interpretable Vulnerability Reasoning about Source Code22 Sep 2025
- 2025Automated Code Review Using Large Language Models with Symbolic Reasoning24 Jul 2025
- 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programming21 Jul 2025
- 2025On the Eligibility of LLMs for Counterfactual Reasoning: A Decompositional Study17 May 2025
- 2025ExLM: Rethinking the Impact of [MASK] Tokens in Masked Language Models23 Jan 2025
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?25 Mar 2024
- 2023Code Llama: Open Foundation Models for Code24 Aug 2023
- 2022MultiCoder: Multi-Programming-Lingual Pre-Training for Low-Resource Code Completioncited by 6
- 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detectioncited by 2
- 2026GRIP: Geometric Refinement and Adaptive Information Potential for Data Efficiencycited by 0
- 2026GRIP: Geometric Refinement and Adaptive Information Potential for Data Efficiency4 Feb 2026
- 2025SAEL: Leveraging Large Language Models with Adaptive Mixture-of-Experts for Smart Contract Vulnerability Detection30 Jul 2025
- 2022MultiCoder: Multi-Programming-Lingual Pre-Training for Low-Resource Code Completion19 Dec 2022
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 179
- 2023Multi-target Backdoor Attacks for Code Pre-trained Modelscited by 19
- 2023Backdooring Neural Code Searchcited by 13
- 2024Security and Privacy Challenges of Large Language Models: A Survey30 Jan 2024
- 2023Multi-target Backdoor Attacks for Code Pre-trained Models14 Jun 2023
- 2023Backdooring Neural Code Search27 May 2023
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
- 2023Towards General Text Embeddings with Multi-stage Contrastive Learningcited by 705
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2022Multimodal Learning with Transformers: A Surveycited by 399
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
- 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 358
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
- 2023Planning with Large Language Models for Code Generationcited by 179
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 158
12 most cited of 524 All 524 (JSON)
- 2026On the Lexical Superstition of Large Language Models for Code Comprehension: Re-evaluation on Code of Low Lexical Quality22 Sep 2026
- 2026Externalizing Requirement-to-Repair Artifacts as Observable Traces for LLM-Based Program Repair14 Sep 2026
- 2026CIT-CAD: Constraint Intent Tree-based CAD Code Generation and Verification7 Sep 2026
- 2026Synthetic Semantic Supervision for Contrastive Code Representation Learning in Small Transformers: An Empirical Study3 Sep 2026
- 2026Probing the Prefill: Detecting Code Vulnerabilities via Latent Activations17 Aug 2026
- 2026ATLAS: Scaffold-Free Algorithm Synthesis by LLMs via Embedding-Guided Quality-Diversity Search16 Aug 2026
- 2026Invariant Pretraining for Robust Code Representations15 Aug 2026
- 2026The Order Is the Guarantee: Verifier-Budgeted Code Deletion with Static-First Learned Proposals5 Aug 2026
- 2026A Unified Model for Cross-Domain Clone Detection via Model Merging4 Aug 2026
- 2026HyperFL: Query-Adaptive Representation Learning for Software Fault Localization4 Aug 2026
- 2026Stylometric Defenses Against Author Impersonation in Software Repositories3 Aug 2026
- 2026SCOPE: Synthetic Conditional Objectives for Policy Evolution in Black-Box Combinatorial Optimization30 Jul 2026
12 newest of 524 All 524 (JSON)