Table of Contents
Fetching ...

Semantically-Aligned Equation Generation for Solving and Reasoning Math Word Problems

Ting-Rui Chiang, Yun-Nung Chen

TL;DR

This work tackles solving math word problems by bridging semantic meaning and symbolic math. It introduces an encoder that derives semantic representations for constants and external constants, and a stack-based postfix decoder that generates equations by composing operand semantics through learned semantic transformers. The approach achieves state-of-the-art accuracy on Math23K and provides interpretable reasoning steps through the semantic representations and stack actions. Ablation and qualitative analyses further demonstrate the value of operand semantics, gating, attention, and explicit semantic transformations for robust problem solving.

Abstract

Solving math word problems is a challenging task that requires accurate natural language understanding to bridge natural language texts and math expressions. Motivated by the intuition about how human generates the equations given the problem texts, this paper presents a neural approach to automatically solve math word problems by operating symbols according to their semantic meanings in texts. This paper views the process of generating equation as a bridge between the semantic world and the symbolic world, where the proposed neural math solver is based on an encoder-decoder framework. In the proposed model, the encoder is designed to understand the semantics of problems, and the decoder focuses on tracking semantic meanings of the generated symbols and then deciding which symbol to generate next. The preliminary experiments are conducted in a dataset Math23K, and our model significantly outperforms both the state-of-the-art single model and the best non-retrieval-based model over about 10% accuracy, demonstrating the effectiveness of bridging the symbolic and semantic worlds from math word problems.

Semantically-Aligned Equation Generation for Solving and Reasoning Math Word Problems

TL;DR

This work tackles solving math word problems by bridging semantic meaning and symbolic math. It introduces an encoder that derives semantic representations for constants and external constants, and a stack-based postfix decoder that generates equations by composing operand semantics through learned semantic transformers. The approach achieves state-of-the-art accuracy on Math23K and provides interpretable reasoning steps through the semantic representations and stack actions. Ablation and qualitative analyses further demonstrate the value of operand semantics, gating, attention, and explicit semantic transformations for robust problem solving.

Abstract

Solving math word problems is a challenging task that requires accurate natural language understanding to bridge natural language texts and math expressions. Motivated by the intuition about how human generates the equations given the problem texts, this paper presents a neural approach to automatically solve math word problems by operating symbols according to their semantic meanings in texts. This paper views the process of generating equation as a bridge between the semantic world and the symbolic world, where the proposed neural math solver is based on an encoder-decoder framework. In the proposed model, the encoder is designed to understand the semantics of problems, and the decoder focuses on tracking semantic meanings of the generated symbols and then deciding which symbol to generate next. The preliminary experiments are conducted in a dataset Math23K, and our model significantly outperforms both the state-of-the-art single model and the best non-retrieval-based model over about 10% accuracy, demonstrating the effectiveness of bridging the symbolic and semantic worlds from math word problems.

Paper Structure

This paper contains 33 sections, 11 equations, 5 figures, 5 tables, 1 algorithm.

Figures (5)

  • Figure 1: The solving process of the math word problem "Each notebok takes $0.5 and each pen takes $1. Tom has $10. How many notebook can he buy after buying 5 pens?" and the associated equation is $x=(10-1\times 5)\div 0.5$. The associated equation is $x=(10-1\times 5)\div 0.5$.
  • Figure 2: The encoder-decoder model architecture of the proposed neural solver machine.
  • Figure 3: Illustration of the inference process. The purple round blocks denote the transformed semantics, while the green ones are generated by the variable generator.
  • Figure 4: The self-attention map visualization of operands' semantic expressions for the problem "There are 58 bananas. Each basket can contain 6 bananas. How many bananas are needed to be token off such that exactly 9 baskets are filled?".
  • Figure 5: Word attention and gate activation ($g^{sa}$ and $g^{opd}$) visualization when generating stack actions for the problem "6.75 deducting 5 times of an unknown number is 2.75. What is the unknown number?", where the associated equation is $x=(6.75 - 2.75)\div 5$. Note that $g^{opd}$ is meaningful only when the $t$-th stack action is $\mathrm{push\_op}$.