PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards

Yunkai Zhan, Miaosen Chai, Shangshang Wang, Jike Zhong, Yuqing Yang, Deqing Fu, Serina Chang, Wang Bill Zhu

University of Southern California · University of Chicago · Google · University of California, Berkeley

Published October 13, 2026 · on the feed October 15, 2026 · ▲ 8 · arXiv 2610.18755

Code & softwareLLM training & RLReasoning & math No code arXiv ↗Hugging Face ↗Weights ↗Dataset ↗

The 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.

The Brief

2:22

A short podcast summary of the paper. Written and voiced by AI.

Transcript

PreciseCoder. Faithful and Generalizable Debugging Beyond Unit-Test Rewards. By Yunkai Zhan and seven others, from the University of Southern California, the University of Chicago, and two other institutions. Published on the thirteenth of October. No code repository is linked to it.

The common recipe for post-training code models is reinforcement learning from unit tests. But a unit test asks only one question: does the final program pass? The authors analyze what that reward teaches a model when it debugs. Pass rates go up. Alongside that, the model learns to edit more than it needs to, and to hallucinate bugs in code that is already correct. Nothing in a pass or fail verdict distinguishes a one-line fix from a sweeping rewrite that happens to pass, so the reward cannot prefer the first. And a model that rewrites correct lines is changing code nobody asked it to touch.

PreciseCoder is a training algorithm that keeps the unit-test reward and adds a second signal, one that rewards edits which are semantically verified and localized. That signal correlates with smaller edits and with higher pass rates.

What the reward adds is an incentive to change only what is wrong, and for the change to be checked as meaningful, on top of the incentive to make the tests pass. The pass signal stays. It simply stops being the only thing the model is paid for.

Results are reported at four billion, nine billion, and twenty-seven billion parameters. Unit-test-only training leaves models editing between seven and fifteen lines on average. PreciseCoder brings that down to three, at a pass rate on par. Trained only on single-line bugs, it generalizes to repository-level program repair, resolving more issues with smaller patches. That is a large step in scope, from one faulty line to issues in whole repositories.

The precision also transfers from weaker models to stronger ones. Given the reasoning trace of the nine billion parameter PreciseCoder model, frontier models such as GPT five point six Sol and Qwen three point eight Max gain four point six to twelve point four points in edit precision, with no extra training. A linguistic analysis of the thinking traces finds that the reward pushes the model to reason about individual lines, name the buggy ones, and form consistent hypotheses about the bug.

A test that passes says nothing about how a fix got there. Rewarding the path, small and verified edits, gives a debugger that touches less, and a reasoning trace good enough that larger models borrow from it.

More with an account

Listen to every day’s papers

Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.

Join free
KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.