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
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
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
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
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
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
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
Divergence between Syntactic and Semantic Scope most populous city in California 16
Divergence between Syntactic and Semantic Scope most populous city in California Syntax city populous in most California 16
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
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
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
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
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
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
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
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
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
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
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
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
Graphical Model ∗∗ 1 2 z capital 1 1 CA database w 19
Graphical Model ∗∗ 1 2 z capital 1 1 CA database Sacramento y w 19
Graphical Model ∗∗ 1 2 z capital 1 1 Interpretation : p ( y | z, w ) CA (deterministic) database Sacramento y w 19
Graphical Model capital of x California? ∗∗ 1 2 z capital 1 1 Interpretation : p ( y | z, w ) CA (deterministic) database Sacramento y w 19
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
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
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
Words to Predicates (Lexical Semantics) What is the most populous city in CA ? 21
Words to Predicates (Lexical Semantics) CA What is the most populous city in CA ? Lexical Triggers: 1. String match CA ⇒ CA 21
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
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
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
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
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
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
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
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
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
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
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
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
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
Log-linear Model 1 1 2 1 z : city city loc CA x : city in California 24
Log-linear Model 1 1 2 1 z : city city loc CA x : city in California features ( x, z ) = ( ) ∈ R d 24
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
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
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
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
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
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
Learning Objective Function: p ( y | z, w ) p ( z | x, θ ) Interpretation Semantic parsing 26
Learning Objective Function: max θ p ( y | z, w ) p ( z | x, θ ) Interpretation Semantic parsing 26
Recommend
More recommend