Math Word Problem Solving with Explicit Numerical Values (2021)

Abstract: In recent years, math word problem solving has received considerable attention and achieved promising results, but previous methods rarely take numerical values into consideration. Most methods treat the numerical values in the problems as number symbols, and ignore the prominent role of the numerical values in solving the problem. In this paper, we propose a novel approach called NumS2T, which enhances math word problem solving performance by explicitly incorporating numerical values into a sequence-to-tree network. In addition, a numerical properties prediction mechanism is used to capture the category and comparison information of numerals and measure their importance in global expressions. Experimental results on the Math23K and APE datasets demonstrate that our model achieves better performance than existing state-of-the-art models.

## introduction taking a math word problem as input, the math word problem solving task aims to generate a corresponding solvable expression and answer. with the advancements in natural language processing, math word problem solving has received growing attention in recent years @xcite @xcite . many methods have been proposed that use sequence-to-sequence (seq2seq) models with an attention mechanism @xcite for math word problem solving @xcite @xcite . to better utilize expression structure information, some methods use sequenceto-tree (seq2tree) models to generate expressions problem: a school purchased several pairs of new desks and chairs for grade students. each desk is worth @xmath0 . the price difference between the tables and the chairs is $ . there are more students than chairs. how many students are there? expression 1: 𝑣 4 / ( 𝑣 2 -𝑣 3 ) + 𝑣 5 numerical expression: 100 / ( 15 -10 ) + 25 expression 2: 𝑣 4 / ( 𝑣 2 -𝑣 3 ) * ( 1 + 𝑣 5 ) numerical expression: 64 / (9.9 -8.3) * (1+20%) expression 3: 𝑣 4 / ( 𝑣 3 -𝑣 2 ) * ( 1 + 𝑣 5 ) numerical expression: 18 / (8 -6.5) * (1 + (1/3)) 𝑣 1 1 3 7 15 9.9 6.5 𝑣 2 10 8.3 8 𝑣 3 𝑣 4 100 64 18 𝑣 5 25 20% (1/3) figure 1: example of a math word problem. the same problem with different numerical values may correspond to different math expressions. without numerical value information, the model can hardly determine which expression is correct. and have achieved promising results @xcite @xcite . these methods convert the target expression into a binary tree, and generate a pre-order traversal sequence of this expression tree based on the parent and sibling nodes of each node. although promising results have been achieved, previous methods rarely take numerical values into consideration, despite the fact that in math word problem solving, numerical values provide vital information. as an infinite number of numerals can appear in math word problems, it is impossible to list them all in the vocabulary. previous methods replace all the numbers in the problems with number symbols (e.g., v 1 , v 2 ) in order in the preprocessing stage. these replaced problems are used as input to directly generate expressions containing number symbols. the number symbols in the expressions are then replaced with the numerical values in the original problems to obtain executable expressions. as shown in figure 1 , taking the problem with numerical values {v 2 =15, v 3 =10, v 4 =100, v 5 =25} as input, the target expression of the problem would be "v 4 /(v 2 -v 3 ) + v 5 ". however, if the number symbol v 5 = 20%, the target expression for the same problem would be "v 4 /(v 2 -v 3 ) * (1 + v 5 )". similarly, without numerical value information, the model can hardly determine whether the number gap between the table and the chair should be v 2 -v 3 or v 3 -v 2 . as such, it will incorrectly generates the same expression for problems with different numerical values. to address these problems, we propose a novel approach called nums2t to better capture numerical value information and utilize numerical properties. specifically, the proposed model uses a sequence-to-tree network with a digit-to-digit number encoder that explicitly incorporates numerical values into the model and captures number-aware problem representations. in addition, we designed a numerical properties prediction mechanism to further utilize the numerical properties. nums2t predicts the comparative relationship between paired numerical values, determines the category of each numeral, and measures their importance for generating the final expression. with the category and comparison information, the model can better identify the interactive relationship between the numerals, and thus generate better results. with consideration of the importance of the numerals, the model can capture the global relationship between the numerals and target expressions rather than simply focusing on the local relationship between numeral pairs. the main contributions of this paper can be summarized as follows: ## models in this section, we present details regarding our proposed nums2t model. as shown in figure 2 , we use an attention-based sequence-to-tree model with a problem encoder (section 2.2) and a treestructured decoder to generate math expressions (section 2.4). in addition, we explicitly incorporate numerical values to obtain number-aware problem representations (section 2.3). finally, we propose a numerical properties prediction mechanism to further utilize the numerical properties (section 2.5).