arXiv:2605.09134cs.AIcs.SE2026-05中稿 · ICML被引 3

用双重奖励模型提升程序修复的精准度,让AI更懂代码修改的关键位置。

BoostAPR: Boosting Automated Program Repair via Execution-Grounded Reinforcement Learning with Dual Reward Models

论文配图:BoostAPR: Boosting Automated Program Repair via Execution-Grounded Reinforcement Learning with Dual Reward Models
图 1 · 摘自论文原文
  • 通过执行验证的示范数据微调模型,结合推理轨迹增强学习
  • 双奖励模型分别评估整体修复效果与逐行贡献度,提升反馈精度
  • 在多语言、多数据集上表现优异,适合需要高精度修复的开发者

程序修复中的强化学习受限于稀疏的执行反馈和粗粒度的序列级奖励,难以定位有效修改。我们提出BoostAPR,一个三阶段框架:(1)基于带推理轨迹的执行验证示范数据进行监督微调;(2)从执行结果训练双奖励模型——一个序列级评估器与一个行级贡献分配器;(3)使用PPO优化,由行级模型将奖励重新分配至关键修改区域。该行级信用分配机制具有代码修改的自然中间粒度。在SWE-Gym上训练,在四个基准上评估,BoostAPR在SWE-bench Verified上达到40.7%(比基础模型高22.9个百分点),Defects4J(Python-to-Java迁移)上达24.8%,HumanEval-Java上达84.5%,QuixBugs上达95.0%,在开源模型中表现竞争力,并展现出强大的跨语言泛化能力。

原文摘要 · Abstract (English)

Reinforcement learning for program repair is hindered by sparse execution feedback and coarse sequence-level rewards that obscure which edits actually fix bugs. We present BoostAPR, a three-stage framework addressing these challenges: (1) supervised fine-tuning on execution-verified demonstrations with reasoning traces, (2) training dual reward models--a sequence-level assessor and a line-level credit allocator--from execution outcomes, and (3) PPO optimization where the line-level model redistributes rewards to critical edit regions. This line-level credit assignment operates at an intermediate granularity naturally suited to code changes. Trained on SWE-Gym and evaluated on four benchmarks, BoostAPR achieves 40.7% on SWE-bench Verified (+22.9pp over base model), 24.8% on Defects4J (Python-to-Java transfer), 84.5% on HumanEval-Java, and 95.0% on QuixBugs, achieving competitive results among open-source models with strong cross-language generalization.

程序修复强化学习代码生成跨语言

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。