arXiv:2510.15681cs.LOcs.AI2025-10被引 19

让自然语言数学证明自动转为可验证的Lean代码

ProofBridge: Auto-Formalization of Natural Language Proofs in Lean via Joint Embeddings

  • 用联合嵌入模型对齐自然语言与形式化语言的定理和证明
  • 通过检索增强和迭代修复,提升证明的语义与类型正确性
  • 在多个指标上超越主流模型,适合数学推理与AI形式化研究者

将人类书写的数学定理与证明从自然语言(NL)自动翻译为形式语言(FL)如Lean 4,长期是人工智能的重大挑战。现有方法多仅聚焦于定理或证明的单向转换,实际应用仍需人工干预——如2024年IMO中AlphaProof的银牌表现,即因题设需手动转译。本文提出ProofBridge,一个统一框架,实现从自然语言定理到形式化证明的端到端自动转换。核心是联合嵌入模型,将NL与FL的定理+证明对齐至共享语义空间,支持跨模态检索相关形式化示例以指导翻译。该框架结合检索增强微调与迭代证明修复,利用Lean的类型检查器和语义等价反馈,确保语法正确性与语义保真度。实验表明,在我们自建的miniF2F-Test-PF数据集上,ProofBridge显著优于强基线(包括GPT-5、Gemini-2.5、Kimina-Prover、DeepSeek-Prover),检索能力提升达3.28倍Recall@1,语义正确率(SC)提高31.14%,类型正确率(TC)提升1.64%(pass@32),相较基线Kimina-Prover-RL-1.7B。

原文摘要 · Abstract (English)

Translating human-written mathematical theorems and proofs from natural language (NL) into formal languages (FLs) like Lean 4 has long been a significant challenge for AI. Most state-of-the-art methods either focus on theorem-only NL-to-FL auto-formalization or on FL proof synthesis from FL theorems. In practice, auto-formalization of both theorem and proof still requires human intervention, as seen in AlphaProof's silver-medal performance at the 2024 IMO, where problem statements were manually translated before automated proof synthesis. We present ProofBridge, a unified framework for automatically translating entire NL theorems and proofs into Lean 4. At its core is a joint embedding model that aligns NL and FL (NL-FL) theorem+proof pairs in a shared semantic space, enabling cross-modal retrieval of semantically relevant FL examples to guide translation. ProofBridge integrates retrieval-augmented fine-tuning with iterative proof repair, leveraging Lean's type checker and semantic equivalence feedback to ensure both syntactic correctness and semantic fidelity. Experiments show substantial improvements in proof auto-formalization over strong baselines (including GPT-5, Gemini-2.5, Kimina-Prover, DeepSeek-Prover), with our retrieval-augmented approach yielding significant gains in semantic correctness (SC, via proving bi-directional equivalence) and type correctness (TC, via type-checking theorem+proof) across pass@k metrics on miniF2F-Test-PF, a dataset we curated. In particular, ProofBridge improves cross-modal retrieval quality by up to 3.28x Recall@1 over all-MiniLM-L6-v2, and achieves +31.14% SC and +1.64% TC (pass@32) compared to the baseline Kimina-Prover-RL-1.7B.

形式化证明自然语言Lean4AI数学

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