arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.14274cs.SEcs.AIcs.LGcs.LOcs.PL
收藏

使用大型语言模型进行证明自动化

Proof Automation with Large Language Models

Purdue University(普渡大学)

Minghai Lu, Benjamin Delaware, Tianyi Zhang

AI总结:

针对LLM在Coq等交互式定理证明器中生成正式证明时低层细节易错的问题,提出PALM生成后修复方法,利用符号方法迭代修复LLM生成的初始证明,显著提升了定理证明数量并超越现有方法。

摘要:

诸如Coq之类的交互式定理证明器是正式保证软件正确性的强大工具。然而,使用这些工具需要大量的手动工作和专业知识。虽然大型语言模型(LLMs)在自动生成自然语言的非正式证明方面显示出了潜力,但它们在交互式定理证明器中生成正式证明方面效果较差。在本文中,我们进行了一项形成性研究,以识别LLMs在被要求生成正式证明时犯的常见错误。通过分析GPT-3.5生成的520个证明错误,我们发现GPT-3.5通常能识别出证明的正确高层结构,但在正确处理低层细节方面存在困难。基于这一洞察,我们提出了PALM,一种新颖的生成后修复方法,它首先提示LLM生成初始证明,然后利用有针对性的符号方法迭代修复低层问题。我们在包含超过10K个定理的大型数据集上评估了PALM。我们的结果显示,PALM显著优于其他最先进的方法,成功证明的定理数量多76.6%至180.4%。此外,PALM证明了1270个现有方法无法触及的定理。我们还展示了PALM在不同LLMs上的泛化能力。

英文摘要:

Interactive theorem provers such as Coq are powerful tools to formally guarantee the correctness of software. However, using these tools requires significant manual effort and expertise. While Large Language Models (LLMs) have shown promise in automatically generating informal proofs in natural language, they are less effective at generating formal proofs in interactive theorem provers. In this paper, we conduct a formative study to identify common mistakes made by LLMs when asked to generate formal proofs. By analyzing 520 proof generation errors made by GPT-3.5, we found that GPT-3.5 often identified the correct high-level structure of a proof, but struggled to get the lower-level details correct. Based on this insight, we propose PALM, a novel generate-then-repair approach that first prompts an LLM to generate an initial proof and then leverages targeted symbolic methods to iteratively repair low-level problems. We evaluate PALM on a large dataset that includes more than 10K theorems. Our results show that PALM significantly outperforms other state-of-the-art approaches, successfully proving 76.6% to 180.4% more theorems. Moreover, PALM proves 1270 theorems beyond the reach of existing approaches. We also demonstrate the generalizability of PALM across different LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