AI/ program repair · reinforcement learning · code llms · arxiv research

New Training Method Sharpens AI Bug Fixing Accuracy

A new reinforcement learning method rewards AI models for the exact code edits that fix bugs, boosting real-world repair accuracy by 22.9 points.

New Training Method Sharpens AI Bug Fixing Accuracy

A new training recipe teaches AI coding models to fix bugs by rewarding the specific lines that actually mattered, instead of judging the whole patch as one lump sum.

Researchers built BoostAPR, a three-stage pipeline for automated program repair. First, a model is fine-tuned on bug fixes that were verified by actually running the code, along with the model's reasoning steps. Then two separate reward models are trained from those execution results: one scores the overall patch, the other pinpoints which lines of the edit made the difference. A reinforcement learning stage then uses that line-level model to steer credit toward the edits that actually fixed the bug. Trained on the SWE-Gym dataset, the resulting model scored 40.7% on SWE-bench Verified, a jump of 22.9 percentage points over its base model, plus 84.5% on HumanEval-Java, 95% on QuixBugs, and 24.8% on Defects4J despite that benchmark testing Java code the model wasn't specifically trained on.

The underlying problem isn't new. Reinforcement learning models often get one pass or fail signal for an entire block of output, so they can't tell which parts of a multi-line patch were essential and which were just along for the ride. That's the same credit-assignment headache that has dogged RLHF for years, now applied to code edits. Splitting the reward into sequence-level and line-level signals is a fairly direct fix, and the SWE-bench Verified jump suggests it helps most on harder, real-world-style bugs.

Worth noting: the easier benchmarks, QuixBugs and HumanEval-Java, are already near-saturated at 84 to 95%, while the messier SWE-bench Verified score sits at 40.7%. Real-world bug fixing is still the harder problem, and this remains an unreviewed preprint rather than a shipped tool.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →