跳到正文
HuggingFace Daily Papers(社區熱門論文)·· 2026-10-13AI 評分49

PreciseCoder:超越單元測試獎勵限制,實現精準且可泛化的程式除錯

PreciseCoder: Faithful and Generalizable Debugging Beyond Unit-Test Rewards

AI 導讀

PreciseCoder 以語義驗證的局部修改作為獎勵,提升程式修復精準度及泛化能力。在 4B、9B、27B 模型上,平均修改行數由 7-15 行降至 3 行,通過率與僅用單元測試訓練相若。使用其 9B 模型的推理軌跡後,GPT-5.6 Sol 和 Qwen3.8-Max 的修改精準度提升 4.6-12.4 個百分點,無須額外訓練。

正文

Published on Oct 13

Authors:

,

,

,

,

,

,

Abstract

PreciseCoder improves code repair by rewarding precise, localized edits rather than only unit-test passage, reducing unnecessary changes and improving generalization across model sizes.

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 arXiv page View PDF Project page Add to collection

Get this paper in your agent:

hf papers read 2610.18755

Don't have the latest CLI?

curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper 3

PreciseCoder/PreciseCoder-27B

Reinforcement Learning •

27B •

Updated 1 day ago

•

56

•

1

PreciseCoder/PreciseCoder-4B

Reinforcement Learning •

5B •

Updated 1 day ago

•

17

•

1

PreciseCoder/PreciseCoder-9B

Reinforcement Learning •

9B •

Updated 1 day ago

•

25

•

1

Datasets citing this paper 1

PreciseCoder/pdb-test

Viewer •

Updated 1 day ago

•

1.21k

•

311

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2610.18755 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.

來源:HuggingFace Daily Papers(社區熱門論文) · huggingface.co