weakly supervised semantic parsing with abstract examples
play

Weakly Supervised Semantic Parsing with Abstract Examples Omer - PowerPoint PPT Presentation

Weakly Supervised Semantic Parsing with Abstract Examples Omer Goldman , Veronica Latcinnik, Udi Naveh, Amir Globerson, Jonathan Berant Tel Aviv University ACL, July 2018 Semantic Parsing h h


  1. Weakly Supervised Semantic Parsing with Abstract Examples Omer Goldman , Veronica Latcinnik, Udi Naveh, Amir Globerson, Jonathan Berant Tel Aviv University ACL, July 2018

  2. Semantic Parsing 𝑋 h 𝑏𝑒 𝑗𝑑 𝑒 h 𝑓 π‘‘π‘π‘žπ‘—π‘’π‘π‘š 𝑝𝑔 𝑒 h 𝑓 π‘šπ‘π‘ π‘•π‘“π‘‘π‘’ 𝑉𝑇 𝑑𝑒𝑏𝑒𝑓 ? model CapitalOf.argmax(Type.State ∩ LocatedIn.US,Population) KB: execution Sacramento οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 1

  3. Training with Full Supervision οΏ½ Training examples: E X P E N S I V E x: y: CapitalOf.argmax(Type.State ∩ LocatedIn.US,Population) $ € Β₯ οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 2

  4. Training with Weak Supervision οΏ½ Training examples: x: y: Sacramento οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 3

  5. Problems with Weak Supervision οΏ½ Exponential search space 3+3*15 1 decoding 5+30 2-2 4+60/3 οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 4

  6. Problems with Weak Supervision οΏ½ Spurious programs (Pasupat and Liang, 2016; Guu et al., 2017) 20-16 32/4 decoding 4*2-4 50-1 3+85 Correct program : 2*2 οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 4

  7. CNLVR (Suhr et al., 2017) οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 6

  8. Semantic Parsing π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘π‘šπ‘£π‘“ π‘‘π‘Ÿπ‘£π‘π‘ π‘“ model exist(filter(ALL_ITEMS, Ξ» x.IsBlue(x) ∩ IsSquare(x))) KB: execution Binary! True 50% spurious οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 7

  9. Insight π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 π‘“π‘¦π‘π‘‘π‘’π‘šπ‘§ π‘π‘œπ‘“ π‘π‘šπ‘π‘‘π‘™ π‘‘π‘—π‘ π‘‘π‘šπ‘“ π‘œπ‘π‘’ 𝑒𝑝𝑣𝑑 h π‘—π‘œπ‘• 𝑒 h 𝑓 𝑓𝑒𝑕𝑓 οΏ½ Equal( 1 ,(filter(ALL_ITEMS, Ξ» x.IsBlack(x) ∩ IsCircle(x) ∩ Β¬IsTouchingWall(x))) οΏ½ Equal( 1 ,(filter(ALL_ITEMS, Ξ» x.IsBlack(x) ∩ IsCircle(x) ∩ Β¬IsTouchingWall(x))) οΏ½ GreaterEqual( 3 ,(filter(ALL_ITEMS, Ξ» x.IsBlue(x) ∩ IsTriangle(x) ∩ Β¬IsTouchingWall(x))) οΏ½ GreaterEqual( 1 ,(filter(ALL_ITEMS, Ξ» x.IsBlue(x) ∩ IsTriangle(x) ∩ Β¬IsTouchingWall(x))) οΏ½ LessEqual( 3 ,(filter(ALL_ITEMS, Ξ» x.IsYellow(x) ∩ IsRectangle(x) ∩ Β¬IsTouchingWall(x))) οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 8

  10. Contributions π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘§π‘“π‘šπ‘šπ‘π‘₯ π‘‘π‘—π‘ π‘‘π‘šπ‘“ exist(filter(ALL_ITEMS, Ξ» x.IsYellow(x) β‹€ IsCircle(x))) π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 𝐷 βˆ’ 𝐷𝑃𝑀𝑃𝑆 𝐷 βˆ’ 𝑇𝐼𝐡𝑄𝐹 exist(filter(ALL_ITEMS, Ξ» x.IsC-COLOR(x) β‹€ IsC-SHAPE(x))) Data augmentation Abstract cache helps search tackles spuriousness CNLVR improvement: 67.8 οΏ½ 82.5 οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 9

  11. Semantic Parsing 11

  12. Logical Program x: z: exist(filter(ALL_BOXES, Ξ» x.ge(3,count(filter(x, Ξ» y.IsBlue(y)))))) Variable Variable Function Set(Item) Item Set() οΏ½ Bool Constant Function Set(Set(Item)) Function Set() οΏ½ Int Set() BoolFunc() οΏ½ Set() οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 12

  13. Model Exist(Filter(ALL_ITEMS, Ξ» x.And(IsYellow(x), IsTriangle(x)))) β€œThere is a yellow triangle” Beam Exist(Filter(ALL_ITEMS, Ξ» x.IsYellow(x))) Encoder – search GraeterEqual(1,count(Filter(ALL_ITEMS, Ξ» x.And(IsYellow(x),IsTriangle(x))))) Decoder οΏ½ Training maximizes log-likelihood of correct programs οΏ½ + discriminative re-ranker οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 13

  14. Abstract Examples 14

  15. Abstraction π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘§π‘“π‘šπ‘šπ‘π‘₯ π‘‘π‘—π‘ π‘‘π‘šπ‘“ π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘π‘šπ‘£π‘“ π‘‘π‘Ÿπ‘£π‘π‘ π‘“ exist(filter(ALL_ITEMS, Ξ» x.IsYellow(x) β‹€ IsCircle(x))) exist(filter(ALL_ITEMS, Ξ» x.IsBlue(x) β‹€ IsRectangle(x))) π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 𝐷 βˆ’ 𝐷𝑃𝑀𝑃𝑆 𝐷 βˆ’ 𝑇𝐼𝐡𝑄𝐹 exist(filter(ALL_ITEMS, Ξ» x.IsC-COLOR(x) β‹€ IsC-SHAPE(x))) οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 15

  16. Analysis 3163 CNLVR sentences There is………… β€’ One of the……. β€’ There are…….. β€’ ~1300 abstract sentences Exactly two….. β€’ There is………… β€’ In two of………. β€’ There is…………… β€’ There is……….. β€’ There are………… β€’ There are…….. β€’ C-Num of…….…… β€’ There is……….. β€’ There is........... β€’ abstraction One square….. β€’ One tower……….. β€’ There is……….. β€’ There are…………. β€’ One of the……. β€’ C-Num C-Shape… β€’ There are…….. β€’ There is……………. β€’ There is…….... β€’ C-Num towers….. β€’ Two towers….. β€’ Another last……… β€’ There are…….. β€’ There is……….. β€’ One circle……. β€’ There is……….. β€’ Last one……….. β€’ οΏ½ ~150 abstract sentences cover 50% of CNLVR. οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 16

  17. Abstraction οΏ½ Data augmentation οΏ½ Abstract cache οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 17

  18. Data Augmentation π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘§π‘“π‘šπ‘šπ‘π‘₯ π‘‘π‘—π‘ π‘‘π‘šπ‘“ π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘π‘šπ‘£π‘“ π‘ π‘“π‘‘π‘’π‘π‘œπ‘•π‘šπ‘“ exist(filter(ALL_ITEMS, Ξ» x.IsBlue(x) β‹€ IsSquare(x))) π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘§π‘“π‘šπ‘šπ‘π‘₯ π‘’π‘ π‘—π‘π‘œπ‘•π‘šπ‘“ exist(filter(ALL_ITEMS, Ξ» x.IsYellow(x) β‹€ IsTriangle(x))) π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 π‘π‘šπ‘π‘‘π‘™ π‘‘π‘—π‘ π‘‘π‘šπ‘“ exist(filter(ALL_ITEMS, Ξ» x.IsBlack(x) β‹€ IsCircle(x))) π‘ˆ h 𝑓𝑠𝑓 𝑗𝑑 𝑏 𝐷 βˆ’ 𝐷𝑃𝑀𝑃𝑆 𝐷 βˆ’ 𝑇𝐼𝐡𝑄𝐹 exist(filter(ALL_ITEMS, Ξ» x.IsC-COLOR(x) β‹€ IsC-SHAPE(x))) οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 18

  19. Training Procedure ~100 Abstract examples (abs. sent., abs. prog.) Generation ~6000 Instantiated examples Supervised model Supervised (sentence, program) training initialization 3163 CNLVR training examples Weakly-supervised model Weakly (sentence, answer) supervised training οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 19

  20. Abstract Cache οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 20

  21. Reward Tying 50% spurious οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 21

  22. Reward Tying : False : False 6.25% spurious οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 22

  23. Results 23

  24. Models Baselines (Suhr et al., 2017) οΏ½ Majority label ( True ) οΏ½ Max Entropy classifier on extracted features οΏ½ Supervised trained model (+Re-ranker) οΏ½ Weakly supervised trained model (+Re-ranker) οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 24

  25. Results - Public test set Test-P Accuracy Test-P Consistency 84 81.7 76.6 67.7 66.9 65 60.1 56.2 51.8 38.3 Majority MaxEnt Sup. Sup.+Rerank W.Sup. W.Sup.+Rerank οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 25

  26. Ablations No data ugmentation Abstract weakly pervised parser οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 26

  27. Data augmentation addition Ablations 85.7 77.2 71.4 67.4 58.2 56.1 Dev Accuracy Dev Consistency 41.2 7.1 -Abstraction -Data augment. -Beam cache W.Sup.+Rerank Cache addition οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 27

  28. Conclusions 28

  29. Conclusions Closed domains Better Abstraction training Weak supervision Facilitate information sharing οΏ½ Similar ideas in: Dong and Lapata (2018) and Zhang et al. (2017) οΏ½ Automation would be useful οΏ½ Introduction οΏ½ Semantic parser οΏ½ Abstract examples οΏ½ Results οΏ½ Conclusions 29

  30. Thank you https://github.com/udiNaveh/nlvr_tau_nlp_final_proj

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