atlas

Research map / Large language models / Reasoning and chain of thought

AuPair: Golden Example Pairs for Code Repair

ICML 2025 · Large language models › Reasoning and chain of thought · approach: Test-time compute scaling · 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.

Proposes AuPair, which builds a submodular-selected ordered set of golden guess-fix pairs from generated candidates and uses each as a 1-shot in-context example for code repair under an N-call inference budget.

Problem

Improving LLM code repair at inference time under a fixed compute budget, where best-of-N and self-repair plateau and produce low diversity of useful fixes.

Approach

Mine candidate (guess, fix) pairs from the model's own repair attempts, then greedily select a complementary ordered set via a submodular fix-quality-matrix procedure; each selected pair is used as a different 1-shot example per LLM call, and the best-scoring fix is returned.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use AuPair examples instead of repeated fixed-prompt samplingGemini-1.5-Pro · CodeForces testtest pass rate: 16.05% -> 51.32%Helped
Use AuPair examples instead of self-repair feedbackGemini-1.5-Pro · CodeForces testtest pass rate: 15.79% -> 51.32%Helped
Use AuPair examples instead of repeated fixed-prompt samplingGemini-1.5-Flash · CodeForces testtest pass rate: 21.8% -> 37.83%Helped
Use AuPair examples instead of self-repair feedbackGemini-1.5-Flash · CodeForces testtest pass rate: 34.1% -> 37.83%Helped
Select complementary AuPair examples instead of random candidate pairs (ablation)Gemini-1.5-Pro · CodeForcestest pass rate: 12 AuPairs match the performance of 32 random pairsHelped
Include repair instruction and guess/fix scores in the prompt (ablation)AuPair repair prompting · CodeForces subsetnumber of problems solvedHelped
Use in-context repair pairs from CodeForces on other datasetsGemini-1.5-Pro AuPair · Six out-of-distribution datasetstest pass rateHelped
Use Gemini-1.5-Pro-collected AuPairs rather than AuPairs from other models (ablation)Gemini-1.5-Pro · CodeForcescode repair performanceHelped
Use AuPairs rather than best-of-N generationsGemini-1.5-Pro and Gemini-1.5-Flash · CodeForcesfix diversityHelped
Use AuPairs rather than best-of-N generationsGemma models · CodeForcesfix diversityHurt
Add AuPair repair examples to the initial guessesFour reported models · CodeForces, difficulty levels A through F+test pass rate: 0.16, 0.13, 0.12, 0.09, 0.08, 0.07Helped

Surprising findings

Limitations

Experimental setup

Datasets: CodeForces AtCoder HackerEarth CodeChef LiveCodeBench CodeJam Aizu

Benchmarks: CodeForces AtCoder HackerEarth CodeChef LiveCodeBench CodeJam Aizu

Metrics: test pass rate strict accuracy diversity score (AST subtrees)

Baselines: best-of-N self-repair random pairs

Builds on: best-of-N self-repair self-consistency

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