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

一种用于形式化定理证明的上下文学习智能体

An In-Context Learning Agent for Formal Theorem-Proving

The University of Texas at Austin(得克萨斯大学奥斯汀分校)

Amitayush Thakur, George Tsoukalas, Yeming Wen, Jimmy Xin, Swarat Chaudhuri

AI总结:

本文提出 COPRA,一种通过 GPT-4 在有状态回溯搜索中反复提议策略并利用执行反馈与引理检索的上下文学习智能体,在 Lean 和 Coq 形式化定理证明上优于少样本与微调方法。

摘要:

我们提出了一种用于在 Lean 和 Coq 等环境中进行形式化定理证明的上下文学习智能体。当前针对该问题的最先进模型是在特定环境的证明数据上进行微调的。相比之下,我们的方法称为 COPRA,在有状态回溯搜索中反复要求一个高容量、通用的 LLM(GPT-4)提出策略应用。提出的策略在底层证明环境中执行。来自执行的反馈被用来构建下一次模型查询的提示,同时还包括从搜索历史中选择的信息以及从外部数据库检索到的引理。我们在 Lean 的 miniF2F 基准和 CompCert 项目的一组 Coq 任务上评估了 COPRA 的实现。在这些基准上,COPRA 显著优于 GPT-4 的少样本调用。它还与基于微调的方法相比表现良好,在 pass@1 指标上优于 ReProver(一种用于 Lean 的最先进微调方法)。我们的代码和数据可在 https://github.com/trishullab/copra 获取。

英文摘要:

We present an in-context learning agent for formal theorem-proving in environments like Lean and Coq. Current state-of-the-art models for the problem are finetuned on environment-specific proof data. By contrast, our approach, called COPRA, repeatedly asks a high-capacity, general-purpose large language model (GPT-4) to propose tactic applications from within a stateful backtracking search. Proposed tactics are executed in the underlying proof environment. Feedback from the execution is used to build the prompt for the next model query, along with selected information from the search history and lemmas retrieved from an external database. We evaluate our implementation of COPRA on the miniF2F benchmark for Lean and a set of Coq tasks from the CompCert project. On these benchmarks, COPRA significantly outperforms few-shot invocations of GPT-4. It also compares favorably against finetuning-based approaches, outperforming ReProver, a state-of-the-art finetuned approach for Lean, in terms of the pass@1 metric. Our code and data are available at https://github.com/trishullab/copra.

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

↑