learning dependency based compositional semantics
play

Learning Dependency-Based Compositional Semantics Semantic - PowerPoint PPT Presentation

Learning Dependency-Based Compositional Semantics Semantic Representations for Textual Inference Workshop Mar. 10, 2012 Percy Liang Google/Stanford joint work with Michael Jordan and Dan Klein Motivating Problem: Question Answering 2


  1. Basic DCS Trees DCS tree Constraints Database city city c ∈ city San Francisco 1 Chicago c 1 = ` 1 Boston 1 · · · ` ∈ loc loc 2 loc ` 2 = s 1 Mount Shasta California 1 San Francisco California CA s ∈ CA Boston Massachusetts · · · · · · CA California A DCS tree encodes a constraint satisfaction problem (CSP) 14

  2. Basic DCS Trees DCS tree Constraints Database city city c ∈ city San Francisco 1 Chicago c 1 = ` 1 Boston 1 · · · ` ∈ loc loc 2 loc ` 2 = s 1 Mount Shasta California 1 San Francisco California CA s ∈ CA Boston Massachusetts · · · · · · CA California A DCS tree encodes a constraint satisfaction problem (CSP) 14

  3. Basic DCS Trees DCS tree Constraints Database city c ∈ city city San Francisco 1 Chicago c 1 = ` 1 Boston 1 · · · ` ∈ loc loc 2 loc ` 2 = s 1 Mount Shasta California 1 San Francisco California s ∈ CA CA Boston Massachusetts · · · · · · CA California A DCS tree encodes a constraint satisfaction problem (CSP) Computation : dynamic programming ⇒ time = O ( # nodes ) 14

  4. Properties of DCS Trees city 1 1 1 2 loc traverse 2 1 1 1 state river 1 1 1 1 1 1 border major traverse 2 2 1 1 CA AZ 15

  5. Properties of DCS Trees city 1 1 1 2 loc traverse 2 1 1 1 state river 1 1 1 1 1 1 border major traverse 2 2 1 1 CA AZ Trees 15

  6. Properties of DCS Trees city 1 1 1 2 loc traverse 2 1 1 1 state river 1 1 1 1 1 1 border major traverse 2 2 1 1 CA AZ Linguistics Trees syntactic locality 15

  7. Properties of DCS Trees city 1 1 1 2 loc traverse 2 1 1 1 state river 1 1 1 1 1 1 border major traverse 2 2 1 1 CA AZ Linguistics Trees Computation syntactic locality e ffi cient interpretation 15

  8. Divergence between Syntactic and Semantic Scope most populous city in California 16

  9. Divergence between Syntactic and Semantic Scope most populous city in California Syntax city populous in most California 16

  10. Divergence between Syntactic and Semantic Scope most populous city in California Syntax Semantics city argmax ( λ x. city ( x ) ∧ loc ( x, CA ) , λ x. population ( x )) populous in most California 16

  11. Divergence between Syntactic and Semantic Scope most populous city in California Syntax Semantics city argmax ( λ x. city ( x ) ∧ loc ( x, CA ) , λ x. population ( x )) populous in most California 16

  12. Divergence between Syntactic and Semantic Scope most populous city in California Syntax Semantics city argmax ( λ x. city ( x ) ∧ loc ( x, CA ) , λ x. population ( x )) populous in most California Problem: syntactic scope is lower than semantic scope 16

  13. Divergence between Syntactic and Semantic Scope most populous city in California Syntax Semantics city argmax ( λ x. city ( x ) ∧ loc ( x, CA ) , λ x. population ( x )) populous in most California Problem: syntactic scope is lower than semantic scope If DCS trees look like syntax, how do we get correct semantics? 16

  14. Solution: Mark-Execute most populous city in California Superlatives ∗∗ x 1 x 1 city 1 1 1 1 population loc 2 c 1 argmax CA 17

  15. Solution: Mark-Execute most populous city in California Superlatives ∗∗ x 1 x 1 city 1 1 1 1 population loc Mark at syntactic scope 2 c 1 argmax CA 17

  16. Solution: Mark-Execute most populous city in California Superlatives ∗∗ Execute at semantic scope x 1 x 1 city 1 1 1 1 population loc Mark at syntactic scope 2 c 1 argmax CA 17

  17. Solution: Mark-Execute Alaska borders no states. Negation ∗∗ Execute at semantic scope x 1 x 1 border 1 2 1 1 AK state Mark at syntactic scope q no 17

  18. Solution: Mark-Execute Some river traverses every city. Quantification (narrow) ∗∗ Execute at semantic scope x 12 x 12 traverse 1 2 1 1 river city Mark at syntactic scope q q some every 17

  19. Solution: Mark-Execute Some river traverses every city. Quantification (wide) ∗∗ Execute at semantic scope x 21 x 21 traverse 1 2 1 1 river city Mark at syntactic scope q q some every 17

  20. Solution: Mark-Execute Some river traverses every city. Quantification (wide) ∗∗ Execute at semantic scope x 21 x 21 traverse 1 2 1 1 river city Mark at syntactic scope q q some every Analogy: Montague’s quantifying in, Carpenter’s scoping constructor 17

  21. Outline city 1 1 1 2 loc traverse 2 1 1 1 Representation state river 1 1 1 1 1 1 border major traverse 2 2 1 1 CA AZ x Learning θ z y w Experiments 18

  22. Graphical Model ∗∗ 1 2 z capital 1 1 CA database w 19

  23. Graphical Model ∗∗ 1 2 z capital 1 1 CA database Sacramento y w 19

  24. Graphical Model ∗∗ 1 2 z capital 1 1 Interpretation : p ( y | z, w ) CA (deterministic) database Sacramento y w 19

  25. Graphical Model capital of x California? ∗∗ 1 2 z capital 1 1 Interpretation : p ( y | z, w ) CA (deterministic) database Sacramento y w 19

  26. Graphical Model capital of x California? ∗∗ parameters 1 2 θ z capital 1 1 Interpretation : p ( y | z, w ) CA (deterministic) database Sacramento y w 19

  27. Graphical Model capital of x California? Semantic Parsing : p ( z | x, θ ) (probabilistic) ∗∗ parameters 1 2 θ z capital 1 1 Interpretation : p ( y | z, w ) CA (deterministic) database Sacramento y w 19

  28. Plan capital of x California? • What’s possible ? z ∈ Z ( x ) ∗∗ 1 parameters 2 • What’s probable ? p ( z | x, θ ) θ z capital 1 1 • Learning θ from ( x, y ) data CA database Sacramento y w 20

  29. Words to Predicates (Lexical Semantics) What is the most populous city in CA ? 21

  30. Words to Predicates (Lexical Semantics) CA What is the most populous city in CA ? Lexical Triggers: 1. String match CA ⇒ CA 21

  31. Words to Predicates (Lexical Semantics) argmax CA What is the most populous city in CA ? Lexical Triggers: 1. String match CA ⇒ CA 2. Function words (20 words) most ⇒ argmax 21

  32. Words to Predicates (Lexical Semantics) city city state state river river argmax population population CA What is the most populous city in CA ? Lexical Triggers: 1. String match CA ⇒ CA 2. Function words (20 words) most ⇒ argmax 3. Nouns/adjectives city ⇒ city state river population 21

  33. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] i j most populous city in California 22

  34. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] i k j most populous city in California 22

  35. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] C i,k C k,j i k j most populous city in California 22

  36. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] population city 1 c 1 argmax loc 2 1 CA C i,k C k,j i k j most populous city in California 22

  37. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] city 1 1 1 1 population loc 2 population city c 1 1 c argmax CA 1 argmax loc 2 1 CA C i,k C k,j i k j most populous city in California 22

  38. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] city 1 1 2 1 population loc 2 population city c 1 1 c argmax CA 1 argmax loc 2 1 CA C i,k C k,j i k j most populous city in California 22

  39. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] city 1 1 1 1 loc loc 2 2 population city 1 1 1 c population CA 1 argmax loc c 2 argmax 1 CA C i,k C k,j i k j most populous city in California 22

  40. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] city 1 1 2 1 loc loc 1 2 population city 1 1 1 c population CA 1 argmax loc c 2 argmax 1 CA C i,k C k,j i k j most populous city in California 22

  41. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] city 1 1 2 1 border loc 1 2 population city 1 1 1 c population CA 1 argmax loc c 2 argmax 1 CA C i,k C k,j i k j most populous city in California 22

  42. Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] population 1 c 1 argmax city 1 population city 1 1 c loc 1 2 argmax loc 1 2 CA 1 CA C i,k C k,j i k j most populous city in California 22

  43. Plan capital of x California? • What’s possible ? z ∈ Z ( x ) ∗∗ 1 parameters 2 • What’s probable ? p ( z | x, θ ) θ z capital 1 1 • Learning θ from ( x, y ) data CA database Sacramento y w 23

  44. Log-linear Model 1 1 2 1 z : city city loc CA x : city in California 24

  45. Log-linear Model 1 1 2 1 z : city city loc CA x : city in California features ( x, z ) = ( ) ∈ R d 24

  46. Log-linear Model 1 1 2 1 z : city city loc CA x : city in California features ( x, z ) = ( ) in : 1 loc ∈ R d 24

  47. Log-linear Model 1 1 2 1 z : city city loc CA x : city in California features ( x, z ) = ( : 1 ) in : 1 loc ∈ R d 1 1 loc city 24

  48. Log-linear Model 1 1 2 1 z : city city loc CA x : city in California features ( x, z ) = ( ) in : 1 loc ∈ R d : 1 1 1 loc city · · · 24

  49. Log-linear Model 1 1 2 1 z : city city loc CA x : city in California features ( x, z ) = ( ) in : 1 loc ∈ R d : 1 1 1 loc city · · · score ( x, z ) = features ( x, z ) · θ 24

  50. Log-linear Model 1 1 2 1 z : city city loc CA x : city in California features ( x, z ) = ( ) in : 1 loc ∈ R d : 1 1 1 loc city · · · score ( x, z ) = features ( x, z ) · θ e score ( x,z ) p ( z | x, θ ) = z 02 Z ( x ) e score ( x,z 0 ) P 24

  51. Plan capital of x California? • What’s possible ? z ∈ Z ( x ) ∗∗ 1 parameters 2 • What’s probable ? p ( z | x, θ ) θ z capital 1 1 • Learning θ from ( x, y ) data CA database Sacramento y w 25

  52. Learning Objective Function: p ( y | z, w ) p ( z | x, θ ) Interpretation Semantic parsing 26

  53. Learning Objective Function: max θ p ( y | z, w ) p ( z | x, θ ) Interpretation Semantic parsing 26

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