MAWPS: A Math Word Problem Repository

Rik Koncel-Kedziorski, Subhro Roy, Aida Amini, Nate Kushman, Hannaneh Hajishirzi

Introduction

Math word problems (MWPs)—such as "Rachel has 23 pictures, buys 32 more, and colors 44; how many are left?"—have long served as a benchmark for machine reasoning in the NLP community. However, progress in this field has been hindered by fragmented datasets and a pervasive, often overlooked issue: data leakage through repetition.

Many existing datasets suffer from high lexical overlap (repetitive scenarios) and template overlap (identical equation structures). These allow models to achieve high accuracy through pattern memorization rather than true semantic understanding. Furthermore, web-sourced data is often ungrammatical, making it difficult to determine if a model failed due to mathematical logic or linguistic noise. MAWPS addresses these challenges by providing a unified repository and a suite of tools to standardize and harden MWP evaluation.

The MAWPS Framework

MAWPS is designed as an end-to-end pipeline for dataset curation and optimization. It hosts thousands of problems and provides "Automatic Optimization Tools" to customize datasets based on three critical criteria:

The MAWPS framework architecture, illustrating the flow from problem contribution to optimized dataset generation.
  1. Reducing Lexical Overlap: The system identifies similarity between problems based on shared unigrams and bigrams. To create diverse subsets, it employs a greedy approximation algorithm to solve the "remote clique problem," selecting a group of items with minimal similarity to force models to handle broader vocabularies.
  2. Minimizing Template Overlap: A "template" is defined as an equation where numbers are replaced by variables (e.g., $(a * b) + c = x$). The toolkit allows researchers to build datasets where specific equation structures are not overrepresented, preventing models from guessing formulas based on frequency.
  3. Grammaticality Filtering: Unlike statistical parsers that may "guess" through broken text, MAWPS utilizes the English Resource Grammar (ERG). This rule-based system provides a binary validation of grammatical correctness, ensuring that models are tested on clean, unambiguous input.

Dataset Aggregation

MAWPS aggregates several prominent datasets into a single, standardized format, categorized by mathematical complexity:

  • AddSub: Addition and subtraction problems.
  • SingleOp: Problems requiring a single arithmetic operation.
  • MultiArith: Multi-step arithmetic problems.
  • SingleEq: Problems resulting in a single algebraic equation.
  • SimulEq (S & L): Small and large sets involving systems of linear equations.

Key Results and Insights

The authors evaluated two high-performing systems against optimized subsets to determine if their performance relied on data shortcuts. The results were stark: when the "easy" patterns were removed, model performance plummeted.

Performance of state-of-the-art systems on optimized subsets, showing significant accuracy drops when lexical and template shortcuts are removed.

As shown in the table above, on the SingleEq dataset, a top-tier system's accuracy dropped from 72.2% on the full dataset to 63.6% when lexical overlap was minimized. Similarly, when template overlap was reduced in the SimulEq-S set, accuracy fell from 68.7% to 59.9%. These findings confirm that state-of-the-art models were largely relying on memorized templates rather than logical reasoning.

Conclusion

MAWPS highlights that dataset diversity is more critical than sheer volume. By providing tools to strip away linguistic and structural shortcuts, the repository sets a new, more rigorous standard for MWP solvers. While complex problem types like simultaneous equations still pose a significant hurdle for current algorithms, MAWPS provides the necessary infrastructure to diagnose these failures and drive the field toward true semantic understanding.

Summary updated

BibTeX
@inproceedings{koncelkedziorski2016mawps,
  author = {Rik Koncel-Kedziorski and Subhro Roy and Aida Amini and Nate Kushman and Hannaneh Hajishirzi},
  title = {{MAWPS: A Math Word Problem Repository}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2016},
  doi = {10.18653/v1/n16-1136},
}
Figure