Broad-coverage CCG Semantic Parsing with AMR
Yoav Artzi Cornell University Kenton Lee Luke Zettlemoyer University of Washington
Cornell Tech
Combinatory Categorial Grammar Abstract Meaning Representation
Broad-coverage CCG Semantic Parsing with AMR Yoav Artzi Kenton Lee - - PowerPoint PPT Presentation
Combinatory Abstract Categorial Meaning Grammar Representation Broad-coverage CCG Semantic Parsing with AMR Yoav Artzi Kenton Lee Luke Zettlemoyer Cornell University University of Washington Cornell Tech Semantic Parsing Show
Broad-coverage CCG Semantic Parsing with AMR
Yoav Artzi Cornell University Kenton Lee Luke Zettlemoyer University of Washington
Cornell Tech
Combinatory Categorial Grammar Abstract Meaning Representation
Semantic Parsing
Show me all papers about semantic parsing
Grammar
λx.paper(x) ∧ topic(x, SEMANTIC PARSING)
Less Supervision More Domains Situated Parsing
Answers Demonstrations Conversations Databases Large Knowledge-bases Instructions Web Tables Time Spatial Observations Linguistic Context Database Content
Semantic Parsing
Show me all papers about semantic parsing
Grammar
λx.paper(x) ∧ topic(x, SEMANTIC PARSING)
Less Supervision More Domains Situated Parsing Non-compositional Semantics Broad-coverage Grammar Induction
Abstract Meaning Representation
Pyongyang officials denied their involvement
deny-01
instance ARG0 ARG1 instance
involve-01
instance
person
ARG0-of
have-org-role-91
instance ARG1
city
instance name instance
name
ARG2 instance
“Pyongyang”
ARG1
AMR: Instances
Pyongyang officials denied their involvement
deny-01
instance ARG0 ARG1 instance
involve-01
instance
person
ARG0-of
have-org-role-91
instance ARG1
city
instance name instance
name
ARG2 instance
“Pyongyang”
ARG1
AMR: Instances
Pyongyang officials denied their involvement
deny-01
instance ARG0 ARG1 instance
involve-01
instance
person
ARG0-of
have-org-role-91
instance ARG1
city
instance name instance
name
ARG2 instance
“Pyongyang”
ARG1
AMR: Relations
Pyongyang officials denied their involvement
deny-01
instance ARG0 ARG1 instance
involve-01
instance
person
ARG0-of
have-org-role-91
instance ARG1
city
instance name instance
name
ARG2 instance
“Pyongyang”
ARG1
Pyongyang officials denied their involvement
AMR: Relations
deny-01
instance ARG0 ARG1 instance
involve-01
instance
person
ARG0-of
have-org-role-91
instance ARG1
city
instance name instance
name
ARG2 instance
“Pyongyang”
ARG1
AMR: Relations
Pyongyang officials denied their involvement
deny-01
instance ARG0 ARG1 instance
involve-01
instance
person
ARG0-of
have-org-role-91
instance ARG1
city
instance name instance
name
ARG2 instance
“Pyongyang”
ARG1
AMR and Combinatory Categorial Grammar
Challenges:
Great opportunity study CCG semantic parsing at scale
Parsing Approach
phenomena, such as co-reference resolution
Combinatory Categorial Grammar
Category Combinators Lexicon
Assign category to words
S\NP/NP : λx.λy.λd.deny-01(d) ∧ ARG0(d, y) ∧ ARG1(d, x)
Unary and binary operators to combine categories denied
S\NP/NP : λx.λy.λd.deny-01(d)∧ ARG0(d, y) ∧ ARG1(d, x)
Syntax Semantics
CCG
Logical Form Entries from Lexicon Parse Steps
Lexicon Combinators
Learned
CCG is fun NP S\NP/ADJ ADJ CCG λf.λx.f(x) λx.fun(x)
>
S\NP λx.fun(x)
<
S fun(CCG)
AMR to Lambda Calculus
Pyongyang officials denied their involvement
deny-01
instance ARG0 ARG1 instance
involve-01
instance
person
ARG0-of
have-org-role-91
instance ARG1
city
instance name instance
name
ARG2 instance
“Pyongyang”
ARG1
AMR to Lambda Calculus
Pyongyang officials denied their involvement
deny-01 instance ARG0 ARG1 instance involve-01 instance person ARG0-of have-org-role-91 instance ARG1 city instance name instance name ARG2 instanceA1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))
AMR Lambda Calculus
Deterministic Conversion
AMR Lambda Calculus: Instances
Pyongyang officials denied their involvement
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))
AMR Lambda Calculus: Relations
Pyongyang officials denied their involvement
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))
AMR Lambda Calculus: Instances
Pyongyang officials denied their involvement
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))
Skolem ID Instance Quantifier
AMR Lambda Calculus: References
Pyongyang officials denied their involvement
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))
Skolem ID Instance Quantifier Reference Predicate
Model
Pyongyang officials denied their involvement
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))
CCG?
Model
Pyongyang officials denied their involvement
Underspecified Logical Form
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))CCG Parse Constant Mapping
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(ID))))))
REL(
A REL-of(
Model
Pyongyang officials denied their involvement
Underspecified Logical Form
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))1(i, R(ID))))))
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(ID))))))
Reference placeholder Passive relation placeholder Active relation placeholder
REL(
A REL-of(
Model
Pyongyang officials denied their involvement
Underspecified Logical Form
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(ID))))))
A ARG0-of( A cause-of(
ARG2(
unit(
frequency(
REL(
A REL-of(
Model
Pyongyang officials denied their involvement
Underspecified Logical Form
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(ID))))))
A ARG0-of( A cause-of(
ARG2(
unit(
frequency(
Model
Pyongyang officials denied their involvement
Underspecified Logical Form
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))1(i, R(ID))))))
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(ID))))))
i, R(2))
i, R(1))
i, R(7))
Model
Pyongyang officials denied their involvement
Underspecified Logical Form
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2))))))1(i, R(ID))))))
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op1(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(ID))))))
i, R(2))
i, R(1))
i, R(7))
Model Advantages
references, including:
distinguished)
difficult CCG parsing problem
CCG Parse
Derivation
Constant Mapping
PyongyangA1(λd.deny-01(d) ∧ ARG0(d, A2(λp.person(p) ∧ ARG0-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c) ∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG)))))∧ ARG2(h, A6(λo.official(o)))))) ∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(2)))))) A1(λd.deny-01(d) ∧ ARG0(d, A2(λp.person(p) ∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c) ∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o)))))) ∧ ARG1(d, A7(λi.involve-01(i) ∧ ARG1(i, R(ID))))))
Log-linear Model
p(z | x; θ, Λ) = X
d∈D(z)
p(d | x; θ, Λ)
p(d | x; θ, Λ) = eθ·φ(x,d) P
d0∈D eθ·φ(x,d0)
ω ∈ Rm
φ : X × D → Rm
Weights CCG Lexicon Feature Function
Λ
z
x ∈ X d ∈ D
CCG Parse
Inference
Constant
CKY parsing Factor graph
PyongyangA1(λd.deny-01(d) ∧ ARG0(d, A2(λp.person(p) ∧ AR ARG1(h, A4(λc.city(c) ∧ name(c, A5(λn.name(n ARG2(h, A6(λo.official(o)))))) ∧ ARG1(d, A7(λi.in A1(λd.deny-01(d) ∧ ARG0(d, A2(λp.person(p) ∧ RE ARG1(h, A4(λc.city(c) ∧ name(c, A5(λn.name(n REL(h, A6(λo.official(o)))))) ∧ ARG1(d, A7(λi.in
Joint scoring
Constant Mapping with a Factor Graph
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i)∧ ARG1(i, R(ID))))))
Build a factor graph for each underspecified logical form
Factor Graph
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i)∧ ARG1(i, R(ID))))))
Each constant is a random variable
Factor Graph
unit, prep-with, frequency, prep-against, compared-to, employed-by, ARG2, . . . unit-of, prep-with-of, frequency-of, prep-against-of, compared-to-of, employed-by-of, ARG0-of, . . .
1, 2, 3, 4, 5, 6, 7
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i)∧ ARG1(i, R(ID))))))
Potential mapping of placeholders defines assignments
Factor Graph
A B
A1(λd.deny-01(d)∧ ARG0(d, A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG)))))∧ REL(h, A6(λo.official(o))))))∧ ARG1(d, A7(λi.involve-01(i)∧ ARG1(i, R(ID))))))
Selectional preference features to specify REL to one of 67 active relations Features for resolving ID to 3
Features define factors to resolve underspecified constants
Approach
and non-compositional distant references
Learning Algorithm Sketch
For T iterations:
Lexicon Induction Parameter Estimation
Learning Algorithm Sketch
For T iterations:
Two-pass Lexical Generation
derivations
Bottom-up Pass
Pyongyang officials denied their involvement
Generated Entries Templates Underspecified Logical Form
Bottom-up Pass
Pyongyang officials denied their involvement
Generated Entries
CCG Parsing
Underspecified logical form
Bottom-up Pass
Pyongyang officials denied their involvement
Generated Entries
Select lexical entries from max scoring correct derivation
Underspecified logical form
Common Failure
Pyongyang officials denied their involvement
Generated Entries
derivation created Need to learn new templates
Splitting CCG Categories
templates
Splitting CCG Categories
Given a CCG category C : h:
f(g) = h λx.f(g(x)) = h
NP[nb] : λi.involve-01(i)∧ ARG1(i, R(ID)) R(ID) λx.λi.involve-01(i) ∧ ARG1(i, x) λf.λi.f(i) ∧ ARG1(i, R(ID)) λi.involve-01(i)
Splitting CCG Categories
Given a CCG category C : h:
f(g) = h λx.f(g(x)) = h
NP[nb] : λi.involve-01(i)∧ ARG1(i, R(ID)) R(ID) λx.λi.involve-01(i) ∧ ARG1(i, x)
NP[x]/N[x] : N[nb] :
λf.λi.f(i) ∧ ARG1(i, R(ID)) λi.involve-01(i) NP[pl] : NP[nb]\NP :
Top-down Pass
Pyongyang officials denied their involvement
Generated Entries
without a correct parse
Top-down Pass
Pyongyang officials denied their involvement
Generated Entries
logical form
create a complete tree
Underspecified logical form
Top-down Pass
Pyongyang officials denied their involvement
Generated Entries
new category with an existing partial derivation
Underspecified logical form
Splitting for CCG Induction
Learning Algorithm Sketch
For T iterations:
Gradient Computation
Pyongyang officials denied their
Underspecified logical form
inside-outside
constant mapping features
Common Failure
Pyongyang officials denied their
~40% of training data
all (or at least most) corpus can be parsed
Early Updates
Early Update with Latent Structures
Pyongyang officials denied their
underspecified logical form
scoring partial derivation
Early Update with Latent Structures
Pyongyang officials denied their
Underspecified Logical Form
A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG))))) REL(h, A6(λo.official(o)))))) A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG))))
Early Update with Latent Structures
Pyongyang officials denied their
Underspecified Logical Form
A2(λp.person(p)∧ REL-of(p, A3(λh.have-org-role-91(h)∧ ARG1(h, A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG))))) REL(h, A6(λo.official(o)))))) A4(λc.city(c)∧ name(c, A5(λn.name(n) ∧ op(n, PYONGYANG))))
Related Work
CCG Semantic Parsing
[Zettlemoyer and Collins 2005, 2007; Kwiatkowski et al. 2010, 2011; Artzi and Zettlemoyer 2013]
Skolem Terms for CCG
[Steedman 2011]
AMR Evaluation
[Cai and Knight 2013]
Graph-based Parsing for AMR
[Flanigan et al. 2014]
Dependency Structure Transformation for AMR
[Wang et al. 2015a, 2015b]
Syntax-based MT for AMR
[Pust et al. 2015]
Rule-based Parsing for AMR
[Vanderwende et al. 2015]
AMR Applications
[Pan et al. 2015; Lin et al. 2015]
Experimental Setup
attachment, selectional preferences, control structures
Ablation Results
45.6 51.6 62.6 66.1
Full system w/o unrestricted lexical generation w/o early updates w/o surface-form similarity
learn effectively from much of the data
heuristics demonstrates need for future work SMATCH F1
Results
SMATCH F1
70 66.3 65.8 62.2 63.2
JAMR (fixed) Werling et al. 2015 Pust et al. 2015 Our Approach Wang et al. 2015b
… and will: SemEval 2016
solution is a promising complimentary direction
Contributions
semantics
http://yoavarzti.com/spf
Cornell Tech
[fin]