SLIDE 1
Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars Karl - - PowerPoint PPT Presentation
Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars Karl - - PowerPoint PPT Presentation
Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars Karl Bringmann and Philip Wellnitz Max Planck Institute for Informatics, Saarland Informatics Campus (SIC), Saarbrcken, Germany May 8, 2019 Motivation Previous Work Hardness
SLIDE 2
SLIDE 3
Motivation Previous Work Hardness Result
Tree-Adjoining Grammars
Adjoining trees A c B b a Initial tree B A c A b B B a Auxiliary tree + A c B A c A b B b B a a =
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 4
Motivation Previous Work Hardness Result
Tree-Adjoining Grammars
Examples Every CFG {anbncndn | n ∈ N} S d S c b a S d S c S b a (Large parts of) English (XTAG [DEH+94])
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 5
Motivation Previous Work Hardness Result
Tree-Adjoining Grammars
Examples Every CFG {anbncndn | n ∈ N} (Large parts of) English (XTAG [DEH+94]) {aa | a ∈ Σ} S S a a S S a S a
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 6
Motivation Previous Work Hardness Result
Tree-Adjoining Grammars
Check for s ∈ T ∗ if s ∈ L(Γ), i.e. parse s O(|s|6) algorithm using dynamic programming [VSJ85, SJ88] O(|s|2ω) using matrix multiplication, ω < 2.373 [RY98] Faster algorithms? Improbable, for |Γ| = Θ(n12) [Sat94] Now, even for |Γ| = Θ(1)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 7
Motivation Previous Work Hardness Result
Tree-Adjoining Grammars
Check for s ∈ T ∗ if s ∈ L(Γ), i.e. parse s O(|s|6) algorithm using dynamic programming [VSJ85, SJ88] O(|s|2ω) using matrix multiplication, ω < 2.373 [RY98] Faster algorithms? Improbable, for |Γ| = Θ(n12) [Sat94] Now, even for |Γ| = Θ(1)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 8
Motivation Previous Work Hardness Result
Tree-Adjoining Grammars
Check for s ∈ T ∗ if s ∈ L(Γ), i.e. parse s O(|s|6) algorithm using dynamic programming [VSJ85, SJ88] O(|s|2ω) using matrix multiplication, ω < 2.373 [RY98] Faster algorithms? Improbable, for |Γ| = Θ(n12) [Sat94] Now, even for |Γ| = Θ(1)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 9
Motivation Previous Work Hardness Result
Tree-Adjoining Grammars
Check for s ∈ T ∗ if s ∈ L(Γ), i.e. parse s O(|s|6) algorithm using dynamic programming [VSJ85, SJ88] O(|s|2ω) using matrix multiplication, ω < 2.373 [RY98] Faster algorithms? Improbable, for |Γ| = Θ(n12) [Sat94] Now, even for |Γ| = Θ(1)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 10
Motivation Previous Work Hardness Result
Lower Bounds
Hard to show lower bounds for natural problems Use reductions to relate problems Problem P Instance I size n I is “yes” instance r(n) + t(s(n)) algorithm reduction r(n) time ⇐ ⇒ ← − Problem Q Instance J size s(n) J is “yes” instance t(n) algorithm
(x1 ∨ x3 ∨ x5) ∧ (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 11
Motivation Previous Work Hardness Result
Lower Bounds
Hard to show lower bounds for natural problems Use reductions to relate problems Problem P Instance I size n I is “yes” instance r(n) + t(s(n)) algorithm reduction r(n) time ⇐ ⇒ ← − Problem Q Instance J size s(n) J is “yes” instance t(n) algorithm
(x1 ∨ x3 ∨ x5) ∧ (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 12
Motivation Previous Work Hardness Result
Lower Bounds
Hard to show lower bounds for natural problems Use reductions to relate problems Problem P Instance I size n I is “yes” instance No r(n) + t(s(n)) algorithm reduction r(n) time ⇐ ⇒ − → Problem Q Instance J size s(n) J is “yes” instance No t(n) algorithm
(x1 ∨ x3 ∨ x5) ∧ (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 13
Motivation Previous Work Hardness Result
Lower Bounds
Hard to show lower bounds for natural problems Use reductions to relate problems
Problem P Instance I size n I is “yes” instance No r(n) + t(s(n)) algorithm reduction r(n) time ⇐ ⇒ − → Problem Q Instance J size s(n) J is “yes” instance No t(n) algorithm (x1 ∨ x3 ∨ x5) ∧ (x1 ∨ x3 ∨ x4) ∧ (x1 ∨ x2 ∨ x3)
Need hard problems
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 14
Motivation Previous Work Hardness Result
k-Clique
Given a graph G = (V, E) and k ∈ N, does G contain a clique of size k? Naïve O(nk) algorithm O(n
ωk 3 ) for 3 | k, using matrix multiplication, ω < 2.373 [NP85]
Let us believe that these algorithms are optimal.
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 15
Motivation Previous Work Hardness Result
k-Clique
Given a graph G = (V, E) and k ∈ N, does G contain a clique of size k? Naïve O(nk) algorithm O(n
ωk 3 ) for 3 | k, using matrix multiplication, ω < 2.373 [NP85]
Let us believe that these algorithms are optimal.
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 16
Motivation Previous Work Hardness Result
Hardness for Context-Free Grammars
3k-Clique G = (V, E), k size n = |V| G contains 3k-Clique No nk+1 + t(nk+1) algorithm reduction nk+1 time ⇐ ⇒ − → Parsing CFG CFG Γ, string s size s(n) = |s| = nk+1 s ∈ L(Γ) No t(n) algorithm
Γ = (T, NT, P, S), graphs w/ 3k-Cliques s, encoding of G
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 17
Motivation Previous Work Hardness Result
Hardness for Context-Free Grammars
3k-Clique G = (V, E), k size n = |V| G contains 3k-Clique No n3k(1−ε) algorithm No n
ωk 3 (1−ε) algorithm
reduction nk+1 time ⇐ ⇒ − → Parsing CFG CFG Γ, string s size s(n) = |s| = nk+1 s ∈ L(Γ) No n3−ε′ algorithm No nω−ε′ algorithm
Γ = (T, NT, P, S), graphs w/ 3k-Cliques s, encoding of G
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 18
Motivation Previous Work Hardness Result
Hardness for Context-Free Grammars
String s: list all k-cliques of G in a special way Γ: all graphs where 3 k-cliques form a triangle
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 19
Motivation Previous Work Hardness Result
Hardness for Context-Free Grammars
String s: list all k-cliques of G in a special way Γ: all graphs where 3 k-cliques form a triangle
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 20
Motivation Previous Work Hardness Result
Hardness for Context-Free Grammars
String s: list all k-cliques of G in a special way Γ: all graphs where 3 k-cliques form a triangle C2 C3 C1
(+|+)2 (−|+)2 (−|−)2 (+|+)3 (−|+)3 (−|−)3 (+|+)1 (−|+)1 (−|−)1 · · · · · · +: List clique’s nodes −: List for every node all neighbors
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 21
Motivation Previous Work Hardness Result
Hardness for Context-Free Grammars
String s: list all k-cliques of G in a special way Γ: all graphs where 3 k-cliques form a triangle C2 C3 C1
(+|+)1 (−|+)2 (−|−)3 · · · · · · · · · · · · +: List clique’s nodes −: List for every node all neighbors Matching + and − form a 2k-clique.
Γ will look like: S →∗ · · · (+|Sαβ|Sβγ|−) · · · Sαβ →∗ +) · · · (− Sβγ →∗ +) · · · (−
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 22
Motivation Previous Work Hardness Result
Hardness for Context-Free Grammars
Defining suitable gadgets: Node gadget NG(v) := $ binary(v) $ List gadget LG(v) :=
- u∈N(v)
NG(u) Clique node gadget (+) CNG(C) :=
v∈C
(#NG(v)#)k Clique list gadget CLG(C) :=
- v∈C
#LG(v)# k Use CLG(C)R for − gadgets CNG(C1) ⊆ CLG(C2) ⇒ C1 ∪ C2 is a 2k-clique CFGs can generate aaR
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 23
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Parsing TAG TAG Γ, string s size |s| = nk+1 s ∈ L(Γ) No |s|6−ε algorithm No |s|2ω−ε algorithm reduction nk+1 time ⇐ ⇒ − → 6k-Clique G = (V, E), k size n = |V| G contains 6k-clique No n6k(1−ε′) algorithm No n2ωk(1−ε′) algorithm
Γ = (I, A), graphs w/ 6k-cliques s, encoding of G
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 24
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Want to “solve” 6k-clique using TAG parser Need string and a grammar String: list all k-cliques in graph G in a special way Grammar: all graphs where 6 k-cliques form a 6-clique Here: Will show how to generate 4k-cliques
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 25
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Want to “solve” 6k-clique using TAG parser Need string and a grammar String: list all k-cliques in graph G in a special way Grammar: all graphs where 6 k-cliques form a 6-clique Here: Will show how to generate 4k-cliques
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 26
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Can generate (almost) 4k-cliques P(·, ·, ·, ·) 6k-cliques decompose into 3 of these Need to use P(·, ·, ·, ·) 3 times Similar to CFG hardness C1 C6 C3 C4 C1 C6 C2 C5 C3 C4
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 27
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Can generate (almost) 4k-cliques P(·, ·, ·, ·) 6k-cliques decompose into 3 of these Need to use P(·, ·, ·, ·) 3 times Similar to CFG hardness C1 C6 C3 C4 C1 C6 C2 C5 C3 C4
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 28
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Can generate (almost) 4k-cliques P(·, ·, ·, ·) 6k-cliques decompose into 3 of these Need to use P(·, ·, ·, ·) 3 times Similar to CFG hardness C1 C6 C3 C4 C1 C6 C2 C5 C3 C4
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 29
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
String: list all k-cliques in graph G in a special way Grammar: all graphs where 6 k-cliques form a 6-clique CNG(Ck) list vertices of k-clique Ck CLG(Ck) list neighbors of vertices of k-clique Ck CNG(Ck) ⊂ CLG(C′
k) iff Ck ∪ C′ k is a 2k-clique
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 30
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
String: list all k-cliques in graph G in a special way Grammar: all graphs where 6 k-cliques form a 6-clique CNG(Ck) list vertices of k-clique Ck CLG(Ck) list neighbors of vertices of k-clique Ck CNG(Ck) ⊂ CLG(C′
k) iff Ck ∪ C′ k is a 2k-clique
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 31
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
CNG(Ck) list vertices of k-clique Ck CLG(Ck) list neighbors of vertices of k-clique Ck CNG(Ck) ⊂ CLG(C′
k) iff Ck ∪ C′ k is a 2k-clique
String (to detect 4k-cliques):
GGk(G) :=
C∈Ck
|CNG(C)§CLG(C)R§CLG(C)§CLG(C)R|
C∈Ck
|CLG(C)§CLG(C)R§CNG(C)§CLG(C)R|
C∈Ck
|CLG(C)§CLG(C)R§CNG(C)§CLG(C)R|
C∈Ck
|CNG(C)§CLG(C)R§CLG(C)§CLG(C)R|
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 32
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
CNG(Ck) ⊂ CLG(C′
k) iff Ck ∪ C′ k is a 2k-clique
String (to detect 4k-cliques):
GGk(G) :=
C∈Ck
|CNG(C)§CLG(C)R§CLG(C)§CLG(C)R|
C∈Ck
|CLG(C)§CLG(C)R§CNG(C)§CLG(C)R|
C∈Ck
|CLG(C)§CLG(C)R§CNG(C)§CLG(C)R|
C∈Ck
|CNG(C)§CLG(C)R§CLG(C)§CLG(C)R|
Claim: There is a TAG that generates {GGk(G) | G contains a 4k-clique} ∪ {some strings that are not encodings of graphs}
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 33
Motivation Previous Work Hardness Result
Reminder: Tree-Adjoining Grammars
Initial and auxiliary trees, nodes marked for adjunction A c B b a Initial tree B A c A b B B a Auxiliary tree
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 34
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Consider sets of special trees Program Easily combinable NIn NOut NIn n2 n1 n3 n4
NIn NOut MOut NOut NIn n2 m2 m1 n1 n3 m3 m4 n4
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 35
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Writing characters W(a, b, c, d) W(a, b, c, d)In d W(a, b, c, d)Out c W(a, b, c, d)In b a Generates (a, b, c, d)
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 36
Motivation Previous Work Hardness Result
Hardness Result
Testing for equality Eq(Σ) Eq(Σ)In Eq(Σ)Out Eq(Σ)In Eq(Σ)In σ Eq(Σ)In σ Eq(Σ)In σ σ ∀σ ∈ Σ Generates {(s, sR, s, sR) | s ∈ Σ∗}
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 37
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Writing anything A(Σ) A(Σ)In A(Σ)Out A(Σ)In A(Σ)In σ A(Σ)In A(Σ)In A(Σ)In A(Σ)In A(Σ)In σ A(Σ)In A(Σ)In A(Σ)In σ A(Σ)In A(Σ)In σ A(Σ)In ∀σ ∈ Σ Generates Σ∗ × Σ∗ × Σ∗ × Σ∗
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 38
Motivation Previous Work Hardness Result
Programs
Combine programs to detect claws of cliques CNG CLG CLG CLG Detect 4k-clique as 4 claws of cliques
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 39
Motivation Previous Work Hardness Result
Hardness for Tree-Adjoining Grammars
Detecting claws NC := W(#) · A({0, 1, $}) · W($) · Eq({0, 1}) · W($) · A({0, 1, $}) · W(#) Detecting claws of k-cliques (applying NC k2 times) CCIn NCOut CCIn NCOut NCIn NCOut NCOut CCOut NCOut
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 40
Motivation Previous Work Hardness Result
CC is completely symmetric Can simply use it 4 times: C := A(0, 1, #, §, |) · W(|) · CC · W(§) · CC · W(§) · CC · W(§) · CC · W(|) · A(0, 1, #, §, |)
GGk(G) :=
C∈Ck
|CNG(C)§CLG(C)R§CLG(C)§CLG(C)R|
C∈Ck
|CLG(C)§CLG(C)R§CNG(C)§CLG(C)R|
C∈Ck
|CLG(C)§CLG(C)R§CNG(C)§CLG(C)R|
C∈Ck
|CNG(C)§CLG(C)R§CLG(C)§CLG(C)R|
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 41
Conclusions
Current TAG parsers are very likely optimal There is a natural problem with the running time – Θ(n2ω) using matrix multiplication – Θ(n6) not using matrix multiplication
SLIDE 42
SLIDE 43
More Details
More Details for TAG-hardness
Overview of the grammar parsing 6k-cliques
S P(1, 3, 4, 6)In P(1, 3, 4, 6)Out P(1, 2, 5, 6)In P(1, 2, 5, 6)Out P(1, 2, 5, 6)In P(2, 3, 4, 5)In P(2, 3, 4, 5)Out P(2, 3, 4, 5)In P(1, 3, 4, 6)Out P(1, 3, 4, 6)In e r3(C3)| . . . . . . | (C3)l3 r2(C2)| . . . . . . | (C2)l2 r1(C1) | . . . . . . |(C1)l1 . . . | (C4)l4 r4(C4) | . . . . . . |(C5)l5 r5(C5) | . . . . . . | (C6)l5 r6(C6)| . . .
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 44
More Details
More Details for TAG-hardness
Encoding of the graph, the string s
GGk(G) :=
C∈Ck
| CNG(C) § CLG(C)R l1 r1 CLG(C) § CLG(C)R |
C∈Ck
| CNG(C) § CLG(C)R l2 r2 CLG(C) § CLG(C)R |
C∈Ck
| CNG(C) § CLG(C)R l3 r3 CLG(C) § CLG(C)R |
- e
C∈Ck
| CLG(C) § CLG(C)R l4 r4 CNG(C) § CLG(C)R |
C∈Ck
| CLG(C) § CLG(C)R l5 r5 CNG(C) § CLG(C)R |
C∈Ck
| CLG(C) § CLG(C)R l6 r6 CNG(C) § CLG(C)R |
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 45
SLIDE 46
More Details
References I
Christy Doran, Dania Egedi, Beth Ann Hockey, Bangalore Srinivas, and Martin Zaidel, XTAG system: a wide coverage grammar for English, 15th Conference on Computational Linguistics, COLING’94, 1994, pp. 922–928. Jaroslav Nešetˇ ril and Svatopluk Poljak, On the complexity of the subgraph problem, Commentationes Mathematicae Universitatis Carolinae 26 (1985), no. 2, 415–419. Sanguthevar Rajasekaran and Shibu Yooseph, TAL recognition in O(M(N2)) time, JCSS 56 (1998), no. 1, 83–89.
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 47
More Details
References II
Giorgio Satta, Tree-adjoining Grammar Parsing and Boolean Matrix Multiplication, Comput. Linguist. 20 (1994), no. 2, 173–191. Yves Schabes and Aravind K. Joshi, An Earley-type parsing algorithm for tree adjoining grammars, 26th Annual Meeting
- f the Association for Computational Linguistics, ACL
’88, 1988, pp. 258–269.
- K. Vijay-Shankar and Aravind K. Joshi, Some computational
properties of tree adjoining grammars, 23rd Annual Meeting
- f the Association for Computational Linguistics, ACL
’85, 1985, pp. 82–93.
Karl Bringmann and Philip Wellnitz Clique-Based Lower Bounds for Parsing Tree-Adjoining Grammars
SLIDE 48
SLIDE 49