Point to the Expression: Solving Algebraic Word Problems using the Expression-Pointer Transformer Model

Bugeun Kim, Kyung Seo Ki, Donggeon Lee, Gahgene Gweon

Introduction

Solving algebraic word problems (AWPs) requires translating natural language into a formal system of equations. Historically, a significant performance gap has existed between "hand-crafted" systems using expert-designed rules and "pure" neural models that learn directly from raw text. While neural models offer greater flexibility, they have traditionally lagged behind in accuracy due to structural limitations in how they process mathematical logic.

The Expression-Pointer Transformer (EPT) is a pure neural model designed to bridge this gap. By rethinking how equations are generated and how numerical values are linked to their linguistic context, EPT achieves up to a 40% accuracy boost over previous neural approaches on standard benchmarks.

Identifying Structural Weaknesses in Neural Solvers

The authors identify two primary reasons why standard neural models struggle with AWPs:

  1. Expression Fragmentation: Most models generate equations token-by-token (e.g., x, +, y). This approach disassembles the natural tree structure of an equation, making it difficult for the model to maintain mathematical logic and global structure.
  2. Operand-Context Separation: Standard models often replace specific numbers in a problem with generic symbols (e.g., replacing "8" with $N_1$). This process strips away vital surrounding context—such as "eight more than"—which is essential for determining the number's correct mathematical role.
Illustration of expression fragmentation and operand-context separation issues alongside the proposed Expression-Pointer solution.

The Expression-Pointer Transformer (EPT) Architecture

The EPT model utilizes an encoder-decoder architecture based on the Transformer, incorporating two critical modifications to address the aforementioned issues:

  • The "Expression" Token: Instead of predicting individual operators or numbers, the decoder predicts holistic "Expression" units. Each unit consists of an operator and its associated operands (e.g., *(x1, 2)), preserving the relational structure of the equation tree during generation.
  • Operand-Context Pointers: To retain linguistic context, the model employs a pointer mechanism. When the decoder requires an operand, it "points" directly to the hidden-state vector in the encoder corresponding to that number's position in the original text. This allows the model to leverage the rich semantic information provided by the ALBERT (A Lite BERT) encoder.
The EPT architecture, showing the ALBERT encoder and the Transformer decoder using pointers to link operands back to the source text.

By combining these features, EPT remains a "purely" neural model, requiring no manual feature engineering or pre-defined equation templates, making it fully end-to-end.

Evaluation and Results

The researchers evaluated EPT on three standard English AWP datasets: ALG514 (high complexity, multiple unknowns), DRAW-1K (diverse structures), and MAWPS (large scale, lower complexity).

The EPT model demonstrated dramatic improvements over previous state-of-the-art (SoTA) pure neural models:

  • ALG514: Accuracy reached 81.3%, a significant jump from the previous neural SoTA of 44.5%, nearly matching hand-crafted models (83.0%).
  • DRAW-1K: Achieved 59.5% accuracy, matching the performance of the best feature-heavy systems.
  • MAWPS: Reached 84.5% accuracy, outperforming previous neural models (78.9%).

Ablation studies highlighted that the pointer mechanism was the primary driver of performance, contributing approximately a 30% accuracy increase in high-complexity datasets.

Conclusion and Future Directions

The EPT model proves that pure neural architectures can compete with and even outperform expert-engineered systems when the model design respects the structural nature of mathematics. By treating equations as structured expressions and maintaining the link between numbers and their textual context, EPT provides a more robust framework for automated math solving.

Despite these gains, challenges remain. The model occasionally struggles with non-commutative operations in comparative phrases (e.g., confusing "x - 6" with "6 - x") and temporal logic (e.g., tracking age changes over time). Future research will focus on addressing these linguistic nuances and extending EPT to more complex mathematical domains and multi-lingual datasets.

Summary updated

BibTeX
@inproceedings{kim2020point,
  author = {Bugeun Kim and Kyung Seo Ki and Donggeon Lee and Gahgene Gweon},
  title = {{Point to the Expression: Solving Algebraic Word Problems using the Expression-Pointer Transformer Model}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.308},
}
Figure