AI Paper Atlas

Research map / Label-efficient and robust learning / Recognition and long-tail

CodeRetriever: A Large Scale Contrastive Pre-Training Method for Code Search

Xiaonan Li, Yeyun Gong, Yelong Shen, Xipeng Qiu, Hang Zhang, Bolun Yao, Weizhen Qi, Daxin Jiang, Weizhu Chen, Nan Duan

EMNLP 2022Label-efficient and robust learning › Recognition and long-tailapproach: Multilingual language representation pretraining79 citations (OpenAlex)

Fudan University · Microsoft

Read the paperPlace an idea next to itCheck your own paper ↗

12measured effects
10improved
2hurt

AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

This paper tried a common change: Add a contrastive loss

add unimodal contrastive loss · Cross-language code search · MRR: 41.6 -> 48.4 Improved

What 1,541 accepted papers report for this change

See this change in detailMatched by the wording of each paper's own result, read by AI from the full text. Papers report gains more often than failures, so this shows what gets published, not the chance a change works.

Measured effects reported in the paper

What was changedWhereMeasuredEffect
contrastive pre-training (CodeRetriever, in-batch fine-tuning) instead of GraphCodeBERTGraphCodeBERT · CodeSearch overallMRR: 71.3 -> 75.3Improved
use AR2 adversarial hard-negative fine-tuning instead of in-batch negativesCodeRetriever · CodeSearch overallMRR: 75.3 -> 77.4Improved
use AR2 instead of hard negativesCodeRetriever · CodeSearch overallMRR: 75.9 -> 77.4Improved
use AR2 or hard negatives instead of in-batch negatives (ablation)CodeRetriever · StaQCMRR: 25.5 -> 24.2 (AR2); 24.6 (hard)Hurt
add unimodal code-code pairs without denoising (ablation)GraphCodeBERT · CodeSearch JavaMRR: 69.1 -> 68.9Hurt
add denoised code-code pairs (CrossModel filter) (ablation)GraphCodeBERT · CodeSearch JavaMRR: 68.9 -> 71.1Improved
add doc-code bimodal pairs (ablation)CodeRetriever · CodeSearch JavaMRR: 71.1 -> 72.2Improved
add comment-code bimodal pairs (ablation)CodeRetriever · CodeSearch JavaMRR: 72.2 -> 74.0Improved
add unimodal contrastive loss (ablation)GraphCodeBERT · Cross-language code searchMRR: 41.6 -> 48.4Improved
add bimodal loss on top of unimodal (ablation)CodeRetriever (Luni) · Cross-language code searchMRR: 48.4 -> 53.3Improved
CodeRetriever pre-training with 500 CoSQA training examplesGraphCodeBERT · CoSQA low-resourceMRR: 43.2 -> 54.7Improved
CodeRetriever pre-training on code-to-code searchSynCoBERT · POJ-104MAP@R: 88.24 -> 88.85Improved

Later papers that compared with this method

2 later accepted papers report CodeRetriever as a baseline in their results tables; 2 of them report a better number on most of the results they share with it.

Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy