Seeking Diverse Reasoning Logic: Controlled Equation Expression Generation for Solving Math Word Problems (2022)

Abstract: To solve Math Word Problems, human students leverage diverse reasoning logic that reaches different possible equation solutions. However, the mainstream sequence-to-sequence approach of automatic solvers aims to decode a fixed solution equation supervised by human annotation. In this paper, we propose a controlled equation generation solver by leveraging a set of control codes to guide the model to consider certain reasoning logic and decode the corresponding equations expressions transformed from the human reference. The empirical results suggest that our method universally improves the performance on single-unknown (Math23K) and multiple-unknown (DRAW1K, HMWP) benchmarks, with substantial improvements up to 13.2% accuracy on the challenging multiple-unknown datasets.

## introduction solving math word problems (mwps) is the task of obtaining mathematical solutions from natural language text descriptions. recent studies leverage sequence-to-sequence (seq2seq) neural networks (nns) for solving mwps, which take in the text as the input and decodes the corresponding humanannotated equation reference, which can further calculate the answer value @xcite . while promising results have been reported for singleunknown variable problems by designing task specialized encoder and decoder architectures @xcite @xcite @xcite @xcite , using pre-trained models @xcite and leveraging auxiliary tasks @xcite @xcite , various studies for a more challenging setting, mwps with multiple-unknowns have recently been developed (upadhyay and chang, 2017; @xmath0. @xcite @xcite . for human students in practice, they intuitively use diverse reasoning logic to solve mwps. students could consider the mwp solution from different aspects by considering diverse equivalence relations in the mwp. as we show in the upper of figure 1 , we can solve this problem in at least two different reasoning logic: as shown on the left side, the equation set is formed by the first reasoning logic of "considering the equivalence relation of the two sums of the cheeseburger and pizza calories given in the question"; or as shown in the right side, we can follow a second reasoning logic "considering first only the equivalence relation of caloric content of the cheeseburger by offsetting the calories from the pizza". such diverse reasoning logic could lead to diverse equation expressions, that the solution equation is written in various mathematically equivalent forms, such as expression 1 and expression 2 in the example. however, previous studies share a long-lasting limitation that they force the solver to decode a fixed equation expression supervised by human annotation. the fixed equation expression supervision used in previous studies ignores diverse mathematical reasoning, which is especially common for human students in multiple-unknown problems and complex single-unknown problems. meanwhile, directly introducing diverse equation expressions to the seq2seq framework in a data augmentation manner could further aggravate the issue of expression bias, which refers to the discrepancy between the annotated equation expression and the model's correct prediction expression. as shown in the middle of figure 1 , even if the model makes the correct prediction of the problem, the training loss accumulated by diverse expressions could be enormous. @xcite propose an equation normalization that reorders the variables in the equations as close as possible to their order in the input text. while their method could reduce the expression bias issue, they ignore the inherent diverse mathematical reasoning and limits to considering single-unknown problems. enlightened by recent methods in controlled text generation, which uses a control code to influence the style and topic of subsequent generated text @xcite , we propose a new training paradigm, where a control code guides the decoding process to consider one type of mathematical reasoning logic and decode the corresponding equation expression. as shown in the bottom figure 1 , @xmath1. not only can it reduce the expression bias problem since the control code can provide guidance for the reasoning logic, but also training on the diverse equation expressions guided by the control codes can lead to better interpretation of the mwps by considering diverse reasoning logic. we design various control codes for both single-unknown and multiple-unknown settings to allow the model to understand different reasoning orders. we conduct experiments on a single-unknown benchmark math23k and two multiple-unknown benchmarks draw1k and hmwp. experimental results show that our method improves the performance of both settings, with a more significant improvement in the challenging multiple-unknown setting. ## methodology for each math word problem holding an original equation set (e 1 , e 2 , ...), we generate new equation expressions based on five types of diverse mathe-matical reasoning logic considering the ordering logic of given variables {n i } and unknown variables {x j }. i and j denote the ordered indices that the variables appear in the text. we then assign a corresponding control code to the equation expressions. the mwp solving model takes in the text and control code, and then is trained to predict the corresponding equation expression. ## conclusion and future work in this paper, we introduce diverse mathematical reasoning logic to the seq2seq mwp solver framework using five control codes to guide the solver to predict the corresponding equation expression in a controlled equation generation manner. the approach allows the solver to benefit from diverse reasoning logic beyond the human-annotated fixed solution equation. meanwhile, the controlled equation generation training paradigm reduces the expression bias problem caused by diverse equation expressions. experimental results show the effectiveness of our method, outperforming strong base-lines on single-unknown (math23k) and multipleunknown (draw1k, hmwp) datasets. there exists other controlled equation generation strategies such as such as adding brackets to merge subtraction terms (e.g. from n 1 -n 2 -n 3 to n 1 -(n 2 +n 3 )) or combining current control codes to form a new type of equation expression, which potentially could lead to more than 10 controlled equation generation strategies. in addition, considering the prediction of multiple control codes in addition @xmath2, for example, applying ensemble learning methods such as major voting, or designing rankers to choose a optimal prediction among the prediction of multiple control codes. these problems could be considered as future work of this study.