Vivek Kumar, Rishabh Maheshwary, Vikram Pudi. Findings of the Association for Computational Linguistics: EMNLP 2021. 2021.
Abstract
Deep learning models for solving Math Word Problems (MWPs) have achieved high benchmark scores, yet their true reasoning capabilities remain questionable. This paper investigates the robustness of state-of-the-art MWP solvers—Seq2Seq, GTS, and Graph2Tree—against black-box adversarial attacks. By introducing Question Reordering (QR) and Sentence Paraphrasing (SP), the authors demonstrate that these models rely heavily on shallow linguistic patterns rather than mathematical logic. Accuracy dropped by over 40 percentage points across datasets, revealing a significant "Clever Hans" effect in current architectures.
Introduction
Math Word Problems (MWPs) require mapping natural language to formal equations, a task that demands both linguistic understanding and mathematical reasoning. While recent architectures like Graph-to-Tree have shown promise, it is unclear if they truly grasp the underlying relationships between entities and numbers. This study tests the hypothesis that these models are primarily pattern matching by subjecting them to adversarial perturbations that preserve the mathematical meaning but alter the linguistic structure.
Methods
The authors developed two black-box adversarial attack methods:
- Question Reordering (QR): The question is moved from the end of the problem to the beginning, using co-reference resolution and connectors (e.g., "Given that...") to maintain textual flow.
- Sentence Paraphrasing (SP): Individual sentences are paraphrased using a pre-trained Pegasus model. A "head entity" check ensures that numerical associations remain consistent with the original problem.
These attacks were evaluated on the MaWPS (2,373 problems) and ASDIV-A (1,213 problems) datasets against three architectures: Seq2Seq, GTS, and Graph2Tree.
Key Results
The adversarial attacks led to a dramatic collapse in solver performance. On the MaWPS dataset, the Graph2Tree model's accuracy plummeted from 83.7% to 25.5% under sentence paraphrasing.
Key findings include:
- Structural Sensitivity: Moving the question (QR) significantly reduced accuracy, suggesting models expect the goal at the end and fail to maintain variable states otherwise.
- Linguistic Fragility: Sentence paraphrasing (SP) was the most effective attack, indicating that models latch onto specific trigger words or phrasing styles.
- Human Validation: Human evaluators confirmed that ~86% of adversarial examples remained mathematically identical to the originals and maintained high grammatical correctness (scoring 4.5+ out of 5).
To mitigate these vulnerabilities, the authors explored adversarial training and BERT embeddings. While BERT improved robustness against reordering, models remained susceptible to paraphrasing.
Conclusion
Current MWP solvers are surprisingly fragile, exhibiting a "Clever Hans" effect where they overfit to the narrative structure of benchmarks. While adversarial training offers some improvement, a significant performance gap remains compared to clean data. Future work should focus on solvers that explicitly model entity-number relationships and the creation of more linguistically diverse training datasets to prevent reliance on shallow heuristics.
Summary updated