arXiv:cs.AI· Yunkai Zhan, Miaosen Chai, Shangshang Wang, Jike Zhong, Yuqing Yang, Deqing Fu, Serina Chang, Wang Bill Zhu·· 17 小时前
PreciseCoder:超越单元测试奖励的精准代码调试训练算法
PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards
AI 导读
PreciseCoder 通过为单元测试奖励增加语义验证的局部编辑信号,在 4B、9B、27B 模型上将平均编辑行数从 7-15 行降至 3 行,通过率与纯单元测试训练持平。仅用单行 bug 训练即可泛化到仓库级程序修复,以更小补丁解决更多问题。其推理轨迹还能让 GPT-5.6 Sol 和 Qwen3.8-Max 等前沿模型编辑精度提升 4.6-12.4 分,无需额外训练。
正文
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.
| Comments: | 29 pages, 14 figures |
| Subjects: | Software Engineering (cs.SE); Artificial Intelligence (cs.AI); Computation and Language (cs.CL) |
| Cite as: | arXiv:2610.18755 [cs.SE] |
| (or arXiv:2610.18755v1 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2610.18755 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Yunkai Zhan [view email]
[v1]
Tue, 13 Oct 2026 17:19:10 UTC (694 KB)
来源:arXiv:cs.AI · arxiv.org