Learning from Explicit and Implicit Supervision Jointly For Algebra Word Problems

Shyam Upadhyay, Ming-Wei Chang, Kai-Wei Chang, Wen-tau Yih

Abstract

Teaching machines to solve algebra word problems typically requires large datasets of human-annotated equations. However, such "explicit" supervision is expensive and difficult to scale. This paper introduces MixedSP, a novel learning algorithm that jointly leverages both explicit human-annotated equations and "implicit" supervision in the form of raw numerical solutions mined from the web. By combining a small amount of clean data with a larger, noisier set of problem-solution pairs, the authors achieve state-of-the-art results on standard benchmarks, demonstrating that models can effectively learn mathematical reasoning by verifying their derived solutions against real-world answers.

Introduction

The task of solving algebra word problems involves translating natural language narratives into formal mathematical systems—a process known as semantic parsing. For example, the sentence "Maria is four times as old as Kate" must be mapped to the equation $m = 4n$. Historically, progress in this field has been hampered by the scarcity of annotated data. Creating datasets with gold-standard equation systems is labor-intensive and requires domain expertise. Consequently, existing benchmarks like ALG-514 remain relatively small.

In contrast, the internet is a rich source of algebra problems. Platforms like algebra.com host thousands of problems accompanied by final numerical solutions provided by tutors. While these solutions offer a form of "implicit" supervision, they present significant challenges: the search space for potential equations is vast, and multiple incorrect logical paths can coincidentally lead to the correct numerical answer. This paper proposes a method to bridge this gap by learning from both explicit and implicit data sources simultaneously.

Problem Formulation

To formalize the task, the authors define several key terms. A word problem $x$ is mapped to a derivation (semantic parse) $y$, which consists of an equation system template $T$ and an alignment $A$ between textual numbers and template coefficients. A mathematical engine $E$ then computes the solution $z$ from the derivation $y$.

Table 1: Definitions of terms, symbols, and examples used in the semantic parsing of algebra word problems.

The MixedSP Algorithm

The core contribution is MixedSP (Structured Perceptron with Mixed Supervision), an online learning algorithm designed to handle heterogeneous data. The algorithm alternates between two phases:

  1. Explicit Phase: When presented with a problem-equation pair $(x, y^*)$, the model performs a standard structured perceptron update to align its internal weights with the human-provided "gold" structure.
  2. Implicit Phase: When presented with a problem-solution pair $(x, z^*)$, the model uses its current parameters to search for candidate derivations $y$ that, when executed, yield the correct solution $z^*$. If multiple candidates match, the model employs a tie-breaking strategy, selecting the derivation with the highest score according to its current features. This effectively uses the model's evolving "intuition" to filter out spurious matches.

A critical component of the training process is a "Warm Start" or curriculum learning strategy. The model initially focuses exclusively on clean, explicit data to build a foundational understanding of mathematical logic before being exposed to the noisier and more complex search space of the web-mined implicit data.

Datasets

The effectiveness of MixedSP was evaluated using three datasets:

  • ALG-514: A standard benchmark of 514 problems with 24 equation templates.
  • DRAW-1K: A more challenging dataset of 1,000 problems with over 200 templates.
  • SOL-2K: A new dataset of 2,039 problem-solution pairs automatically crawled from online forums, containing no annotated equations.

Results and Discussion

The experimental results demonstrate that joint learning significantly outperforms models trained on either data source in isolation. On the ALG-514 benchmark, MixedSP achieved an accuracy of 83.0%, representing a 3% absolute improvement over the previous state-of-the-art and a 4.6% gain over the explicit-only baseline.

Table 2: Accuracy results on ALG-514 and DRAW-1K datasets across different supervision settings, highlighting the performance of MixedSP.

The results on DRAW-1K further highlight the model's robustness, with accuracy increasing from 55.0% to 59.5%. These gains are particularly impressive given that the SOL-2K data was used without manual cleaning. The algorithm's conservative update policy—only updating when a matching derivation is found—successfully prevented the model from being "poisoned" by noisy or unsolvable web data.

Conclusion

This work demonstrates that "checking the answer" is a powerful supervisory signal for training semantic parsers. By leveraging the abundance of numerical solutions available online, MixedSP overcomes the data bottleneck inherent in explicit annotation. While computational complexity remains a challenge for datasets with very large template sets, the success of this mixed supervision approach suggests broad applicability to other domains where final outcomes are easier to obtain than internal logical structures, such as instruction following or database querying.

Summary updated

BibTeX
@inproceedings{upadhyay2016learning,
  author = {Shyam Upadhyay and Ming-Wei Chang and Kai-Wei Chang and Wen-tau Yih},
  title = {{Learning from Explicit and Implicit Supervision Jointly For Algebra Word Problems}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  doi = {10.18653/v1/d16-1029},
}
Figure