Analogical Math Word Problems Solving with Enhanced Problem-Solution Association

Zhenwen Liang, Jipeng Zhang, Xiangliang Zhang

Abstract

Solving Math Word Problems (MWPs) requires mapping natural language to structured mathematical logic, a process known as "mathematization." While deep learning models have made strides, they often lack the generalization capabilities of human analogical reasoning. This paper introduces a novel training framework that enhances MWP solvers by teaching them to identify mathematical analogies and discriminate between correct and "hard" incorrect solutions. By focusing on underlying operator structures rather than surface-level text, the proposed MWP-BERT+A&D model achieves state-of-the-art performance on major benchmarks with significantly fewer parameters than previous leading models.

Introduction

The challenge of MWP solving lies in the gap between linguistic description and mathematical logic. Current solvers frequently fail when the same logic is presented in different narrative contexts. In contrast, humans utilize analogical reasoning to recognize that a complex new problem shares a core structure with a simpler, known one. This research aims to bridge this gap by explicitly rewarding models for identifying these mathematical analogies, moving beyond simple keyword matching to true logical understanding.

Methodology

The researchers propose a flexible framework consisting of two primary modules that can be integrated into various backbone solvers:

  1. Analogy Identification (A): This module identifies "analogical" problems based on their solution trees—the hierarchical structure of the underlying equations. Problems sharing the same top-level operators are defined as analogical. During training, the model is incentivized to map these pairs closely in a latent representation space while distancing non-analogical problems.
  2. Solution Discrimination (D): To strengthen the association between a problem and its correct solution, this module employs gradient-based hard negative sampling. By identifying and swapping the most "vulnerable" tokens in an equation, the system generates "hard" negative examples that are mathematically incorrect but visually similar to the correct answer, forcing the model to learn precise logical distinctions.
The proposed training framework, featuring the Analogy Identification (A) and Solution Discrimination (D) modules designed to enhance the model's grasp of mathematical logic.

Evaluation and Results

The framework was tested on two major benchmarks: Math23k (Chinese) and MathQA (English). The optimized MWP-BERT+A&D model achieved a state-of-the-art accuracy of 85.6% on Math23k. Notably, this performance was reached using only 103M parameters in the encoder, a five-fold reduction compared to the 610M parameters of the previous leader, Generate&Rank.

The model showed exceptional improvement on "long-tail" problems involving four or more operators, where accuracy rose from a baseline of 60.6% to 78.8%. This suggests that learning core logic from simpler analogies significantly boosts the ability to solve complex, multi-step problems.

Discussion and Insights

A key insight of this work is that mathematical analogy resides in operator structure rather than surface-level vocabulary. Visualization of the latent space confirms that the Analogy Identification module helps the model cluster problems by their mathematical logic more effectively than standard BERT-based approaches.

t-SNE visualization of operator representations comparing standard MWP-BERT (left) with the improved clustering achieved by adding the Analogy Identification module (right).

Despite these advances, "Commonsense Knowledge" remains a significant hurdle. Solvers still struggle with implicit constants (e.g., 60 minutes in an hour) not explicitly stated in the text. Future work will focus on integrating external knowledge bases to handle these real-world variables.

Conclusion

By mimicking human analogical reasoning and focusing on structural logic, this framework provides a more efficient and generalizable path for MWP solving. The results demonstrate that better training objectives can be more effective than simply scaling model size.

Summary updated

BibTeX
@inproceedings{liang2022analogical,
  author = {Zhenwen Liang and Jipeng Zhang and Xiangliang Zhang},
  title = {{Analogical Math Word Problems Solving with Enhanced Problem-Solution Association}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.643},
}
Figure