Source-linked AI summary

Easy-First Dependency Parsing with Hierarchical Tree LSTMs

Eliyahu Kiperwasser, Yoav Goldberg

arXiv:1603.00375v2cs.CL

TL;DR

Dependency-tree encoders need to accommodate arbitrary branching without losing modifier order. The paper recursively combines recurrent encoders of left and right modifier sequences in a greedy bottom-up parser. It reports competitive English and Chinese parsing accuracies without external embeddings.

  • Problem

    Tree encoders often require binary or fixed-arity branching, while approaches supporting arbitrary branching may ignore modifier order.

    Source: §1 · p. 1
  • Method

    The parser recursively combines recurrent encoders of left and right modifier sequences to represent trees and guide greedy bottom-up dependency parsing.

    Source: §1 · p. 1
  • Results

    92.6 UAS and 90.2 LAS on the PTB (Stanford dependencies), and 86.1 UAS and 84.4 LAS on the Chinese treebank, are reported without external embeddings.

    Source: §1 · p. 1
  • Takeaways & Limitations

    The authors report competitive full-scale parsing using recursive compositional tree representations without a reranking framework.

    Source: §1 · p. 1

    Hyperparameter tuning was limited to a few manual hill-climbing attempts before settings were retained for the remaining experiments.

    Source: §6 · p. 9

Abstract

from arXiv · show

We suggest a compositional vector representation of parse trees that relies on a recursive combination of recurrent-neural network encoders. To demonstrate its effectiveness, we use the representation as the backbone of a greedy, bottom-up dependency parser, achieving state-of-the-art accuracies for English and Chinese, without relying on external word embeddings. The parser's implementation is available for download at the first author's webpage.

1 Introduction

Dependency-tree encoders must handle arbitrary branching without discarding modifier order. The paper recursively combines recurrent encoders for left and right modifiers in a greedy bottom-up parser, reporting competitive English and Chinese parsing accuracies without external embeddings.

  • Recursive neural tree encoders often require binary branching or a fixed arity, while alternatives that allow arbitrary branching may ignore modifier order.Source: §1 · p. 1
  • The proposed tree encoding supports arbitrary branching and recursively composes recurrent encoders of left and right modifier sequences in a greedy, bottom-up dependency parser.Source: §1 · p. 1
  • 92.6 UAS and 90.2 LAS on the PTB (Stanford dependencies), and 86.1 UAS and 84.4 LAS on the Chinese treebank, are reported without external embeddings and with greedy decoding.Source: §1 · p. 1
  • The authors describe this as the first demonstration, to their knowledge, of competitive full-scale parsing using only recursive compositional tree representations and no reranking framework.Source: §1 · p. 1

2 Background and Notation

The section defines dependency trees as labeled head–modifier structures and presents recurrent networks as sequence encoders whose learned states support prediction. LSTMs are used in this work, but the encoding method is not restricted to that architecture.

2.1 Dependency-based Representation

  • A dependency tree is a list of labeled head–modifier edges over sentence words, with one designated root and every other node having a parent.Source: §2.1 · p. 2
  • PTB dependency trees are often shallow but wide: 93% have a node of arity 4 or more, and 56% have one of arity 6 or more.Source: §2.1 · p. 2

2.2 Recurrent Networks and LSTMs

  • An RNN maps an input-vector sequence to state vectors, with each state conditioned on the inputs seen so far; its learned outputs are trained for prediction.Source: §2.2 · p. 2
  • The method uses the LSTM variant, but its encoding and algorithm can transparently switch to another RNN variant.Source: §2.2 · pp. 2–3

3 Tree Representation

The tree representation recursively encodes ordered left and right modifier sequences from the head outward, then combines their recurrent states. Word vectors incorporate sentence context, while head-outward ordering supports incremental construction and gives more emphasis to outermost dependents.

3 Tree Representation

  • For each node, separate RNNs encode its left and right modifiers in head-outward order; their states are concatenated, transformed, and reduced to the node representation.Source: §3 · p. 3

3.1 Representing words

  • Bidirectional LSTM word representations capture word form, POS tag, and sentence context, and are trained jointly with the parsing network.Source: §3.1 · p. 4
  • The main experiments emphasize random word-embedding initialization to assess what the architecture learns from the training corpus alone; pretrained embeddings are also evaluated.Source: §3.1 · p. 4

3.2 A note on the head-outward generation

  • Head-outward order facilitates incremental tree construction and emphasizes outermost dependents, while a head-inward or bidirectional encoding may suit trees specified in advance.Source: §3.2 · p. 5
  • Unlike prior approaches that use fixed modifier windows and treat left and right sequences independently, the model accesses both complete sequences jointly.Source: §3.2 · p. 5

4 Parsing Algorithm

The parser builds projective dependency trees bottom-up by attaching neighboring partial trees, while maintaining their vector representations for action scoring. Its scoring uses encoded subtree context, and the added components preserve the Easy-First parser’s O(n log n) complexity.

4.1 Bottom-up Parsing

  • Neighboring partial trees are attached in one of two directions until a single output tree remains after n −1 steps.The strategy is projective and follows an Easy-First-style bottom-up procedure.Source: §4.1 · p. 5

4.2 Bottom-up Tree-Encoding

  • The parser maintains a vector encoding for every pending tree so the scoring function can condition on the subtrees it may connect.Algorithm 2 maintains these representations alongside the parsing algorithm.Source: §4.2 · p. 6

4.3 Labeled Tree Representation

  • The labeled tree representation concatenates the node vector with an embedding for the relation connecting the subtree to its parent.The label embedding is learned; only the final encoding equation changes.Source: §4.3 · p. 6

4.4 Scoring Function

  • The scoring function assesses head-modifier compatibility, modifier fit with the head’s existing modifiers, and whether the modifier subtree is complete.Neighboring subtree representations provide hints about modifiers that may still be acquired.Source: §4.4 · p. 6
  • The scoring function considers a window of six subtree encodings, using them instead of extensive hand-engineered features.The experiments use k = 2 subtrees on each side of the head-modifier pair.Source: §4.4 · pp. 6–7
  • The action score sums separate unlabeled and labeled attachment scores, with the unlabeled score serving as a fallback when the label is uncertain.Both components are modeled as multilayer perceptrons.Source: §4.4 · p. 7

4.5 Computational Complexity

  • The BI-LSTM encoder, tree-representation updates, and MLP scoring retain the Easy-First parser’s O(n log n) complexity.The added encoding and scoring operations take constant time at each parsing step.Source: §4.5 · p. 7

5 Training Algorithm

Training uses a margin-based hinge loss and exposes the parser to states from erroneous decisions through error exploration and a dynamic oracle. Frequency-based word dropout trains an unknown-word representation while minimizing its impact on sparse words.

5.1 Loss and Parameter Updates

  • A margin-based hinge loss trains the scorer to rank the highest-scoring correct action above incorrect actions at each parsing step.The losses are summed across a sentence, with parameter updates at sentence boundaries because updates invalidate the tree encodings.Source: §5.1 · p. 7
  • Parameters are updated after 50 errors to provide a sufficient number of gradients and reduce gradient instability.The authors use ADAM after finding SGD results unstable.Source: §5.1 · pp. 7–8

5.2 Error-Exploration and Dynamic Oracle Training

  • Error-exploration training follows the highest-scoring action, including incorrect actions, and uses a dynamic oracle to define correct actions in the resulting states.The oracle treats actions as gold when they do not increase erroneous attachments beyond the minimum possible given previous errors.Source: §5.2 · p. 8
  • When a modifier’s score trails a correct action by less than the margin, aggressive exploration chooses the incorrect action with probability paug = 0.1.This cost-augmentation scheme exposes the parser to more errors during training.Source: §5.2 · p. 8

5.3 Out-of-vocabulary items and word-dropout

  • Frequency-based word dropout replaces training words with the unknown-word symbol to learn its representation while minimizing impact on sparse words.The replacement probability is inversely proportional to word frequency.Source: §5.3 · pp. 8–9

6 Implementation Details

The implementation uses PyCNN for network computation and parameter updates, and training runs for 20 iterations. The authors report very limited hyperparameter tuning, using manual hill climbing before fixing settings for the experiments.

6 Implementation Details

  • The Python implementation uses PyCNN for computation graphs, automatic differentiation, and parameter updates, and trains for 20 iterations.Non-projective sentences are skipped during training; sentences are shuffled between iterations.Source: §6 · p. 9
  • Table 1 lists the hyperparameter values used for the reported experiments.The implementation uses the toolkit’s default initialization, step sizes, and regularization values.Source: Table 1 · p. 9, §6 · p. 9
  • The authors made few hyperparameter-tuning attempts, using manual hill climbing until results seemed reasonable and then keeping those settings.They note this did not follow advice emphasizing careful tuning for top neural-parser accuracy.Source: §6 · p. 9

7 Experiments and Results

The parser is evaluated on English and Chinese dependency data against greedy parsing systems, with comparisons to state-of-the-art results. Results show that tree encodings bring accuracy near state of the art, while Chinese results surpass it; error-exploration training also matters.

