等價算式
例子 1 中,模型顯示了組合順序不同但等價的算式。例 2 中,正確答案是先計 算出需要的總天數再減掉已經過去的天數。但模型產生的算式是利用未完成率去 除以每天的完成率,計算出剩餘需要的天數。例 3 要求第一次的木料使用量,中間 的算式 (2.2/((5/6)-(3/8))) 的意義為木料原本的總長度。在正確答案中用地一天使 用掉的比例去乘以全長,但在模型生成的算式中,則是用第二次用掉的木料去減掉 兩次的總使用量,雖然計算出的答案為負,是錯誤的,但邏輯上的操作僅差在兩者 的順序選錯而已。其他部分都象徵此模型能學習到等價算式的概念,即使在複雜的 運算中亦同。
Figure 6: Examples of generation results: 1, 2, 3
語意模糊與領域知識
在例 4 中,顯示一部分的錯誤也是因為語意上的模糊所導致,雖然題目強調 了第二天開始,並在末句加上「一周」的字眼,但計算上卻將天數減 1,而沒有出 現任何可以判斷需要減 1 的線索。在例 5 則與領域知識的議題相關,模型顯然不 具備「最大公約數」和「最小公倍數」的知識,即便能從大量數據中學習兩者分別 的數學涵義,但要了解兩者的關係仍然具有一定難度。例 6 是涉及到幾何領域的 知識,模型在計算時,可能不清楚題目中的正方形在邊長減少後,仍要維持以「正 方形的面積」來計算差,而非計算減少一邊的邊長後「成為長方形」的差。
Figure 7: Examples of generation results: 4, 5, 6
不正確的語意理解
例 7 是一個有趣的例子,模型看上去可能僅僅以「少 84」的字句來選擇減號 和 84,但模型在生成算式時是缺乏數值資訊的,如果將 84 這個數字換做是某種比 率,那這條算式會是正確的。例 8 顯然沒有將數字的訊息解讀正確,因而將把乘法 選成加法。例 9 則是順序選擇錯誤,這也表示若模型在前運算元就選錯了,那在後 面可能會缺乏選擇的餘地。例 10 則是把計算的主客體顛倒了,也沒有將字面的意 思推論成反函數的能力。
Figure 8: Examples of generation results: 7, 8, 9, 10
結論與未來研究方向
從一個長遠的角度來看,我們終究要處理領域知識 (domain knowledge) 的議 題,即便我們已經使用了預訓練的 word2vec,但它針對數學領域的語意理解還是 有其限制。而我們認為,引入更先進的 NLP 研究成果是改進這個議題較可行的方 案。
參考文獻
[1]
D. Bobrow, “Natural language input for a computer problem solving system,” in Semantic information processing, M. Minsky, Ed. MIT Press, 1964, pp. 146–226.[2]
E. A. Feigenbaum and J. Feldman, Computers and Thought. New York, NY, USA:McGraw-Hill, Inc., 1963.
[3]
E. Charniak, “Computer solution of calculus word problems,” in IJCAI, 1969, pp.303–316
[4]
D. Goldwasser and D. Roth, “Learning from natural instructions,” in IJCAI, 2011, pp. 1794–1800[5]
T. Kwiatkowski, E. Choi, Y. Artzi, and L. S. Zettlemoyer, “Scaling semantic parsers with on-the-fly ontology matching,” in EMNLP, 2013, pp. 1545–1556.[6]
N. Kushman, L. Zettlemoyer, R. Barzilay, and Y. Artzi, “Learning to automatically solve algebra word problems,” in ACL, 2014, pp. 271– 281.[7]
L. Zhou, S. Dai, and L. Chen, “Learn to solve algebra word problems using quadratic programming,” in EMNLP, 2015, pp. 817–822.[8]
D. Huang, S. Shi, J. Yin, and C.-Y. Lin, “Learning fine-grained expressions to solve math word problems,” in EMNLP, 2017, pp. 805–814[9]
S. Roy and D. Roth, “Solving general arithmetic word problems,” in EMNLP, 2015, pp. 1743–1752.[10]
R. Koncel-Kedziorski, H. Hajishirzi, A. Sabharwal, O. Etzioni, and S. D. Ang,[11]
S. Roy, S. Upadhyay, and D. Roth, “Equation parsing : Mapping sentences to grounded equations,” in EMNLP, 2016, pp. 1088–1097.[12]
S. Roy and D. Roth, “Unit dependency graph and its application to arithmetic word problem solving,” in AAAI. AAAI Press, 2017, pp. 3082–3088[13]
Y. Wang, X. Liu, and S. Shi, “Deep neural solver for math word problems,” in EMNLP, 2017, pp. 845–854.[14]
L. Wang, Y. Wang, D. Cai, D. Zhang, and X. Liu, “Translating math word problem to expression tree,” in EMNLP. Association for Computational Linguistics, 2018, pp. 1064–1069.[15]
T. Chiang and Y. Chen, “Semantically-aligned equation generation for solving and reasoning math word problems,” CoRR, vol. abs/1811.00720, 2018.[16]
L. Wang, D. Zhang, J. Zhang, X. Xu, L. Gao, B. Dai, and H. T. Shen, “Template-based mathword problem solvers with recursive neural networks,” in AAAI. AAAI Press, 2019[17]
Sepp Hochreiter and Jurgen Schmidhuber. 1997. ¨ Long short-term memory.Neural Computation, 9(8):1735–1780.