atlas

Research map / Large language models / Agents, code and math

CPRet: A Dataset, Benchmark, and Model for Retrieval in Competitive Programming

NeurIPS 2025 · Large language models › Agents, code and math · approach: LLM-guided program synthesis · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces CPRet, a retrieval benchmark suite and two embedding models (CPRetriever-Code with Group-InfoNCE, CPRetriever-Prob) for competitive programming problem and code retrieval, and shows high-similarity problems inflate LiveCodeBench pass rates.

Problem

Duplicate or highly similar competitive programming problems threaten contest fairness and the validity of LLM benchmarks, and existing retrieval benchmarks lack problem-level similarity tasks and strict temporal separation.

Approach

Four retrieval tasks (two code-centric, two new problem-centric: Problem-to-Duplicate and Simplified-to-Full) built from crawled problem-solution data and curated annotations, plus a Group-InfoNCE loss that treats all correct solutions of a problem as one positive group with a variance penalty, and a triplet-loss problem-level fine-tuning stage.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
fine-tune CPRetriever-Code on problem-level retrieval tasks (ablation)CPRetriever-Code · Problem-to-DuplicateNDCG@10: 38.68 -> 60.06Helped
fine-tune CPRetriever-Code on problem-level retrieval tasks (ablation)CPRetriever-Code · Text-to-CodeNDCG@10: 70.40 -> 56.50Hurt
add data augmentation during Group-InfoNCE training (ablation)Group-InfoNCE · Text-to-CodeNDCG@10: 69.00 -> 70.11Helped
add data augmentation during Group-InfoNCE training (ablation)Group-InfoNCE · Code-to-CodeNDCG@10: 69.18 -> 70.42Helped
replace single-positive InfoNCE with multi-positive InfoNCE (ablation)contrastive pretraining · Text-to-CodeNDCG@10: 68.84 -> 66.44Hurt
replace single-positive InfoNCE with multi-positive InfoNCE (ablation)contrastive pretraining · Code-to-CodeNDCG@10: 68.97 -> 66.62Hurt
increase Group-InfoNCE positive count from 4 to 16 (ablation)Group-InfoNCE · Text-to-CodeNDCG@10: 69.00 -> 69.47Helped
increase Group-InfoNCE positive count from 4 to 16 (ablation)Group-InfoNCE · Code-to-CodeNDCG@10: 69.18 -> 69.77Helped
add contrastive pretraining on CPRet-PCPCD (ablation)retrieval model · Text-to-CodeNDCG@10: 39.60 -> 70.40Helped
fine-tune only on Simplified-to-Full data rather than both problem-level datasets (ablation)contrastively pretrained model · Average of four retrieval tasksNDCG@10: 69.50 -> 72.62Helped
add Problem-to-Duplicate data to Simplified-to-Full fine-tuning (ablation)contrastively pretrained model · Problem-to-DuplicateNDCG@10: 57.01 -> 60.06Helped
add CPRet-PCPCD data during problem-level fine-tuning (ablation)contrastively pretrained model · Text-to-CodeNDCG@10: 68.05 -> 71.15Helped

Surprising findings

Limitations

Experimental setup

Datasets: CPRet-PCPCD APPS CodeContests TACO Codeforces submissions CodeChef submissions Luogu simplified statements

Benchmarks: CPRet Text-to-Code CPRet Code-to-Code CPRet Problem-to-Duplicate CPRet Simplified-to-Full LiveCodeBench

Metrics: NDCG@10 pass rate Pass@1

Baselines: SFR-Embedding-Code-2B Qwen3-Embedding-4B Qodo-Embed-1-7B Qwen3-Embedding-8B CodeSage-large-v2 gte-modernbert-base

Builds on: InfoNCE SFR-Embedding-Code-2B Qwen3-Embedding-4B CoIR

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