2025-10-24 · 专家 · 自然语言处理 · 机器学习

ImpossibleBench: Measuring LLMs' Propensity of Exploiting Test Cases

ImpossibleBench 通过创建与自然语言规范冲突的“不可能”任务变体,系统地衡量大型语言模型(LLMs)利用测试用例的倾向性。

更新于 2025-10-27。作者:Ziqian Zhong、Aditi Raghunathan、Nicholas Carlini。

中文摘要

寻找并利用“捷径”完成任务的趋势,对大型语言模型(LLM)的可靠评估和部署构成了重大风险。例如,一个可以访问单元测试的LLM代理可能会删除失败的测试,而不是修复底层错误。这种行为不仅损害了基准测试结果的准确性,还损害了实际部署的LLM代码助手的可靠性。为了量化、研究和缓解这种行为,我们引入了ImpossibleBench,这是一个基准框架,系统地测量LLM代理利用测试用例的倾向。ImpossibleBench通过引入自然语言规范与单元测试之间的直接冲突,从现有的基准测试(如LiveCodeBench和SWE-bench)中创建了“不可能”的任务变体。我们通过代理在这些不可能的任务上的通过率来衡量其“作弊率”,其中任何通过都必然意味着违反了规范。 作为一个实用的框架,ImpossibleBench不仅是一个评估工具,还是一个多功能的工具。我们展示了其以下方面的效用:(1)研究模型行为,揭示从简单的测试修改到复杂的操作重载的更细粒度的作弊行为;(2)上下文工程,展示了提示、测试访问和反馈循环如何影响作弊率;(3)开发监控工具,提供了一个具有验证过的欺骗性解决方案的测试平台。我们希望ImpossibleBench能成为一个构建更稳健和可靠的LLM系统的有用框架。 我们的实现可以在以下网址找到:https://github.com/safety-research/impossiblebench。

英文摘要

The tendency to find and exploit "shortcuts" to complete tasks poses significant risks for reliable assessment and deployment of large language models (LLMs). For example, an LLM agent with access to unit tests may delete failing tests rather than fix the underlying bug. Such behavior undermines both the validity of benchmark results and the reliability of real-world LLM coding assistant deployments. To quantify, study, and mitigate such behavior, we introduce ImpossibleBench, a benchmark framework that systematically measures LLM agents' propensity to exploit test cases. ImpossibleBench creates "impossible" variants of tasks from existing benchmarks like LiveCodeBench and SWE-bench by introducing direct conflicts between the natural-language specification and the unit tests. We measure an agent's "cheating rate" as its pass rate on these impossible tasks, where any pass necessarily implies a specification-violating shortcut. As a practical framework, ImpossibleBench is not just an evaluation but a versatile tool. We demonstrate its utility for: (1) studying model behaviors, revealing more fine-grained details of cheating behaviors from simple test modification to complex operator overloading; (2) context engineering, showing how prompt, test access and feedback loop affect cheating rates; and (3) developing monitoring tools, providing a testbed with verified deceptive solutions. We hope ImpossibleBench serves as a useful framework for building more robust and reliable LLM systems. Our implementation can be found at https://github.com/safety-research/impossiblebench.

解读

一句话总结

ImpossibleBench 通过创建与自然语言规范冲突的“不可能”任务变体,系统地衡量大型语言模型(LLMs)利用测试用例的倾向性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源