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

Practice Makes a Solver Perfect: Data Augmentation for Math Word Problem Solvers

Vivek Kumar, Rishabh Maheshwary, Vikram Pudi

Abstract

Math Word Problem (MWP) solvers often rely on shallow heuristics, such as keyword matching, rather than genuine linguistic reasoning. This paper presents a comprehensive data augmentation framework designed to improve the robustness and accuracy of these solvers. By employing paraphrasing and substitution techniques, the researchers expanded existing datasets fivefold. A novel Candidate Selection Algorithm (CSA) was used to filter for challenging examples. Results show an average accuracy improvement of over 5% across multiple architectures and enhanced performance on adversarial datasets, with qualitative analysis revealing a shift in model attention toward more relevant linguistic context.

Introduction

Math Word Problem (MWP) solvers—AI models that translate natural language problems into executable mathematical equations—have reached high performance on standard benchmarks. However, recent studies suggest these models are often "brittle," relying on superficial cues like specific keywords or number proximity rather than a holistic understanding of the text. For instance, many models can predict the correct equation even when the question itself is removed, indicating a reliance on memorized patterns. To address this, we propose a two-stage augmentation paradigm that forces models to move beyond shallow heuristics toward genuine linguistic reasoning.

Augmentation Methodology

The core of our approach involves increasing both the size and linguistic variety of training data through two primary categories of augmentation: paraphrasing and substitution.

Paraphrasing and Substitution Techniques

Paraphrasing methods include Problem Reordering, which moves the question to the beginning of the text, and Round Trip Translation, which uses back-translation through multiple languages to introduce syntactic variety. Substitution methods leverage models like BERT for Fill-Masking of context words, Named-Entity Replacement (NER) to decouple specific entities from operations, and Synonym Replacement via word embeddings.

Examples of data augmentation methods including paraphrasing and substitution.

Candidate Selection Algorithm (CSA)

To ensure the quality of augmented data, we introduced the Candidate Selection Algorithm (CSA). Rather than adding all generated variations, CSA selects "hard" examples—those that are semantically similar to the original but result in high loss for the current solver. This targeted approach ensures the model focuses on its linguistic weaknesses during training.

Experimental Results and Analysis

We evaluated our methods using the MaWPS and ASDiv-A datasets, expanding them by five times their original size. The augmented training led to significant performance gains across three state-of-the-art architectures: Seq2Seq, GTS, and Graph2Tree.

Performance Gains and Robustness

On average, solver accuracy increased by over 5 percentage points. Notably, the Graph2Tree solver's accuracy on the MaWPS dataset improved from 88.7% to 93.5%. Furthermore, models trained with augmented data showed improved robustness on the SVAMP challenge set, an adversarial benchmark designed to trick models relying on shallow heuristics.

Attention Redistribution

A key insight from this work is the change in how models process information. Visualizing attention weights revealed that baseline models focused almost exclusively on narrow windows around numbers. In contrast, models trained on augmented data distributed their attention more broadly across the question text and verbs.

Visualization of mean attention values before and after data augmentation, showing a shift toward broader linguistic context.

Conclusion

This research demonstrates that data augmentation is a powerful tool for teaching MWP solvers to "read" rather than just "calculate." By introducing linguistic variety and prioritizing challenging examples, we significantly improved both accuracy and robustness. While the current methods focus on linguistic variation, future work will explore generating entirely new mathematical logic templates to further expand the capabilities of AI math solvers.

Summary updated

BibTeX
@inproceedings{kumar2022practice,
  author = {Vivek Kumar and Rishabh Maheshwary and Vikram Pudi},
  title = {{Practice Makes a Solver Perfect: Data Augmentation for Math Word Problem Solvers}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.310},
}
Figure