Lune

EMNLP2022顶会

Exploring Representation-level Augmentation for Code Search

Haochen Li, Chunyan Miao, Cyril Leung, Yanxian Huang, Yuan Huang, Hongyu Zhang, Yanlin Wang

摘要

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 representationlevel 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 representationlevel augmentation methods with state-of-theart 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 .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • MGS3: A Multi-Granularity Self-Supervised Code Search Framework 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • MGS3: A Multi-Granularity Self-Supervised Code Search Framework 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
  • MGS3: A Multi-Granularity Self-Supervised Code Search Framework 引用了 CONSIDER: Commonalities and Specialties Driven Multilingual Code Retrieval Framework
  • Towards Domain-Agnostic Contrastive Learning 引用了 Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
  • iSMELL: Assembling LLMs with Expert Toolsets for Code Smell Detection and Refactoring 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CONSIDER: Commonalities and Specialties Driven Multilingual Code Retrieval Framework 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CONSIDER: Commonalities and Specialties Driven Multilingual Code Retrieval Framework 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
  • SimCSE: Simple Contrastive Learning of Sentence Embeddings 引用了 Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hypersphere
  • XSearch: Explainable Code Search via Concept-to-Code Alignment 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • XSearch: Explainable Code Search via Concept-to-Code Alignment 引用了 GraphCodeBERT: Pre-training Code Representations with Data Flow
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. iSMELL: Assembling LLMs with Expert Toolsets for Code Smell Detection and RefactoringDi Wu, Fangwen Mu, Lin Shi, Zhaoqiang Guo 等ASE 2024 · 19 次引用
  2. CONSIDER: Commonalities and Specialties Driven Multilingual Code Retrieval FrameworkRui Li, Liyang He, Qi Liu, Yuze Zhao 等AAAI 2024 · 11 次引用
  3. XSearch: Explainable Code Search via Concept-to-Code AlignmentYiming Liu, Ruofan Liu, Yun Lin, Zicong Zhang 等ISSTA 2026 · 1 次引用
  4. MGS3: A Multi-Granularity Self-Supervised Code Search FrameworkRui Li, Junfeng Kang, Qi Liu, Liyang He 等KDD 2025
  5. GiFT: Gibbs Fine-Tuning for Code GenerationHaochen Li, Wanjin Feng, Xin Zhou, Zhiqi ShenACL 2025

它引用的 Paper13

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 次引用
  3. Understanding Contrastive Representation Learning through Alignment and Uniformity on the HypersphereTongzhou Wang, Phillip IsolaICML 2020 · 2,360 次引用
  4. GraphCodeBERT: Pre-training Code Representations with Data FlowDaya Guo, Shuo Ren, Shuai Lu, Zhangyin Feng 等ICLR 2021 · 1,644 次引用
  5. Towards Domain-Agnostic Contrastive LearningVikas Verma, Thang Luong, Kenji Kawaguchi, Hieu Pham 等ICML 2021 · 131 次引用

相关 Paper

  1. Uncertainty-Aware Contrastive Learning with Hard Negative Sampling for Code Search TasksHan Liu, Jiaqing Zhan, Qin ZhangAAAI 2025 · 1 次引用
  2. CoCoSoDa: Effective Contrastive Learning for Code SearchEnsheng Shi, Yanlin Wang, Wenchao Gu, Lun Du 等ICSE 2023 · 45 次引用
  3. CodeRetriever: A Large Scale Contrastive Pre-Training Method for Code SearchXiaonan Li, Yeyun Gong, Yelong Shen, Xipeng Qiu 等EMNLP 2022 · 25 次引用
  4. Code Representation Learning at ScaleDejiao Zhang, Wasi Uddin Ahmad, Ming Tan, Hantian Ding 等ICLR 2024 · 32 次引用
  5. ContraBERT: Enhancing Code Pre-trained Models via Contrastive LearningShangqing Liu, Bozhi Wu, Xiaofei Xie, Guozhu Meng 等ICSE 2023 · 56 次引用
黄昏的海面,两侧是细线勾勒的悬崖