mlsanityData to 7 Oct 2026

Exploring Representation-Level Augmentation for Code Search

arXiv 2210.12285 ↗First posted 21 Oct 2022cs.SE cs.IR cs.LGcited by 8

Not on the map. Why?

Abstract (arXiv)

Code search, which aims at retrieving the most relevant code fragment for a given natural language query, is a common activity in software development practice. Recently, contrastive learning is widely used in code search research, where many data augmentation approaches for source code (e.g., semantic-preserving program transformation) are proposed to learn better representations. However, these augmentations are at the raw-data level, which requires additional code analysis in the preprocessing stage and additional training costs in the training stage. In this paper, we explore augmentation methods that augment data (both code and query) at representation level which does not require additional data processing and training, and based on this we propose a general format of representation-level augmentation that unifies existing methods. Then, we propose three new augmentation methods (linear extrapolation, binary interpolation, and Gaussian scaling) based on the general format. Furthermore, we theoretically analyze the advantages of the proposed augmentation methods over traditional contrastive learning methods on code search. We experimentally evaluate the proposed representation-level augmentation methods with state-of-the-art code search models on a large-scale public dataset consisting of six programming languages. The experimental results show that our approach can consistently boost the performance of the studied code search models. Our source code is available at https://github.com/Alex-HaochenLi/RACS.

Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 29 of its 47 references that are in the map. First posted on arXiv 21 Oct 2022.

Builds on

29 of 47 references.

References · 29

  1. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  2. 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
  3. 2019Momentum Contrast for Unsupervised Visual Representation Learningcited by 7,482
  4. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
  5. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  6. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  7. 2020Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hyperspherecited by 1,393
  8. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  9. 2021BEIR: A Heterogenous Benchmark for Zero-shot Evaluation of Information Retrieval Modelscited by 1,225
  10. 2019EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Taskscited by 800
  11. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  12. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
17 more
  1. 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
  2. 2020DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representationscited by 249
  3. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
  4. 2020CERT: Contrastive Self-supervised Learning for Language Understandingcited by 169
  5. 2019Augmenting Data with Mixup for Sentence Classification: An Empirical Studycited by 125
  6. 2020Contrastive Code Representation Learningcited by 76
  7. 2020Towards Domain-Agnostic Contrastive Learningcited by 75
  8. 2021CoSQA: 20,000+ Web Queries for Code Search and Question Answeringcited by 74
  9. 2021SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representationcited by 63
  10. 2020Self-Supervised Contrastive Learning for Code Retrieval and Summarization via Semantic-Preserving Transformationscited by 49
  11. 2019When Deep Learning Met Code Searchcited by 45
  12. 2020Opportunities and Challenges in Code Search Toolscited by 22
  13. 2017Query Expansion Based on Crowd Knowledge for Code Searchcited by 18
  14. 2020Mixup-Transformer: Dynamic Data Augmentation for NLP Taskscited by 15
  15. 2021Multimodal Representation for Neural Code Searchcited by 11
  16. 2022Augmenting Document Representations for Dense Retrieval with Interpolation and Perturbationcited by 10
  17. 2021Constructing Contrastive samples via Summarization for Text Classification with limited annotationscited by 2

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 4; 2025: 2; 2026: 1.

8 papers.