AI 中文总结
AuditCoder通过带契约注释的任务图为代码生成保留责任标识,结合保守定位器与有界修复,在APPS、ClassEval数据集上取得优于CoT+重试的可审计代码生成效果。
AI 中文摘要
代码生成器会返回程序,但通常不会保留将故障与产生受影响代码的决策关联起来,或界定合理修复所需的构建记录。我们提出AuditCoder,它将程序和可审计构建轨迹作为联合输出。在代码生成前,带契约注释的任务图会分配稳定的责任标识,这些标识会附着于每个承诺、其所属实现、来源、验证证据及干预历史。当验证失败时,保守定位器会将异构证据映射到节点或依赖分支,或弃权(不执行),而有界修复仅会重新生成该区域,同时复用冻结的补充部分。在APPS数据集上,\texttt{pass@1}达到82.5%–83.0%,挽回了大量因未修复的图分解导致的损失,但比AgentCoder低7.5–8.5个百分点;在ClassEval上,其达到75.0%–82.0%,优于CoT + 重试,但仍低于AgentCoder。对200条APPS记录的单独审计得出0.9725的任务-宏决策-代码轨迹覆盖率;定位器为60次故障中的26次识别出有证据支持的节点或分支,其中17次局部修复通过。对于具有稳定、可局部测试边界的任务,该图不仅作为分解结构,还作为验证与修复的持久索引。
英文摘要
Code generators return programs, but typically do not preserve the construction record needed to connect a failure to the decision that produced the affected code or to delimit a justified repair. We present AuditCoder, which treats the program and an auditable construction trace as joint outputs. Before code generation, a contract-annotated task graph assigns stable responsibility identities that remain attached to each commitment, its owned implementation, provenance, validation evidence, and intervention history. When validation fails, a conservative locator maps heterogeneous evidence to a node or dependency branch---or abstains---and bounded repair regenerates only that region while reusing the frozen complement. On APPS, \method{} reaches $82.5$--$83.0\%$ \texttt{pass@1}, recovering much of the loss caused by unrepaired graph decomposition but trailing AgentCoder by $7.5$--$8.5$ points. On ClassEval, it reaches $75.0$--$82.0\%$, outperforming CoT + retry while remaining below AgentCoder. A separate audit of 200 APPS records yields $0.9725$ task-macro decision--code trace coverage; the locator identifies an evidence-supported node or branch for 26 of 60 failures, and 17 of those localized repairs pass. For tasks with stable, locally testable boundaries, the graph functions not only as a decomposition structure but also as a persistent index for validation and repair.
CommentsPreprint. 37 pages, 5 figures. Code and data are available at the project repository