Integrating Arithmetic Learning Improves Mathematical Reasoning in Smaller Models
Neeraj Gangwar, Suma P Bhat, Nickvash Kani
TL;DR
This work addresses the difficulty of achieving strong mathematical reasoning in small language models by introducing an explicitly arithmetic-centric training regimen. It investigates two strategies: intermediate fine-tuning on a programmatically generated arithmetic dataset before downstream reasoning fine-tuning, and incorporating the arithmetic data into the instruction-tuning mixture. Across GSM8k and several out-of-domain benchmarks, both approaches improve arithmetic grounding and reasoning performance, with intermediate fine-tuning enhancing out-of-domain generalization and arithmetic accuracy within reasoning, and arithmetic-inclusive instruction tuning boosting few-shot math reasoning and robustness to numerical perturbations. The findings highlight explicit arithmetic training as a key pathway to strengthening mathematical reasoning in smaller models and provide publicly available datasets and code to enable further exploration.
Abstract
While large models pre-trained on high-quality data exhibit excellent performance across various reasoning tasks, including mathematical reasoning (e.g. GSM8k, MultiArith), specializing smaller models to excel at mathematical reasoning remains a challenging problem. Common approaches to address this challenge include knowledge distillation, where smaller student models learn from large pre-trained teacher models, and data augmentation, such as rephrasing questions. Despite these efforts, smaller models struggle with arithmetic computations, leading to errors in mathematical reasoning. In this work, we focus on leveraging a programmatically generated arithmetic dataset to enhance the reasoning capabilities of smaller models. We investigate two key approaches to incorporate this dataset -- (1) intermediate fine-tuning, where a model is fine-tuned on the arithmetic dataset before being trained on a reasoning dataset, and (2) integrating the arithmetic dataset into the instruction-tuning mixture, allowing the model to learn arithmetic skills alongside general instruction-following abilities. Our experiments on multiple reasoning benchmarks demonstrate that incorporating an arithmetic dataset, whether through targeted fine-tuning or within the instruction-tuning mixture, enhances the models' arithmetic capabilities, which in turn improves their mathematical reasoning performance.
