mlsanityData to 14 Oct 2026

RepoFusion: Training Code Models to Understand Your Repository

arXiv 2306.10998 ↗First posted 19 Jun 2023cs.LG cs.AI cs.PLcited by 40

Not on the map. Why?

Abstract (arXiv)

Despite the huge success of Large Language Models (LLMs) in coding assistants like GitHub Copilot, these models struggle to understand the context present in the repository (e.g., imports, parent classes, files with similar names, etc.), thereby producing inaccurate code completions. This effect is more pronounced when using these assistants for repositories that the model has not seen during training, such as proprietary software or work-in-progress code projects. Recent work has shown the promise of using context from the repository during inference. In this work, we extend this idea and propose RepoFusion, a framework to train models to incorporate relevant repository context. Experiments on single-line code completion show that our models trained with repository context significantly outperform much larger code models as CodeGen-16B-multi (~73× larger) and closely match the performance of the ~ 70× larger StarCoderBase model that was trained with the Fill-in-the-Middle objective. We find these results to be a novel and compelling demonstration of the gains that training with repository context can bring. We carry out extensive ablation studies to investigate the impact of design choices such as context type, number of contexts, context length, and initialization within our framework. Lastly, we release Stack-Repo, a dataset of 200 Java repositories with permissive licenses and near-deduplicated files that are augmented with three types of repository contexts. Additionally, we are making available the code and trained checkpoints for our work. Our released resources can be found at urlhttps://huggingface.co/RepoFusion.

Key facts. Cited by 40 papers in the map (data through 14 Oct 2026). Builds on 31 of its 42 references that are in the map. First posted on arXiv 19 Jun 2023.

Builds on

31 of 42 references.

References · 31

  1. 2014Adam: A Method for Stochastic Optimizationcited by 37,240
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2022Competition-Level Code Generation with AlphaCodecited by 1,462
  4. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  5. 2021Improving language models by retrieving from trillions of tokenscited by 1,293
  6. 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,210
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  8. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 885
  9. 2019Generalization through Memorization: Nearest Neighbor Language Modelscited by 800
  10. 2023StarCoder: may the source be with you!cited by 799
  11. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
  12. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
19 more
  1. 2022The Stack: 3 TB of permissively licensed source codecited by 359
  2. 2022Efficient Training of Language Models to Fill in the Middlecited by 255
  3. 2020IntelliCode Compose: Code Generation Using Transformercited by 227
  4. 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 218
  5. 2022Do Users Write More Insecure Code with AI Assistants?cited by 192
  6. 2023SantaCoder: don't reach for the stars!cited by 170
  7. 2022DocPrompting: Generating Code by Retrieving the Docscited by 153
  8. 2021Retrieval Augmented Code Generation and Summarizationcited by 149
  9. 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 119
  10. 2022Repository-Level Prompt Generation for Large Language Models of Codecited by 106
  11. 2022Reading Between the Lines: Modeling User Behavior and Costs in AI-Assisted Programmingcited by 91
  12. 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 65
  13. 2022When Language Model Meets Private Librarycited by 54
  14. 2022FiDO: Fusion-in-Decoder optimized for stronger performance and faster inferencecited by 31
  15. 2022How Readable is Model-generated Code? Examining Readability and Visual Inspection of GitHub Copilotcited by 14
  16. 2021Capturing Structural Locality in Non-parametric Language Modelscited by 8
  17. 2021Learning to Generate Code Comments from Class Hierarchiescited by 5
  18. 2021Embedding API Dependency Graph for Neural Code Generationcited by 5
  19. 2020On-the-Fly Adaptation of Source Code Models using Meta-Learningcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 3; 2024: 14; 2025: 13; 2026: 10.

40 papers.

Sort:

By area:

  1. 2024A Survey on Large Language Models for Code Generationcited by 658
  2. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
  3. 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 189
  4. 2024CodexGraph: Bridging Large Language Models and Code Repositories via Code Graph Databasescited by 65
  5. 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
  6. 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
  7. 2024Repoformer: Selective Retrieval for Repository-Level Code Completioncited by 55
  8. 2024AgileCoder: Dynamic Collaborative Agents for Software Development based on Agile Methodologycited by 46
  9. 2024GraphCoder: Enhancing Repository-Level Code Completion via Code Context Graph-based Retrieval and Language Modelcited by 40
  10. 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?cited by 38
  11. 2024REPOFUSE: Repository-Level Code Completion with Fused Dual Contextcited by 32
  12. 2026SWE-Lego: Pushing the Limits of Supervised Fine-tuning for Software Issue Resolvingcited by 31
28 more
  1. 2023BioCoder: A Benchmark for Bioinformatics Code Generation with Large Language Modelscited by 25
  2. 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 23
  3. 2024M2rc-Eval: Massively Multilingual Repository-level Code Completion Evaluationcited by 21
  4. 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
  5. 2024RepoHyper: Search-Expand-Refine on Semantic Graphs for Repository-Level Code Completioncited by 15
  6. 2024Enhancing LLM-Based Coding Tools through Native Integration of IDE-Derived Static Contextcited by 10
  7. 2024InCoRo: In-Context Learning for Robotics Control with Feedback Loopscited by 10
  8. 2025Towards an Understanding of Context Utilization in Code Intelligencecited by 10
  9. 2024R2C2-Coder: Enhancing and Benchmarking Real-world Repository-level Code Completion Abilities of Code Large Language Modelscited by 9
  10. 2025RTLRepoCoder: Repository-Level RTL Code Completion through the Combination of Fine-Tuning and Retrieval Augmentationcited by 7
  11. 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
  12. 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generationcited by 6
  13. 2025Agentic Software Issue Resolution with Large Language Models: A Surveycited by 6
  14. 2026Multi-agent Collaboration with State Managementcited by 6
  15. 2024Building A Coding Assistant via the Retrieval-Augmented Language Modelcited by 5
  16. 2025YABLoCo: Yet Another Benchmark for Long Context Code Generationcited by 5
  17. 2025Enhancing Project-Specific Code Completion by Inferring Internal API Informationcited by 5
  18. 2025Impact-driven Context Filtering For Cross-file Code Completioncited by 5
  19. 2025Intuition to Evidence: Measuring AI's True Impact on Developer Productivitycited by 5
  20. 2025Knowledge Graph Based Repository-Level Code Generationcited by 4
  21. 2025Exploring the Challenges and Opportunities of AI-assisted Codebase Generationcited by 4
  22. 2025Gistify! Codebase-Level Understanding via Runtime Executioncited by 4
  23. 2026Repository Intelligence Graph: Deterministic Architectural Map for LLM Code Assistantscited by 4
  24. 2026REAgent: Requirement-Driven LLM Agents for Software Issue Resolutioncited by 4
  25. 2026SWE-Fuse: Empowering Software Agents via Issue-free Trajectory Learning and Entropy-aware RLVR Trainingcited by 1
  26. 2026Hierarchical Embedding Fusion for Retrieval-Augmented Code Generationcited by 0
  27. 2026Benchmarking LLM-Based Static Analysis for Secure Smart Contract Development: Reliability, Limitations, and Potential Hybrid Solutionscited by 0
  28. 2026PaperCompiler: Faithful Paper-to-Code Generation via Repository-Level Specification Compilationcited by 0