A Tag-Based Statistical English Math Word Problem Solver with Understanding, Reasoning and Explanation
Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence. Pages 4254-4254.
Abstract
This demonstration presents a tag-based statistical English math word problem (MWP) solver with understanding, reasoning, and explanation. It analyzes the text and transforms both body and question parts into their tag-based logic forms, and then performs inference on them. The proposed tag (e.g., Agent, Verb, etc.) provides the flexibility for annotating an extracted math quantity with its associated syntactic and semantic information, which can be used to identify the desired operand and filter out irrelevant quantities (so that the answer can be obtained precisely). Since the physical meaning of each quantity is explicitly represented with those tags and used in the inference process, the proposed approach could explain how the answer is obtained in a human comprehensible way.
- [Hosseini et al., 2014] M.J. Hosseini, H. Hajishirzi, O. Etzioni, N. Kushman. Learning to Solve Arithmetic Word Problems with Verb Categorization, EMNLP. 2014.
- [Kushman et al., 2014] N. Kushman, Y. Artzi, L. Zettlemoyer, R. Barzilay. Learning to Automatically Solve Algebra Word Problems, ACL. 2014.
- [Manning et al., 2014] C.D. Manning, M. Surdeanu, J. Bauer, J. Finkel, S. J. Bethard, and D. McClosky. The Stanford CoreNLP Natural Language Processing Toolkit, In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pp. 55-60. 2014.
- [Mukherjee and Garain, 2008] A. Mukherjee, U. Garain. A review of methods for automatic understanding of natural language mathematical problems, Artif Intell Rev, 2008.
- [Roy and Roth, 2015] S.I. Roy and D.I. Roth. Solving General Arithmetic Word Problems, EMNLP. 2015.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
The math word problem (MWP) is frequently chosen to study natural language understanding for the following reasons: (1) The answer of the MWP cannot be simply extracted by performing keyword/pattern matching. It can clearly show the merit of understanding and inference. (2) MWP usually possesses less complicated syntax and requires less amount of domain knowledge, so the researcher can focus on the task of understanding and reasoning. (3) The body part of MWP (which mentions the given information for solving the problem) consists of only a few sentences. The understanding and reasoning procedures could be checked more efficiently. (4) The MWP solver has its own applications such as Computer Math Tutor and Helper for Math in Daily Life.
Previous MWP solvers either adopt rule-based approaches [Mukherjee and Garain, 2008; Hosseini et al., 2014] or purely statistic-based approaches [Kushman et al., 2014; Roy and Roth, 2015] to identify entities, quantities, operations, and get the answer. The main problem of the rule-based approaches is that a wide coverage rule-set is difficult and expensive to construct. It is also awkward in resolving ambiguity problem. In contrast, the main problems of the purely statistic-based approaches is that the performance deteriorates significantly when the MWP is complicated. These approaches are also sensitive to the irrelevant information [Kushman et al., 2014].
A tag-based statistical English MWP solver is thus proposed to perform understanding and reasoning, and avoid the problems mentioned above. The proposed tag-based approach provides the flexibility for annotating an extracted math quantity with its associated syntactic and semantic information, which can be used to identify the desired operand and filter out irrelevant quantities so that the answer can be obtained precisely. Since the physical meaning of each quantity is explicitly expressed and used during inference, the associated reasoning procedure is human comprehensible and could be easily explained to the user.
2 Tag-based MWP Solver

