跳到正文
arXiv cs.AI· Abhishek Kaushik, Jordan Feldstein, Dalila P\^irvu, Krishnendu Ray, Leo Tsourides·· 2 天前AI 评分44

诊断智能体生成代码中的状态有效性问题

Diagnosing State Validity in Agent-Generated Code

AI 导读

一项 arXiv 研究分析了编码智能体为 7 个精确优化任务编写的 15 个程序,每个程序都通过了全部隐藏测试并获得满分验证奖励,但在某个合法输入上出错。研究用证明、穷举 oracle 或模拟器验证等方式独立确立错误,其中 8 个程序存在具体状态缺陷,5 个切换到自身精确分支后即返回正确答案。作者建议评测不仅应检验输出正确性,还应检验状态表示、更新与保留决策是否保住后续决策所需信息。

正文 · 原文

View PDF HTML (experimental)

Abstract:In exact search and optimization, programs must decide which partial solutions to represent, update, and retain. An incorrect decision can remove information needed to reach the optimum, even when the program passes every hidden test. We examine fifteen programs written by coding agents for seven exact optimization tasks. Each passed every hidden test and received full verifier reward, yet each is incorrect on a valid input.
We establish each error independently of the task's reference solution, using a proof, an exhaustive oracle, or a permitted plan checked by a simulator derived from the task statement. We then investigate whether the error arises from how the program represents, updates, or retains its working state. Eight programs show evidence of a specific state defect: in six, changing the implicated retention or transition decision restores an independently established comparison value on the input that exposed the error; in two, we exhibit merged or omitted histories without a restoring edit. Five more return the correct answer when switched from an approximate fallback to their own exact branch, without locating the error within the fallback. One fails on an input that activates its fallback, with no edit tested, and one remains unlocalized. No edit establishes global correctness.
Some hidden suites never reached the decisions implicated in these failures; others reached them without exposing an incorrect answer. These cases establish concrete false-positive verifier outcomes, not their prevalence or any effect on training. These failures suggest that evaluations should test not only whether a program produces the correct output, but also whether its state representation, updates, and retention decisions preserve the information required for later decisions.
Comments: 32 pages, 3 figures, 16 tables
Subjects: Artificial Intelligence (cs.AI); Software Engineering (cs.SE)
ACM classes: D.2.5; D.2.4; I.2.2
Cite as: arXiv:2612.05893 [cs.AI]
  (or arXiv:2612.05893v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2612.05893

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Dalila Pîrvu [view email]
[v1] Thu, 3 Dec 2026 15:17:55 UTC (112 KB)

来源:arXiv cs.AI · arxiv.org