Abstract
Mathematical reasoning in Large Language Models (LLMs) is currently limited by a "data bottleneck," specifically the scarcity of high-quality, Olympiad-level training data. We present MathSmith, a framework that autonomously "forges" complex synthetic problems by combining raw mathematical concepts with a reinforcement learning policy. By utilizing the length of a model's Chain-of-Thought (CoT) reasoning as a reward signal, MathSmith generates problems that significantly exceed the difficulty of existing synthetic datasets. Models trained on MathSmith data show marked improvements on elite benchmarks such as AIME and OlympiadBench, outperforming state-of-the-art baselines.
Introduction
The advancement of LLMs in mathematics has reached a point where standard textbook problems no longer provide sufficient challenge for further improvement. Existing data synthesis methods often rely on "re-skinning" human-authored problems, which limits diversity and risks data contamination. To push the boundaries of AI reasoning, there is a critical need for a method to generate novel, intellectually demanding problems that require deep, multi-step logical synthesis rather than pattern memorization.
The MathSmith Framework
MathSmith adopts a three-stage approach to problem generation, analogous to the process of a blacksmith forging a tool from raw materials.
1. Concept-Explanation Collection
The process begins with "raw materials"—approximately 11,000 mathematical concepts and explanations crawled from PlanetMath. This ensures a broad foundation across various mathematical domains.
2. Supervised Fine-Tuning (SFT) Stage
Using GPT-4o, an initial "cold-start" dataset of 8,000 problems is generated. These problems are guided by nine predefined difficulty strategies, including cross-topic integration, implicit logic, and extreme conditions. This stage ensures the generated problems are structured and inherently challenging.
3. Reinforcement Learning (RL) Stage
The core of MathSmith is the RL stage, which uses Group Relative Policy Optimization (GRPO) to refine the generator model. The model is optimized based on three primary rewards:
- Structural Reward: Ensures the output adheres to the required format.
- Answer Consistency: Validates that a teacher model consistently reaches the same answer for the generated problem.
- Reasoning Complexity: Uses the length of the Chain-of-Thought (CoT) trace as a proxy for difficulty.
CoT Length as a Difficulty Metric
A key insight of this work is the validation of reasoning trace length as a reliable metric for problem difficulty. Under "thinking" modes (such as those in Qwen or DeepSeek-R1), harder problems naturally elicit longer sequences of logical steps.
As shown in the figure above, MathSmith-generated problems (MathSmith-HC and MathSmith-Hard) elicit reasoning traces nearly three times longer than standard datasets like GSM8K and significantly longer than other high-difficulty sets like AIME 2024. By rewarding longer reasoning traces during RL, MathSmith encourages the generation of increasingly complex problems.
Weakness-Focused Improvement
Beyond general dataset generation, MathSmith includes a pipeline to identify specific concepts where a target model struggles. It then generates targeted "practice exercises" to bridge these specific reasoning gaps, creating a personalized curriculum for model improvement.
Results and Discussion
MathSmith consistently outperforms state-of-the-art baselines like NuminaMath and OpenMathInstruct-2. On elite benchmarks:
- AIME and OlympiadBench: Achieved relative performance improvements ranging from 9.8% to 18.1%.
- Scalability: The performance advantage of MathSmith data increased as training volume grew from 50k to 200k samples.
- Model Size: Larger models showed a greater ability to absorb the complex reasoning patterns present in MathSmith data.
One notable observation was an "over-reasoning" penalty on simpler benchmarks like GSM8K. Models trained on extremely hard data occasionally applied overly complex logic to basic arithmetic, suggesting that a balanced curriculum remains important.
Conclusion
MathSmith provides a blueprint for moving beyond human-curated data. By allowing AI to autonomously generate its own increasingly difficult curriculum through reinforced policies and complexity-based rewards, we can continue to push the frontiers of machine mathematical reasoning.
Summary updated