Illinois Math Solver: Math Reasoning on the Web

Subhro Roy, Dan Roth

Introduction

The Illinois Math Solver is a web-based tool designed to automatically solve school-level math word problems and complex arithmetic queries. While the field of Natural Language Processing (NLP) has made significant strides in quantitative reasoning, many state-of-the-art models remain confined to academic papers and private codebases. This lack of accessibility hinders both students, who could benefit from automated tutoring, and researchers, who need to understand where these models fail.

Existing math word problem (MWP) solvers are often "brittle," performing well on specific datasets but failing when faced with slight linguistic variations. The Illinois Math Solver addresses this by creating a public-facing tool that handles both direct "number queries" (e.g., "What is the result when 6 is divided by the sum of 7 and 5?") and narrative word problems.

Methods

The system utilizes a two-stage pipeline to process input text, ensuring that both structured mathematical queries and natural language narratives are handled appropriately.

The system architecture showing the two-stage pipeline involving a CFG parser and a general arithmetic solver.
  1. CFG Parser: For direct mathematical questions, the system uses a Context-Free Grammar (CFG) semantic parser. It identifies mathematical terms (like "added" or "fraction") and uses the CKY algorithm with 26 derivation rules to compose these into a formal expression.
  2. General Arithmetic Problem Solver: If the CFG parser cannot process the query, it is passed to a more robust arithmetic solver. This module treats the problem as a series of decision tasks, including operation prediction, relevance filtering (to remove "distractor" numbers), and global inference to ensure the final answer satisfies common-sense constraints (e.g., ensuring a "how many" question results in a positive integer).

Datasets and Evaluation

The solver was trained and evaluated on a union of three major public datasets:

  • AI2: Primarily addition and subtraction problems.
  • Illinois (IL): Problems requiring a single operation.
  • Commoncore (CC): More complex, multi-step arithmetic problems.

Key Insights and Ideas

  • Adversarial Data Acquisition: A primary goal of the web interface is to encourage "crowd-based" research. By allowing users to make small edits to word problems to see if the system fails, the authors can collect a wider variety of "adversarial" examples that aren't found in standard textbooks.
  • Expression Trees as Explanations: Unlike a simple calculator, the tool outputs the full mathematical expression (e.g., (3 + 5) × 9). This transparency is vital for educational settings, as it teaches the student the logic of the solution rather than just providing the result.
  • Handling Compositionality: The use of a CFG allows the system to handle deeply nested queries (compositional operations) that standard word-problem solvers often struggle with.

Key Results

At the time of publication, the Illinois Math Solver achieved state-of-the-art results across all tested benchmarks. Most notably, it achieved a massive leap in accuracy on the Commoncore (CC) dataset, reaching 45.2% compared to the previous benchmark of 2.3% set by Kushman et al. (2014).

Performance comparison showing the Illinois Math Solver outperforming previous state-of-the-art models across three datasets.

These results demonstrated that the system was significantly more capable of handling multi-step logic than previous "template-based" approaches.

Limitations and Future Work

The authors identify three main areas for improvement:

  1. Implicit Knowledge: The solver currently cannot handle problems requiring external facts (e.g., knowing that one week equals seven days).
  2. Algebraic Reasoning: The current version is limited to arithmetic; future iterations aim to handle variables ($x, y$) and systems of equations.
  3. Number Generation: The system assumes the answer is a combination of numbers explicitly mentioned in the text and cannot yet "introduce" new numbers or constants (like $\pi$) that aren't provided in the prompt.

Summary updated

BibTeX
@inproceedings{roy2016illinois,
  author = {Subhro Roy and Dan Roth},
  title = {{Illinois Math Solver: Math Reasoning on the Web}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2016},
  doi = {10.18653/v1/n16-3011},
}
Figure