7 Experiments and Results

  • English evaluation uses Penn Treebank Stanford Dependencies with predicted POS tags, while Chinese uses CTB5 with gold POS tags.Punctuation is excluded from English evaluation.Source: §7 · p. 9
  • The comparison includes a head-word-only baseline, tree-encoding variants, BI-LSTM head encodings, and configurations with external embeddings or without POS tags.The Stack-LSTM parser of Dyer et al. is included as a strong greedy-model comparator.Source: §7 · p. 9
  • Across English and Chinese, adding tree encodings brings results near state-of-the-art accuracy; BI-LSTM head encodings further improve English results, while external embeddings improve both parsers.Without POS tags, accuracy drops slightly for English and substantially for Chinese; the authors report a somewhat smaller drop than Dyer et al.’s model.Source: §7 · p. 10, Table 2 · p. 10, Table 3 · p. 10
  • 0.4–0.8 accuracy points (0.58 average) are lost on unseen sentences without error-exploration training.The authors report this for training without error-exploration or the dynamic aspect of the oracle.Source: §7 · p. 10, Table 4 · p. 10

Comparison to other state-of-the-art parsers

8 Related Work

Prior tree encoders face trade-offs between fixed arity and representing modifier order, while prior parsing approaches use varied combinations of search, local features, and composition. This work uses a bottom-up encoder for arbitrary branching and a greedy parser relying solely on subtree-composition vectors.

8 Related Work

  • Many recursive tree encoders restrict node composition to fixed arity, while binarization can create deep trees and vanishing-gradient problems.Tree-LSTM adds gating to address vanishing gradients; other arbitrary-arity approaches may ignore modifier sequence.Source: §8 · p. 11
  • The proposed encoder handles arbitrary branching by using LSTMs over modifier sequences; a related top-down encoder is less suited to parsing but suited to generation.The authors suggest combining bottom-up and top-down approaches in an encoder-decoder framework.Source: §8 · p. 11
  • Parsing approaches include search-based local-feature models, greedy transition parsers, recursive bottom-up encoders, and parse reranking.Reranking first generates a k-best list using a traditional parser and then scores its trees with recursive vector encodings.Source: §8 · pp. 11–12
  • The proposed parser uses subtree-composition vectors as its sole features, without an external k-best parser or grammar, and parses arbitrary sentences greedily bottom-up.The authors contrast it with prior bottom-up parsers limited to short sentences or reporting low accuracy.Source: §8 · p. 12
  • Compared with Dyer et al.’s greedy transition parser, this parser uses a more elaborate composition function and fully bottom-up parsing without stack-and-buffer control.The authors report similar scores overall and somewhat better results without pre-trained embeddings.Source: §8 · p. 12

9 Conclusions and Future Work

The paper concludes that recursive combinations of recurrent encoders provide a compositional parse-tree representation, demonstrated in a bottom-up easy-first parser. It identifies extensions to parsing and semantic representation tasks as future work.

9 Conclusions and Future Work

  • The paper proposes a compositional parse-tree representation built from recursive combinations of recurrent-neural-network encoders and demonstrates it in a bottom-up easy-first parser.Future parsing extensions include beam search, character embeddings for unknown words, and adaptation to constituency trees.Source: §9 · p. 12
  • The authors plan to test the encoder on sentiment, semantic sentence similarity, and textual inference tasks.These are proposed as further evaluations of its semantic vector representations.Source: §9 · p. 12

Appendix: Training Algorithm Pseudocode

The pseudocode trains on annotated sentences, accumulating local losses before parameter updates. Within a sentence, it considers candidate attachments, distinguishes gold-compatible from incorrect actions, and uses scoring and loss to guide training.

Appendix: Training Algorithm Pseudocode

  • The outer training algorithm takes sentences, tree annotations, and an epoch count, then processes sentence–tree pairs.The pseudocode includes a pointer to the single-sentence dynamic-oracle training algorithm.Source: Appendix: Training Algorithm Pseudocode · pp. 16–17
  • Corpus training iterates over sentence–tree pairs and accumulates each sentence’s loss before calling ADAM to minimize the summed loss.The pseudocode checks whether the loss list exceeds 50 before updating.Source: Appendix: Training Algorithm Pseudocode · p. 16
  • For each sentence, training takes the words, their input vectors, an annotated dependency tree, and a list for loss expressions.The sentence loop continues while more than one item remains in the pending list.Source: Appendix: Training Algorithm Pseudocode · p. 17
  • The sentence procedure enumerates candidate index, direction, and relation actions, then places actions into the gold-compatible or incorrect set.It uses action scores and a margin condition with random augmentation when selecting an action.Source: Appendix: Training Algorithm Pseudocode · p. 17
  • When a modifier attaches, its left and right encodings are combined, transformed with the relation, and appended to the head’s left or right modifier sequence.The pseudocode gives the composition as m.c = m.el ◦ m.er, followed by m.enc = g(W(m.c ◦ rel) + b).Source: Appendix: Training Algorithm Pseudocode · p. 17
Loading 1603.00375v2…