Parsing to Stanford Dependencies: Trade-offs between speed and - - PowerPoint PPT Presentation
Parsing to Stanford Dependencies: Trade-offs between speed and - - PowerPoint PPT Presentation
Parsing to Stanford Dependencies: Trade-offs between speed and accuracy Daniel Cer, Marie-Catherine de Marneffe Daniel Jurafsky, Christopher D. Manning Stanford Dependencies Overview About the Representation Widely used
Stanford Dependencies
Overview
About the Representation Widely used Semantically-oriented Slow to extract Extraction Bottleneck Stanford lexicalized phrase structure parser Are There Faster and Better Approaches? Dependency parsing algorithms Alternate phrase structure parsers
Stanford Dependencies
Organization
Brief Review of Stanford Dependencies Properties Extraction pipeline Experiments Comparing Parsing Approaches Search Space Pruning with Charniak-Johnson Dependency Phrase structure MaltParser Berkeley MSTParser Bikel Charniak
Stanford Dependencies
What We’ll Show
Performing dependency parsing using a phrase structure parser followed by rule based extraction is more accurate and, in some cases, faster then using statistical dependency parsing algorithms.
Stanford Dependencies
What We’ll Show
Performing dependency parsing using a phrase structure parser followed by rule based extraction is more accurate and, in some cases, faster then using statistical dependency parsing algorithms. For English using the Stanford Dependency formalism
Stanford Dependencies
What We’ll Show
Performing dependency parsing using a phrase structure parser followed by rule based extraction is more accurate and, in some cases, faster then using statistical dependency parsing algorithms. For English using the Stanford Dependency formalism However, we suspect the results maybe more general
Stanford Dependencies
Semantically Oriented
Capture relationships between content words Syntactic Dependencies Stanford Dependencies
Stanford Dependencies
Basic Dependencies
Start out by extracting syntactic heads Results in a projective dependency tree
Stanford Dependencies
Basic Dependencies
Start out by extracting syntactic heads Results in a projective dependency tree
Stanford Dependencies
Collapsed Dependencies
Bills on ports and immigration
Stanford Dependencies
Collapsed Dependencies
Bills on ports and immigration
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Sentence Standard Pipeline
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Sentence Constituent Parse Tree Standard Pipeline
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Sentence Constituent Parse Tree Projective Basic Dependencies Standard Pipeline
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Sentence Constituent Parse Tree Projective Basic Dependencies Collapsed Dependencies Standard Pipeline
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Sentence Constituent Parse Tree Projective Basic Dependencies Collapsed Dependencies Standard Pipeline
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Dependency parser Sentence Sentence Constituent Parse Tree Projective Basic Dependencies Collapsed Dependencies Standard Pipeline Direct Pipeline
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Dependency parser Sentence Sentence Constituent Parse Tree Projective Basic Dependencies Projective Basic Dependencies Collapsed Dependencies Standard Pipeline Direct Pipeline
Stanford Dependencies
Obtaining the Dependencies
Phrase Structure Parser Dependency parser Sentence Sentence Constituent Parse Tree Projective Basic Dependencies Projective Basic Dependencies Collapsed Dependencies Collapsed Dependencies Standard Pipeline Direct Pipeline
RESULTS BY PIPELINE TYPE
Experimental
Results by Pipeline Type
Method
Train Penn Treebank Sections 2 through 21 Test Penn Treebank Section 22 Dependency parsers RelEx CMU Link grammar parser in Stanford compatibility mode Malt Parser MSTParser Algorithm Nivre Eager, Nivre, Covington Eisner Classifier LibLinear, LibSVM Factored MIRA
Results by Pipeline Type
Method
Train Penn Treebank Sections 2 through 21 Test Penn Treebank Section 22 Phrase Structure Parsers Charniak Charniak Johnson Reranking Bikel Berkeley Stanford
Results by Pipeline Type
Phrase Structure Parser Accuracy
Best: Charniak Johnson Reranking Parser
82 83 84 85 86 87 88 89 Charniak Johnson Berkeley Bikel Stanford
Labeled Attachment F1
Results by Pipeline Type
Phrase Structure Parser Speed
0.5 1 1.5 2 2.5 3 Berkeley Stanford Charniak Johnson Bikel
Sentences/Second Parse times similar except for Bikel
Results by Pipeline Type
Dependency Parser Accuracy
Labeled Attachment
74 75 76 77 78 79 80 81 Nivre Eager LibSVM MSTParser Eisner Nivre Eager LibLinear
Best: Nivre Eager LibSVM F1
Results by Pipeline Type
Dependency Parser Speed
20 40 60 80 100 120 Nivre Eager LibLinear Nivre Eager LibSVM MSTParser Eisner
Sentences/Second Fastest: Nivre Eager LibLinear
SPEED AND ACCURACY TRADE-OFFS
Comparison of
Speed and Accuracy Trade-Offs
Worst vs. Best Accuracy Worst Phrase Structure Parser vs. Best Dependency Parser
Speed and Accuracy Trade-Offs
Worst vs. Best Accuracy
76 78 80 82 84 86 Bikel Stanford Nivre Eager LibSVM MSTParser Eisner
Labeled Attachment Phrase Structure Dependency Worst phrase structure parser better than Best dependency parser F1
Speed and Accuracy Trade-Offs
Worst vs. Best Accuracy
76 78 80 82 84 86 Bikel Stanford Nivre Eager LibSVM MSTParser Eisner
Labeled Attachment Phrase Structure Dependency Worst phrase structure parser better than Best dependency parser F1
+3
Speed and Accuracy Trade-Offs
Best vs. Best Accuracy Best Phrase Structure Parser vs. Best Dependency Parser
Speed and Accuracy Trade-Offs
Best vs. Best Accuracy
76 78 80 82 84 86 88 90 Charniak Johnson Berkeley Nivre Eager LibSVM MSTParser Eisner
Labeled Attachment Phrase Structure Dependency Eight point difference between Best phrase structure and Best dependency parser F1
+8
Speed and Accuracy Trade-Offs
Worst vs. Best Speed Worst Dependency Parser vs. Best Phrase Structure Parser
Speed and Accuracy Trade-Offs
Worst vs. Best Speed
Sentences/Second Dependency Phrase Structure Worst dependency parser better than Best phrase structure parser
1 2 3 4 5 6 7 8 9 Nivre Eager LibSVM MSTParser Eisner Berkeley Stanford
Speed and Accuracy Trade-Offs
Worst vs. Best Speed
Sentences/Second Dependency Phrase Structure Worst dependency parser better than Best phrase structure parser
1 2 3 4 5 6 7 8 9 Nivre Eager LibSVM MSTParser Eisner Berkeley Stanford
+2
Speed and Accuracy Trade-Offs
Best vs. Best Speed Best Dependency Parser vs. Best Phrase Structure Parser
20 40 60 80 100 120 Nivre Eager LibLinear Nivre Eager LibSVM Berkeley Stanford
Speed and Accuracy Trade-Offs
Best vs. Best Speed
Sentences/Second Dependency Phrase Structure 103 sentences/second difference between Best dependency and Best phrase structure parser
20 40 60 80 100 120 Nivre Eager LibLinear Nivre Eager LibSVM Berkeley Stanford
Speed and Accuracy Trade-Offs
Best vs. Best Speed
Sentences/Second Dependency Phrase Structure 103 sentences/second difference between Best dependency and Best phrase structure parser
+103
Speed and Accuracy Trade-Offs
Out-of-the-Box Summary
Accuracy Use Phrase Structure Parsers Best choice: Charniak Johnson Reranking Speed Use Dependency Parsers Best Choice: Nivre Eager* with LibLinear
* Actually, any parser in the MaltParser package will do.
CHARNIAK JOHNSON SEARCH SPACE PRUNING
Making Use Of
Charniak Johnson Search Space Pruning
Example Search
Best First Search
Best First Search Charniak Johnson Search Space Pruning
Example Search
Best First Search Charniak Johnson Search Space Pruning
Example Search
Best First Search Charniak Johnson Search Space Pruning
Example Search
Best First Search Charniak Johnson Search Space Pruning
Example Search
Best First Search Charniak Johnson Search Space Pruning
Example Search
Best First Search Charniak Johnson Search Space Pruning
Example Search
First Complete Parse! Charniak Johnson Search Space Pruning
Example Search
After the First Complete Parse Count edges expanded so far Then Expand Edge count x Pruning constant more edges
Pruning constant = T parameter /10
Charniak Johnson Search Space Pruning
Example Search
Expand edge count x Constant more edges Charniak Johnson Search Space Pruning
Example Search
Expand edge count x Constant more edges Charniak Johnson Search Space Pruning
Example Search
Expand edge count x Constant more edges Charniak Johnson Search Space Pruning
Example Search
Expand edge count x Constant more edges Charniak Johnson Search Space Pruning
Example Search
Charniak Johnson Search Space Pruning
Pruning Effects on Accuracy
Minimal loss of accuracy for moderate pruning Labeled Attachment
70 75 80 85 90 T210 T50 T10 Default T210
F1
Charniak Johnson Search Space Pruning
Pruning Effects on Accuracy
Minimal loss of accuracy for moderate pruning Labeled Attachment
70 75 80 85 90 T210 T50 T10 Default T210
F1
- 2
2 4 6 8 10 12 14 T10 T50 T210
Charniak Johnson Search Space Pruning
Pruning Effects on Speed
3x speed gains with moderate pruning
Default T210
Sentences/Second
2 4 6 8 10 12 14 T10 T50 T210
Charniak Johnson Search Space Pruning
Pruning Effects on Speed
3x speed gains with moderate pruning
Default T210
Sentences/Second
+5
Speed and Accuracy Trade-Offs
Best vs. Best Accuracy Best Phrase Structure Parser vs. Best Dependency Parser
with Pruning
Pruning Speed and Accuracy Trade-Offs
Best vs. Best Accuracy
76 78 80 82 84 86 88 90 Charniak Johnson Berkeley Nivre Eager LibSVM MSTParser Eisner
Labeled Attachment Phrase Structure Dependency Remember this? Let’s insert Charniak Johnson T50 F1
+8
72 74 76 78 80 82 84 86 88 90
Charniak Johnson Default Berkeley Charniak Johnson T50 Nivre Eager LibSVM MSTParser Eisner
Pruning Speed and Accuracy Trade-Offs
Best vs. Best Accuracy
Labeled Attachment Phrase Structure Dependency About as good as Berkeley
Charniak Johnson T50
F1
- 1
72 74 76 78 80 82 84 86 88 90
Charniak Johnson Default Berkeley Charniak Johnson T50 Nivre Eager LibSVM MSTParser Eisner
Pruning Speed and Accuracy Trade-Offs
Best vs. Best Accuracy
Labeled Attachment Phrase Structure Dependency Much better than best dependency parser
Charniak Johnson T50
F1
+6
Speed and Accuracy Trade-Offs
Best vs. Best Speed Best Dependency Parser vs. Best Phrase Structure Parser
with Pruning
20 40 60 80 100 120 Nivre Eager LibLinear Nivre Eager LibSVM Berkeley Stanford
Speed and Accuracy Trade-Offs
Best vs. Best Speed
Sentences/Second Dependency Phrase Structure Remember this? Let’s insert Charniak Johnson T50
+103
20 40 60 80 100 120 Nivre Eager LibLinear Nivre Eager LibSVM Berkeley Stanford
Speed and Accuracy Trade-Offs
Best vs. Best Speed
Sentences/Second Dependency Phrase Structure Let’s insert Charniak Johnson T50 …Excluding the 100+ sentences/second parser
+103
1 2 3 4 5 6 7 8 9 Nivre Eager LibSVM Charniak Johnson T50 Berkeley Stanford
Speed and Accuracy Trade-Offs
Best vs. Best Speed
Sentences/Second Dependency Phrase Structure Nearly as fast as Nivre Eager using LibSVM
Charniak Johnson T50