NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Solving General Arithmetic Word Problems

Subhro Roy, Dan Roth

Introduction

Arithmetic word problems represent a fundamental challenge in Natural Language Processing (NLP). While the underlying mathematics—addition, subtraction, multiplication, and division—is elementary, the "semantic gap" between natural language descriptions and mathematical formalisms is vast. Traditional solvers often rely on rigid equation templates, which fail when encountering novel problem structures. Researchers at the University of Illinois have proposed a more flexible approach that decomposes these problems into "Expression Trees," allowing for greater generalization across diverse problem types.

The Expression Tree Approach

The core innovation of this work is representing mathematical solutions as trees rather than flat equations. In an expression tree, internal nodes represent operations, and leaf nodes represent quantities extracted from the text. This structure allows the system to break down a complex, multi-step problem into a series of local decisions about how pairs of numbers relate to one another.

An example of an arithmetic solution mapped to its corresponding expression tree.

By predicting the "Lowest Common Ancestor" (LCA) operation for every pair of quantities in the text, the system can reconstruct the full mathematical expression without needing to match a predefined template. This decomposition turns a structural search problem into a series of manageable classification tasks.

Monotonicity and Global Inference

A significant challenge in using trees is that a single arithmetic expression can often be represented by multiple valid tree structures. To resolve this ambiguity, the authors introduced Monotonic Expression Trees. By enforcing specific structural rules—for instance, preventing an addition node from being a child of a subtraction node—they ensure that every valid expression maps to a unique, standardized tree.

Two different tree structures representing the same mathematical expression, illustrating the need for monotonic constraints to ensure uniqueness.

To further refine the results, the system employs a Global Inference procedure using a Constrained Conditional Model. This engine doesn't just look at local operation probabilities; it searches for the highest-scoring tree that satisfies "world knowledge" constraints. For example, it enforces that answers to "how many" questions are positive integers, effectively using redundancy in the data to "outvote" local classification errors.

Datasets and Results

The system was rigorously tested against three benchmarks:

  • AI2 Dataset: 395 addition/subtraction problems.
  • IL Dataset: 562 single-operation problems across all four basic operations.
  • Commoncore Dataset: A new, challenging benchmark of 600 multi-step problems.

The results were striking. On the IL dataset, the system achieved 73.9% accuracy, far surpassing previous state-of-the-art methods which hovered around 52.7%. Most notably, on the multi-step Commoncore dataset, the expression tree approach achieved 45.2% accuracy, while the leading template-based competitor (Kushman et al.) managed only 2.3%. This highlights the system's superior ability to generalize to unseen problem structures.

Limitations and Future Work

Despite its success, the system faces hurdles in linguistic complexity. Approximately 45% of errors on the AI2 dataset were attributed to failures in extracting correct "quantity schemas"—the context surrounding a number, such as its unit or associated verb. Additionally, "implicit rates" (e.g., recognizing that "4-dollar toys" implies a rate of dollars per toy) remain a challenge. Future work aims to extend this framework to handle variables, potentially opening the door to solving complex algebra word problems.

Summary updated

BibTeX
@inproceedings{roy2015solving,
  author = {Subhro Roy and Dan Roth},
  title = {{Solving General Arithmetic Word Problems}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1202},
}
Figure