The block diagram of proposed math word problem solver is shown in Figure 1. First, each sentence in a MWP is analyzed by the Language Analyzer module (which adopts Stanford CoreNLP suite [Manning et al., 2014] to generate dependency trees and co-reference chains). The associated linguistic information is then sent to the Solution Type Classifier (STC), which is a SVM classifier associated with a linear kernel function, to find out the corresponding math operations. Afterwards, they are converted into the logic form by the Logic Form Converter (LFC). The Inference Engine (IE) then obtains the answer from those obtained logic expressions. Finally, the Explanation Generator module will explain how the answer is obtained according to the given reasoning chain [Russel and Norvig, 2009].
2.1 Logic Form Transformation
The LFC non-deterministically generates the domain dependent logic forms (a variant of First-Order-Logic (FOL)) from those crucial math facts associated with quantities and relations between quantities. For example, the sentence ÒFred picks 36 limes.Ó will be transformed into the domain dependent logic form as Òquan(q1, #, lime)=36 & verb(q1, pick) & nsubj(q1, Fred)Ó. Here the associated auxiliary facts Òverb(q1, pick) & nsubj(q1, Fred)Ó are our proposed tags to make the system less sensitive to the irrelevant information.
The questions of the MWP will be also transformed into logic functions provided by the IE according to the suggested solution type. Take the question ÒHow many limes were picked in total?Ó as an example. The STC will assign the ÒSumÓ operation type to it. Based on that, the LFC will generate the FOL function ÒSum(quan(?q, #, lime), verb(?q, pick)Ó to search all quantities that are associated with object ÒlimeÓ and also attached with the verb tag ÒpickÓ.
2.2 Logic Inference

The IE is used to find out the solution of a MWP. It is responsible for providing utilities to select desired facts and then obtain the answer by taking math operations on selected facts. In addition, it is also responsible for using inference rules to derive new facts from those facts which are directly derived from the description of the MWP. Consider the example shown in Figure 2, the IE will first select all qualified quantities which match Òquan(?q, #, lime)Ó and with a ÒpickÓ verb tag, and then perform a Sum operation on them. The irrelevant quantity Òquan(q4, #, pear)Ó in that example is thus pruned out as its verb tag is ÒdropÓ, not ÒpickÓ. The answer is then obtained by summing those quantities q1, q2 and q3.
2.3 Explanation Generation
Based on the reasoning chain generated from the IE (an example is shown in Figure 3), a math operation oriented approach is adopted to explain how the answer is obtained. A specific template is used to generate the explanation text for each kind of operation. For example, the explanation text ÒTotally pick 36 limes + 32 limes + 35 limes = 103 limesÓ will be generated to explain that the obtained answer is a summation of Ò36 limesÓ, Ò32 limesÓ and Ò35 limesÓ.

3 Demonstration Outline
The MWP solver comprises a web user interface and a processing server. The demonstration will start from an input MWP which will be submitted from the web interface. After that, those modules shown in Figure 1 will be invoked to solve the problem. Once the process is finished, all outputs will be displayed in the web interface: (1) Parse Trees, Dependency and Co-Reference from the language analyzer. (2) Linguistic representations, which are converted from the above language analysis result. (3) Suggested solution type, which identifies the desired math operation that the LFC should adopt. (4) Obtained logical forms, which are transformed from the linguistic representation and specified solution type. (5) Generated reasoning chains and explanation text, which explains how the problem is solved.
4 Conclusion
A tag-based statistical framework is proposed to perform understanding and reasoning for solving English MWPs. The adopted tag can help identify desired operands and filter out irrelevant quantities. Furthermore, by representing the physical meaning of each quantity with tags and using them in the inference process, we can explain how the answer is obtained in a human comprehensible way.
@inproceedings{ijcai2016p647,
title = {A Tag-Based Statistical English Math Word Problem Solver with Understanding, Reasoning and Explanation},
author = {Liang, Chao-Chun and Hsu, Kuang-Yi and Huang, Chien-Tsung and Li, Chung-Min and Miao, Shen-Yu and Su, Keh-Yih},
booktitle = {Proceedings of the Twenty-Fifth International Joint Conference on
Artificial Intelligence, {IJCAI-16}},
publisher = {AAAI Press / International Joint Conferences on Artificial Intelligence},
editor = {Subbarao Kambhampati},
pages = {4254--4254},
year = {2016},
month = {7},
url = {https://ijcai.org/proceedings/2016/647},
}
TY - CPAPER TI - A Tag-Based Statistical English Math Word Problem Solver with Understanding, Reasoning and Explanation AU - Liang, Chao-Chun AU - Hsu, Kuang-Yi AU - Huang, Chien-Tsung AU - Li, Chung-Min AU - Miao, Shen-Yu AU - Su, Keh-Yih T2 - Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence, IJCAI-16 PB - AAAI Press / International Joint Conferences on Artificial Intelligence PY - 2016 SP - 4254 EP - 4254 UR - https://ijcai.org/proceedings/2016/647 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: