Dependency-Based Compositional Semantics (DCS) What is the most populous city in California? 10
Dependency-Based Compositional Semantics (DCS) What is the most populous city in California? city 1 1 1 1 population loc 2 c 1 argmax CA 10
How to interpret the logical form? What is the most populous city in California? city 1 1 1 1 population loc 2 c 1 argmax CA 11
How to interpret the logical form? What is the most populous city in California? city 1 1 1 1 population loc 2 c 1 argmax CA Los Angeles 11
How to interpret the logical form? What is the most populous city in California? city 1 1 1 1 population loc 2 c 1 argmax CA World/Database Los Angeles 11
World/Database city state San Francisco Alabama Chicago Alaska Boston Arizona · · · · · · loc border Mount Shasta California Washington Oregon San Francisco California Washington Idaho Boston Massachusetts Oregon Washington · · · · · · · · · · · · · · · · · · 12
Basic DCS Trees DCS tree Database city 1 1 loc 2 1 CA 13
Basic DCS Trees DCS tree Constraints Database city 1 1 loc 2 1 CA A DCS tree encodes a constraint satisfaction problem (CSP) 13
Basic DCS Trees DCS tree Constraints Database city city c ∈ city San Francisco 1 Chicago Boston 1 · · · loc 2 1 CA A DCS tree encodes a constraint satisfaction problem (CSP) 13
Basic DCS Trees DCS tree Constraints Database city c ∈ city city San Francisco 1 Chicago Boston 1 · · · ℓ ∈ loc loc 2 loc Mount Shasta California 1 San Francisco California CA Boston Massachusetts · · · · · · A DCS tree encodes a constraint satisfaction problem (CSP) 13
Basic DCS Trees DCS tree Constraints Database city c ∈ city city San Francisco 1 Chicago Boston 1 · · · ℓ ∈ loc loc 2 loc Mount Shasta California 1 San Francisco California s ∈ CA CA Boston Massachusetts · · · · · · CA California A DCS tree encodes a constraint satisfaction problem (CSP) 13
Basic DCS Trees DCS tree Constraints Database city c ∈ city city San Francisco 1 Chicago c 1 = ℓ 1 Boston 1 · · · ℓ ∈ loc loc 2 loc Mount Shasta California 1 San Francisco California s ∈ CA CA Boston Massachusetts · · · · · · CA California A DCS tree encodes a constraint satisfaction problem (CSP) 13
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) 13
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) 13
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) 13
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) 13
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 ) 13
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 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 Trees 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 Linguistics Trees syntactic locality 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 Linguistics Trees Computation syntactic locality efficient interpretation 14
Divergence between Syntactic and Semantic Scope most populous city in California 15
Divergence between Syntactic and Semantic Scope most populous city in California Syntax city populous in most California 15
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 15
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 15
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 15
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? 15
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 16
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 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 16
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 16
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 16
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 16
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 16
From Sentences to DCS Trees Lexicon (very simple/crude) no ⇒ no state ⇒ state 17
From Sentences to DCS Trees Lexicon (very simple/crude) no no ⇒ state ⇒ state Grammar (very simple/crude) a b i i a b a b ⇒ ⇒ j j b a 17
From Sentences to DCS Trees Lexicon (very simple/crude) no no ⇒ state ⇒ state Grammar (very simple/crude) a b i i j j a b a b c c ⇒ ⇒ k k l l b a 17
Words to Predicates (Lexical Semantics) What is the most populous city in CA ? 18
Words to Predicates (Lexical Semantics) CA What is the most populous city in CA ? Lexical Triggers: 1. String match CA ⇒ CA 18
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 18
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 18
Predicates to DCS Trees (Compositional Semantics) C i,j = set of DCS trees for span [ i, j ] i j most populous city in California 19
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 19
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 19
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 19
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 19
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 19
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 19
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 19
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 19
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 19
Comparison CCG DCS 20
Comparison CCG DCS Logical form lambda calculus formulae DCS trees λx. city ( x ) ∧ loc ( x, CA ) 1 1 2 1 CA city loc 20
Comparison CCG DCS Logical form lambda calculus formulae DCS trees λx. city ( x ) ∧ loc ( x, CA ) 1 1 2 1 CA city loc Lexicon categories + lambda calculus predicates major n / n : λf.λx.f ( x ) ∧ major ( x ) major 20
Comparison CCG DCS Logical form lambda calculus formulae DCS trees λx. city ( x ) ∧ loc ( x, CA ) 1 1 2 1 CA city loc Lexicon categories + lambda calculus predicates major n / n : λf.λx.f ( x ) ∧ major ( x ) major Grammar combinator rules ≅ dependency parsing Y/X : a X : b Y : a ( b ) ⇒ i j a b 20
Comparison CCG DCS Logical form lambda calculus formulae DCS trees λx. city ( x ) ∧ loc ( x, CA ) 1 1 2 1 CA city loc Lexicon categories + lambda calculus predicates major n / n : λf.λx.f ( x ) ∧ major ( x ) major Grammar combinator rules ≅ dependency parsing Y/X : a X : b Y : a ( b ) ⇒ i j a b Nature tighter control simple/permissive 20
Comparison CCG DCS Logical form lambda calculus formulae DCS trees λx. city ( x ) ∧ loc ( x, CA ) 1 1 2 1 CA city loc Lexicon categories + lambda calculus predicates major n / n : λf.λx.f ( x ) ∧ major ( x ) major Grammar combinator rules ≅ dependency parsing Y/X : a X : b Y : a ( b ) ⇒ i j a b Nature tighter control simple/permissive Origin linguistics NLP 20
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 θ w y Experiments 21
Supervision Detailed Supervision What is the largest city in California? argmax ( { c : city ( c ) ∧ loc ( c, CA ) } , population ) 22
Supervision Detailed Supervision What is the largest city in California? expert argmax ( { c : city ( c ) ∧ loc ( c, CA ) } , population ) 22
Supervision Detailed Supervision What is the largest city in California? - doesn’t scale up expert argmax ( { c : city ( c ) ∧ loc ( c, CA ) } , population ) 22
Supervision Detailed Supervision What is the largest city in California? - doesn’t scale up expert argmax ( { c : city ( c ) ∧ loc ( c, CA ) } , population ) Natural Supervision What is the largest city in California? Los Angeles 22
Supervision Detailed Supervision What is the largest city in California? - doesn’t scale up expert argmax ( { c : city ( c ) ∧ loc ( c, CA ) } , population ) Natural Supervision What is the largest city in California? non-expert Los Angeles 22
Supervision Detailed Supervision What is the largest city in California? - doesn’t scale up expert argmax ( { c : city ( c ) ∧ loc ( c, CA ) } , population ) Natural Supervision What is the largest city in California? - scales up non-expert Los Angeles 22
Supervision Detailed Supervision What is the largest city in California? - doesn’t scale up expert - representation-dependent argmax ( { c : city ( c ) ∧ loc ( c, CA ) } , population ) Natural Supervision What is the largest city in California? - scales up non-expert Los Angeles 22
Recommend
More recommend