Skip to content

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

Authors: Microsoft Research, Tsinghua University Published: January 2025 Paper: arxiv.org/abs/2501.04519


Why This Matters

rStar-Math proved small models can match large models on hard reasoning:

  • 🎯 7B model rivals 70B+ - David beats Goliath
  • 🔄 Self-evolution - Model improves itself without human data
  • 💡 Monte Carlo Tree Search - Game-playing AI for math
  • 📈 90%+ on GSM8K - With tiny 7B model
  • 💰 Efficient - No need for giant models

Real-world impact: - Democratizes reasoning AI (small models work!) - Proves self-improvement scales - Reduces compute requirements - Shows MCTS works for reasoning

The insight: Small models + smart search > large models with simple generation


The Breakthrough

Performance (7B model!)

MATH benchmark:

Model Size Score
GPT-4 ~1.7T 42.5%
LLaMA 3.1 70B 58.8%
rStar-Math 7B 63.9%

7B beats 70B!

GSM8K:

rStar-Math-7B: 94.6%
(Near perfect on grade school math)


How It Works

Monte Carlo Tree Search (MCTS)

Borrowed from AlphaGo:

Problem: "Solve x³ - 6x² + 11x - 6 = 0"

MCTS explores solution tree:

              Problem
                 |
        ┌────────┼────────┐
    Approach A  Approach B  Approach C
        |           |           |
    [evaluate]  [evaluate]  [evaluate]

Expand best approaches
Try multiple paths
Combine insights
Find solution

Why it works:

Single forward pass: May miss solution
MCTS: Explores many possibilities
Small model + search > large model alone

Self-Evolution

Bootstrap process:

1. Start with base 7B model

2. Use MCTS to solve problems
   - Generate many solution attempts
   - Keep correct ones

3. Train on own correct solutions
   - Model learns from itself
   - No human reasoning data needed

4. Improved model solves harder problems

5. Repeat (self-evolution!)

Key insight:

Model's mistakes + search = correct solutions
Train on those solutions
Model improves
Can now solve harder problems
Repeat


Technical Details

Process Reward Model (PRM)

Guides the search:

def evaluate_step(current_state, next_step):
    """
    Estimate: How likely is this step to lead to correct answer?

    Returns: Probability (0-1)
    """
    # Learned from successful solutions
    return prm_model.score(current_state, next_step)

# MCTS uses this to explore promising paths

Training Pipeline

Stage 1: Supervised Fine-Tuning

Train on standard math problems
Get basic reasoning ability

Stage 2: Self-Evolution with MCTS

for iteration in range(num_iterations):
    # Generate solutions with MCTS
    solutions = []
    for problem in training_set:
        solution = mcts_solve(problem, current_model)
        if verify_correct(solution):
            solutions.append((problem, solution))

    # Train on own solutions
    current_model = finetune(current_model, solutions)

    # Model gets better each iteration

Stage 3: Process Reward Training

Train PRM to predict step quality
Improves MCTS guidance
Better exploration


Comparison

rStar-Math vs DeepSeek-R1

Aspect DeepSeek-R1 rStar-Math
Size 671B total, 37B active 7B
Approach Pure RL RL + MCTS
Training cost $5.76M <$100K
Math (MATH) 97.3% 63.9%
Accessibility Requires GPUs Runs on laptop

rStar-Math: Much smaller, still impressive!

vs Standard 7B Models

Model MATH Score
LLaMA 3.1 7B 30.2%
Qwen 2.5 7B 42.1%
rStar-Math 7B 63.9%

2× improvement over base model!


Practical Usage

from rstar_math import RStarMathModel

# Load model
model = RStarMathModel.from_pretrained("rstar-math-7b")

# Solve with MCTS
problem = "If f(x) = x³ - 6x² + 11x - 6, find all zeros"

solution = model.solve_with_mcts(
    problem,
    num_simulations=100,  # More = better but slower
    max_depth=20
)

print(solution.answer)
print(solution.reasoning_trace)

Real-World Applications

1. Educational Tools

Deploy on student devices:
- 7B model runs on consumer hardware
- Helps with homework
- Shows step-by-step reasoning
- Affordable for schools

2. Research Assistants

Scientific calculations:
- Doesn't need cloud GPUs
- Privacy (runs locally)
- Good enough for most math

3. Proof of Concept

Shows what's possible:
- Small models + smart algorithms
- Efficiency over brute force
- Self-improvement works

Limitations

1. Slower Than Direct Generation

Standard model: <1 second
rStar-Math with MCTS: 10-30 seconds
Trade-off: Quality vs speed

2. Only Math

Specialized for mathematical reasoning
Not general-purpose like GPT-4

3. Still Below Frontier

rStar-Math 7B: 63.9%
DeepSeek-R1: 97.3%
GPT-4o: 76.6%

Good for its size, but not SOTA

Key Takeaways

  1. Small + search = competitive - 7B rivals 70B with MCTS
  2. Self-evolution works - Model improves from own solutions
  3. Efficiency breakthrough - Don't always need giant models
  4. MCTS for reasoning - Game-playing AI applies to math
  5. Democratization - Powerful reasoning on consumer hardware

Bottom line: rStar-Math proved that with smart algorithms (MCTS) and self-improvement, small models can achieve impressive reasoning capabilities, challenging the "bigger is always better" paradigm.


Further Reading

  • Paper: https://arxiv.org/abs/2501.04519

Published: January 2025 Impact: 🔥🔥🔥 MEDIUM - Small model reasoning breakthrough