mlsanityData to 14 Oct 2026

Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking

arXiv 2508.19558 ↗First posted 27 Aug 2025cs.SE cs.CL cs.PLcited by 4

On the map: Synthetic data and self-improvement for LLMs → Code and instruction data synthesis

Abstract (arXiv)

Embedding models have demonstrated strong performance in tasks like clustering, retrieval, and feature extraction while offering computational advantages over generative models and cross-encoders. Benchmarks such as MTEB have shown that text embeddings from large language models (LLMs) capture rich semantic information, but their ability to reflect code-level functional semantics remains unclear. Existing studies largely focus on code clone detection, which emphasizes syntactic similarity and overlooks functional understanding. In this paper, we focus on the functional consistency of LLM code embeddings, which determines if two code snippets perform the same function regardless of syntactic differences. We propose a novel data synthesis framework called Functionality-Oriented Code Self-Evolution to construct diverse and challenging benchmarks. Specifically, we define code examples across four semantic and syntactic categories and find that existing datasets predominantly capture syntactic properties. Our framework generates four unique variations from a single code instance, providing a broader spectrum of code examples that better reflect functional differences. Extensive experiments on three downstream tasks-code clone detection, code functional consistency identification, and code retrieval-demonstrate that embedding models significantly improve their performance when trained on our evolved datasets. These results highlight the effectiveness and generalization of our data synthesis framework, advancing the functional understanding of code.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Code and instruction data synthesis, one of 13 directions in Synthetic data and self-improvement for LLMs. Builds on 39 of its 61 references that are in the map. First posted on arXiv 27 Aug 2025.

Builds on

39 of 61 references.

References · 39

  1. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  4. 2024Qwen2.5-Coder Technical Reportcited by 1,203
  5. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  6. 2023WizardLM: Empowering large pre-trained language models to follow complex instructionscited by 1,125
  7. 2024M3-Embedding: Multi-Linguality, Multi-Functionality, Multi-Granularity Text Embeddings Through Self-Knowledge Distillationcited by 1,073
  8. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  9. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
  10. 2022MTEB: Massive Text Embedding Benchmarkcited by 640
  11. 2023C-Pack: Packed Resources For General Chinese Embeddingscited by 578
  12. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
27 more
  1. 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 361
  2. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
  3. 2018code2vec: Learning Distributed Representations of Codecited by 250
  4. 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 181
  5. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
  6. 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
  7. 2024Making Text Embedders Few-Shot Learnerscited by 79
  8. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 75
  9. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
  10. 2021AEDA: An Easier Data Augmentation Technique for Text Classificationcited by 67
  11. 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
  12. 2023xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrievalcited by 47
  13. 2024Top Leaderboard Ranking = Top Coding Proficiency, Always? EvoEval: Evolving Coding Benchmarks via LLMcited by 40
  14. 2024Code Representation Learning At Scalecited by 26
  15. 2023Nuances are the Key: Unlocking ChatGPT to Find Failure-Inducing Tests with Differential Promptingcited by 23
  16. 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
  17. 2020Deep Graph Matching and Searching for Semantic Code Retrievalcited by 20
  18. 2019A Literature Study of Embeddings on Source Codecited by 18
  19. 2024Rewriting the Code: A Simple Method for Large Language Model Augmented Code Searchcited by 17
  20. 2023ContraBERT: Enhancing Code Pre-trained Models via Contrastive Learningcited by 16
  21. 2024Code Needs Comments: Enhancing Code LLMs with Comment Augmentationcited by 16
  22. 2020CRaDLe: Deep Code Retrieval Based on Semantic Dependency Learningcited by 12
  23. 2023Code Representation Pre-training with Complements from Program Executionscited by 8
  24. 2024Don't Transform the Code, Code the Transforms: Towards Precise Code Rewriting using LLMscited by 8
  25. 2024Source Code Clone Detection Using Unsupervised Similarity Measurescited by 5
  26. 2024AutoAugment Is What You Need: Enhancing Rule-based Augmentation Methods in Low-resource Regimescited by 1
  27. 2024CodeSAM: Source Code Representation Learning by Infusing Self-Attention with Multi-Code-View Graphscited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 4.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  2. 2026Evaluating Language Models on Cross-Language Code Functional Equivalence
  3. 2023Towards Understanding the Capability of Large Language Models on Code Clone Detection: A Survey
  4. 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrieval
  5. 2026Detecting Functional Memorization in Code Language Models
  6. 2025Towards A Generalist Code Embedding Model Based On Massive Data Synthesis
  7. 2023Beyond Accuracy: Evaluating Self-Consistency of Code Large Language Models with IdentityChain
  8. 2023SelfEvolve: A Code Evolution Framework via Large Language Models