arXiv:2502.00212cs.LGcs.AI2025-02ICML被引 79

让大模型自己出题自己解题,持续提升数学定理证明能力。

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

论文配图:STP: Self-play LLM Theorem Provers with Iterative Conjecturing and Proving
图 1 · 摘自论文原文
  • 设计双向自博弈系统:一个角色出难题,另一个角色解题,互相训练。
  • 在Lean数据集上证明率提升至28.5%,是之前最佳结果的两倍。
  • 适合对自动化推理、形式化验证感兴趣的开发者与研究者。

大语言模型在形式化定理证明中面临高质量训练数据稀缺的问题。尽管强化学习或专家迭代通过交替生成证明与微调可缓解此问题,但因正确证明稀少(奖励稀疏),性能迅速达到瓶颈。受数学家不断提出新猜想并尝试求解的启发,我们提出自博弈定理证明框架STP,让模型同时扮演出题者与解题者双重角色,互为训练信号。出题者基于当前解题者几乎无法证明的猜想进行迭代训练,逐步生成更难题目;解题者则采用标准专家迭代策略尝试证明。我们在Lean和Isabelle两个形式化系统上评估,使用513亿个令牌训练后,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。

原文摘要 · Abstract (English)

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.

定理证明自博弈大模型形式化验证

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。