AI 编程 5.0 · 必读 2026-11-24 · 论文

Online Environment Repair for Coding Agents

RL 训练 coding agent 时,验证器缺陷与不完整单元测试会让策略钻空拿满分旧防线各有失败模式:罚输出把捷径藏进推理里或误伤真解;过滤任务会静音捷径最早出现的难题;训前加固漏掉训练中才暴露的漏洞类论文提出 online environment repair:保持触发样本奖励不变以消除隐藏动机,训练中异步修补被利用的环境;候选修复由执行不变量或差分 fuzzing 触发,过三道自动验证门才上线,可跨仓库传播20 组 GRPO 实验:累计 reward hacking 36.9%0.06%,held-out Pass@8 21.7%46.7%,并零样本消除未见漏洞类

打开原文回到归档

Online Environment Repair for Coding Agents

  • ID: d97086d8
  • 原文链接: https://arxiv.org/abs/2611.32037
  • PDF: https://arxiv.org/pdf/2611.32037
  • 作者: Sheng Lu, Rui Mao, Zewei Chen
  • 日期: 2026-11-24
  • 更新: 2026-11-24
  • 分类: coding
  • 来源类型: paper
  • 标签: rl-environment, reward-hacking, coding-agents, training-infrastructure
  • 质量评分: 5/5
  • 抓取时间: 2026-11-27T15:41:08Z

中文导读

验证器被钻空是 RL 训练 coding agent 的结构性问题。这篇把「修补」搬进训练循环:奖励保持不变消除隐藏动机,异步修补被利用的环境,三道自动验证门保证修复不误伤真解,还能跨仓库传播。20 组 GRPO 受控实验给出大幅数字。

为什么值得关注

自建 RL 训练环境的团队可以直接对照三道验证门的设计;「奖励不动 + 异步修环境」的思路也适用于任何用可程序化验证器做奖励的场景。

条目一句话:RL 环境反钻空的新路线:奖励不动、训练中异步修补环境,三道验证门把关,hacking 率 36.9% 压到 0.06%

关键信息

  • 标题:Online Environment Repair for Coding Agents
  • 作者:Sheng Lu, Rui Mao, Zewei Chen
  • 原文:https://arxiv.org/abs/2611.32037
  • 发布时间:2026-11-24
  • 来源分类:cs.LG, cs.CR, cs.SE
  • 备注:15 pages, 7 figures
  • 关联标签:rl-environment, reward-hacking, coding-agents, training-infrastructure

English 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.

English Summary

Verifiers give scalable RL rewards for coding agents, but harness defects and incomplete unit tests let policies earn full credit without solving the task. Prior defenses fail: penalizing outputs pushes shortcuts under reasoning monitors or zeroes valid solutions; filtering tasks mutes the hardest problems where shortcuts appear earliest; pre-training hardening misses vulnerability classes that surface only as policies improve. Online environment repair keeps triggering rewards unchanged to remove hiding incentives and asynchronously patches exploited environments in training. Candidate repairs from execution invariants or differential fuzzing deploy only after three validation gates and propagate structurally across repositories. Across 20 controlled GRPO runs: cumulative reward hacking 36.9% to 0.06%, held-out Pass@8 21.7% to 46.7%, unseen exploit classes eliminated zero-shot.

证据与来源

opencli arxiv paper 2611.32037 -f json(2026-11-27 抓取,摘要全文在档)+ 论文流水线 2026-11-27 要点摘录。