mlsanityData to 7 Oct 2026

Code Representation Learning At Scale

arXiv 2402.01935 ↗First posted 2 Feb 2024cs.CLcited by 26

Not on the map. Why?

Abstract (arXiv)

Recent studies have shown that code language models at scale demonstrate significant performance gains on downstream tasks, i.e., code generation. However, most of the existing works on code representation learning train models at a hundred million parameter scale using very limited pretraining corpora. In this work, we fuel code representation learning with a vast amount of code data via a two-stage pretraining scheme. We first train the encoders via a mix that leverages both randomness in masking language modeling and the structure aspect of programming language. We then enhance the representations via contrastive learning with hard negative and hard positive constructed in an unsupervised manner. We establish an off-the-shelf encoder model that persistently outperforms the existing models on a wide variety of downstream tasks by large margins. To comprehend the factors contributing to successful code representation learning, we conduct detailed ablations and share our findings on (i) a customized and effective token-level denoising scheme for source code; (ii) the importance of hard negatives and hard positives; (iii) how the proposed bimodal contrastive learning boost the cross-lingual semantic search performance; and (iv) how the pretraining schemes decide the downstream task performance scales with the model size.

Key facts. Cited by 26 papers in the map (data through 7 Oct 2026). Builds on 28 of its 34 references that are in the map. First posted on arXiv 2 Feb 2024.

Builds on

28 of 34 references.

References · 28

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  5. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  6. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  7. 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,216
  8. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  9. 2023StarCoder: may the source be with you!cited by 790
  10. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 732
  11. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  12. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
16 more
  1. 2015Deep Metric Learning via Lifted Structured Feature Embeddingcited by 449
  2. 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 358
  3. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  4. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  5. 2019To Tune or Not to Tune? Adapting Pretrained Representations to Diverse Taskscited by 167
  6. 2020Contrastive Code Representation Learningcited by 76
  7. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
  8. 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
  9. 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
  10. 2021TreeBERT: A Tree-Based Pre-Trained Model for Programming Languagecited by 40
  11. 2021Pairwise Supervised Contrastive Learning of Sentence Representationscited by 31
  12. 2022CodeRetriever: Unimodal and Bimodal Contrastive Learning for Code Searchcited by 21
  13. 2022ContraCLM: Contrastive Learning For Causal Language Modelcited by 18
  14. 2022Learning Dialogue Representations from Consecutive Utterancescited by 17
  15. 2023Mask-then-Fill: A Flexible and Effective Data Augmentation Framework for Event Extractioncited by 12
  16. 2022Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptionscited by 11

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 6; 2025: 15; 2026: 5.

26 papers.

Sort:

By area:

  1. 2024CoRNStack: High-Quality Contrastive Data for Better Code Retrieval and Rerankingcited by 37
  2. 2024CodeXEmbed: A Generalist Embedding Model Family for Multiligual and Multi-task Code Retrievalcited by 33
  3. 2025SweRank: Software Issue Localization with Code Rankingcited by 20
  4. 2024CodeRosetta: Pushing the Boundaries of Unsupervised Code Translation for Parallel Programmingcited by 19
  5. 2025Improving Code Localization with Repository Memorycited by 19
  6. 2024Automated Knowledge Concept Annotation and Question Representation Learning for Knowledge Tracingcited by 11
  7. 2025Empowering Multi-Turn Tool-Integrated Agentic Reasoning with Group Turn Policy Optimizationcited by 9
  8. 2024Prompt Tuning Strikes Back: Customizing Foundation Models with Low-Rank Prompt Adaptationcited by 8
  9. 2025All You Need is One: Capsule Prompt Tuning with a Single Vectorcited by 8
  10. 2025CoQuIR: A Comprehensive Benchmark for Code Quality-Aware Information Retrievalcited by 6
  11. 2026More Code, Less Reuse: Investigating Code Quality and Reviewer Sentiment towards AI-generated Pull Requestscited by 5
  12. 2025EditLord: Learning Code Transformation Rules for Code Editingcited by 4
14 more
  1. 2025Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarkingcited by 4
  2. 2025CPRet: A Dataset, Benchmark, and Model for Retrieval in Competitive Programmingcited by 3
  3. 2025C2LLM Technical Report: A New Frontier in Code Retrieval via Adaptive Cross-Attention Poolingcited by 3
  4. 2025MoSE: Hierarchical Self-Distillation Enhances Early Layer Embeddingscited by 2
  5. 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programmingcited by 2
  6. 2025Routesplain: Towards Faithful and Intervenable Routing for Software-related Taskscited by 2
  7. 2025SpIDER: Spatially Informed Dense Embedding Retrieval for Software Issue Localizationcited by 1
  8. 2026Do Papers Tell the Whole Story? A Benchmark and Framework for Uncovering Hidden Implementation Gaps in Bioinformaticscited by 1
  9. 2026Beyond Retrieval: A Multitask Benchmark and Model for Code Searchcited by 1
  10. 2024LSem2Vec: A Simple yet Effective Two-Stage Approach for Source Code Embeddingcited by 0
  11. 2025LLaVul: A Multimodal LLM for Interpretable Vulnerability Reasoning about Source Codecited by 0
  12. 2025OMPILOT: Harnessing Transformer Models for Auto Parallelization to Shared Memory Computing Paradigmscited by 0
  13. 2026Ensuring Reliability in Programming Knowledge Tracing: A Re-evaluation of Attention-augmented Models and Experimental Protocolscited by 0
  14. 2026Stylometric Defenses Against Author Impersonation in Software Repositoriescited by 0