incrementality in compositional distributional semantics
play

Incrementality in Compositional Distributional Semantics M. - PowerPoint PPT Presentation

Incrementality in Compositional Distributional Semantics M. Sadrzadeh, EECS, QMUL SemDial 2018 joint work with M. Purver, J. Hough, R. Kempson SYCO2, Glasgow December 2018 NLP in one slide structure preserving map Semantic Formal


  1. Incrementality in Compositional Distributional Semantics M. Sadrzadeh, EECS, QMUL SemDial 2018 joint work with M. Purver, J. Hough, R. Kempson SYCO2, Glasgow December 2018

  2. NLP in one slide structure preserving map Semantic Formal Calculus Grammar

  3. NLP in one slide structure preserving map Models of Formal First Order Grammar Logic

  4. NLP in one slide structure preserving map Distributions Formal of Linguistic Grammar Data

  5. Distributional Semantics • sugar, a sliced lemon, a tablespoonful of apricot preserve or jam, a pinch each of, their enjoyment. Cautiously she sampled her first pineapple and another fruit whose taste she likened well suited to programming on the digital computer . In finding the optimal R-stage policy from for the purpose of gathering data and information necessary for the study authorized in the computer data pinch result sugar apricot 0 0 2.25 0 2.25 pineapple 0 0 2.25 0 2.25 digital 1.66 0 0 0 0 information 0 0.57 0 0.47 0 Figure 15.7 The PPMI matrix showing the association between words and context words, P ( w , c ) PPMI ( w , c ) = max ( log 2 P ( w ) P ( c ) , 0 ) Speech and Language Processing, Jurafsky and Martin

  6. State of the art NLP packages import spacy nlp = spacy.load('en_core_web_md') tokens = nlp(u'dog cat car') for token1 in tokens: for token2 in tokens: print(token1.text, token2.text, token1.similarity(token2)) dog dog 1.0 dog cat 0.80168545 dog car 0.35629162 cat dog 0.80168545 cat cat 1.0 cat car 0.31907532 car dog 0.35629162 car cat 0.31907532 car car 1.0

  7. Distributional Semantics dog cat car dog 1 0.80 0.35 cat 1 0.31 car 1

  8. Distributional Semantics grave zombie vampire ↵ � ↵ � blood butterfly dead

  9. NLP in one slide structure preserving map Distributions Formal of Linguistic Grammar Data structure preserving map ??? ???

  10. NLP in one slide structure preserving map Distributions Formal of Linguistic Grammar Data structure preserving map Multilinear Type Algebra Grammars

  11. CCG T ypes NP, S A noun phrase NP/NP, S\NP adj, iTv X / Y Tv (S\NP)/NP X \ Y Rules X / Y Y = ) X NP/NP NP => NP NP S\NP => S X \ Y = ) X Y

  12. Multilinear Algebraic Semantics 7! A A { } Vectors 7! C ⌦ B X A = { e i } i A 7! A 3 T i = C i e i i X X

  13. Multilinear Algebraic Semantics Matrices A 7! A A / B 7! A ⌦ B A = { e i } i B = { e j } j X X X 3 T ij = C ij e i ⌦ e j 7! A ⌦ B ij

  14. Multilinear Algebraic Semantics Cubes 7! A X A = { e i } i B = { e j } j C = { e k } k A / ( B / C ) 7! A ⌦ ( B ⌦ C ) X X A ⌦ B ⌦ C 3 T ijk = C ijk e i ⌦ e j ⌦ e k ijk

  15. Multilinear Algebraic Semantics Higher order tensors X A ⌦ B ⌦ · · · ⌦ Z 3 T i j ··· w = C i j ··· w e i ⌦ e j ⌦ · · · ⌦ e w i j ··· w

  16. Multilinear Algebraic Semantics Matrix Multiplication X ( A ⌦ B ) B = ) A A / B B = ) A 7! ··· tensor contract T ij T j T i = ) X X X C i j C j e i h e j | e j i ( C i j e i ⌦ e j )( C j e j ) = i j i i

  17. Multilinear Algebraic Semantics Higher order tensor contraction · · · 7! A ⌦ B ⌦ · · · ⌦ M M ⌦ N ⌦ P ⌦ · · · ⌦ W · · · 7! A ⌦ B ⌦ · · · ⌦ M M ⌦ N ⌦ P ⌦ · · · ⌦ W tensor contract tensor contract T ij ··· m T mnp ··· w T ij ··· np ··· w = ) X X X X X X X C ij ··· m e i ⌦ e j ⌦ · · · ⌦ e m )( C mn ··· w e m ⌦ e n ⌦ · · · ⌦ e w ) ( ··· ··· mn ··· w ij ··· m X X C ij ··· m C mn ··· w e i ⌦ e j ⌦ · · · ⌦ e n ⌦ · · · ⌦ e w h e m | e m i = ij ··· n ··· w

  18. Dogs Chase White Cats NP ( S \ NP ) / NP NP / NP NP N N NP S \ NP S

  19. Dogs Chase White Cats 2 N 2 N 2 N ( S ⌦ N ) ⌦ N N ⌦ N N 2 N ⌦ N N S ⌦ N N S

  20. Dogs Chase White Cats T i T ijk T kl T l T k T i j T j

  21. Pregroup Grammars T ypes … NPNP l NP r S N XY l NP r S NP l S Y r X Rules NPNP l NP  NP XY l Y  X Y NPNP r S  S N YY r X  X X

  22. Catgorical Semantics structure preserving map Distributions Formal of Linguistic Grammar Data monoidal functor Pregroup FVect Grammars

  23. Categorial Grammars + Distributional Semantics Coecke, Sadrzadeh, Clark, 2010 Grefenstette and Sadrzadeh 2011, 2015 Maillard, Clark, Grefenstette, 2014 Krishnamurti and Mitchell, 2014 Baroni and Zamparelli 2010 Wijnholds (and Moortgat) 2015-16

  24. Language Processing Complete Sentences

  25. � �� ���� � � ���� � � �� � � � �� �� � � � �� �� � �� ���� ����������� ������� �� � ��������� ����������� �������������� ��� �������������� ������� ����� ������ �� ���� ����� ������������ ��� ��������������� ���������������� �� ���� ������ ��� � ��� ������ �� ���� ����� ������ ��� ������� ����� � ��� ���� ����� �� ��� ������ ������� � ��� ���� ����� �� ��� ����� � ��� ���� ����� �� ��� ������ � ����������� ������ ���� ����� ����������� Naturally Occurring Dialogue

  26. Naturally Occurring Dialogue 1) A: Ray destroyed . . . B: . . . the fuchsia. He never liked it. The roses he spared . . . A: . . . this time.

  27. Naturally Occurring Dialogue A: You are going to write the letter? B: Only if you post it! Howes et al, 2011, Poesio and Reiser 2010

  28. Computational Dialogue Systems A: I want to book a ticket … B: … from where? A: London B: … to where? A: to Paris. Purver and Kempson 2011 Purver, Eshghi, Hough 2017

  29. Psycholinguistic Analysis A: The footballer dribbled … B (thinking) it means controlling the ball A: … the ball across the pitch A: The baby dribbled … the milk all over the floor. Pickering and Frisson 2001

  30. Cognitive Neuroscience Predictive Processing: agents incrementally generate expectations and judge the degree to which they are met. Frisson and Frith 2001 Clarke 2015

  31. • Incremental Language Processing Dynamic Syntax + Type Theoretic Semantics Ruth Kempson, Wilfried Meyer-Viol, and Dov Gabbay. 2001. Hough 2015, Purver et al 2014.

  32. Recent Contribution Dynamic Syntax + Distributional Semantics Sadrzadeh, Purver, Hough, Kempson SemDial 2018

  33. Outline • Dynamic Syntax: DS • CDS for DS • Some Examples • Some Experimental Results

  34. Dynamic Syntax Trees decorated with semantic formulae and applications O ( X 3 , O ( X 1 , X 2 )) O ( X 1 , X 2 ) X 3 X 1 X 2

  35. Dynamic Syntax and with … - Ty: types of formulae - ?: requirements for further development - <>: node currently under development - links: connect trees of arguments of conjunctives etc

  36. ����� ��������� �������������� ����� �� � Dynamic Syntax ? �� ( � ) �� ( � ) , �� ( ���� ) ? �� ( ⟨ � , � ⟩ ) , ♦

  37. ����� ��������� �������������� ����� ����� �� � Dynamic Syntax ? �� ( � ) �� ( � ) , �� ( ���� ) ? �� ( ⟨ � , � ⟩ ) ? �� ( � ) , ♦ �� ( ⟨ � , ⟨ � , � ⟩⟩ ) , �� ( λ � λ � . ���� ( � , � ))

  38. ����� ��������� �������������� ����� ����� ����� � Dynamic Syntax ? �� ( � ) �� ( � ) , �� ( ���� ) ? �� ( ⟨ � , � ⟩ ) , ♦ �� ( � ) , �� ( ���� ) �� ( ⟨ � , ⟨ � , � ⟩⟩ ) , �� ( λ � λ � . ���� ( � , � ))

  39. ����� ��������� �������������� ����� ����� ����� � Dynamic Syntax �� ( � ) , �� ( ���� ( ���� , ���� )) , ♦ �� ( � ) , �� ( ���� ) �� ( ⟨ � , � ⟩ ) , �� ( λ � . ���� ( � , ���� )) �� ( � ) , �� ( ���� ) �� ( ⟨ � , ⟨ � , � ⟩⟩ ) , �� ( λ � λ � . ���� ( � , � ))

  40. Mary who sleeps snores. “mary, . . . ” “. . . who . . . ” ? S ? S W, T mary ? W ⊗ S i W, T mary ? S , ♦ ? W ⊗ S i W, T mary , ♦ i “. . . sleeps, . . . ” ? S W, T mary ? W ⊗ S, ♦ i S, T mary T sleep i ij W, T mary W ⊗ S, T sleep i ij “. . . snores . . . ” S, µ ( T mary T sleep , T mary T snore ) , ♦ ij i ij i W, T mary W ⊗ S, T snore ij i W, T mary T sleep i ij W, T mary W ⊗ S, T sleep i ij

Recommend


More recommend