VerifyThisBench:同时生成代码、规范与证明
VerifyThisBench: Generating Code, Specifications, and Proofs All at Once
AI总结:
针对现有代码生成基准饱和且缺乏可信度保障的问题,本文提出VerifyThisBench基准,要求模型从自然语言提取规范、实现并证明,评估显示SOTA模型通过率低于4%,并发布基准与环境以推动形式验证能力。
摘要:
大型语言模型(LLMs)在代码生成方面已展现出显著进展,但许多现有基准正趋于饱和,且对生成程序的可信度保障甚微。为了提升对模型在形式正确性推理方面的可见性,我们引入了VerifyThisBench,这是一个从自然语言描述出发评估端到端程序验证的新基准:模型必须(i)提取形式化规范,(ii)以支持验证的语言实现代码,以及(iii)构建机器可检查的证明。我们的评估显示,即便是最先进的(SOTA)模型(如o3-mini),其通过率也低于4%,且许多输出无法编译。为隔离难点来源,我们进一步提出了VerifyThisBenchXS,这是一个放宽的变体,其中提供了部分实现或证明。在九个模型和七种验证工具上对两个基准进行测试,我们观察到基于反馈的细化带来了一致的提升,但总体通过率仍然较低,凸显了形式推理方面的巨大差距。我们发布了该基准及统一的评估环境,以促进未来模型验证能力的提升。
英文摘要:
Large language models (LLMs) have demonstrated remarkable progress in code generation, but many existing benchmarks are approaching saturation and offer little guarantee on the trustworthiness of the generated programs. To improve visibility into model reasoning on formal correctness, we introduce VerifyThisBench, a new benchmark that evaluates end-to-end program verification from natural language descriptions: models must (i) extract formal specifications, (ii) implement in a verification-aware language, and (iii) construct machine checkable proofs. Our evaluation reveals that even state-of-the-art (SOTA) models, such as o3-mini, achieve a pass rate of less than 4%, with many outputs failing to compile. To isolate sources of difficulty, we further propose VerifyThisBenchXS, a relaxed variant in which partial implementations or proofs are provided. Across nine models and seven verification tools on both benchmarks, we observe consistent gains with feedback-driven refinement, but overall pass rates remain low, underscoring substantial gaps in formal reasoning. We release the benchmark and the unified evaluation environment to catalyze the verification capabilities for future models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。