Type-driven Incremental Semantic Parsing with Polymorphism
Kai Zhao and Liang Huang City University of New York
Type-driven Incremental Semantic Parsing with Polymorphism Kai - - PowerPoint PPT Presentation
Type-driven Incremental Semantic Parsing with Polymorphism Kai Zhao and Liang Huang City University of New York The Problem weakly supervised semantic fully supervised semantic parsing parsing aka. parsing from Q/A pairs
Kai Zhao and Liang Huang City University of New York
parsing
Input
What states border Texas?
Output
λx.state(x) ∧ borders(x, texas)
parsing
Input
What states border Texas?
Output
{LA,AR,OK,NM}
parsing
Input
What states border Texas?
Output
λx.state(x) ∧ borders(x, texas)
parsing
Input
What states border Texas?
Output
λx.state(x) ∧ borders(x, texas)
semantics to known predicates
semantic expr. onto stack
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
Stack Type Constraints
φ
Queue:
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SKIP
Stack Type Constraints
φ
Queue:
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SKIP Stack Type Constraints
φ
Queue:
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SKIP the Queue: capital …
Stack Type Constraints
φ
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT capital Queue: of …
Stack Type Constraints
λP : ' b → ' c . (λx : ' b . (P x))
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT capital Queue: of …
Stack Type Constraints
λP : ' b → ' c . (λx : ' b . (P x))
capital : st → ct
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT capital Queue: of …
Stack Type Constraints
st → ct <: ' b → ' c
λx : ' b . (capital : st → ct x)
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT capital Queue: of …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SKIP of Queue: the …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SKIP the Queue: largest …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT largest Queue: state …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
λP : (' a → t) → (' a → i) → ' a . λx : ' a → t . λy : ' a → i . (P x y)
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT largest Queue: state …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
λP : (' a → t) → (' a → i) → ' a . λx : ' a → t . λy : ' a → i . (P x y)
argmax : (' b → t) → (' b → i) → ' b
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT largest Queue: state …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
λx : ' a → t . λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a x y)
(' b → t) → (' b → i) → ' b <: (' a → t) → (' a → i) → ' a
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT largest Queue: state …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
λx : ' a → t . λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a x y)
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT state Queue: by …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
λx : ' a → t . λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a x y)
λx : ' c . (state : st → t x)
' c <: st
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT state Queue: by …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st
λx : ' a → t . λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a x y)
λx : ' c . (state : st → t x)
' c <: st
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT state Queue: by …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st ' c <: st
' c → t <: ' a → t
λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a λx : ' c . (state : st → t x) y)
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT state Queue: by …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st ' c <: st
λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a λx : ' c . (state : st → t x) y)
' a <: ' c
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SKIP by Queue: area …
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st ' c <: st
λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a λx : ' c . (state : st → t x) y)
' a <: ' c
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
SHIFT area Queue: φ
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st ' c <: st
λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a λx : ' c . (state : st → t x) y)
' a <: ' c
λx : ' d . (size : lo → i x)
' d <: lo
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
REDUCE Queue: φ
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st ' c <: st
λy : ' a → i . (argmax : (' a → t) → (' a → i) → ' a λx : ' c . (state : st → t x) y)
' a <: ' c
λx : ' d . (size : lo → i x)
' d <: lo
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
REDUCE Queue: φ
Stack Type Constraints
λx : ' b . (capital : st → ct x)
' b <: st ' c <: st
' a <: ' c
' d <: lo
(argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y)))
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
REDUCE Queue: φ
Stack Type Constraints (capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
' c <: st
' a <: ' c
' d <: lo
What is the capital of the largest state by area ? WP VBZ DT NN IN DT JJS NN IN NN
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
' c <: st
' a <: ' c
' d <: lo
logical form
Latent Variable Structured Perceptron
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
highest-scoring gold derivation
d∗
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
highest-scoring gold derivation
d∗
(size : st → i (argmin : (' a → t) → (' a → i) → ' a (λx : ' c . (city : ct → t x)) (λy : ' d . (population : au → i y))))
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
highest-scoring gold derivation
d∗
full search space
(size : st → i (argmin : (' a → t) → (' a → i) → ' a (λx : ' c . (city : ct → t x)) (λy : ' d . (population : au → i y))))
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
highest-scoring gold derivation
d∗
full search space b e a m
highest-scoring derivation
ˆ d
(size : st → i (argmin : (' a → t) → (' a → i) → ' a (λx : ' c . (city : ct → t x)) (λy : ' d . (population : au → i y))))
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
highest-scoring gold derivation
d∗
full search space b e a m
highest-scoring derivation
ˆ d
(size : st → i (argmin : (' a → t) → (' a → i) → ' a (λx : ' c . (city : ct → t x)) (λy : ' d . (population : au → i y))))
REWARD
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
highest-scoring gold derivation
d∗
full search space b e a m
highest-scoring derivation
ˆ d
(size : st → i (argmin : (' a → t) → (' a → i) → ' a (λx : ' c . (city : ct → t x)) (λy : ' d . (population : au → i y))))
REWARD PENALIZE
What is the capital of the largest state by area ?
(capital : st → ct (argmax : (' a → t) → (' a → i) → ' a (λx : ' c . (state : st → t x)) (λy : ' d . (size : lo → i y))))
forced decoding space
highest-scoring gold derivation
d∗
full search space b e a m
highest-scoring derivation
ˆ d
(size : st → i (argmin : (' a → t) → (' a → i) → ' a (λx : ' c . (city : ct → t x)) (λy : ' d . (population : au → i y))))
REWARD PENALIZE
penalize wrong
reward correct
Type Hierarchy
79 81.25 83.5 85.75 88 Recall
Z&C '05 Z&C '07 UBL