MathSmith: Forging Mathematical Intelligence with a Reinforced Blacksmith
MathSmith: Towards Extremely Hard Mathematical Reasoning by Forging Synthetic Problems with a Reinforced Policy
MathSmith is a novel framework designed to synthesize high-difficulty mathematical problems by randomly sampling concept-explanation pairs from PlanetMath and refining them through reinforcement learning. It achieves SOTA performance on elite benchmarks like AIME and OlympiadBench, improving relative accuracy by 9.8% to 18.1% in hard reasoning tasks.
TL;DR
MathSmith is a framework that autonomously generates extremely difficult math problems starting from raw mathematical concepts (PlanetMath). By using nine "difficulty strategies" and a Reinforcement Learning (RL) loop that rewards longer reasoning traces, it produces synthetic data that pushes LLMs to new SOTA levels on Olympiad-grade benchmarks like AIME.
Motivation: The Scarcity of High-Difficulty Data
The hallmark of recent LLM progress (think OpenAI's o1 or DeepSeek-R1) is mathematical reasoning. However, as models improve, we are running out of high-quality "human-grade" competition problems to train on.
Existing synthesis methods typically:
- Rewrite existing problems: Limiting diversity.
- Back-translate: Relying on the original distribution.
- Lack Difficulty Control: Generating "quantity" over "depth."
MathSmith addresses this by acting as a "Blacksmith," taking raw conceptual ore and forging it into complex problems without relying on human-written seeds.
Methodology: The Three Stages of Forging
1. Concept-Explanation Collection
The authors crawled PlanetMath, an encyclopedia of advanced math, to extract 11,000 concept-explanation pairs. This ensures the "ingredients" are inherently sophisticated (e.g., Von Neumann ordinals, Quadratic Resolvents).
2. Supervised Fine-Tuning (The "Draft")
Using GPT-4o, the authors generated 8k "cold-start" samples. The innovation here is the Rationale-Problem structure. The model must first output a 5-step rationale selecting concepts and difficulty strategies before stating the problem.
3. Reinforcement Learning (The "Refinement")
This is the heart of MathSmith. Using Group Relative Policy Optimization (GRPO), the model is optimized via three rewards:
- Structural Reward: Does it follow the 5-step rationale format?
- Complexity Reward: Crucially, difficulty is estimated by the token length of the solution generated by a teacher model (Qwen3-30B). Longer solutions = deeper cognitive depth.
- Consistency Reward: Does the teacher model get the same answer across multiple samples? This ensures the synthetic problem is solvable and unambiguous.

Experiments: Higher Difficulty, Better Gains
The authors tested MathSmith across benchmarks categorized as Easy/Medium (GSM8K) and Hard (AIME, OlympiadBench).
Key Findings:
- Hard Tasks Specialist: On AIME2025, MathSmith-HC improved Qwen3-8B (Long-CoT) from 63.3% to 70.0%.
- Long-CoT Compatibility: The gains are most pronounced when models are allowed to "think" (Long-CoT mode), proving that MathSmith's data effectively teaches models how to navigate complex reasoning paths.
- Scalability: Unlike other synthetic datasets that plateau, MathSmith-HC shows a widening gap against baselines as the data volume increases from 50k to 200k.

Why Trace Length Matters
One of the most profound "Academic Insights" of this paper is Figure 2. It shows a direct correlation between the dataset difficulty and the average length of the reasoning trace. By specifically rewarding the model for generating problems that force a teacher model to think longer, the authors successfully automated the creation of Olympiad-level challenges.

Critical Insight: The Weakness-Focused Pipeline
Beyond just bulk generation, MathSmith includes a "Variant Generation" module. If a model fails on a certain concept, MathSmith can trace the concept back to its source and forge 10 new, similar problems to "drill" the model on its specific weaknesses. This targeted refinement yielded a significant boost over random sampling.
Conclusion
MathSmith proves that we don't need human templates to create "smart" data. By leveraging reinforcement learning and structural constraints, it suggests a future where LLMs can autonomously expand the frontiers of mathematical reasoning.
Limitations: While powerful for competition math, the framework might be overkill for simple word problems (GSM8K), where adding complexity can sometimes introduce noise.
