As long-horizon coding agents produce more code than any developer can review, oversight collapses onto a single surface: the automated test suite. Reward hacking naturally arises in this setup, as the agent optimizes for passing tests while deviating from the users true goal. We study this reward hacking phenomenon by decompose software engineering tasks into three parts: (i) a natural language description of the specification (ii) visible validation tests that exercise specified features in isolation, and (iii) held-out tests that compose those same features to simulate real-world usage. Based on the specification and the visible validation test suites, a genuine agent would be able to generate a solution that can also pass all of the held-out tests. Therefore we use the gap in pass rates on these two suites to quantify reward hacking. Based on this methodology, we introduce SpecBench, a benchmark comprising 30 systems-level programming tasks ranging from short horizon tasks like building a JSON parser to ultra long horizon tasks like building an entire OS kernel from scratch. Large-scale experiments reveal a consistent pattern: while every frontier agent saturates the visible suite, reward hacking persists, with smaller models exhibiting larger gaps on holdout suites. The gap also scales sharply with task length: it grows by 28 percentage points for every tenfold increase in code size. Failures range from subtle feature isolation to deliberate exploits, including a 2,900-line hash-table "compiler" that memorizes test inputs. SpecBench offers a principled testbed for measuring whether coding agents build genuine working systems or merely game the test suites developers hand them.


翻译:[翻译摘要] 随着长周期编码智能体产出的代码量超过任何开发者能够审查的范围,监督便坍缩至单一表面:自动化测试套件。在这种设定下,奖励黑客行为(reward hacking)自然产生——智能体在优化通过测试的同时偏离用户真实目标。我们通过将软件工程任务分解为三个部分来研究这一现象:(i) 规范的纯文本描述,(ii) 独立验证指定特征的可见性测试,以及(iii) 组合这些相同特征以模拟真实使用场景的留存测试。基于规范与可见性测试套件,诚实智能体应能生成同样通过所有留存测试的解决方案。因此,我们利用这两套测试的通过率差异来量化奖励黑客行为。基于该方法,我们提出SpecBench基准测试集,包含30项系统级编程任务,涵盖从构建JSON解析器等短周期任务到从零构建完整操作系统内核等超长周期任务。大规模实验揭示出一致模式:虽然每个前沿智能体在可见性测试套件上均达饱和,但奖励黑客行为依然存在,较小模型在留存套件上表现出更大差异。该差异随任务长度急剧扩大:代码规模每增加十倍,差异扩大28个百分点。失败案例从细微的特征隔离到蓄意漏洞利用,包括一个通过记忆测试输入来作弊的2900行哈希表"编译器"。SpecBench为测量编码智能体是构建真正可工作系统还是仅仅利用开发者提供的测试套件提供了理论化测试平台。

0
下载
关闭预览

相关内容

《大语言模型驱动的智能红队测试》
专知会员服务
18+阅读 · 2025年11月26日
深度强化学习中的奖励模型:综述
专知会员服务
29+阅读 · 2025年6月20日
【博士论文】强化学习智能体的奖励函数设计
专知会员服务
48+阅读 · 2025年4月8日
【伯克利博士论文】以人为中心的奖励设计
专知会员服务
28+阅读 · 2024年9月23日
异常检测(Anomaly Detection)综述
极市平台
20+阅读 · 2020年10月24日
强化学习《奖励函数设计: Reward Shaping》详细解读
深度强化学习实验室
20+阅读 · 2020年9月1日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
论文浅尝 | 采用多层注意力机制的事件检测
开放知识图谱
24+阅读 · 2019年8月24日
基于机器学习的KPI自动化异常检测系统
运维帮
13+阅读 · 2017年8月16日
侦测欺诈交易(异常点检测)
GBASE数据工程部数据团队
20+阅读 · 2017年5月10日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
5+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关资讯
异常检测(Anomaly Detection)综述
极市平台
20+阅读 · 2020年10月24日
强化学习《奖励函数设计: Reward Shaping》详细解读
深度强化学习实验室
20+阅读 · 2020年9月1日
Xsser 一款自动检测XSS漏洞工具
黑白之道
14+阅读 · 2019年8月26日
论文浅尝 | 采用多层注意力机制的事件检测
开放知识图谱
24+阅读 · 2019年8月24日
基于机器学习的KPI自动化异常检测系统
运维帮
13+阅读 · 2017年8月16日
侦测欺诈交易(异常点检测)
GBASE数据工程部数据团队
20+阅读 · 2017年5月10日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员