mlsanityData to 7 Oct 2026

ReACC: A Retrieval-Augmented Code Completion Framework

arXiv 2203.07722 ↗First posted 15 Mar 2022cs.SE cs.AI cs.CLcited by 117

On the map: Retrieval-augmented generation → RAG for code

Abstract (arXiv)

Code completion, which aims to predict the following code token(s) according to the code context, can improve the productivity of software development. Recent work has proved that statistical language modeling with transformers can greatly improve the performance in the code completion task via learning from large-scale source code datasets. However, current approaches focus only on code context within the file or project, i.e. internal context. Our distinction is utilizing "external" context, inspired by human behaviors of copying from the related code snippets when writing code. Specifically, we propose a retrieval-augmented code completion framework, leveraging both lexical copying and referring to code with similar semantics by retrieval. We adopt a stage-wise training approach that combines a source code retriever and an auto-regressive language model for programming language. We evaluate our approach in the code completion task in Python and Java programming languages, achieving a state-of-the-art performance on CodeXGLUE benchmark.

Key facts. Cited by 117 papers in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 46 of its 70 references that are in the map. First posted on arXiv 15 Mar 2022.

Builds on

46 of 70 references.

Closest ancestors · 1

Same direction, newest first

  1. 2021Retrieval Augmented Code Generation and Summarization26 Aug

Other references · 45

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  6. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  7. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  8. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  9. 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
  10. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
  11. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  12. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
33 more
  1. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  2. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  3. 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
  4. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  5. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  6. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  7. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
  8. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  9. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  10. 2020IntelliCode Compose: Code Generation Using Transformercited by 225
  11. 2020CERT: Contrastive Self-supervised Learning for Language Understandingcited by 169
  12. 2020A Transformer-based Approach for Source Code Summarizationcited by 129
  13. 2020PyMT5: multi-mode translation of natural language and Python code with transformerscited by 80
  14. 2020Contrastive Code Representation Learningcited by 76
  15. 2018A Retrieve-and-Edit Framework for Predicting Structured Outputscited by 73
  16. 2020Code Prediction by Feeding Trees to Transformerscited by 70
  17. 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
  18. 2020Multi-task Learning based Pre-trained Language Model for Code Completioncited by 58
  19. 2020Big Code != Big Vocabulary: Open-Vocabulary Models for Source Codecited by 53
  20. 2017Code Completion with Neural Attention and Pointer Networkscited by 49
  21. 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
  22. 2019When Deep Learning Met Code Searchcited by 45
  23. 2021Applying CodeBERT for Automated Program Repair of Java Simple Bugscited by 44
  24. 2016Deep API Learningcited by 41
  25. 2018Retrieval-Based Neural Code Generationcited by 41
  26. 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 41
  27. 2020Fast and Memory-Efficient Neural Code Completioncited by 38
  28. 2021A Replication Study of Dense Passage Retrievercited by 37
  29. 2019Retrieve and Refine: Exemplar-based Neural Comment Generationcited by 36
  30. 2018Aroma: Code Recommendation via Structural Code Searchcited by 29
  31. 2021Learning to Complete Code with Sketchescited by 23
  32. 2021Generating Bug-Fixes Using Pretrained Transformerscited by 18
  33. 2021Long-Range Modeling of Source Code Files with eWASH: Extended Window Access by Syntax Hierarchycited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 8; 2023: 20; 2024: 38; 2025: 35; 2026: 16.

117 papers.

Sort:

By area:

  1. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  2. 2024A Survey on Large Language Models for Code Generationcited by 646
  3. 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
  4. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
  5. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 352
  6. 2023ToolQA: A Dataset for LLM Question Answering with External Toolscited by 273
  7. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
  8. 2024InstructRAG: Instructing Retrieval-Augmented Generation via Self-Synthesized Rationalescited by 100
  9. 2024RAGCache: Efficient Knowledge Caching for Retrieval-Augmented Generationcited by 97
  10. 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 84
  11. 2024RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Horizon Generationcited by 75
  12. 2023PanGu-Coder2: Boosting Large Language Models for Code with Ranking Feedbackcited by 69
38 more
  1. 2024Vul-RAG: Enhancing LLM-based Vulnerability Detection via Knowledge-level RAGcited by 67
  2. 2024TurboRAG: Accelerating Retrieval-Augmented Generation with Precomputed KV Caches for Chunked Textcited by 60
  3. 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
  4. 2022When Language Model Meets Private Librarycited by 54
  5. 2024Iterative Refinement of Project-Level Code Context for Precise Code Generation with Compiler Feedbackcited by 45
  6. 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 43
  7. 2023RepoFusion: Training Code Models to Understand Your Repositorycited by 40
  8. 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
  9. 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
  10. 2024LeanAgent: Lifelong Learning for Formal Theorem Provingcited by 34
  11. 2025A Survey on Knowledge-Oriented Retrieval-Augmented Generationcited by 34
  12. 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
  13. 2024An LLM-Assisted Easy-to-Trigger Backdoor Attack on Code Completion Models: Injecting Disguised Vulnerabilities against Strong Detectioncited by 32
  14. 2023Large Language Models of Code Fail at Completing Code with Potential Bugscited by 28
  15. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  16. 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
  17. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  18. 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyondcited by 22
  19. 2022Open-world Story Generation with Structured Knowledge Enhancement: A Comprehensive Surveycited by 21
  20. 2023AI-TA: Towards an Intelligent Question-Answer Teaching Assistant using Open-Source LLMscited by 21
  21. 2024Consistent Autoformalization for Constructing Mathematical Librariescited by 20
  22. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
  23. 2025Correctness Assessment of Code Generated by Large Language Models Using Internal Representationscited by 17
  24. 2022AST-Probe: Recovering abstract syntax trees from hidden representations of pre-trained language modelscited by 16
  25. 2024Prompt-based Code Completion via Multi-Retrieval Augmented Generationcited by 16
  26. 2023Better Context Makes Better Code Language Models: A Case Study on Function Call Argument Completioncited by 14
  27. 2023Enhancing Large Language Models for Secure Code Generation: A Dataset-driven Study on Vulnerability Mitigationcited by 14
  28. 2024DocCGen: Document-based Controlled Code Generationcited by 11
  29. 2026Controlled Self-Evolution for Algorithmic Code Optimizationcited by 11
  30. 2024Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Contextcited by 10
  31. 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
  32. 2025LevelRAG: Enhancing Retrieval-Augmented Generation with Multi-hop Logic Planning over Rewriting Augmented Searcherscited by 10
  33. 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
  34. 2024FT2Ra: A Fine-Tuning-Inspired Approach to Retrieval-Augmented Code Completioncited by 9
  35. 2024Does Your Neural Code Completion Model Use My Code? A Membership Inference Approachcited by 9
  36. 2024Statically Contextualizing Large Language Models with Typed Holescited by 9
  37. 2024CATCODER: Repository-Level Code Generation with Relevant Code and Type Contextcited by 8
  38. 2025Retrieval-Augmented Generation in Industry: An Interview Study on Use Cases, Requirements, Challenges, and Evaluationcited by 8

50 most cited of 117 All 117 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completion
  2. 2024A Lightweight Framework for Adaptive Retrieval In Code Completion With Critique Model
  3. 2025Completion by Comprehension: Guiding Code Generation with Multi-Granularity Understanding
  4. 2026Do Not Treat Code as Natural Language: Implications for Repository-Level Code Generation and Beyond
  5. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities
  6. 2025GRACE: Graph-Guided Repository-Aware Code Completion through Hierarchical Code Fusion
  7. 2025SpareCodeSearch: Searching for Code Context When You Have No Spare GPU
  8. 2024Context-Augmented Code Generation Using Programming Knowledge Graphs