程序验证是 AI 安全的关键环节,Claude Code 在 Lean 4 上接近完美的表现意味着做形式化验证的团队可以大幅提升效率,建议关注其编译器闭环范式。
该论文评估了 Claude Code 在 CLEVER 基准(Lean 4 可验证代码生成)上的表现。结果显示,Claude 为 98.8% 的问题生成了有效的规范(其中 81.3% 通过了同构评分),87.5% 的问题通过了正确规范的实现验证,端到端管线成功率达 98.1%。Claude 还能对自身尝试提供高质量反馈,识别失败原因和数据集中的错误。这表明现有程序验证基准已不足以衡量现代智能体证明器的能力,需要更严格、抗错误的评估方法。
Agentic Proving for Program Verification
Agentic systems have recently emerged as state-of-the-art approaches for automated theorem proving in formal mathematics. To assess how far these capabilities extend to program verification, we evaluate Claude Code in an agentic proving framework on CLEVER, a Lean 4 benchmark for verifiable code generation. Our results show that Claude generates arguably valid specifications for 98.8% of problems (with 81.3% also accepted by CLEVER's isomorphism-based scoring on the correct portion of the benchmark), certifies implementations against correct ground-truth specifications for 87.5% of problems, and reaches a 98.1% success rate on the end-to-end program generation and verification pipeline over entries with self-consistent premises. Across all stages, Claude further provides high-quality feedback on its own attempts (as confirmed under manual review), identifying underlying causes of failure and lingering bugs in the dataset. These findings highlight a growing mismatch between the difficulty of existing program verification benchmarks and the capabilities of modern agentic provers, and point to the need for more rigorous, bug-resilient evaluation methodologies, and in particular for alternatives to isomorphism-based scoring of generated specifications. More broadly, our results provide empirical evidence that tight compiler-in-the-loop agentic paradigms are currently the most effective approach for foundational program verification.