Mapping between English Strings and Reentrant Semantic Graphs - - PowerPoint PPT Presentation
Mapping between English Strings and Reentrant Semantic Graphs - - PowerPoint PPT Presentation
Mapping between English Strings and Reentrant Semantic Graphs knight 3/12/15 Strings, Trees, and Graphs Automata greatly simplify design of NLP systems Finite-state speech recognition, tagging, string string Transducer transliteration,
string
Strings, Trees, and Graphs
string Finite-state Transducer (FST) string tree Tree Transducer (LNT, etc.) tree graph
speech recognition, tagging, transliteration, etc. machine translation, summarization, etc. semantic interpretation, meaning-to-text
Not yet thoroughly studied for NLP apps
string tree graph
Automata greatly simplify design of NLP systems
Strings, Trees, and Graphs
String Automata Algorithms Tree Automata Algorithms Graph Algorithms
N-best … … paths through an WFSA (Viterbi, 1967; Eppstein, 1998) … trees in a weighted forest (Jiménez & Marzal, 2000; Huang & Chiang, 2005) EM training Forward-backward EM (Baum/Welch, 1971; Eisner 2003) Tree transducer EM training (Graehl & Knight, 2004) Determinization… … of weighted string acceptors (Mohri, 1997) … of weighted tree acceptors (Borchardt & Vogler, 2003; May & Knight, 2005) Intersection WFSA intersection Tree acceptor intersection Applying transducers string WFST WFSA tree TT weighted tree acceptor Transducer composition WFST composition (Pereira & Riley, 1996) Many tree transducers not closed under composition (Maletti et al 09) General tools Carmel, OpenFST Tiburon (May & Knight 10)
Graph/String Data
“Pascale was charged with public intoxication and resisting arrest.” 14,000 sentences have been annotated with Abstract Meaning Representation (AMR). Freely available portion at http://amr.isi.edu/download/amr-bank-v1.4.txt
[Banarescu et al 13]
Graph/String Data
- 10,000 smallest semantic graphs composed of:
– Predicates BELIEVE and WANT – Entities BOY and GIRL
- Plus 10 English string realizations of each graph
He wants her to believe he wants her. He wants her belief that he wants her. For her to believe he wants her is wanted by him. etc. [Braune, Bauer & Knight 14]
Freely available at http://amr.isi.edu/download/boygirl.tgz
Graph/String Data
- Graphs created synthetically by enumeration.
- English string realizations then created
synthetically by arbitrary program.
- Microworld, but:
– graphs are highly re-entrant, enabling focus on handling entities playing multiple roles – strings involve pronouns, case, reflexives, zero pronouns, nominalizations, passives, etc. – not easy to map graphs to strings & vice-versa!
Goal
- Concisely capture all graph/string pairs in the
corpus
- Using a formalism with nice theoretical and
computational properties
Candidate Formalisms
- Unification grammar [Kay 84; Shieber 86, Moore 89]
- Synchronous Hyperedge Replacement
Grammar (SHRG) [Drewes et al 97; Chiang et al 14]
- DAG-to-Tree transducer (D2T) [Kamimura & Slutzki
82; Quernheim & Knight 12ab]
- Tree transducer (xLNT, xLNTs) [Rounds 70; Thatcher
70; Maletti et al 08]
... and cascades of these devices.
RULE C RULE B RULE A
the boy wants to go
VB go syn cat subj sem sem io agt TO syn cat VP-INF go syn cat subj sem sem agt NP boy syn cat sem io VB want syn subj sem sem io agt cat pat inf sem VP want syn subj sem sem io agt cat pat io io go agt S want syn sem io agt cat pat io go agt boy io
RULE A: x0 x1 x2 ;; VP-INF TO VB (x0 sem) = (x2 sem) (x0 syn subj) = (x2 syn subj) RULE B: x0 x1 x2 ;; VP VB VP-INF (x0 sem) = (x1 sem) (x1 syn inf) = x2 (x1 syn subj) = (x2 syn subj) = (x0 syn subj) RULE C: x0 x1 x2 ;; S NP VP (x0 sem) = (x2 sem) (x2 syn subj) = x1
Unification-Based Semantics
Desired Properties
- Concisely captures linguistic phenomena
– huge sections of transformation grammar not replicated & tweaked over and over!
- Polynomial membership checking
- Reversible, bidirectional application (forward
and backward)
- Weighted or probabilistic version
- Efficient N-best generation
- Efficient EM training
end
backup slides
Hyperedge Replacement Grammar [Drewes et al 97]
- Represents a possibly infinite set of graphs
- Start with graph containing
– terminal edges: part of final output – non-terminal edges: to be expanded
- Recursively replace non-terminal edges by
rule, until none remain
HRG Derivation
instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 = boy wants girl to believe that he is wanted LET’S DERIVE THIS:
HRG Derivation
instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 instance ARG0 WANT B X “the boy wants something involving himself” ARG1 LET’S DERIVE THIS:
HRG Derivation
instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 “the boy wants something involving himself” instance ARG0 WANT B X ARG1 LET’S DERIVE THIS:
HRG Derivation
instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 instance ARG0 WANT B X instance ARG0 BELIEVE G “the boy wants the girl to believe something involving him” ARG1 LET’S DERIVE THIS:
HRG Derivation
instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 instance ARG0 WANT B X instance ARG0 BELIEVE G “something involving B” ARG1 LET’S DERIVE THIS:
HRG Derivation
instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 instance ARG0 WANT B instance ARG0 BELIEVE G instance WANT ARG1 ARG1 ARG1 FINISHED! LET’S DERIVE THIS:
HRG Derivation 2
X instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 ARG0
(= boy wants girl to believe that he wants her)
ARG0 WANT B ARG1
“the boy wants something involving himself” LET’S DERIVE THIS:
HRG Derivation 2
ARG0 WANT B ARG1 X instance ARG0 BELIEVE G instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 ARG0
“the boy wants the girl to believe something involving them both” this new hyperedge labeled X has two tails LET’S DERIVE THIS:
HRG Derivation 2
ARG0 WANT B ARG1 instance ARG0 BELIEVE G instance ARG0 WANT B ARG1 instance ARG0 BELIEVE ARG1 G instance WANT ARG1 ARG0 ARG1 ARG0 ARG1 instance WANT
FINISHED! LET’S DERIVE THIS:
Synchronous Hyperedge Replacement Grammar [Chiang et al 13]
- Represents a possibly infinite set of
graph/tree (or graph/string, or graph/graph) pairs
- Each SHRG rule outputs a graph fragment and
a tree fragment simultaneously
SHRG Derivation
S wants B INF instance ARG0 WANT B X “the boy wants something involving himself”
SHRG Derivation
S wants B INF to believe G S instance ARG0 WANT B X ARG1 instance ARG0 BELIEVE G “something involving B”
SHRG Derivation
instance ARG0 WANT B ARG1 instance ARG0 BELIEVE G instance WANT ARG1 S wants B INF to believe G S is wanted he FINISHED!
DAG-to-Tree Transducer [Kamimura & Slutzki 82]
- Bottom-up transformation of graph to tree
„Girl believes girl wants girl to want boy“
DAG-to-Tree Transducer [Kamimura & Slutzki 82]
Graph node GIRL transformed into three tree nodes (NP-she, NP-she, NP-0), and labeled with different states.
Top-Down Tree Transducers
(Rounds 70; Thatcher 70, Maletti et al 08)
xLNT (tree-to-tree)
q S NP VP PRO he VBZ enjoys NP VBG listening VP P to NP SBAR music s NP PRO he q VBZ enjoys r NP VBG listening VP P to NP SBAR music wa ga S wa ga S
Top-Down Tree Transducers
(Rounds 70; Thatcher 70, Maletti et al 08)
xLNTs (tree-to-string)
q S NP VP PRO he VBZ enjoys NP VBG listening VP P to NP SBAR music s NP PRO he q VBZ enjoys r NP VBG listening VP P to NP SBAR music
, , , wa ,
ga kare kiku
- ngaku o
wa daisuki desu ga no
Solutions We Designed and Tested
All transducer cascades are bidirectional: we run forwards for NL generation task, and backwards for NL understanding task.
graph SHRG string tree graph string graph DAG2Tree string tree xLNTs (take yield) tree DAG2Tree (tree-ify) xLNT (introduce verbs) xLNTs (take yield) tree xLNT (introduce pronouns)
Issues with SHRG
S wants he to believe instance ARG0 WANT boy NParg0masc ARG1 instance ARG0 BELIEVE girl
Sinf_arg0masc indicates that the realization of the arg0 of the next verb will be masculine
- Long distance interactions need to be encoded in
nonterminal set.
Sinf_arg0masc instance NParg0masc her Sinf_arg0masc
Issues with DAG2Tree
- All surface forms for reentrant entity nodes must
be generated at the same time
The node GIRL is realized by she she 0 The node GIRL is realized by she she she
Cascading with xLNT
string tree graph tree DAG2Tree (tree-ify) xLNT (introduce verbs) xLNTs (take yield) tree xLNT (introduce pronouns)
- Breaks down complex mapping into simpler tasks
- Most concise solution