Advancing Mathematical Reasoning in Language Models: The Impact of Problem-Solving Data, Data Synthesis Methods, and Training Stages

Zui Chen, Tianqiao Liu, Tongqing, Mi Tian, Weiqi Luo, Zitao Liu

TL;DR

This paper demonstrates that the secret to better mathematical reasoning in Large Language Models (LLMs) isn't just "more math data," but rather using problem-solving data during the pre-training phase. By shifting from passive mathematical corpora to active question-and-reasoning steps during continued pre-training (CPT), the authors developed MathGPT-8B. This model outperforms much larger competitors, like Qwen2-Math-72B, on key benchmarks despite using significantly fewer training tokens.

What Problem Does This Paper Address?

Traditionally, math-specific LLMs follow a two-stage training recipe:

  1. Continued Pre-training (CPT): Feeding the model massive amounts of math-related text (like textbooks and ArXiv papers) to build foundational "knowledge."
  2. Supervised Fine-Tuning (SFT): Training the model on specific math problems to teach it how to "reason" and follow user instructions.

The authors noticed a frustrating trend in this paradigm: the reasoning gains achieved during the CPT stage are often marginal compared to the SFT stage. They argue this happens because general math corpora teach the model to memorize facts, but not how to apply them step-by-step. This paper investigates whether developers should use problem-solving data (questions paired with step-by-step solutions) much earlier in the training process, and how different data synthesis methods impact the final reasoning capabilities.

Methods and Data Synthesis

The researchers conducted a series of controlled experiments using Llama2 as a base model to answer three core questions regarding CPT, SFT, and data synthesis.

Instead of just "reading" math text, they trained the model on 7.2B tokens of actual math problems and solutions during the pre-training phase. To scale this, they tested four ways to generate synthetic math data:

  1. Response Diversification: Generating multiple reasoning paths for a single question.
  2. Query Expansion: Creating new, related questions from existing ones.
  3. Retrospective Enhancement: Teaching the model to "retry" a problem after making an error.
  4. Tutorship Amplification: A "Teacher" model identifies errors in a "Student" model's work and provides corrections, simulating a real-world tutoring process.
Comparison of data synthesis methods, showing Tutorship Amplification (Tutor-Amp) achieving the highest average score across benchmarks.

As shown in the results, Tutorship Amplification was the clear winner. By seeing how a teacher corrects a student's specific mistakes, the model learns self-correction—a highly sought-after trait in LLM reasoning.

Key Insights: CPT vs. SFT

To understand how models absorb complex reasoning, the researchers trained models on the exact same problem-solving datasets using both CPT and SFT objectives head-to-head.

  • "Doing" is better than "Reading": Problem-solving data is significantly more effective than general math text during pre-training. It teaches the model the logic of math rather than just the vocabulary.
  • SFT is for "Manners," CPT is for "Brains": The authors found that a tiny amount of SFT data (just 1%) is enough to teach a model how to follow instructions and format its answers. However, for the actual "heavy lifting" of solving hard problems, CPT is far superior.
  • The SFT Bottleneck: SFT has a lower "learning ceiling" for difficult data. When faced with complex, multi-step problems, the model learns much more effectively through the CPT objective than the SFT objective.
Performance gains demonstrating that while a small amount of SFT enables instruction following, CPT drives the most significant reasoning improvements.

Key Results: MathGPT-8B

The culmination of this research is MathGPT-8B, a model based on the Llama3-8B architecture. Its performance highlights the efficiency of the authors' proposed training pipeline:

  • Extreme Efficiency: MathGPT-8B was trained on only 140 billion tokens (100B of which were math-related). For comparison, Qwen2.5-Math-7B used a massive 1 trillion tokens.
  • Top-Tier Performance: It achieved an average score of 70.62% across benchmarks (including GSM8K, MATH, GAOKAO, and ZHONGKAO), outperforming DeepSeekMath-Base-7B (46.41%) and Qwen2-Math-7B (63.22%).
  • Punching Above Its Weight: It showed comparable or superior performance to the massive Qwen2-Math-72B on certain benchmarks, despite being nearly 10x smaller.
  • Retained General Knowledge: Unlike many math-specific models that suffer from "catastrophic forgetting" and lose their ability to reason about other topics, MathGPT-8B maintained high scores on general benchmarks like MMLU.

Limitations and Future Work

The authors note that their current data synthesis methods are relatively simple and could be refined further. Additionally, this paper focused heavily on the base model and pre-training stages. They did not perform a full RLHF (Reinforcement Learning from Human Feedback) or DPO (Direct Preference Optimization) process, which usually provides a final performance boost. Future work will explore how alignment processes during post-training interact with the deep reasoning capabilities built during CPT.

Summary updated

BibTeX
@inproceedings{chen2025advancing,
  author = {Zui Chen and Tianqiao Liu and Tongqing and Mi Tian and Weiqi Luo and Zitao Liu},
  title = {{Advancing Mathematical Reasoning in Language Models: The Impact of Problem-Solving Data, Data Synthesis Methods, and Training Stages}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=GtpubstM1D},
}
Figure