dynamic programming for linear time incremental parsing
play

Dynamic Programming for Linear-Time Incremental Parsing Liang Huang - PowerPoint PPT Presentation

Dynamic Programming for Linear-Time Incremental Parsing Liang Huang Information Sciences Institute University of Southern California (Joint work with Kenji Sagae, USC/ICT) JHU CLSP Seminar September 14, 2010 Remembering Fred Jelinek


  1. Dynamic Programming for Linear-Time Incremental Parsing Liang Huang Information Sciences Institute University of Southern California (Joint work with Kenji Sagae, USC/ICT) JHU CLSP Seminar September 14, 2010

  2. Remembering Fred Jelinek (1932-2010) Prof. Jelinek hosted my visit and this talk on his last day. He was very supportive of this work, which is related to his work on structured language models, and I dedicate my work to his memory.

  3. Ambiguity and Incrementality • NLP is (almost) all about ambiguity resolution • human-beings resolve ambiguity incrementally DP for Incremental Parsing 3

  4. Ambiguity and Incrementality • NLP is (almost) all about ambiguity resolution • human-beings resolve ambiguity incrementally One morning in Africa, I shot an elephant in my pajamas; DP for Incremental Parsing 3

  5. Ambiguity and Incrementality • NLP is (almost) all about ambiguity resolution • human-beings resolve ambiguity incrementally One morning in Africa, I shot an elephant in my pajamas; how he got into my pajamas I’ll never know. DP for Incremental Parsing 3

  6. Ambiguity and Incrementality • NLP is (almost) all about ambiguity resolution • human-beings resolve ambiguity incrementally One morning in Africa, I shot an elephant in my pajamas; how he got into my pajamas I’ll never know. DP for Incremental Parsing 3

  7. Ambiguity and Incrementality • NLP is (almost) all about ambiguity resolution • human-beings resolve ambiguity incrementally One morning in Africa, I shot an elephant in my pajamas; how he got into my pajamas I’ll never know. DP for Incremental Parsing 3

  8. Ambiguities in Translation CS 562 - Intro 4

  9. Ambiguities in Translation CS 562 - Intro 4

  10. Ambiguities in Translation Google translate: carefully slide CS 562 - Intro 4

  11. Ambiguities in Translation Google translate: carefully slide CS 562 - Intro 4

  12. Ambiguities in Translation Google translate: carefully slide CS 562 - Intro 4

  13. If you are stolen... CS 562 - Intro 5

  14. If you are stolen... Google translate: Once the theft to the police CS 562 - Intro 5

  15. or even... CS 562 - Intro 6

  16. or even... clear evidence that NLP is used in real life! CS 562 - Intro 6

  17. Ambiguities in Parsing I feed cats nearby in the garden ... • let’s focus on dependency structures for simplicity • ambiguous attachments of nearby and in • ambiguity explodes exponentially with sentence length • must design efficient (polynomial) search algorithm • typically using dynamic programming (DP); e.g. CKY DP for Incremental Parsing 7

  18. Ambiguities in Parsing I feed cats nearby in the garden ... • let’s focus on dependency structures for simplicity • ambiguous attachments of nearby and in • ambiguity explodes exponentially with sentence length • must design efficient (polynomial) search algorithm • typically using dynamic programming (DP); e.g. CKY DP for Incremental Parsing 7

  19. Ambiguities in Parsing I feed cats nearby in the garden ... • let’s focus on dependency structures for simplicity • ambiguous attachments of nearby and in • ambiguity explodes exponentially with sentence length • must design efficient (polynomial) search algorithm • typically using dynamic programming (DP); e.g. CKY DP for Incremental Parsing 7

  20. Ambiguities in Parsing I feed cats nearby in the garden ... • let’s focus on dependency structures for simplicity • ambiguous attachments of nearby and in • ambiguity explodes exponentially with sentence length • must design efficient (polynomial) search algorithm • typically using dynamic programming (DP); e.g. CKY DP for Incremental Parsing 7

  21. But full DP is too slow... I feed cats nearby in the garden ... • full DP (like CKY) is too slow (cubic-time) • while human parsing is fast & incremental (linear-time) DP for Incremental Parsing 8

  22. But full DP is too slow... I feed cats nearby in the garden ... • full DP (like CKY) is too slow (cubic-time) • while human parsing is fast & incremental (linear-time) • how about incremental parsing then? • yes, but only with greedy search (accuracy suffers) • explores tiny fraction of trees (even w/ beam search) DP for Incremental Parsing 8

  23. But full DP is too slow... I feed cats nearby in the garden ... • full DP (like CKY) is too slow (cubic-time) • while human parsing is fast & incremental (linear-time) • how about incremental parsing then? • yes, but only with greedy search (accuracy suffers) • explores tiny fraction of trees (even w/ beam search) • can we combine the merits of both approaches? • a fast, incremental parser with dynamic programming? • explores exponentially many trees in linear-time? DP for Incremental Parsing 8

  24. Linear-Time Incremental DP incremental parsing greedy (e.g. shift-reduce) search ☹ (Nivre 04; Collins/Roark 04; ...) this work: full DP principled fast shift-reduce parsing (e.g. CKY) search with dynamic programming ☺ (Eisner 96; Collins 99; ...) ☹ ☺ fast slow (linear-time) (cubic-time) DP for Incremental Parsing 9

  25. Big Picture natural programming languages languages ☺ ☹ human psycholinguistics ☹ NLP ☺ computer compiler theory (LR, LALR, ...) DP for Incremental Parsing 10

  26. Big Picture natural programming languages languages ☺ ☹ human psycholinguistics ☹ NLP ☺ computer compiler theory (LR, LALR, ...) DP for Incremental Parsing 10

  27. Preview of the Results • very fast linear-time dynamic programming parser • best reported dependency accuracy on PTB/CTB • explores exponentially many trees (and outputs forest) 1.4 parsing time (secs) 1.2 1 0.8 0.6 0.4 0.2 0 0 10 20 30 40 50 60 70 sentence length DP for Incremental Parsing 11

  28. Preview of the Results • very fast linear-time dynamic programming parser • best reported dependency accuracy on PTB/CTB • explores exponentially many trees (and outputs forest) 1.4 y k e parsing time (secs) a l i e 1.2 n k r r a 1 e h B C MST 0.8 0.6 0.4 this work 0.2 0 0 10 20 30 40 50 60 70 sentence length DP for Incremental Parsing 11

  29. Preview of the Results • very fast linear-time dynamic programming parser • best reported dependency accuracy on PTB/CTB • explores exponentially many trees (and outputs forest) 1.4 y 10 10 DP: exponential k e parsing time (secs) a l i e 1.2 n k 10 8 r r a 1 e h B 10 6 C MST 0.8 0.6 10 4 0.4 10 2 this work 0.2 non-DP beam search 10 0 0 0 10 20 30 40 50 60 70 0 10 20 30 40 50 60 70 sentence length sentence length DP for Incremental Parsing 11

  30. Outline • Motivation • Incremental (Shift-Reduce) Parsing • Dynamic Programming for Incremental Parsing • Experiments DP for Incremental Parsing 12

  31. Shift-Reduce Parsing I feed cats nearby in the garden. action stack queue I feed cats ... 0 - feed cats nearby ... cats nearby in ... cats nearby in ... nearby in the ... nearby in the ... in the garden ... DP for Incremental Parsing 13

  32. Shift-Reduce Parsing I feed cats nearby in the garden. action stack queue I feed cats ... 0 - I feed cats nearby ... 1 shift cats nearby in ... cats nearby in ... nearby in the ... nearby in the ... in the garden ... DP for Incremental Parsing 14

  33. Shift-Reduce Parsing I feed cats nearby in the garden. action stack queue I feed cats ... 0 - I feed cats nearby ... 1 shift I feed 2 shift cats nearby in ... cats nearby in ... nearby in the ... nearby in the ... in the garden ... DP for Incremental Parsing 15

  34. Shift-Reduce Parsing I feed cats nearby in the garden. action stack queue I feed cats ... 0 - I feed cats nearby ... 1 shift I feed 2 shift cats nearby in ... feed 3 l-reduce cats nearby in ... I nearby in the ... nearby in the ... in the garden ... DP for Incremental Parsing 16

  35. Shift-Reduce Parsing I feed cats nearby in the garden. action stack queue I feed cats ... 0 - I feed cats nearby ... 1 shift I feed 2 shift cats nearby in ... feed 3 l-reduce cats nearby in ... I 4 shift feed cats nearby in the ... I nearby in the ... in the garden ... DP for Incremental Parsing 17

  36. Shift-Reduce Parsing I feed cats nearby in the garden. action stack queue I feed cats ... 0 - I feed cats nearby ... 1 shift I feed 2 shift cats nearby in ... feed 3 l-reduce cats nearby in ... I 4 shift feed cats nearby in the ... I 5a r-reduce feed nearby in the ... cats I in the garden ... DP for Incremental Parsing 18

  37. Shift-Reduce Parsing I feed cats nearby in the garden. action stack queue I feed cats ... 0 - I feed cats nearby ... 1 shift I feed 2 shift cats nearby in ... feed 3 l-reduce cats nearby in ... I 4 shift feed cats nearby in the ... I 5a r-reduce feed nearby in the ... cats I 5b shift in the garden ... feed cats nearby I DP for Incremental Parsing 19

Recommend


More recommend