paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Baldur: Whole-Proof Generation and Repair with Large Language Models

Baldur:使用大型语言模型进行整体证明生成与修复
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 7/10 · 论文将LLM用于Isabelle/HOL定理证明的整证明生成与修复,对应画像中AI→PL方向里“用LLM改进形式化验证”的核心兴趣;但它不涉及静态分析、浮点程序分析或贝叶斯程序分析,且主要基于微调模型,与当前更强模型/Agentic工具化研究的距离使其未达正中核心。引用 206 inbox
Emily First, Markus N. Rabe, Talia Ringer, Yuriy Brun
crossref: 2026-09-12dblp: 2026-09-12arxiv: 2026-09-12

AI 速览

一句话:用微调大语言模型一次性生成完整证明,并借助失败尝试与错误信息修复,提升自动形式化验证能力。

形式化验证虽理想但人力成本极高,已有工作多采用逐步预测证明步骤并搜索证明空间的方式。本文提出用经过自然语言、代码与证明数据微调的大语言模型一次性生成完整证明,并进一步训练修复模型:将先前失败的证明尝试及其错误信息作为额外上下文,对生成证明进行修复,从而增强证明能力。作者实现了原型工具 Baldur,在包含 6,336 条 Isabelle/HOL 定理及其证明的基准上评估,表明整体证明生成与基于搜索的方法同样有效且更高效,修复与额外上下文能进一步提升成功率。Baldur 还可补充最先进工具 Thor,为额外 8.7% 的定理自动生成证明,二者合计可全自动证明 65.7% 的定理,为用大语言模型自动化形式化验证开辟了新方向。

问题
形式化验证劳动密集,现有自动化方法多依赖逐步预测证明步骤并搜索证明空间,效率与可扩展性受限。
方法
微调大语言模型使其一次性生成完整证明,并训练修复模型,以失败证明尝试和错误信息作为额外上下文来修复生成结果。
评估
在 6,336 条 Isabelle/HOL 定理及证明的基准上评估原型 Baldur,并与最先进工具 Thor 比较,显示整体生成高效、修复有效,且能补充证明额外 8.7% 的定理。
原文摘要(Abstract)

Formally verifying software is a highly desirable but labor-intensive task. Recent work has developed methods to automate formal verification using proof assistants, such as Coq and Isabelle/HOL, e.g., by training a model to predict one proof step at a time and using that model to search through the space of possible proofs. This paper introduces a new method to automate formal verification: We use large language models, trained on natural language and code and fine-tuned on proofs, to generate whole proofs at once. We then demonstrate that a model fine-tuned to repair generated proofs further increasing proving power. This paper: (1) Demonstrates that whole-proof generation using transformers is possible and is as effective but more efficient than search-based techniques. (2) Demonstrates that giving the learned model additional context, such as a prior failed proof attempt and the ensuing error message, results in proof repair that further improves automated proof generation. (3) Establishes, together with prior work, a new state of the art for fully automated proof synthesis. We reify our method in a prototype, Baldur, and evaluate it on a benchmark of 6,336 Isabelle/HOL theorems and their proofs, empirically showing the effectiveness of whole-proof generation, repair, and added context. We also show that Baldur complements the state-of-the-art tool, Thor, by automatically generating proofs for an additional 8.7% of the theorems. Together, Baldur and Thor can prove 65.7% of the theorems fully automatically. This paper paves the way for new research into using large language models for automating formal verification.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@inproceedings{FirstRRB23,
  title = {Baldur: Whole-Proof Generation and Repair with Large Language Models},
  author = {Emily First and Markus N. Rabe and Talia Ringer and Yuriy Brun},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3616243}
}