DeepSeek-Prover:通过大规模合成数据推进大语言模型中的定理证明

DeepSeek-Prover: Advancing Theorem Proving in LLMs through Large-Scale Synthetic Data

深度求索 DeepSeek-AI · DeepSeek · 2024-05-23 · arXiv:2405.14333 ↗ · 被引 229

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

像 Lean 这样的证明助手彻底改变了数学证明的验证方式,确保了高准确性和可靠性。尽管大语言模型在数学推理方面显示出潜力,但它们在形式定理证明方面的进展受到训练数据缺乏的阻碍。为了解决这个问题,我们提出了一种方法,从高中和本科水平的数学竞赛问题中生成大量的 Lean 4 证明数据。该方法包括将自然语言问题转化为形式化陈述,过滤低质量陈述,并生成证明以创建合成数据。在包含 800 万条形式化陈述及其证明的合成数据集上微调 DeepSeekMath 7B 模型后,我们的模型在 Lean 4 miniF2F 测试中实现了 46.3%(64 个样本)的整句证明生成准确率,累计准确率达到 52%,超过了基线 GPT-4(64 个样本准确率 23.0%)和树搜索强化学习方法(准确率 41.0%)。此外,我们的模型在 Lean 4 形式化国际数学奥林匹克(FIMO)基准测试中成功证明了 148 个问题中的 5 个,而 GPT-4 未能证明任何问题。这些结果表明,利用大规模合成数据来增强大语言模型的定理证明能力具有巨大潜力。合成数据集和模型都将公开,以促进这一有前景领域的进一步研究。

Proof assistants like Lean have revolutionized mathematical proof verification, ensuring high accuracy and reliability. Although large language models (LLMs) show promise in mathematical reasoning, their advancement in formal theorem proving is hindered by a lack of training data. To address this issue, we introduce an approach to generate extensive Lean 4 proof data derived from high-school and undergraduate-level mathematical competition problems. This approach involves translating natural language problems into formal statements, filtering out low-quality statements, and generating proofs to create synthetic data. After fine-tuning the DeepSeekMath 7B model on this synthetic dataset, which comprises 8 million formal statements with proofs, our model achieved whole-proof generation accuracies of 46.3% with 64 samples and 52% cumulatively on the Lean 4 miniF2F test, surpassing the baseline GPT-4 at 23.0% with 64 samples and a tree search reinforcement learning method at 41.0%. Additionally, our model successfully proved 5 out of 148 problems in the Lean 4 Formalized International Mathematical Olympiad (FIMO) benchmark, while GPT-4 failed to prove any. These results demonstrate the potential of leveraging large-scale synthetic data to enhance theorem-proving capabilities in LLMs. Both the synthetic dataset and the model will be made available to facilitate further research in this promising field.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 16)

阅读逐段中英对照全文 →