for solv lving and reasoning math word problems
play

for Solv lving and Reasoning Math Word Problems N T U Ting-Rui - PowerPoint PPT Presentation

M I U L A B Semanticall lly-Aligned Equation Generation for Solv lving and Reasoning Math Word Problems N T U Ting-Rui Chiang and Yun-Nung (Vivian) Chen https://github.com/MiuLab/E2EMathSolver Math Word Problem Each notebook takes $ 0.5 and


  1. M I U L A B Semanticall lly-Aligned Equation Generation for Solv lving and Reasoning Math Word Problems N T U Ting-Rui Chiang and Yun-Nung (Vivian) Chen https://github.com/MiuLab/E2EMathSolver

  2. Math Word Problem Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? Reasoning & Solving N T U x = 10 − 1 × 5 ÷ 0.5

  3. Prior Work Non-neural approaches Deep learning • Template-based • Seq2Seq M I U L A B (Kushman et al., Upadhyay and Chang) (Wang et al., Ling et al.) x = (? + ?) × ? - ? Problem fill generate x = (1+ 2) × 3 - 4 x = (1+ 2) × 3 - 4 N T U Rely on hand-crafted features! Does not use the structure of math expression. Our model is end-to-end and structural !

  4. Overview of f the Proposed Model x = 10 − 1 × 5 ÷0.5 Encoder M I U L A B stack stack stack stack action action action action N T U Decoder Each notebook takes $0.5 and each pen takes $1. Tom has $10. How many notebooks can he buy after buying 5 pens?

  5. Look Again at the Problem Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? $ 0.5 $ 1 ? N T U $ 10

  6. Semantic Meaning of f the Operands Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? The amount of Price of a notebook money Tom has N T U x = ( 10 − 1 × 5 ) ÷0.5 Number of pens bought Price of a pen

  7. Id Idea: Bridging Symbolic and Semantic Worlds M I U L A B N T U Symbolic World Semantic World

  8. Preprocess Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? Preprocess 0.5 N T U 1 10 5 Symbolic Part

  9. Symbol Encoding Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? Encode Preprocess 0.5 N T U 1 10 5 Semantic Part Symbolic Part

  10. In Inside Encoder M I U L A B N T U Each notebook takes $ and ... 0.5

  11. Semantic Generation for Unknown x M I U L A B N T U ... Each notebook takes $ and 0.5 * This part is actually done when decoding, but is present at this place for illustration. Check our paper for more information.

  12. Operands & Their Semantics Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? 0.5 N T U 1 10 5 Symbolic Part x Semantic Part

  13. In Intuition of f Using Semantics Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? Number of pens bought. N T U x = ( 10 − 1 ? 5 ) Price of a pen.

  14. Equation Generation in Postfix Each notebook takes $ 0.5 and each pen takes $ 1 . Tom has M I U L A B $ 10 . How many notebooks can he buy after buying 5 pens? N T U x 10 1 5 × − 0.5 ÷ =

  15. Equation Generation by Stack Actions Stack is used • x = 10 − 1 × 5 ÷0.5 M I U L A B The decoder generates • stack actions. stack stack stack stack action action action action An equation is generated • with actions on stack. N T U Decoder

  16. Action Selection in Each Step Encoder Decoder M I U L A B stack action { +, -, × , ÷ , =, Push } classifier N T U

  17. Equation Generation by Stack Actions Target Equation: x = 10 − 1 × 5 ÷ 0.5 Generated Actions: M I U L A B Action: push 0.5 1 N T U 10 5 x

  18. Equation Generation by Stack Actions Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Generated Actions: x 10 1 5 Generated Actions: x 10 1 Generated Actions: x 10 Generated Actions: x 10 Generated Actions: x M I U L A B Action: push 0.5 5 1 N T U 1 10 5 10 x x

  19. Equation Generation by Stack Actions Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Generated Actions: x 10 1 5 Generated Actions: x 10 1 Generated Actions: x 10 Generated Actions: x 10 Generated Actions: x M I U L A B Action: × 0.5 5 1 N T U 1 × 5 1 10 5 10 x x

  20. Equation Generation by Stack Actions Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Target Equation: x = 10 − 1 × 5 ÷ 0.5 Generated Actions: x 10 1 5 × 0.5 ÷ = Generated Actions: x 10 1 Generated Actions: x 10 Generated Actions: x 10 Generated Actions: x M I U L A B After many steps… 0.5 1 N T U 10 5 x=(10−1 × 5) ÷ 0.5 x

  21. Training Process Target equation is given. • M I U L A B Trained as Seq2Seq. • … x 10 1 5 N T U Encoder Decoder Each notebook takes $0.5 and each pen takes $1. Tom has $10. How many … x 10 1 5 <bos> notebooks can he buy after buying 5 pens?

  22. Experiments Dataset: Math23k • M I U L A B In Chinese • 23000 math word problems. • Operators: +, -, ×, ÷ • N T U

  23. Results Retrieval Template Ensemble Generation Acc. 70 M I U L A B > 1% 65 ≈ 8% 60 N T U 55 50 45 Retrieval BLSTM Self-Attention Seq2Seq w/SNI Proposed Hybrid

  24. Ablation Test Acc. 66 M I U L A B 65 64 ≈ 3% 63 62 61 ≈ 2.5% N T U 60 59 Char-Based Word-Based Word-Based Word-Based Word-Based Word-Based -Semantic -Gate -Gate -Gate -Attention -Attention -Stack

  25. Self-Attention for Qualitative Analysis Encoder M I U L A B N T U Each notebook takes $ and ... 0.5

  26. Self-Attention for Qualitative Analysis Encoder M I U L A B N T U Each notebook takes $ and ... 0.5

  27. Attention for Operand Semantics The attention focuses on: M I U L A B • Informative verbs o “ gain ”, “ get ”, “ fill ”, etc. • Quantifier-related words o “ every ”, “ how many ”, etc. N T U

  28. Conclusion Three main contributions M I U L A B Approach: equation generation with stack • Originality: automatic extraction of operand semantics • Performance: a SOTA end-to-end neural model on Math23k • N T U

  29. M I U L A B Code Available @ https://github.com/MiuLab/E2EMathSolver N T U

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend