Developing automatic Math Word Problem (MWP) solvers is a challenging task that demands the ability of understanding and mathematical reasoning over the natural language. Recent neural-based approaches mainly encode the problem text using a language model and decode a mathematical expression over quantities and operators iteratively. Note the problem text of a MWP consists of a context part and a question part, a recent work finds these neural solvers may only perform shallow pattern matching between the context text and the golden expression, where question text is not well used. Meanwhile, existing decoding processes fail to enforce the mathematical laws into the design, where the representations for mathematical equivalent expressions are different. To address these two issues, we propose a new encoder-decoder architecture that fully leverages the question text and preserves step-wise commutative law. Besides generating quantity embeddings, our encoder further encodes the question text and uses it to guide the decoding process. At each step, our decoder uses Deep Sets to compute expression representations so that these embeddings are invariant under any permutation of quantities. Experiments on four established benchmarks demonstrate that our framework outperforms state-of-the-art neural MWP solvers, showing the effectiveness of our techniques. We also conduct a detailed analysis of the results to show the limitations of our approach and further discuss the potential future work. Code is available at https://github.com/sophistz/Question-Aware-Deductive-MWP.
翻译:开发自动数学应用题求解器是一项具有挑战性的任务,需要具备自然语言理解与数学推理能力。当前的神经方法主要使用语言模型编码问题文本,并迭代地对运算量和运算符进行数学表达式解码。值得注意的是,数学应用题的文本由上下文部分和问题部分组成,近期研究发现这些神经求解器可能仅执行上下文文本与标准表达式之间的浅层模式匹配,而问题文本未被充分利用。同时,现有解码过程未能将数学法则融入设计,导致数学等价表达式的表征存在差异。针对这两个问题,我们提出了一种新型编码器-解码器架构,该架构能充分利用问题文本并保持逐步交换律。除生成运算量嵌入外,我们的编码器进一步编码问题文本,并利用它引导解码过程。在每一步解码中,解码器使用Deep Sets计算表达式表征,使得这些嵌入在运算量的任意排列下保持不变。在四个公认基准上的实验表明,我们的框架优于最先进的神经数学应用题求解器,证实了所提技术的有效性。我们还对结果进行了详细分析,以揭示方法的局限性,并进一步探讨了未来潜在的研究方向。代码发布于https://github.com/sophistz/Question-Aware-Deductive-MWP。