atlas

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

Is Self-Repair a Silver Bullet for Code Generation?

ICLR 2024 · Large language models › Agents, code and math · approach: Code generation benchmarks · 4 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.

Analyzes whether LLM self-repair (debug and fix own code with feedback) improves code generation on HumanEval and APPS once sampling cost is accounted for, and tests the role of feedback quality via stronger-model and human feedback.

Problem

Self-repair is popular for boosting LLM code generation, but its benefit relative to simply drawing more i.i.d. samples at equal compute is poorly understood, especially the role of the textual feedback stage.

Approach

Models self-repair as a repair tree (generate programs, execute tests, generate feedback, repair) and compares pass rates against i.i.d. sampling at matched sample budgets; isolates feedback quality by swapping in feedback from stronger models or human programmers.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace GPT-4's feedback with human feedback (ablation)GPT-4 repair · APPS overallrepair success rate: 33.30% -> 52.60%; 1.58×Helped
Use GPT-3.5 feedback instead of Code Llama feedback (ablation)Code Llama repair · HumanEvalrepair success rate: 9.1% -> 20.1%Helped
Use GPT-4 feedback instead of Code Llama feedback (ablation)Code Llama repair · HumanEvalrepair success rate: 9.1% -> 39.3%Helped
Use GPT-4 feedback instead of GPT-3.5 feedback (ablation)GPT-3.5 repair · APPS overallrepair success rate: 4.7% -> 11.5%Helped
Use GPT-4 feedback instead of GPT-3.5 feedback (ablation)GPT-3.5 repair · APPS competitionrepair success rate: 1.5% -> 3.3%Helped
Use GPT-3.5 feedback instead of Code Llama feedback (ablation)Code Llama repair · APPS overallrepair success rate: 1.1% -> 2.2%Helped
Increase initial program samples while holding feedback-repair samples fixed (ablation)Self-repair · HumanEval and APPSpass rate relative to equal-budget i.i.d. samplingHelped
Increase feedback-repair samples while holding initial samples fixed (ablation)Self-repair · HumanEval and APPSpass rate relative to equal-budget i.i.d. samplingMixed
Allocate 10 initial samples and 1 repair candidate each rather than 2 initial samples and 10 repair candidates each (ablation)GPT-4 self-repair · APPSpass rate relative to equal-budget i.i.d. sampling: 1.05×; 0.97×Mixed
Use self-repair rather than i.i.d. sampling, accounting for equal sample budgetGPT-4 · APPSpass rate relative to baseline: up to 8%Helped
Use self-repair rather than i.i.d. sampling, accounting for equal sample budgetGPT-3.5 · APPS competitionpass rate relative to baseline: up to a 34% performance gainHelped
Use self-repair rather than i.i.d. sampling, accounting for equal sample budgetCode Llama · HumanEvalpass rate relative to baseline: up to 10%Helped

Surprising findings

Limitations

Experimental setup

Datasets: HumanEval APPS

Benchmarks: HumanEval APPS

Metrics: pass rate pass@k normalized pass rate repair success rate pass@t

Baselines: i.i.d. sampling without repair pass@k baseline

Builds on: pass@k Self-Debugging

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