Preprint
Machine Learning

rStar-Math

January 1, 2025

0

Citations

0

Influential Citations

Venue

2025

Year

Abstract

Uses a deep thinking approach with Monte Carlo Tree Search and smaller language models to achieve state-of-the-art math reasoning, rivaling or surpassing larger models like OpenAI's. It employs a novel code-augmented CoT data synthesis, a process preference model (PPM) trained with pairwise ranking, and a self-evolution recipe to iteratively improve SLM performance on complex math problems, including Olympiad-level questions.

Analysis

Why This Paper Matters

Large language models like OpenAI's o1 have set new standards for mathematical reasoning, but their enormous size and computational demands make them inaccessible to many researchers and practitioners. rStar-Math challenges this paradigm by demonstrating that small language models (SLMs) can achieve comparable or even superior performance through a clever combination of Monte Carlo Tree Search (MCTS) and self-evolution. This is not just an incremental improvement—it's a fundamental shift in how we think about reasoning in AI. By showing that deep thinking can be instilled in small models without distillation from larger ones, the paper opens the door to deploying advanced reasoning capabilities on edge devices, in low-resource settings, and in applications where data privacy is paramount.

How It Works

Figure 1

The core idea is to train two models: a math policy SLM that generates reasoning steps, and a Process Preference Model (PPM) that evaluates them. Both are integrated into an MCTS framework that performs test-time search, breaking down complex problems into simpler single-step generation tasks. This step-by-step approach reduces the difficulty for the policy SLM compared to methods like Best-of-N, which require generating full solutions in one go.

Figure 2

A key innovation is the code-augmented Chain-of-Thought (CoT) synthesis. The policy model generates both a natural language reasoning step and corresponding Python code. Only steps where the code executes successfully are kept, effectively filtering out hallucinations. This is crucial because LLMs often produce incorrect steps that coincidentally lead to the correct answer—a problem that is hard to detect with traditional methods.

An example of Code-augmented CoT.

The PPM is trained using preference pairs rather than precise numerical scores. From the MCTS search tree, two steps with the highest Q-values leading to correct answers are selected as positive examples, and two with the lowest Q-values leading to incorrect answers as negative examples. This pairwise ranking approach avoids the difficulty of assigning exact scores to individual steps, which is notoriously noisy even for human experts.

Figure 4

The self-evolution recipe runs over four rounds. Round 1 bootstraps the system using a large teacher model (DeepSeek-Coder-V2-Instruct) with terminal-guided annotation. Round 2 trains a reliable PPM. Round 3 uses the PPM to guide MCTS, improving trajectory quality. Round 4 focuses on the hardest problems, using up to 128 rollouts to achieve 80.58% coverage on Olympiad-level problems.

Results

The results of rStar-Math and other frontier LLMs on the most challenging math benchmarks.

rStar-Math achieves remarkable results. With a 1.5B parameter model, it matches or exceeds the performance of OpenAI's o1 on several benchmarks. It consistently outperforms state-of-the-art System 2 baselines, even when using a smaller reward model. The method shows strong generalization across diverse benchmarks, including Olympiad Bench, College Math, and Gaokao.

Reasoning performance under scaling up the test-time compute.

Increasing test-time computation (number of trajectories) generally improves performance, but even with just 4 trajectories, rStar-Math significantly outperforms Best-of-N baselines. This demonstrates the efficiency of the MCTS-guided approach.

Significance

rStar-Math is a landmark paper for several reasons. First, it proves that small models can achieve frontier-level reasoning without relying on proprietary large models or distillation. This democratizes access to advanced AI capabilities. Second, the self-evolution framework provides a scalable path for continuous improvement without human annotation. Third, the code-augmented CoT and preference-based training offer practical solutions to common problems in reasoning systems, such as hallucination and noisy reward signals.

The broader impact extends beyond math reasoning. The techniques developed here—MCTS-guided search, code-augmented verification, and preference-based reward modeling—are applicable to any domain requiring step-by-step reasoning, from code generation to scientific discovery. As AI practitioners, we should watch for follow-up work that applies these ideas to other challenging tasks. The era of small, deep-thinking models may be just beginning.