mlsanityData to 7 Oct 2026

Towards A Generalist Code Embedding Model Based On Massive Data Synthesis

arXiv 2505.12697 ↗First posted 19 May 2025cs.IRcited by 8

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

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 3; 2026: 5.

8 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval
  2. 2026CodeMMR: Bridging Natural Language, Code, and Image for Unified Retrieval
  3. 2026ExecRetrieval: Measuring the Functional-Correctness Gap in Code-Embedding Retrieval
  4. 2023Novel Preprocessing Technique for Data Embedding in Engineering Code Generation Using Large Language Model
  5. 2024Retrieval-augmented code completion for local projects using large language models
  6. 2025ReCode: Improving LLM-based Code Repair with Fine-Grained Retrieval-Augmented Generation
  7. 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking
  8. 2026Context-Augmented Code Generation Using Programming Knowledge Graphs