Solving Arithmetic Word Problems Automatically Using Transformer and Unambiguous Representations
Kaden Griffith and Jugal Kalita University of Colorado Colorado Springs Colorado Springs, Colorado Email: and
Abstract
Constructing accurate and automatic solvers of math word problems has proven to be quite challenging. Prior attempts using machine learning have been trained on corpora specific to math word problems to produce arithmetic expressions in infix notation before answer computation. We find that custom-built neural networks have struggled to generalize well. This paper outlines the use of Transformer networks trained to translate math word problems to equivalent arithmetic expressions in infix, prefix, and postfix notations. In addition to training directly on domain-specific corpora, we use an approach that pre-trains on a general text corpus to provide foundational language abilities to explore if it improves performance. We compare results produced by a large number of neural configurations and find that most configurations outperform previously reported approaches on three of four datasets with significant increases in accuracy of over 20 percentage points. The best neural approaches boost accuracy by almost 10% on average when compared to the previous state of the art.
中文速览
数学文字题(math word problem)的自动求解一直很难做好,关键障碍在于神经网络既难以处理题目中千变万化的具体数字,又容易在生成算式时把括号放错位置、运算符用错。研究者把这个问题重新定义为一项机器翻译任务——用 Transformer 网络把自然语言题目直接"翻译"成前缀、中缀、后缀三种算术表达式,同时在输入预处理阶段将所有数值替换为通用占位符(如⟨n1⟩、⟨n2⟩),避免网络对具体数字产生错误依赖;此外还对比了在 IMDb 影评语料上预训练后再迁移到数学题领域的方案,以检验通用语言预训练能否进一步提升理解能力。在四个标准数据集上的实验表明,绝大多数 Transformer 配置在其中三个数据集上超越了此前所有方法,最高精度提升超过 20 个百分点,最优模型平均比先前最佳结果高出近 10%。这项工作的意义在于:用更简洁的纯翻译框架、无需外部句法树或强化学习模块,就能大幅刷新数学文字题求解的性能上限,为后续研究提供了一条更清晰的技术路线。
原文 arXiv:1912.00871;中英对照 + 大白话阅读 https://aha.fim.ai/paper/1912.00871v1