PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards

Yunkai Zhan, Miaosen Chai, Shangshang Wang, Jike Zhong, Yuqing Yang +3 more
10/13/2026
cs.SEcs.AIcs.CL

No official code found. Best implementation: precise-coder-rl/precise-coder-rl.github.io (0 stars, last commit 2026-10-14). 2 more below.

Abstract

Reinforcement learning (RL) from unit tests is the common recipe for post-training code models, but a unit test only asks whether the final program passes. We analyze what this unit-test-only reward teaches a model during debugging and find that, while it raises pass rates, it also teaches the model to edit more and to hallucinate bugs in code that is already correct. We introduce PreciseCoder, a training algorithm that augments the unit-test reward with a signal for semantically verified, localized edits, which correlates with smaller edits and higher pass rates. On 4B, 9B, and 27B models, PreciseCoder reduces the average number of edit lines from 7-15to 3 at a pass rate on par with unit-test-only training. Trained only on single-line bugs, PreciseCoder can generalize to repository-level program repair, where it resolves more issues with smaller patches. Its precision also transfers from weaker to stronger models: given the reasoning trace of a 9B PreciseCoder model, frontier models such as GPT-5.6 Sol and Qwen3.8-Max gain 4.6-12.4 points in edit precision with no additional training. Linguistic analysis of the thinking traces shows that our reward encourages the model to reason about individual lines, name the buggy ones, and form consistent bug hypotheses.

View on arXivView PDF

Code Implementations(3)

Project page for PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards

00Oct 7, 20261 weeks ago

Code for PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards (coming soon)

00Oct 7, 20261 weeks ago

The official GitHub organization page of the paper "PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards"

00Oct 7, 20261 weeks ago

Similar Papers

Cite this paper

@article{zhan2026precisecoder,
  title  = {PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards},
  author = {Yunkai Zhan and Miaosen Chai and Shangshang Wang and Jike Zhong and Yuqing Yang and Deqing Fu and Serina Chang and Wang Bill Zhu},
  year   = {2026},
  eprint = {2610.18755},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.18755v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.18755.svg)](https://codeofpaper.com/paper/2610.18755)

Discussion