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

A Knowledge-Aware Sequence-to-Tree Network for Math Word Problem Solving

Qinzhuo Wu, Qi Zhang, Jinlan Fu, Xuanjing Huang

Introduction

Math Word Problem (MWP) solving is a challenging task that requires machines to translate natural language descriptions into executable mathematical expressions. Despite recent progress, existing models struggle with two primary issues: the Knowledge Gap and the Structural Gap. The Knowledge Gap refers to the lack of "common-sense" background knowledge (e.g., understanding that "apples" and "oranges" are both "fruit"). The Structural Gap arises from the linear nature of standard sequence-to-sequence models, which fail to capture the hierarchical, tree-like dependencies inherent in mathematical equations.

Methodology

To address these challenges, the authors propose the KA-S2T (Knowledge-Aware Sequence-to-Tree) network. This architecture integrates external semantic knowledge and a novel decoding mechanism to maintain global structural awareness.

Knowledge-Aware Encoder

The encoder utilizes a Bidirectional LSTM to process the problem text. To bridge the Knowledge Gap, an Entity Graph is constructed using external knowledge bases like Cilin and Hownet. A Graph Attention Network (GAT) then processes this graph, enriching word representations with semantic category information.

Tree-Structured Decoder with State Aggregation

Unlike traditional decoders that generate flat sequences, the KA-S2T decoder generates a tree structure in a top-down manner. A key innovation is the State Aggregation Mechanism, which uses a Graph Convolutional Network (GCN) to recursively aggregate the states of all previously generated nodes. This provides the model with a "global view" of the partial expression tree at every step.

The KA-S2T architecture featuring the Knowledge-Aware Encoder and Tree-Structured Decoder with State Aggregation.

Experimental Results

The model was evaluated on the Math23K dataset, a benchmark of over 23,000 Chinese elementary math problems. The results demonstrate that KA-S2T achieves a new state-of-the-art accuracy of 76.3%, significantly outperforming previous models.

Comparison of KA-S2T performance against other state-of-the-art models on the Math23K dataset.

Ablation studies confirmed the importance of each component: removing external knowledge decreased accuracy by approximately 0.8%, while removing the state aggregation mechanism led to a more significant drop of over 2%. This highlights that while semantic knowledge is beneficial, capturing the global mathematical structure is critical for solving complex problems.

Conclusion

The KA-S2T network successfully bridges the semantic and structural gaps in math word problem solving. By combining graph-based knowledge enrichment with a tree-structured decoder that maintains global context, the model sets a new performance benchmark. Future work will explore generalizing this approach to more complex domains like geometry and multi-variable calculus.

Summary updated

BibTeX
@inproceedings{wu2020knowledge,
  author = {Qinzhuo Wu and Qi Zhang and Jinlan Fu and Xuanjing Huang},
  title = {{A Knowledge-Aware Sequence-to-Tree Network for Math Word Problem Solving}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.579},
}
Figure