PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards
PreciseCoder trains code models to debug with smaller, localized edits instead of hallucinating bugs.
PreciseCoder augments unit-test rewards for code-model debugging with a signal for semantically verified, localized edits. Unit-test-only training raises pass rates but also teaches models to edit more and to invent bugs in already-correct code. On 4B, 9B, and 27B models, PreciseCoder cuts average edit lines from 7-15 to 3 at comparable pass rates and generalizes from single-line bugs to repository-level repair. Reasoning traces from a 9B PreciseCoder improve edit precision of GPT-5.6 Sol and Qwen3.8-Max by 4.6-12.4 points without further training.
- Unit-test-only rewards raise pass rates but increase edits and hallucinated bugs.
- PreciseCoder adds a reward for semantically verified, localized edits.
- On 4B, 9B, and 27B models, average edit lines fall from 7-15 to 3.
- Single-line-bug training generalizes to repository-level repair with smaller patches.
- A 9B reasoning trace lifts frontier edit precision by 4.6-12.4 points.
- Products
- PreciseCoder
- AI models
- GPT-5.6 SolQwen3.8-Max
From the original article
1 min read at huggingface.coReinforcement 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.
By Yunkai Zhan, Miaosen Chai, Shangshang Wang · huggingface.co
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.