DISK : Domain-constrained Instance Sketch for Math Word Problem Generation (2022)

Abstract: A math word problem (MWP) is a coherent narrative which reflects the underlying logic of math equations. Successful MWP generation can automate the writing of mathematics questions. Previous methods mainly generate MWP text based on inflexible pre-defined templates. In this paper, we propose a neural model for generating MWP text from math equations. Firstly, we incorporate a matching model conditioned on the domain knowledge to retrieve a MWP instance which is most consistent with the ground-truth, where the domain is a latent variable extracted with a domain summarizer. Secondly, by constructing a Quantity Cell Graph (QCG) from the retrieved MWP instance and reasoning over it, we improve the model’s comprehension of real-world scenarios and derive a domain-constrained instance sketch to guide the generation. Besides, the QCG also interacts with the equation encoder to enhance the alignment between math tokens (e.g., quantities and variables) and MWP text. Experiments and empirical analysis on educational MWP set show that our model achieves impressive performance in both automatic evaluation metrics and human evaluation metrics.

## introduction text generation has been broadly studied as an important task in the field of natural language processing. it aims to generate natural language text that is fluent, readable and faithful to the original input. recent text generation studies mainly focus on the data-to-text generation, which generates textual output from structured data such as tables of records or knowledge graphs (kgs) @xcite @xcite . in this paper, we focus on a relatively new type of data-to-text generation task: generating math word problems (mwp) from equations @xcite , which does not equations: @xmath0; (x + y) * 3= 147 problem: jane travels 6 times faster than mike. traveling in opposite directions they are 147 miles apart after 3 hrs. find their rates of travel. equations: (1 -1/3 -9/20) * @xmath1: at a local high school, 3/8 of the students are freshman. 1/4 are juniors. and 245 are seniors. find the total number of students. figure 1 : two examples selected from the mwp generation dataset. however, different from other data-to-text generation tasks, generating mwp text from abstract math equations is much more challenging. firstly, an equation can be expressed by different mwp texts which differ in topic, style or grammar, known as one-to-many pattern. take the equation 1 in figure 1 for example, "@xmath2.", but it is also okay to express it as "the price of oranges is six times the apples.". so when grounding the input abstract math equations into a specific math problem, it is hard for a model to decide which scenes to choose for generation. secondly, the math tokens in equations and natural language text in problems are from completely different symbolic representation space. so this gap increases the difficulty of establishing alignments between math tokens and natural language words, as shown in figure 2 . such issue also confuses the generator thus makes generation process uncontrollable. to overcome these challenges, we propose a equation 1: problem 1: if a guy drove 2 miles in 10 minutes how many miles per hour was he going. ## methodology the overview of our disk is depicted in figure 3 . our model follows a three-stage procedure: firstly, given the input equations and a text-domain vector which is extracted by the domain summarizer, the matching model retrieves a most similar mwp instance in database by jointly measuring equation-text matching score and domain-text matching score. secondly, the sketch provider enriches the original representation of the instance to yield a refined instance sketch, it filters out excessive information considering domain constraint and helps the model to understand quantity relationship by applying graph neural network (gnn) over the quantity cell graph (qcg). thirdly, text generator generates mwp text via utilizing both the math equation contextualized by qcg and the refined instance sketch based on an encoder-decoder architecture. ## conclusion we propose disk, which introduces latent discrete domains for matching appropriate mwp instance and refines its representation. we also extract quan-tity cell graph to enhance the sketch-guided generator and help our model better understand math equations in real scenarios. experimental results on the extended dolphin18k dataset show the superiority of our model.