NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

From Next-Token to Mathematics: The Learning Dynamics of Mathematical Reasoning in Language Models

Shubhra Mishra, Gabriel Poesia, Noah Goodman

TL;DR

This paper introduces MathCAMPS, a novel, fine-grained dataset for evaluating mathematical reasoning in LLMs, grounded in the K-8 Common Core curriculum. It provides the first comprehensive analysis of how mathematical reasoning abilities evolve during LLM pre-training and post-training, revealing surprising correlations with human learning and nuanced impacts of instruction tuning.

What Problem Does This Paper Address?

Large Language Models (LLMs) trained on next-token prediction have shown impressive capabilities in mathematical reasoning. However, understanding how these abilities develop during training has been a significant challenge. Existing benchmarks like GSM8K and MATH, while useful for overall performance, lack the granularity to dissect the learning dynamics of specific mathematical skills. Furthermore, the widespread availability of these benchmarks on the web raises concerns about data contamination, making it difficult to assess true learning during training. This paper aims to bridge this gap by providing a fine-grained analysis of LLM mathematical reasoning development, from pre-training to post-training, using a novel dataset that mitigates contamination concerns.

Methods

The authors introduce MathCAMPS, a synthetic dataset generated using an attribute grammar that encodes 44 fine-grained mathematical skills from the K-8 Common Core curriculum. This grammar allows for the generation of an arbitrary number of symbolic math problems. These symbolic problems are then translated into natural language word problems using GPT-4, with a crucial cycle-consistency step to ensure faithfulness between the symbolic and natural language representations. This process involves back-translating the generated word problem into a symbolic form and verifying that the answer remains consistent.

To analyze learning dynamics, the researchers evaluate intermediate checkpoints of open-weight LLMs (Pythia, OLMo, Amber) during pre-training. They also investigate the impact of instruction tuning by comparing base models with their instruction-tuned counterparts. The evaluation focuses on both performance on original problems and on follow-up questions (incremental and counterfactual) designed to probe deeper understanding and robustness.

Datasets

  • MathCAMPS: A newly constructed synthetic dataset comprising 4900 novel mathematical reasoning problems. It is grounded in 44 fine-grained skills from the K-8 Common Core curriculum, offering a more granular evaluation than existing benchmarks. The dataset generation pipeline is released.
  • GSM8K and MATH: Used for comparison and correlation analysis, though the authors highlight potential data contamination issues with these benchmarks.

Key Insights and Ideas

  • Curriculum Alignment: LLMs learn mathematical skills during pre-training in an order that surprisingly correlates with the human-designed Common Core curriculum, even though the training data is randomly ordered. This suggests LLMs might implicitly learn the hierarchical structure of mathematical knowledge.
  • Skill Emergence: Mathematical skills tend to evolve smoothly during training rather than emerging discretely at specific training steps.
  • Instruction Tuning Nuances: Instruction tuning has a variable impact on specific mathematical skills. While it generally improves performance, some skills can be negatively affected, and the impact varies significantly across different models and tuning methodologies.
  • Robustness and Follow-ups: LLMs show a surprisingly robust ability to answer follow-up questions about problems they solve, indicating that their reasoning is not purely superficial. However, the gap between answering initial problems and follow-ups tends to increase over time, suggesting challenges in maintaining context over longer interactions.
  • Fractions vs. Decimals: Models tend to learn operations with decimals more easily than fractions, likely due to their closer surface similarity to integer operations and potentially simpler tokenization.

Key Results

  • Pre-training: Models show a tendency to learn skills from earlier grades before later grades, mirroring human learning trajectories. However, specific skills can be learned out of order due to factors like memorizability (e.g., simple exponents) or tokenization differences.
  • Instruction Tuning: For OLMo, instruction tuning generally improved accuracy across most skills. For Amber, the impact was more mixed, with some skills improving and others degrading. The paper highlights specific skills that were either significantly boosted or negatively impacted by instruction tuning.
  • Follow-up Questions: As models improve at solving initial problems, their ability to answer follow-up questions also generally improves, demonstrating a degree of robustness. However, performance drops on follow-up questions can be substantial (e.g., a 29% drop for GPT-40 on fraction addition/subtraction with follow-ups).
  • Correlation: MathCAMPS accuracy shows a strong correlation with GSM8K accuracy (p = 0.91), suggesting that MathCAMPS captures similar overall reasoning capabilities while offering finer-grained analysis.

Limitations and Future Work

  • Scope of MathCAMPS: The current MathCAMPS dataset covers 44 Common Core standards, excluding more conceptual areas like mathematical proofs or problems requiring explanations. Extending the pipeline to cover additional computational topics (calculus, linear algebra) is possible, but evaluating natural language reasoning without exact answers remains an open challenge.
  • Familiarity Bias: While the authors argue against a strong familiarity bias for GPT-40, the use of GPT-4 for dataset generation could still introduce some inherent biases.
  • Instruction Tuning Methods: The paper notes that instruction tuning methodologies vary widely, and the specific methods used for OLMo and Amber might not be representative of all approaches.
  • Future Work: The authors suggest MathCAMPS can be used for direct comparison with human participants to study human-LLM learning alignment. They also propose further analyses on the robustness of reasoning and the impact of instruction tuning, particularly in the context of mathematical dialogue. The dataset's fine-grained nature is highlighted as a rich source for future research.

Summary updated

BibTeX
@inproceedings{mishra2025from,
  author = {Shubhra Mishra and Gabriel Poesia and Noah Goodman},
  title = {{From Next-Token to Mathematics: The Learning Dynamics of Mathematical Reasoning in Language Models}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=bJ9aARjtBu},
}
Figure