Towards A Generalist Code Embedding Model Based On Massive Data Synthesis
On the map: Retrieval-augmented generation → RAG for code
Abstract (arXiv)
Code embedding models attract increasing attention due to the widespread popularity of retrieval-augmented generation (RAG) in software development. These models are expected to capture the rich semantic relationships inherent to code, which differ significantly from those found in text. However, existing models remain severely limited due to the scarcity of high-quality training data. In this work, we introduce CodeR (underlineCode underlineRetrieval), a state-of-the-art embedding model for general-purpose code retrieval. The superior performance of CodeR is built upon CodeR-Pile, a large-scale synthetic dataset constructed under the DRU (Diversity, Reliability, Usability) principle via a novel data synthesis pipeline. To optimize training effectiveness, we propose Annealing, a curriculum learning strategy that enables effective knowledge transfer across heterogeneous sources of data. We evaluate CodeR based on 16 diverse code retrieval tasks, where it significantly outperforms existing baselines and exhibits strong out-of-domain generalization performance. We have publicly released our code and the well-trained model to facilitate further research in this critical area. https://github.com/FlagOpen/FlagEmbedding/tree/master/research/BGECoder.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. First posted on arXiv 19 May 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 3; 2026: 5.
8 papers.
- 2025ReasonEmbed: Enhanced Text Embeddings for Reasoning-Intensive Document Retrievalcited by 15
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligencecited by 13
- 2025C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Poolingcited by 3
- 2026On the Challenges and Opportunities of Learned Sparse Retrieval for Codecited by 2
- 2026Pull Requests as a Training Signal for Repo-Level Code Editingcited by 1
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalencecited by 1
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoringcited by 0
- 2026RTLCurator: Label-Efficient Data Curation for RTL Generationcited by 0
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence25 Aug 2026
- 2026RTLCurator: Label-Efficient Data Curation for RTL Generation31 Jul 2026
- 2026Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoring1 May 2026
- 2026On the Challenges and Opportunities of Learned Sparse Retrieval for Code23 Mar 2026
- 2026Pull Requests as a Training Signal for Repo-Level Code Editing7 Feb 2026
- 2025C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Pooling24 Dec 2025
- 2025From Code Foundation Models to Agents and Applications: A Comprehensive Survey and Practical Guide to Code Intelligence23 Nov 2025
- 2025ReasonEmbed: Enhanced Text Embeddings for Reasoning-Intensive Document Retrieval9 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval
- 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval
- 2026ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval
- 2023Novel Preprocessing Technique for Data Embedding in Engineering Code Generation Using Large Language Model
- 2024Retrieval-augmented code completion for local projects using large language models
- 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generation
- 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking
- 2026Context-Augmented Code Generation Using Programming Knowledge Graphs