DeepTheorem: Advancing LLM Reasoning for Theorem Proving Through Natural Language and Reinforcement Learning

Ziyin Zhang, Jiahao Xu, Zhiwei He, Tian Liang, Qiuzhi Liu, Yansi Li, Linfeng Song, Zhengwen Liang, Zhuosheng Zhang, Rui Wang, Zhaopeng Tu, Haitao Mi, Dong Yu

Introduction

Theorem proving represents a pinnacle of logical reasoning for artificial intelligence. Traditional Automated Theorem Proving (ATP) has historically relied on formal languages like Lean or Coq. While these systems offer rigorous verification, they present a significant barrier for Large Language Models (LLMs), which are natively optimized for natural language. DeepTheorem proposes a shift toward informal theorem proving, leveraging the natural language knowledge LLMs acquire during pre-training to unlock complex mathematical reasoning.

Methodology: RL-Zero and Verifiable Variants

The primary challenge in informal theorem proving is the lack of a "ground truth" compiler to verify logical steps. DeepTheorem addresses this through RL-Zero, a reinforcement learning strategy that utilizes verifiable theorem variants.

For every theorem in the training set, the framework generates logically entailed (True) and contradictory (False) variants. A model is only rewarded if it maintains logical consistency across these variants. This "consistency-as-verification" approach acts as a soft compiler, forcing the model to engage in genuine reasoning rather than memorizing specific proof patterns.

An example of an informal mathematical proof generated in natural language and LaTeX.

The training utilizes Group Relative Policy Optimization (GRPO), which optimizes reasoning efficiency by eliminating the need for a separate critic model, allowing the 7B parameter model to focus entirely on its internal "thinking" process.

The DeepTheorem Dataset

To support this framework, the authors introduced the DeepTheorem Dataset, a massive collection of 121,000 high-quality, IMO-level informal theorems. Unlike existing datasets, this collection is rigorously decontaminated and categorized by difficulty (Levels 1–9). The scale of this dataset is significantly larger than previous open-source efforts, providing the necessary breadth for robust RL training.

Experimental Results

The effectiveness of the DeepTheorem framework is most evident in the performance of the DeepTheorem-RL-7B model. Despite its relatively small size, it achieved state-of-the-art results on elite benchmarks including FIMO, Putnam, and HMMT.

Comparison of dataset scale and performance metrics across various LLMs.

As shown in the performance analysis, the 7B model achieved an outcome score of 47.2%, significantly outperforming the much larger Qwen2.5-Math-72B (35.8%) and Llama3.3-70B (29.3%). Furthermore, process evaluations—which judge the logic and clarity of reasoning steps—showed that RL-Zero training specifically incentivizes higher-quality "thinking" tags compared to standard supervised fine-tuning (SFT).

Conclusion

DeepTheorem demonstrates that reasoning capability is not solely a product of model scale. By aligning training with the natural language strengths of LLMs and introducing a novel verification mechanism through theorem variants, small models can achieve performance previously reserved for massive commercial systems. This work paves the way for more efficient, natural-language-based mathematical exploration and automated reasoning.

Summary updated

BibTeX
@misc{zhang2025deeptheorem,
  author = {Ziyin Zhang and Jiahao Xu and Zhiwei He and Tian Liang and Qiuzhi Liu and Yansi Li and Linfeng Song and Zhengwen Liang and Zhuosheng Zhang and Rui Wang and Zhaopeng Tu and Haitao Mi and Dong Yu},
  title = {{DeepTheorem: Advancing LLM Reasoning for Theorem Proving Through Natural Language and Reinforcement Learning}},
  year = {2025},
  eprint = {2505.23754},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.23754},
}
Figure