程序重构下大语言模型生成的证明有多稳定?可验证代码生成的压力测试
How Stable Are LLM-Generated Proofs Under Program Refactoring? A Stress Test for Verifiable Code Generation
AI总结:
本文通过提出RefactorProof,测试程序重构下LLM生成证明的稳定性,发现专用证明器证明的未变更存活率高于参考证明,且失效修复成本较低。
摘要:
可验证代码生成的基准通常针对固定实现测试证明的有效性,本文探究在保留行为的程序重构后,同一证明是否仍有效。我们提出RefactorProof,从185项VERINA任务中衍生出458个Lean认证变体,这些变体在固定环境中可编译,且规范与评估证明逐字节固定。VERINA为46项任务提供参考证明,均来自其基础拆分;模型与参考的主要比较在21-25个短的非递归任务上匹配。结构重构暴露了不同证明来源的显著脆弱性:任务归一化的结构PSR,参考证明为4.3%,专用证明器为13.3%-26.8%。在匹配任务上,专用证明器的证明整体未变更证明存活率高于参考制品:DeepSeek-Prover-V2-7B高15.6个百分点,Goedel-Prover-V2-32B高18.8个百分点,Goedel-Prover-V2-8B高20.3个百分点,三者95%置信区间均不包含零。排除普遍存活的T1变体、采用家族平衡聚合及替代可部署有效证明选择规则后,该排序仍成立。但未变更证明失效与修复成本不同:预定义的单标识符编辑可修复51/54个合格参考结构失效和58/85个合格证明器失效。因此,RefactorProof测量程序重构下未变更证明的稳定性,而非证明失效后的维护成本。
英文摘要:
Benchmarks for verifiable code generation usually test a proof against one fixed implementation. We ask whether the same proof remains valid after a program refactoring that preserves behavior. We introduce RefactorProof, which derives 458 Lean-certified variants from the 185 VERINA tasks that compile in our pinned environment while holding the specification and evaluated proof fixed byte-for-byte. VERINA supplies reference proofs for 46 tasks, all from its basic split; the primary model-versus-reference comparisons further match on 21-25 short, non-recursive tasks. Structural refactorings expose substantial brittleness across proof sources: task-normalized structural PSR is 4.3% for the supplied references and 13.3-26.8% for the specialized provers. On the matched tasks, specialized prover proofs nevertheless have higher overall unchanged-proof survival than the supplied reference artifacts: +15.6 points for DeepSeek-Prover-V2-7B, +18.8 for Goedel-Prover-V2-32B, and +20.3 for Goedel-Prover-V2-8B; all three 95% CIs exclude zero. The ordering persists after excluding universally survived T1 variants, under family-balanced aggregation, and under alternative deployable valid-proof selection rules. However, unchanged-proof failure is not the same as high repair cost: predefined one-identifier edits repair 51/54 eligible reference structural failures and 58/85 eligible prover failures. RefactorProof therefore measures unchanged-proof stability under program refactoring, not the cost of maintaining a proof after it breaks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。