harness_evolve/ref03_anchored-self-play-code-repair.md

[ref03] Anchored Self-Play for Code Repair

Download status: ⚠️ Blocked by OpenReview bot-challenge

OpenReview returns an HTTP 403 "Challenge verification required" (anti-bot / CAPTCHA) to every automated request — direct PDF URL, hash-attachment URL, and the api2 notes endpoint all fail from this environment. The file must be downloaded manually from a real browser (click the Direct PDF link above), or via the Claude-in-Chrome browser extension if connected.

Abstract (captured via web search)

The paper proposes generator–fixer self-play: a single model is trained with RL to alternate between generating bugs and fixing them. As the fixer improves, the generator adapts to produce more challenging bugs, yielding an automatic curriculum.

Motivation: in code repair, a model is given a buggy program and unit tests and must produce a corrected program that passes the tests. Large collections of realistic buggy programs are costly and hard to scale, and because unit tests certify correctness but not realism, it is unclear whether training on synthetically-generated bugs improves repair on real-world bugs.

Anchored Self-Play (ASP) anchors self-play to a small reference set drawn from the target bug sources. It shapes generation with a code-embedding similarity reward and mixes reference bugs into fixer training to stabilize learning as the generator evolves. The authors introduce BugSourceBench, evaluating repair across diverse bug sources (human-authored bugs, errors in LM-generated code, and human edits of buggy LM-generated code). Across sources, ASP achieves the best fix rates, improving the average fix rate by +25 pp (relative).