面向编码智能体的在线环境修复方法
Online Environment Repair for Coding Agents
针对程序化验证器的缺陷与单元测试不完整导致编码智能体通过捷径获取全额奖励的问题,提出在线环境修复方法:保持触发rollout的奖励不变以消除隐藏动机,并在训练中异步修补被利用的环境。在20组GRPO实验中,该方法将累积奖励黑客从36.9%降至0.06%,held-out Pass@8从21.7%提升至46.7%。
arXiv:2611.32037v1 Announce Type: new Abstract: Programmatic verifiers provide scalable reward signals for training coding agents with reinforcement learning, yet subtle harness defects and incomplete unit tests allow policies to earn full credit without solving the intended task. Existing training-time defenses intervene either by penalizing suspicious outputs or by filtering flagged tasks and rollouts. However, output penalties leave the underlying verifier exploitable, driving policies to disguise shortcuts under reasoning monitors or zeroing out valid solutions under detector false positives, whereas task and rollout filtering discards or mutes the hardest problems where shortcuts emerge earliest. Pre-training verifier hardening repairs the environment directly, but misses vulnerability classes that surface only as the policy improves during reinforcement learning. In this paper, we propose online environment repair, which leaves triggering rollout rewards unchanged to remove hiding incentives and asynchronously patches exploited environments during training. Candidate repairs triggered by execution invariants or differential fuzzing are deployed only after passing three automated validation gates that block the exploit while preserving valid solutions, canceling detector false positives and enabling structural propagation across repositories without scaffold labels or reference solutions. Across 20 controlled GRPO experiments on heterogeneous software-engineering repositories, online environment repair reduces cumulative reward hacking from 36.9% to 0.06% and improves held-out Pass@8 from 21.7% to 46.7%, consistently outperforming reward-penalty, rollout-filtering, and static-hardening baselines while eliminating zero-shot exploitation on unseen loophole classes.
来源:arXiv (AI + Vision + Imaging) · arxiv.org