rStar-Math: Small LLMs Can Master Math Reasoning with Self-Evolved Deep Thinking

Xinyu Guan, Li Lyna Zhang, Yifei Liu, Ning Shang, Youran Sun, Yi Zhu, Fan Yang, Mao Yang

Abstract

Recent advancements in Large Language Models (LLMs) have highlighted the potential of "System 2" thinking—deliberate, multi-step reasoning—for complex tasks. However, achieving this in small language models (SLMs) without relying on distillation from larger "teacher" models has remained a challenge. We present rStar-Math, a novel framework that utilizes Monte Carlo Tree Search (MCTS) and a self-evolved Process Preference Model (PPM) to boost the mathematical reasoning capabilities of SLMs. By incorporating code-augmented Chain-of-Thought (CoT) and a four-round self-evolution process, rStar-Math enables a 7B-parameter model to achieve a 90.0% accuracy on the MATH benchmark, rivaling OpenAI’s o1-preview.

Introduction

Complex mathematical reasoning often acts as a "System 1" bottleneck for standard LLMs, which typically generate solutions in a single pass. While models like OpenAI’s o1 have popularized slower, more deliberate reasoning, the recipe for small, open-source models is less clear. Key obstacles include the scarcity of high-quality reasoning data, the "teacher ceiling" imposed by distillation, and the noise inherent in training process reward models. rStar-Math addresses these by building a frontier-level policy and reward model from scratch through iterative self-evolution.

Methodology: MCTS and Self-Evolution

The core of rStar-Math is a deep thinking process driven by MCTS and a pairwise preference model that avoids the pitfalls of traditional reward regression.

Overview of the rStar-Math framework, including MCTS-driven deep thinking, preference pair construction, and the four-round self-evolution process.

MCTS-driven Deep Thinking

At test-time, the model performs a tree search to explore multiple reasoning paths. Each node in the tree represents a reasoning step, and the search is guided by a reward model to prioritize the most promising branches. This allows the model to backtrack if a chosen path becomes too complex, finding simpler, more elegant solutions.

Code-Augmented CoT and Verification

To ensure the correctness of intermediate steps, rStar-Math generates a natural language thought followed by Python code. A step is only validated if the code executes successfully. This "hard" verification acts as a ground truth filter, significantly reducing hallucinations that often plague pure natural language reasoning.

Process Preference Model (PPM)

Rather than regressing to absolute Q-values, which can be imprecise, the authors train a PPM using pairwise ranking. This model learns to distinguish between "good" and "bad" steps based on their eventual contribution to a correct final answer, making it much more robust against the noise inherent in MCTS rollouts.

Experimental Results

The performance of rStar-Math is evaluated across several rigorous benchmarks, including MATH, AIME 2024, and Olympiad Bench.

Comparison of rStar-Math performance against frontier models like OpenAI o1 and GPT-4o across various math benchmarks.

As shown in the table above, rStar-Math (Qwen-7B) achieves a 90.0% accuracy on the MATH benchmark, matching OpenAI o1-mini and surpassing o1-preview (+4.5%). Even the 3.8B Phi3-mini model reaches 86.4%, demonstrating the framework's efficiency. On the highly challenging AIME 2024, the 7B model solved 53.3% of problems, placing it in the top tier of high school math performance.

Key Insights

  • Verification is Crucial: Python execution provides a reliable signal for intermediate reasoning steps, eliminating the "lucky guess" problem.
  • Preference Over Regression: Pairwise ranking for process rewards is more robust than traditional regression, effectively "guiding" the policy model toward expert-level strategies like identifying specific theorems.
  • Scaling Laws: Performance continues to improve as more test-time compute (more MCTS trajectories) is allocated, demonstrating a clear "System 2" scaling law for small models.

Conclusion and Future Work

rStar-Math proves that small models can achieve frontier-level reasoning through structured search and self-evolution. While currently focused on mathematics and code-verifiable tasks, future work aims to extend this framework to multimodal reasoning and broader domains. The primary trade-off remains the inference cost of MCTS, suggesting a future path toward distilling these "System 2" capabilities back into faster, single-pass models.

Summary updated

BibTeX
@inproceedings{guan2025rstar,
  author = {Xinyu Guan and Li Lyna Zhang and Yifei Liu and Ning Shang and Youran Sun and Yi Zhu and Fan Yang and Mao Yang},
  title = {{rStar-Math: Small LLMs Can Master Math Reasoning with Self-Evolved Deep Thinking}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=5zwF1GizFa},
}
Figure