Integrating Arithmetic Learning Improves Mathematical Reasoning in Smaller Models

Neeraj Gangwar, Suma P. Bhat, Nickvash Kani

TL;DR

Smaller language models often fail at mathematical reasoning not because they lack logic, but because they simply can't do basic sums. This paper demonstrates that by "pre-heating" these models with a large, programmatically generated arithmetic dataset—either through intermediate fine-tuning or as part of an instruction-tuning mixture—we can significantly boost their reasoning accuracy and robustness across multiple benchmarks.

What Problem Does This Paper Address?

Large Language Models (LLMs) like GPT-4 are surprisingly adept at math, but their smaller counterparts (under 1B parameters) struggle immensely. Interestingly, the failure mode is often an "arithmetic bottleneck." A small model might correctly identify the steps to solve a word problem (e.g., "I need to add the apples and then subtract the oranges") but then fail the actual calculation (e.g., stating $38 + 6 = 42$).

The authors argue that standard reasoning datasets like GSM8k are too small to teach both high-level logic and low-level arithmetic simultaneously. When a model is forced to learn both at once from limited examples, it fails to build a solid foundation in either.

Methods

The researchers propose a two-pronged strategy to integrate arithmetic learning into smaller models like FlanT5 and GPT-2:

  1. Intermediate Fine-Tuning (IFT): Before training the model on complex word problems, they "warm it up" on a pure arithmetic dataset. This allows the model to develop a strong foundation in numerical computation before it has to worry about linguistic logic.
  2. Instruction Tuning Mixture: They integrate the arithmetic data directly into a general-purpose instruction-following mixture (using the TÜLU 3 SFT mixture). This teaches the model arithmetic skills alongside general tasks.

The core of their approach is a programmatically generated arithmetic dataset containing nearly 1.3 million examples. Unlike natural language datasets, this is "ground truth" data covering addition, subtraction, multiplication, division, fractions, and percentages, with operands up to seven digits long.

Datasets

The study utilizes a wide array of benchmarks to test different facets of mathematical ability:

  • Arithmetic Foundation: A synthetic 1.3M example dataset generated using log-uniform sampling to ensure a diverse range of digit lengths.
  • Reasoning Benchmarks: GSM8k (both the original and a larger "distilled" version), MultiArith, ASDiv, and SVAMP.
  • Instruction Tuning: The TÜLU 3 SFT mixture (~1M examples).
  • Robustness Testing: GSM-Plus and GSM-Symbolic, which use adversarial perturbations (like changing numbers or rephrasing) to see if the model actually understands the math or is just memorizing patterns.

Key Insights and Ideas

  • The "Arithmetic First" Advantage: Models trained on arithmetic before reasoning tasks consistently outperformed those trained on reasoning alone. This suggests that arithmetic is a "primitive" skill that serves as a necessary scaffold for higher-order reasoning.
  • Generalization is the Real Prize: The most striking finding wasn't just the improvement on the training set, but the massive gains in out-of-domain generalization. For example, a FlanT5-Large model saw its accuracy on the MultiArith dataset jump from 28.9% to 45.0% after arithmetic pre-training.
  • Robustness to "Digit Expansion": Small models are notoriously brittle; change a "5" to a "50" in a word problem, and they often collapse. The authors found that explicit arithmetic training makes models significantly more robust to these numerical variations.
  • Saturation Point: Interestingly, the benefits of intermediate fine-tuning saturate quickly. Training for more than two epochs on the arithmetic data provided no extra benefit, suggesting the models learn the "rules" of the operations rather than just memorizing the numbers.

Key Results

The quantitative improvements were consistent across different architectures (Encoder-Decoder like FlanT5 and Decoder-only like GPT-2):

  • GSM8k Performance: FlanT5-Large improved from 12.9% to 17.1% on the original GSM8k set and from 22.4% to 27.7% on the distilled version.
  • Arithmetic Accuracy: Within the context of solving word problems, the models' internal calculation accuracy improved by an average of 11.7%.
  • Robustness: On the adversarial GSM-Symbolic benchmark, the performance drop caused by changing numbers was reduced from 44.4% to 25.9% in instruction-tuned models.

Limitations and Future Work

While the results are promising, the authors note several hurdles:

  • The Ceiling Effect: Even with better arithmetic, these models are still "small." There is a limit to the reasoning complexity they can handle compared to multi-billion parameter models.
  • Architecture vs. Data: The study focused on data-centric improvements. The authors suggest that future work should explore architectural changes, such as custom embedding schemes specifically designed for numerical values, which might help models "see" numbers more clearly.
  • Mixture Optimization: While adding arithmetic to the instruction mixture helped, the authors admit that more work is needed to find the "perfect" ratio of math to general text to prevent the model from forgetting other skills.

Summary updated

BibTeX
@inproceedings{gangwar2026integrating,
  author = {Neeraj Gangwar and Suma P. Bhat and Nickvash Kani},
  title = {{Integrating Arithmetic Learning Improves Mathematical Reasoning in Smaller Models}},
  booktitle = {LREC},
  year = {2026},
  doi = {10.63317/35u36mdkj4r7},
}
Figure