让AI像数学家一样持续学习新定理,不遗忘旧知识。
LeanAgent: Lifelong Learning for Formal Theorem Proving
- 用动态知识库和渐进训练实现持续学习
- 在23个仓库中补全155个高级定理证明
- 适合长期研究数学推理的AI系统开发者
大型语言模型(LLMs)在集成交互式证明助手Lean后,在数学推理任务如形式化定理证明中表现优异。现有方法通常在特定数据集上训练或微调,仅适用于特定领域(如本科数学),难以推广到高等数学。其根本局限在于静态领域设定,无法模拟数学家跨领域、循环性工作的现实。本文提出LeanAgent,一种面向形式化定理证明的终身学习框架,可在不断扩展的数学知识中持续泛化并提升能力,且不遗忘已有知识。核心创新包括:基于数学难度的课程学习策略、高效管理演进知识的动态数据库、以及平衡稳定与可塑性的渐进训练机制。LeanAgent成功为23个不同领域的Lean仓库生成了155条此前缺失的形式化证明,涵盖抽象代数、代数拓扑等高阶内容。相较于静态LLM基线,其在复杂定理证明上表现显著更优,并展现出从基础概念到高级主题的学习进展。进一步分析显示,其在稳定性与回溯迁移(backward transfer)指标上得分优异——学习新任务反而提升了对旧任务的性能,体现了持续泛化与进步的能力,解释了其优越的定理证明表现。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have been successful in mathematical reasoning tasks such as formal theorem proving when integrated with interactive proof assistants like Lean. Existing approaches involve training or fine-tuning an LLM on a specific dataset to perform well on particular domains, such as undergraduate-level mathematics. These methods struggle with generalizability to advanced mathematics. A fundamental limitation is that these approaches operate on static domains, failing to capture how mathematicians often work across multiple domains and projects simultaneously or cyclically. We present LeanAgent, a novel lifelong learning framework for formal theorem proving that continuously generalizes to and improves on ever-expanding mathematical knowledge without forgetting previously learned knowledge. LeanAgent introduces several key innovations, including a curriculum learning strategy that optimizes the learning trajectory in terms of mathematical difficulty, a dynamic database for efficient management of evolving mathematical knowledge, and progressive training to balance stability and plasticity. LeanAgent successfully generates formal proofs for 155 theorems across 23 diverse Lean repositories where formal proofs were previously missing, many from advanced mathematics. It performs significantly better than the static LLM baseline, proving challenging theorems in domains like abstract algebra and algebraic topology while showcasing a clear progression of learning from basic concepts to advanced topics. In addition, we analyze LeanAgent's superior performance on key lifelong learning metrics. LeanAgent achieves exceptional scores in stability and backward transfer, where learning new tasks improves performance on previously learned tasks. This emphasizes LeanAgent's continuous generalizability and improvement, explaining its superior theorem-proving performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。