neural crf parsing
play

Neural CRF Parsing Greg Durre2 and Dan Klein UC Berkeley - PowerPoint PPT Presentation

Neural CRF Parsing Greg Durre2 and Dan Klein UC Berkeley Parsing with CKY Parsing with CKY He gave a long speech on foreign


  1. Basic ¡CRF ¡Model NP NP w > f = Y P ( T | x ) ∝ exp (score( r )) score NP PP NP PP 2 5 8 2 5 8 r ∈ T NP FirstWord ¡= ¡a ∧ NP PP NP NP PP He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9 [Hall, ¡Durre5, ¡Klein ¡(2014)]

  2. Basic ¡CRF ¡Model NP NP w > f = Y P ( T | x ) ∝ exp (score( r )) score NP PP NP PP 2 5 8 2 5 8 r ∈ T NP FirstWord ¡= ¡a ∧ NP PP NP NP PP He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9 [Hall, ¡Durre5, ¡Klein ¡(2014)]

  3. Basic ¡CRF ¡Model NP NP w > f = Y P ( T | x ) ∝ exp (score( r )) score NP PP NP PP 2 5 8 2 5 8 r ∈ T NP FirstWord ¡= ¡a ∧ NP PP NP NP PrevWord ¡= ¡gave ∧ NP PP NP PP He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9 [Hall, ¡Durre5, ¡Klein ¡(2014)]

  4. Basic ¡CRF ¡Model NP NP w > f = Y P ( T | x ) ∝ exp (score( r )) score NP PP NP PP 2 5 8 2 5 8 r ∈ T NP FirstWord ¡= ¡a ∧ NP PP NP NP PrevWord ¡= ¡gave ∧ NP PP NP PP He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9 [Hall, ¡Durre5, ¡Klein ¡(2014)]

  5. Basic ¡CRF ¡Model NP NP = w > f score NP PP NP PP 2 5 8 2 5 8 NP ∧ FirstWord ¡= ¡a NP PP NP ∧ PrevWord ¡= ¡gave NP PP

  6. Basic ¡CRF ¡Model NP NP = w > f score NP PP NP PP 2 5 8 2 5 8 Surface ¡feature NP ∧ FirstWord ¡= ¡a NP PP NP ∧ PrevWord ¡= ¡gave NP PP

  7. Basic ¡CRF ¡Model NP NP = w > f score NP PP NP PP 2 5 8 2 5 8 Surface ¡feature Label ¡feature NP ∧ FirstWord ¡= ¡a NP PP NP ∧ PrevWord ¡= ¡gave NP PP

  8. Basic ¡CRF ¡Model NP NP = w > f score NP PP NP PP 2 5 8 2 5 8 Surface ¡feature Label ¡feature NP ∧ FirstWord ¡= ¡a NP PP NP ∧ PrevWord ¡= ¡gave NP PP s First ¡= ¡a, Prev ¡= ¡gave,…

  9. Basic ¡CRF ¡Model NP NP = w > f score NP PP NP PP 2 5 8 2 5 8 ` NP Surface ¡feature Label ¡feature NP PP NP ∧ FirstWord ¡= ¡a NP PP NP … NP ∧ PrevWord ¡= ¡gave NP PP s First ¡= ¡a, Prev ¡= ¡gave, …

  10. Basic ¡CRF ¡Model NP NP = w > f score NP PP NP PP 2 5 8 2 5 8 ` NP Surface ¡feature Label ¡feature NP PP F i,j = s i ` j NP ∧ FirstWord ¡= ¡a NP PP NP … NP ∧ PrevWord ¡= ¡gave NP PP s First ¡= ¡a, Prev ¡= ¡gave, …

  11. Basic ¡CRF ¡Model NP NP = w > f = W � score NP PP NP PP 2 5 8 2 5 8 ` NP Surface ¡feature Label ¡feature NP PP F i,j = s i ` j NP ∧ FirstWord ¡= ¡a NP PP NP … NP ∧ PrevWord ¡= ¡gave NP PP s First ¡= ¡a, Prev ¡= ¡gave, …

  12. Basic ¡CRF ¡Model NP NP X = w > f = W � score NP PP s NP PP X X 2 5 8 2 5 8 2 5 8 ` NP Surface ¡feature Label ¡feature NP PP F i,j = s i ` j NP ∧ FirstWord ¡= ¡a NP PP NP … NP ∧ PrevWord ¡= ¡gave NP PP s First ¡= ¡a, Prev ¡= ¡gave, …

  13. Basic ¡CRF ¡Model NP NP X NP = w > f = W � ` > score NP PP s NP PP X X NP PP 2 5 8 2 5 8 2 5 8 ` NP Surface ¡feature Label ¡feature NP PP F i,j = s i ` j NP ∧ FirstWord ¡= ¡a NP PP NP … NP ∧ PrevWord ¡= ¡gave NP PP s First ¡= ¡a, Prev ¡= ¡gave, …

  14. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8

  15. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8

  16. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  17. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  18. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 s v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  19. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 s one-­‑layer ¡NN v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  20. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 s one-­‑layer ¡NN 100-­‑dim ¡vectors ¡ v (Bansal ¡et ¡al., ¡2014) He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  21. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 200-­‑dim ¡vector s one-­‑layer ¡NN 100-­‑dim ¡vectors ¡ v (Bansal ¡et ¡al., ¡2014) He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  22. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 s one-­‑layer ¡NN v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  23. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 s one-­‑layer ¡NN v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  24. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 s one-­‑layer ¡NN v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  25. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 Neural s one-­‑layer ¡NN v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  26. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 Neural Sparse s s one-­‑layer ¡NN v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  27. Neural ¡CRF ¡Model NP X NP = W � s ` > score NP PP X X NP PP 2 5 8 2 5 8 Neural+Sparse Neural Sparse s s s one-­‑layer ¡NN v He ¡ ¡gave ¡ ¡a ¡ ¡long ¡ ¡speech ¡ ¡on ¡ ¡foreign ¡ ¡policy ¡ ¡. 0 1 2 3 4 5 6 7 8 9

  28. Inference

  29. Inference Just ¡CKY!

  30. Inference Just ¡CKY! … ¡with ¡coarse ¡pruning ¡and ¡caching ¡of ¡neural ¡net ¡opera^ons (Goodman, ¡1997) (Chen ¡and ¡Manning, ¡2014)

  31. Inference Just ¡CKY! … ¡with ¡coarse ¡pruning ¡and ¡caching ¡of ¡neural ¡net ¡opera^ons (Goodman, ¡1997) (Chen ¡and ¡Manning, ¡2014) Roughly ¡2x ¡slower ¡than ¡with ¡sparse ¡features ¡alone

  32. Learning

  33. Learning Just ¡Maximum ¡Likelihood!

  34. Learning Just ¡Maximum ¡Likelihood! … ¡with ¡backpropaga^on ¡through ¡each ¡local ¡neural ¡network

  35. Learning Just ¡Maximum ¡Likelihood! … ¡with ¡backpropaga^on ¡through ¡each ¡local ¡neural ¡network Op^miza^on: ¡Adadelta ¡(Zeiler, ¡2012) ¡worked ¡slightly ¡be5er ¡than ¡ Adagrad ¡(Duchi ¡et ¡al., ¡2011)

  36. Results

  37. Results: ¡English ¡Treebank ¡(Dev) 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90 90.1 89 Sparse 88 87

  38. Results: ¡English ¡Treebank ¡(Dev) 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 90.1 89 Neural Sparse 88 87

  39. Results: ¡English ¡Treebank ¡(Dev) 92 Dev ¡set ¡F 1 ¡all ¡lengths 91.3 91 90.4 90 90.1 Sparse+ ¡ 89 Neural Neural Sparse 88 87

  40. Results: ¡English ¡Treebank ¡(Dev) 92 Dev ¡set ¡F 1 ¡all ¡lengths 91.3 91 90.4 90 90.2 90.1 Sparse+ ¡ 89 Neural Sparse+ ¡ Neural Sparse Brown 88 87

  41. Results: ¡English ¡Treebank ¡(Dev) 92 Dev ¡set ¡F 1 ¡all ¡lengths 91.3 91 90.4 90 90.2 90.1 Sparse+ ¡ 89 Neural Sparse+ ¡ Neural Sparse Brown 88 87

  42. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 89 Bansal ¡et ¡al. 88 87

  43. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 89 Bansal ¡et ¡al. 88 87

  44. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 89.6 89 Bansal ¡et ¡al. Collobert ¡and ¡ Weston 88 87

  45. Word ¡Vectors 92 Dependency ¡ context Dev ¡set ¡F 1 ¡all ¡lengths 91 11-­‑word ¡ surface ¡context 90.4 90 89.6 89 Bansal ¡et ¡al. Collobert ¡and ¡ Weston 88 87

  46. Word ¡Vectors 92 Dependency ¡ context Dev ¡set ¡F 1 ¡all ¡lengths 91 11-­‑word ¡ surface ¡context 90.4 90 89.6 89 Bansal ¡et ¡al. Collobert ¡and ¡ Weston 88 87 ‣ Syntac^c ¡vectors ¡are ¡best ¡for ¡parsing ¡(Bansal ¡et ¡al., ¡2014; ¡Levy ¡and ¡Goldberg, ¡2014)

  47. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 89.6 89 Bansal ¡et ¡al. Collobert ¡and ¡ Weston 88 87 ‣ Syntac^c ¡vectors ¡are ¡best ¡for ¡parsing ¡(Bansal ¡et ¡al., ¡2014; ¡Levy ¡and ¡Goldberg, ¡2014)

  48. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 89.6 89 89.0 Bansal ¡et ¡al. Collobert ¡and ¡ word2vec ¡ Weston 88 on ¡PTB 87 ‣ Syntac^c ¡vectors ¡are ¡best ¡for ¡parsing ¡(Bansal ¡et ¡al., ¡2014; ¡Levy ¡and ¡Goldberg, ¡2014)

  49. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 89.6 89 89.0 Bansal ¡et ¡al. Collobert ¡and ¡ word2vec ¡ Weston 88 on ¡PTB 87 ‣ Syntac^c ¡vectors ¡are ¡best ¡for ¡parsing ¡(Bansal ¡et ¡al., ¡2014; ¡Levy ¡and ¡Goldberg, ¡2014)

  50. Word ¡Vectors 92 30M ¡tokens Dev ¡set ¡F 1 ¡all ¡lengths 91 90.4 90 1M ¡tokens 89.6 89 89.0 Bansal ¡et ¡al. Collobert ¡and ¡ word2vec ¡ Weston 88 on ¡PTB 87 ‣ Syntac^c ¡vectors ¡are ¡best ¡for ¡parsing ¡(Bansal ¡et ¡al., ¡2014; ¡Levy ¡and ¡Goldberg, ¡2014)

  51. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91.3 91 90.9 90.4 90 89.6 Sparse+ 89 89.0 Bansal ¡et ¡al. Sparse+ Collobert ¡and ¡ word2vec ¡ Weston 88 on ¡PTB 87 ‣ Syntac^c ¡vectors ¡are ¡best ¡for ¡parsing ¡(Bansal ¡et ¡al., ¡2014; ¡Levy ¡and ¡Goldberg, ¡2014)

  52. Word ¡Vectors 92 Dev ¡set ¡F 1 ¡all ¡lengths 91.3 91 90.9 90.4 90 89.6 Sparse+ 89 89.0 Bansal ¡et ¡al. Sparse+ Collobert ¡and ¡ word2vec ¡ Weston 88 on ¡PTB 87 ‣ Syntac^c ¡vectors ¡are ¡best ¡for ¡parsing ¡(Bansal ¡et ¡al., ¡2014; ¡Levy ¡and ¡Goldberg, ¡2014) ‣ Don’t ¡need ¡huge ¡unlabeled ¡corpora ¡for ¡these ¡methods ¡to ¡be ¡effec^ve

  53. Results: ¡English ¡Treebank ¡(Test) 92 Test ¡set ¡F 1 ¡all ¡lengths 91 91.1 90 Neural+ ¡ Sparse 89 88 87

  54. Results: ¡English ¡Treebank ¡(Test) 92 Test ¡set ¡F 1 ¡all ¡lengths 91 91.1 90 Neural+ ¡ Sparse 89.2 89 Sparse 88 87

  55. Results: ¡English ¡Treebank ¡(Test) 92 Test ¡set ¡F 1 ¡all ¡lengths 91 91.1 90 90.1 Neural+ ¡ Sparse 89.2 89 Berkeley Sparse Petrov+ ¡06 88 87

  56. Results: ¡English ¡Treebank ¡(Test) 92 Test ¡set ¡F 1 ¡all ¡lengths 91 91.1 91.1 90 90.1 Neural+ ¡ CCK Sparse 89.2 89 Carreras+ ¡08 Berkeley Sparse Petrov+ ¡06 88 87

  57. Results: ¡English ¡Treebank ¡(Test) 92 Test ¡set ¡F 1 ¡all ¡lengths 91.3 91 91.1 91.1 90 90.1 Neural+ ¡ CCK ZPar Sparse 89.2 89 Carreras+ ¡08 Zhu+ ¡13 Berkeley Sparse Petrov+ ¡06 88 87

  58. Results: ¡English ¡Treebank ¡(Test) 92 Test ¡set ¡F 1 ¡all ¡lengths 91.3 91 91.1 91.1 90 90.1 Neural+ ¡ CCK ZPar Sparse 89.2 89 Carreras+ ¡08 Zhu+ ¡13 Berkeley Sparse Petrov+ ¡06 88 87

  59. Results: ¡English ¡Treebank ¡(Test) 92 (reranking ¡ Test ¡set ¡F 1 ¡all ¡lengths ensemble) 91.3 91 91.1 91.1 90.4 90 90.1 Neural+ ¡ CCK ZPar Sparse 89.2 89 CVG Carreras+ ¡08 Zhu+ ¡13 Berkeley Socher+ ¡13 Sparse Petrov+ ¡06 88 87

  60. Related ¡Work

  61. Related ¡Work ‣ Transi^on-­‑based ¡neural ¡parsers: ¡Henderson ¡(2003), ¡Chen ¡and ¡ Manning ¡(2014)

  62. Related ¡Work ‣ Transi^on-­‑based ¡neural ¡parsers: ¡Henderson ¡(2003), ¡Chen ¡and ¡ Manning ¡(2014) ‣ Local ¡decisions ¡only: ¡Belinkov ¡et ¡al. ¡(2014)

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