arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2502.00212cs.LGcs.AIcs.LO
收藏

STP:具备迭代猜想与证明能力的自博弈大语言模型定理证明器

STP: Self-play LLM Theorem Provers with Iterative Conjecturing and Proving

Stanford University(斯坦福大学)

Kefan Dong, Tengyu Ma

AI总结:

针对大语言模型形式化定理证明中训练数据不足、奖励稀疏的问题,提出兼具猜想生成与证明双角色的自博弈定理证明器STP,通过迭代互训提升性能,在多个基准数据集上取得整证明生成方法的最优结果。

摘要:

大语言模型(LLM)进行形式化定理证明的核心挑战是缺乏高质量训练数据。尽管强化学习或专家迭代通过交替执行“LLM生成证明”和“基于生成的正确证明微调模型”的流程,部分缓解了这一问题,但由于正确证明稀缺(奖励稀疏),模型性能会很快进入平台期。为在数据有限的情况下持续提升模型效果,我们从数学家的研究模式中汲取灵感:数学家会不断产出新成果,部分方式是提出新颖的猜想或练习题(通常是已知结果的变体)并尝试解决它们。我们设计了自博弈定理证明器(Self-play Theorem Prover,STP),它同时承担猜想生成器和证明器两个角色,二者互为对方提供训练信号。猜想生成器基于此前生成的、当前证明器刚好能证明的猜想进行迭代训练,这会激励它随时间推移生成难度逐步提升的猜想。证明器则通过标准的专家迭代方法尝试证明这些猜想。我们使用Lean和Isabelle两种形式化验证工具对STP进行评估。在Lean环境下训练过程共生成513亿个token,STP能证明LeanWorkbook数据集中28.5%的命题,是此前专家迭代方法取得的13.2%最优结果的两倍。最终模型在miniF2F-test(65.0%,pass@3200)、Proofnet-test(23.9%,pass@3200)和PutnamBench(8/644,pass@3200)的整证明生成方法中达到了当前最优性能。我们已在以下网址发布代码、模型和数据集:https://github.com/kfdong/STP。

英文摘要:

A fundamental challenge in formal theorem proving by LLMs is the lack of high-quality training data. Although reinforcement learning or expert iteration partially mitigates this issue by alternating between LLM generating proofs and finetuning them on correctly generated ones, performance quickly plateaus due to the scarcity of correct proofs (sparse rewards). To keep improving the models with limited data, we draw inspiration from mathematicians, who continuously develop new results, partly by proposing novel conjectures or exercises (which are often variants of known results) and attempting to solve them. We design the Self-play Theorem Prover (STP) that simultaneously takes on two roles, conjecturer and prover, each providing training signals to the other. The conjecturer is trained iteratively on previously generated conjectures that are barely provable by the current prover, which incentivizes it to generate increasingly challenging conjectures over time. The prover attempts to prove the conjectures with standard expert iteration. We evaluate STP with both Lean and Isabelle formal versifiers. With 51.3 billion tokens generated during the training in Lean, STP proves 28.5% of the statements in the LeanWorkbook dataset, doubling the previous best result of 13.2% achieved through expert iteration. The final model achieves state-of-the-art performance among whole-proof generation methods on miniF2F-test (65.0%, pass@3200), Proofnet-test (23.9%, pass@3200) and PutnamBench (8/644, pass@3200). We release our code, model, and dataset in this URL: https://github.com/kfdong/STP.

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

↑