[论文解读] LEGO-Prover: Neural Theorem Proving with Growing Libraries
LEGO-Prover 引入一个模块化、可增长的技能库,使基于LLM的证明器能够检索并演化引理以证明定理。它通过利用新创建和演化的引理来提高 miniF2F 的通过率。
Despite the success of large language models (LLMs), the task of theorem proving still remains one of the hardest reasoning tasks that is far from being fully solved. Prior methods using language models have demonstrated promising results, but they still struggle to prove even middle school level theorems. One common limitation of these methods is that they assume a fixed theorem library during the whole theorem proving process. However, as we all know, creating new useful theorems or even new theories is not only helpful but crucial and necessary for advancing mathematics and proving harder and deeper results. In this work, we present LEGO-Prover, which employs a growing skill library containing verified lemmas as skills to augment the capability of LLMs used in theorem proving. By constructing the proof modularly, LEGO-Prover enables LLMs to utilize existing skills retrieved from the library and to create new skills during the proving process. These skills are further evolved (by prompting an LLM) to enrich the library on another scale. Modular and reusable skills are constantly added to the library to enable tackling increasingly intricate mathematical problems. Moreover, the learned library further bridges the gap between human proofs and formal proofs by making it easier to impute missing steps. LEGO-Prover advances the state-of-the-art pass rate on miniF2F-valid (48.0% to 57.0%) and miniF2F-test (45.5% to 47.1%). During the proving process, LEGO-Prover also manages to generate over 20,000 skills (theorems/lemmas) and adds them to the growing library. Our ablation study indicates that these newly added skills are indeed helpful for proving theorems, resulting in an improvement from a success rate of 47.1% to 50.4%. We also release our code and all the generated skills.
研究动机与目标
- 通过模块化引理重用来自动化形式推理,以应对日益复杂的定理。
- 通过证明器和演化器组件实现经验证技能库的动态增长。
- 通过使LLMs在Isabelle/Lean-like环境中重用和演化引理来桥接非形式与形式证明。
提出的方法
- 证明器将定理分解为子目标并从不断增长的技能库中检索相关引理,以构建一个模块化的Isabelle证明。
- 演化器将现有引理转化为更通用、可重用的形式,并解决未解决的请求以生成新的引理。
- 三个向量存储(引理、请求、问题)通过嵌入和最近邻检索对技能进行编码和检索,以为提示提供信息。
- LLMs草拟非正式证明,然后用检索到的引理和验证者反馈将其形式化为Isabelle证明脚本。
- 基于Isabelle/Sledgehammer的验证加上启发式策略在需要时自动纠错证明,并将验证通过的引理加入库。
- 一个增长循环:来自证明器/演化器的新引理经验证并加入,扩展未来证明的库。

实验结果
研究问题
- RQ1在与LLMs结合时,日益增长的模块化技能库是否能提高神经定理证明?
- RQ2演化出的引理是否能超出其原始问题的范围,帮助其他证明?
- RQ3模块化证明构建与单块证明在证明成功率和效率上有何差异?
- RQ4移除技能库对证明性能有什么影响?
- RQ5生成的技能库有多大、多样,以及如何被利用?
主要发现
- LEGO-Prover 实现了 57.0% miniF2F-valid 和 50.0% miniF2F-test 通过率(有人工非正式证明)以及 52.4%/45.5%(模型非正式证明)。
- LEGO-Prover 在 miniF2F 上的表现优于之前的方法,大约领先约 6.75 个百分点(平均值)。
- 一个增长的技能库使持续改进成为可能:在50次尝试内,若不使用库的验证下降从50.4%至47.1%。
- 该库最终包含22,532个技能,贡献来自证明器(10.8%)、请求驱动演化器(38.2%)和定向变换器演化器(51.1%)。
- 技能可以直接使用或作为灵感来源以激发新引理,提升LLM的证明生成。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。