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

**Authors:** Huajian Xin, Daya Guo, Zhihong Shao, Zhizhou Ren, Qihao Zhu, Bo Liu, Chong Ruan, Wenda Li, Xiaodan Liang  
**arXiv:** [2405.14333](https://arxiv.org/abs/2405.14333)  
**Date:** 2024-05-23  
**Summary page:** https://www.summarizepaper.com/en/paper/2405.14333v1/

## Key points

- Proof assistants like Lean have revolutionized mathematical proof verification by ensuring accuracy and reliability.
- Progress of large language models (LLMs) in formal theorem proving is hindered by a lack of training data.
- A novel approach has been introduced to generate extensive Lean 4 proof data from high-school and undergraduate-level mathematical competition problems.
- The DeepSeekMath 7B model was fine-tuned on a dataset comprising 8 million formal statements with proofs, leading to remarkable advancements.
- The model demonstrated whole-proof generation accuracies surpassing both the baseline GPT-4 and a tree search reinforcement learning method.
- Leveraging synthetic data generated through this method enhances theorem-proving capabilities in LLMs.

## Summary

, , , , 


Proof assistants, such as Lean, have revolutionized mathematical proof verification by ensuring accuracy and reliability. However, the progress of large language models (LLMs) in formal theorem proving is hindered by a lack of training data. To address this challenge, a novel approach has been introduced to generate extensive Lean 4 proof data from high-school and undergraduate-level mathematical competition problems. This innovative method involves translating natural language problems into formal statements, filtering out low-quality statements, and generating proofs to create synthetic data. By fine-tuning the DeepSeekMath 7B model on this dataset comprising 8 million formal statements with proofs, remarkable advancements have been achieved. like Lean have transformed the landscape of mathematical  by ensuring high accuracy and reliability. While  show promise in mathematical reasoning, their progress in formal  is hindered by a lack of training data. To address this challenge, a novel approach has been introduced to generate extensive Lean 4 proof data derived from high-school and undergraduate-level mathematical competition problems. This innovative method involves translating natural language problems into formal statements, filtering out low-quality statements, and generating proofs to create synthetic data. By fine-tuning the DeepSeekMath 7B model on this synthetic dataset comprising 8 million formal statements with proofs, remarkable advancements have been achieved. The model demonstrated whole-proof generation accuracies of 46.3% with 64 samples on the Lean 4 miniF2F test, surpassing both the baseline GPT-4 at 23.0% and a tree search reinforcement learning method at 41.0%. Moreover, the 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 highlight the potential of leveraging  to enhance theorem-proving capabilities in LLMs. In response to the ongoing challenges faced in automated theorem proving due to limited datasets for formal proof languages, a method has been proposed for generating extensive Lean 4 proof data from informal mathematical problems. This approach involves translating high-school and undergraduate-level competition problems into formal statements, automating proof generation using LLMs, and verifying correctness within the Lean 4 environment. To ensure both scale and quality of synthetic data generated through this method, a multi-step process has been implemented for quality assurance. Filtering out simple statements and invalid hypotheses is followed by an iterative framework that refines proof quality by generating synthetic statements from informal math problems using an under-trained LLM fine-tuned on limited data. Furthermore, addressing challenges related to the large search space for proofs, the method accelerates proof generation by proving negated statements in parallel and terminating processing once either the original statement or its negation is proven. The effectiveness of this approach was evaluated on Lean 4 theorem proving using benchmarks such as miniF2F and FIMO benchmarks. Results indicate that the iteratively trained model performs strongly with significant improvements in accuracy compared to existing methods. In summary, this research introduces an iterative method that synthesizes millions of formal statements accompanied by proofs from informal math problems, significantly enhancing scalability and quality of synthetic data. The model trained on this dataset achieves state-of-the-art performance on various benchmarks, showcasing its potential for advancing automated theorem proving capabilities in LLMs.
