Spark-Prover-X1: Formal Theorem Proving Through Diverse Data Training

Xinyuan Zhou, Yi Lei, Xiaoyu Zhou, Jingyi Sun, Yu Zhu, Zhongyi Ye, Weitai Zhang, Quan Liu, Si Wei, Cong LiuarXiv 2025 · DOI

Introduction

Automated Theorem Proving (ATP) is often considered the "grand challenge" of artificial intelligence. Unlike standard natural language tasks, formal mathematical reasoning demands absolute logical precision; even a minor syntax error or a single logical leap can invalidate an entire proof. Spark-Prover-X1, a 7B-parameter model, addresses this challenge by demonstrating that moderately sized models can achieve state-of-the-art performance through sophisticated data engineering and training strategies.

The development of Spark-Prover-X1 targets two primary hurdles in the field: the scarcity of high-quality formal language data (such as Lean or Isabelle) and the difficulty of "whole-proof generation," where models must independently plan and execute complex logical deductions.

Methodology: A Three-Stage Refinement Pipeline

To maximize the reasoning potential of a 7B-parameter architecture, the researchers implemented a three-stage "progressive refinement" framework. This pipeline integrates continuous pre-training, expert iteration, and reinforcement learning to build deep mathematical intuition.

The Spark-Prover-X1 training pipeline, illustrating the progression from pre-training to supervised fine-tuning (SFT) and reinforcement learning (RL).
  1. Continuous Pre-training & State Prediction: The model was trained on a massive corpus of formal and informal data. A key innovation was the "CoT-augmented state prediction" task. Rather than simply predicting the next line of code (tactic), the model learns to describe the resulting mathematical state in natural language. This forces the model to understand the underlying logic of each step.
  2. Expert Iteration (SFT): The system utilizes a dual-model approach involving a Prover and a Formalizer. These models operate in a feedback loop: the formalizer translates natural language problems into formal code, the prover attempts to solve them, and successful proofs are incorporated back into the training set to specialize the models further.
  3. Reinforcement Learning (GRPO): In the final stage, the model undergoes Group Relative Policy Optimization (GRPO). This allows the model to refine its strategies on the most difficult problems by comparing multiple proof attempts, using a formal proof assistant as the ground truth for verification.

Datasets and Evaluation Benchmarks

The training corpus included diverse sources such as GitHub repositories and Mathlib4 tutorials. To evaluate the model's real-world academic problem-solving capabilities, the authors introduced ExamFormal-Bench, a dataset of 402 problems curated from high school and undergraduate examinations and math competitions. Other standard benchmarks used for evaluation include miniF2F, ProofNet, PutnamBench, and CombiBench.

Key Results and Performance

Spark-Prover-X1-7B has established itself as a leader among open-source models in its weight class, achieving the highest average score (37.0%) across eight major benchmarks compared to other 7B and 8B models.

Comparative performance of Spark-Prover and Spark-Formalizer against other leading models like DeepSeek and Goedel across multiple benchmarks.
  • PutnamBench: The model solved 27 problems (pass@32), outperforming many significantly larger systems.
  • CombiBench: It achieved a 24.0% success rate, nearly doubling the performance of DeepSeek-Prover-V2-7B (16%).
  • Formalization Excellence: Spark-Formalizer-X1-7B reached a 78.85% pass rate on ProofNet-test, showcasing its superior ability to translate informal mathematics into rigorous formal code.

Key Insights and Future Directions

A critical takeaway from the Spark-Prover-X1 project is that state awareness is fundamental to reasoning. By using Chain-of-Thought (CoT) to describe proof states, the model moves beyond rote memorization toward strategic intuition. Furthermore, the synergy between the Prover and Formalizer creates a virtuous cycle of data generation and verification.

While highly capable, 7B models still face limitations when dealing with the massive search spaces required for Olympiad-level problems. Future work may involve integrating more intensive search algorithms, such as Monte Carlo Tree Search (MCTS) or step-wise generation, to further push the boundaries of automated formal reasoning.

Summary updated

Abstract

Large Language Models (LLMs) have shown significant promise in automated theorem proving, yet progress is often constrained by the scarcity of diverse and high-quality formal language data. To address this issue, we introduce Spark-Prover-X1, a 7B parameter model trained via an three-stage framework designed to unlock the reasoning potential of more accessible and moderately-sized LLMs. The first stage infuses deep knowledge through continuous pre-training on a broad mathematical corpus, enhanced by a suite of novel data tasks. Key innovation is a "CoT-augmented state prediction" task to achieve fine-grained reasoning. The second stage employs Supervised Fine-tuning (SFT) within an expert iteration loop to specialize both the Spark-Prover-X1-7B and Spark-Formalizer-X1-7B models. Finally, a targeted round of Group Relative Policy Optimization (GRPO) is applied to sharpen the prover's capabilities on the most challenging problems. To facilitate robust evaluation, particularly on problems from real-world examinations, we also introduce ExamFormal-Bench, a new benchmark dataset of 402 formal problems. Experimental results demonstrate that Spark-Prover achieves state-of-the-art performance among similarly-sized open-source models within the "Whole-Proof Generation" paradigm. It shows exceptional performance on difficult competition benchmarks, notably solving 27 problems on PutnamBench (pass@32) and achieving 24.0\% on CombiBench (pass@32). Our work validates that this diverse training data and progressively refined training pipeline provides an effective path for enhancing the formal reasoning capabilities of lightweight LLMs. We will release both Spark-Prover-X1-7B and Spark-Formalizer-X1-7B, along with the ExamFormal-Bench dataset, in the near future.
BibTeX
@misc{zhou2025spark,
  author = {Xinyuan Zhou and Yi Lei and Xiaoyu Zhou and Jingyi Sun and Yu Zhu and Zhongyi Ye and Weitai Zhang and Quan Liu and Si Wei and Cong Liu},
  title = {{Spark-Prover-X1: Formal Theorem Proving Through Diverse Data Training}},
  year = {2025},
  eprint = {2511.13043},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.13043},
}
Figure