Seeking Diverse Reasoning Logic: Controlled Equation Expression Generation for Solving Math Word Problems

Yibin Shen, Qianying Liu, Zhuoyuan Mao, Zhen Wan, Fei Cheng, Sadao Kurohashi

TL;DR

This paper introduces a novel method for solving math word problems (MWPs) by generating diverse equation expressions that reflect different reasoning logics. By using control codes to guide the generation process, their approach significantly improves accuracy, especially on complex multi-unknown problems, while mitigating the "expression bias" problem common in existing solvers.

What Problem Does This Paper Address?

Solving math word problems (MWPs) requires translating natural language descriptions into mathematical equations. While current automated solvers often rely on sequence-to-sequence models to generate a single, human-annotated equation, human students naturally employ a variety of reasoning strategies, leading to mathematically equivalent but structurally different equations. This inherent diversity is lost in current models, which are trained on a fixed equation format. This "expression bias" can limit performance, as the model might struggle to generalize or might be penalized for generating a correct but non-standard equation. The paper aims to bridge this gap by enabling solvers to leverage diverse reasoning logics, mirroring human problem-solving flexibility.

Methods

The core innovation is a "controlled equation generation" approach. Instead of just generating a single target equation, the model is guided by control codes. These codes represent different mathematical reasoning logics. The authors categorize these logics into two aspects:

  1. Diverse Reasoning Orders of Given Variables: This includes applying the commutative law for addition and multiplication (e.g., a + b vs. b + a) and transforming equations into a "solution form" (e.g., x = y/z instead of y = x * z).
  2. Diverse Reasoning Orders of Unknown Variables: For multi-unknown problems, this involves swapping the order of equations within a system or swapping the assignment of variables to their corresponding unknowns.

These diverse equation expressions are generated from the original human-annotated equations. The MWP solver then takes both the problem text and a control code as input to generate the corresponding equation expression. This controlled generation aims to reduce expression bias by explicitly guiding the model's reasoning process.

Datasets

The proposed method is evaluated on three datasets:

  • Math23K: A single-unknown Chinese dataset.
  • DRAW1K: A multiple-unknown English dataset.
  • HMWP: A multiple-unknown Chinese dataset.

The paper notes that for Math23K, the "Solution Form" (<sol>) corresponds to the original annotation format, meaning no new expressions are generated for this specific code on this dataset. The authors also mention augmenting the training data by generating these diverse expressions, increasing the dataset size by 1.87 to 6.15 times.

Key Insights and Ideas

  • Human-like Reasoning: The paper highlights that human problem-solving isn't monolithic; diverse reasoning paths lead to equivalent solutions. Mimicking this diversity in AI solvers is crucial for robustness.
  • Controlling Generation: Using explicit control codes is an effective way to steer complex generation tasks like equation formulation, allowing the model to explore different valid mathematical structures.
  • Mitigating Expression Bias: By guiding the model with control codes, the authors directly address the issue where models are penalized for generating correct but non-standard equations, a significant limitation in prior work.
  • Multi-Unknown Problems Benefit Most: The most substantial accuracy gains are observed on challenging multi-unknown problems, suggesting that diverse reasoning is particularly critical when dealing with complex systems of equations.

Key Results

The proposed controlled generation method, particularly when using the BERT-GTS baseline model, significantly outperforms existing methods:

  • Single-Unknown (Math23K): Accuracy improved by 1.4% (from 82.6% to 84.0%).
  • Multiple-Unknown (DRAW1K): Accuracy improved by 8.0% (from 42.2% to 50.2%).
  • Multiple-Unknown (HMWP): Accuracy improved by 8.1% (from 48.3% to 56.4%).
  • The combined use of all control codes ("All" in Table 2) yielded the best performance across all datasets.
  • Ablation studies showed that even individual control codes improved performance, and using them in a data augmentation manner without control codes also helped, but less effectively than with control.
  • The performance gap between the proposed method and the baseline widens as the number of variables in a problem increases, indicating its strength in handling complexity.

Limitations and Future Work

  • Control Code Strategy: While using special tokens for control codes is effective, the paper suggests that using short descriptive texts for control codes might yield even better performance, especially for datasets with more expression categories. This is left as future work.
  • Further Control Mechanisms: The authors propose exploring additional control strategies, such as adding brackets to merge terms or combining existing control codes to create more diverse generation options.
  • Ensemble Methods: Investigating ensemble learning or ranking methods to select the best prediction among multiple generated control code outputs is suggested for future research.
  • Runtime: Experiments were conducted on high-end GPUs (NVIDIA 3090 and A100), with the longest runtime around 6 hours, which might be a consideration for real-time applications.

Summary updated

Abstract

To solve Math Word Problems, human students leverage diverse reasoning logic that reaches different possible equation solutions. However, the mainstream sequence-to-sequence approach of automatic solvers aims to decode a fixed solution equation supervised by human annotation. In this paper, we propose a controlled equation generation solver by leveraging a set of control codes to guide the model to consider certain reasoning logic and decode the corresponding equations expressions transformed from the human reference. The empirical results suggest that our method universally improves the performance on single-unknown (Math23K) and multiple-unknown (DRAW1K, HMWP) benchmarks, with substantial improvements up to 13.2% accuracy on the challenging multiple-unknown datasets.
BibTeX
@inproceedings{shen2022seeking,
  author = {Yibin Shen and Qianying Liu and Zhuoyuan Mao and Zhen Wan and Fei Cheng and Sadao Kurohashi},
  title = {{Seeking Diverse Reasoning Logic: Controlled Equation Expression Generation for Solving Math Word Problems}},
  booktitle = {Aacl/ijcnlp},
  year = {2022},
  doi = {10.18653/v1/2022.aacl-short.32},
}

Loading related content...

Figure