用通用编程大模型自动把数学论文转成可验证代码。
Beyond the Library: An Agentic Framework for Autoformalizing Research Mathematics

- 设计多智能体系统动态扩展类型定义,支持研究级数学形式化。
- 在32道普特南竞赛题和7篇顶会论文上成功生成可验证证明。
- 无需额外公理即可形式化两个前沿成果,适合数学与AI交叉研究者。
尽管大型语言模型在数学推理方面表现优异,但仍常出现难以被人类发现的细微错误。形式化数学语言如Lean 4具备机械证明校验能力,强烈推动了自动形式化的需求——即把自然语言数学自动翻译为可验证代码。近期趋势显示,针对通用编程优化的大型语言模型,已超越专门微调用于Lean的小模型。基于此转变,我们提出Theo,一个由通用编码大模型驱动的代理式自动形式化框架。系统核心是一个协调器,管理专为研究级数学设计的多智能体流水线。由于前沿研究常涉及Mathlib等现有库未覆盖的概念,我们的系统通过一种新型辅助引理技术,在形式化主定理前动态扩展并验证所需类型定义。我们将方法应用于PutnamBench,对随机抽取的32道题目生成机器可检查的Lean证明。此外,我们在七篇研究论文上进行评估——包括五篇来自ACM Symposium on Theory of Computing(STOC)及两篇近期OpenAI论文——涵盖组合数学、通信复杂性、机制设计、学习理论、数论、离散几何和图论。成功形式化其主定理与证明,并经人类专家验证;值得注意的是,其中两项成果仅依赖Lean内核的公理。所有形式化结果均公开于https://beyondthelibrary.github.io/formal_arxiv/。
原文摘要 · Abstract (English)
While Large Language Models (LLMs) have demonstrated exceptional capabilities in mathematical reasoning, they frequently produce subtle errors that evade human detection. Formal mathematical languages like Lean 4 offer mechanical proof checking, strongly motivating the need for autoformalization: the automatic translation of natural language mathematics into verifiable code. Recent trends indicate that general-purpose LLMs, heavily optimized for standard programming, now outperform smaller models explicitly fine-tuned for Lean. Leveraging this shift, we introduce *Theo*, an agentic autoformalization framework powered by general coding LLMs. At the core of our system is an orchestrator that manages a multi-agent pipeline tailored for research-level mathematics. Because cutting-edge research frequently relies on concepts outside the scope of existing libraries like Mathlib, our system dynamically extends necessary type definitions and validates them via a novel Auxiliary Lemma technique before formalizing the primary theorems. We applied our approach to PutnamBench, producing machine-checked Lean proofs for a random sample of 32 problems. Furthermore, we evaluate our system on seven research papers---five from the ACM Symposium on Theory of Computing (STOC) and two recent OpenAI manuscripts---spanning combinatorics, communication complexity, mechanism design, learning theory, number theory, discrete geometry, and graph theory. We successfully formalize their main theorems and proofs and validate the generated formalizations with human experts; notably, two developments require no axioms beyond Lean's kernel. All of our formalizations are available at https://beyondthelibrary.github.io/formal_arxiv/.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。