Existing MWP solvers employ sequence or binary tree to present the solution expression and decode it from given problem description. However, such structures fail to handle the identical variants derived via mathematical manipulation, e.g., $(a_1+a_2)*a_3$ and $a_1*a_3+a_2*a_3$ are for the same problem but formulating different expression sequences and trees, which would raise two issues in MWP solving: 1) different output solutions for the same input problem, making the model hard to learn the mapping function between input and output spaces, and 2) difficulty of evaluating solution expression that indicates wrong between the above examples. To address these issues, we first introduce a unified tree structure to present expression, where the elements are permutable and identical for all the expression variants. We then propose a novel non-autoregressive solver, dubbed MWP-NAS, to parse the problem and reason the solution expression based on the unified tree. For the second issue, to handle the variants in evaluation, we propose to match the unified tree and design a path-based metric to evaluate the partial accuracy of expression. Extensive experiments have been conducted on Math23K and MAWPS, and the results demonstrate the effectiveness of the proposed MWP-NAS. The codes and checkpoints are available at: https://github.com/mengqunhan/MWP-NAS
翻译:现有数学应用题求解器采用序列或二叉树来表示解题表达式,并从给定的问题描述中解码得到该表达式。然而,此类结构无法处理通过数学推导得到的恒等变体,例如 $(a_1+a_2)*a_3$ 和 $a_1*a_3+a_2*a_3$ 对应同一个问题,却形成了不同的表达式序列和树结构。这会在数学应用题求解中引发两个问题:(1)同一输入问题对应的不同输出解,使得模型难以学习输入空间与输出空间之间的映射函数;(2)难以评估解题表达式的正确性,导致上述示例之间出现误判。为解决这些问题,我们首先引入一种统一的树结构来表示表达式,在该结构中,所有表达式变体的元素均可置换且彼此等价。随后,我们提出一种名为MWP-NAS的新型非自回归求解器,用于解析问题并基于统一树结构推理出解题表达式。针对第二个问题,为处理评估中的变体情况,我们提出对统一树进行匹配,并设计了一种基于路径的度量指标来评估表达式的部分正确性。在Math23K和MAWPS数据集上进行了大量实验,结果表明所提出的MWP-NAS方法具有有效性。代码和检查点已开源至:https://github.com/mengqunhan/MWP-NAS