Discontinuous Constituency Parsing with a Stack-Free Transition System and a Dynamic Oracle
Paper · 2019 · Maximin Coavoux and Shay B. Cohen
Summary
A phrase can include words from different parts of a sentence. In the question the authors use to illustrate the problem, what belongs with do, even though other words intervene. A tree that groups the two words records a relationship that a single uninterrupted span would miss. Discontinuous constituency parsing aims to recover trees with these separated pieces. The difficulty for a parser that builds trees a step at a time is getting access to the right pieces when they are ready to join.
Coavoux and Cohen give the parser an unordered set for storing unfinished fragments and a separate focus for the fragment it is currently extending. It reads words from left to right. At each structural step, it can read the next word or join the focus directly to any stored fragment. A separate decision then determines whether the resulting group of words should receive a phrase label. For a sentence of length n, the system completes a derivation in exactly 4n − 2 transitions, whatever the pattern of gaps. This is a guarantee about the number of moves. The work of choosing a move still depends on how many fragments are available to join.
The authors also introduce a dynamic oracle, a training procedure that identifies the best moves even after the parser has made a mistake. A wrong merge can permanently rule out a reference phrase because the system cannot split fragments it has already joined. The oracle checks which reference phrases remain possible and guides the parser toward preserving them. During training, the parser samples its own moves to encounter states that a flawless derivation would never visit.
The authors evaluate the system on the Discontinuous Penn Treebank and the German Tiger and Negra treebanks. On the English development set, dynamic-oracle training raises discontinuous-constituent F1 from 68.2 to 70.9, with gains on both German development sets as well. On the test sets, the parser matches the strongest prior results in some comparisons and falls slightly below them in others. The English test results are 90.9 overall F1 and 67.3 discontinuous F1, compared with 91.0 and 71.3 for the strongest prior system shown. The experiments establish that a parser can dispense with ordered storage and remain competitive, while the development comparisons show where training on its own mistakes helps.
Deep dive: Discontinuous Constituency Parsing with a Stack-Free Transition System and a Dynamic Oracle
A stack-free parser builds phrases whose words can be separated, and a dynamic oracle teaches it which structures it can still recover after an error. · about 36 minutes to read
The problem and its context
When a phrase has a gap
A constituency tree groups words into phrases and assigns categories to those groups. Each node has a yield, the words that descend from it. In a continuous tree, the yield of every node can be specified by its beginning and ending positions. Every word between those positions belongs to the phrase. Discontinuous trees relax that condition. The endpoints still tell the reader how far a phrase extends, but some of the intervening positions can belong elsewhere in the tree. Drawing the tree over the words in sentence order can then produce crossing branches.
The paper illustrates this with the question So what’s a parent to do? In its analysis, what belongs inside a verb phrase with do. A larger verb phrase contains what, to and do. The arc from the interrogative element to the verb phrase expresses part of the analysis of wh-extraction. The position where what is spoken and the phrase in which the annotation groups it need not coincide. The smaller and larger verb phrases have the same endpoints. Their membership differs because the larger phrase includes to and the smaller phrase leaves it in the gap.
That example shows why allowing discontinuous yields affects the output of the parser. If a candidate phrase is represented solely as a beginning and an end, the representation cannot even state the distinction between those verb phrases. And if a parsing procedure can join only adjacent fragments, it needs some way to make separated fragments adjacent or to reach across the pieces between them. The paper addresses these as distinct questions. Its transition system determines which fragments the parser can join. Its action scorer needs features that make the available joins distinguishable.
There is also a grammar-based account of these trees. The authors describe them as derivations of Linear Context-Free Rewriting Systems, or LCFRS, which can express structures beyond those of a context-free grammar. They give the following cost for exact CKY-style parsing in that setting.
O(n³ᶠ)
Here O denotes an asymptotic upper bound, n is sentence length and f is the grammar’s fan-out, which concerns how many pieces a constituent can have. The exponent is 3f. The cost concerns exact chart-style inference under that grammar formalism. It motivates looking at procedures that make a series of smaller decisions and can use approximate search.
How earlier transition systems reached separated fragments
A transition system defines the legal changes a parser can make to a partially constructed tree. A statistical scorer can then guide a greedy search, which takes the best-scoring legal move at each step, or a beam search, which keeps several partial derivations in contention. An ordered stack is a natural place to hold fragments when the next operation typically uses the most recently stored ones. Discontinuous structure creates a case where this access pattern is inconvenient. The desired partner for the current fragment may be buried under several unrelated pieces.
One strategy in the earlier work was to change the order in which the parser handled the words. SWAP-based procedures can transform a discontinuous structure into one that is continuous under a different terminal order. SWAP moves make that order available during the derivation. The paper traces this approach from easy-first parsing to shift–reduce systems and then to a system with shift, promote and adjoin operations. It also notes the value of choosing a training derivation that keeps the number of swaps down. Even when the final tree is fixed, the steps used to reach it can vary substantially in length.
The split-stack strategy kept the linear order accessible through a stack and a double-ended queue. The tops of those structures supplied the pieces available for reduction. A GAP move transferred an item out of the way so that a deeper item became accessible. This gave the parser a way to combine nonadjacent fragments without using a SWAP derivation. Access was still sequential. A suitable fragment further down required more GAP moves before the reduction could occur. The extra actions served to reach a fragment that the parser already held.
A further approach gave the transition system operations with nonlocal arguments. The paper cites a version of SHIFT that selects an item farther into the input buffer. It also places these operations in a tradition of non-projective dependency parsing, where relations can cross when drawn over words in order. Attardi’s work is one of the examples the authors cite for using nonlocal transitions in that setting. Experiments with a Multilanguage Non-Projective Dependency Parser
The stack-free proposal keeps a fixed left-to-right reading order and changes the way the parser stores what it has read. A join specifies a fragment from the pending set directly. It does not go through an action whose meaning is to reach a particular depth in a stack or a particular offset in the buffer. This also changes what the scorer has to learn. One scoring function can compare the current focus with any candidate fragment. Applying that function to a candidate at a new distance uses the same parameters.
Why learning from imperfect states matters
A transition system can admit the right tree while a trained parser still misses it. A greedy choice changes the state from which every later choice will be made. A parser trained only on moves from flawless reference derivations gets no direct supervision for many of the states that follow its own errors. In a bottom-up system that only joins fragments, one early decision can also make parts of the reference tree impossible. At that point, useful supervision must identify which remaining parts are still achievable.
The distinction between static and dynamic oracles comes from earlier work discussed by the authors. A static oracle specifies a conventional route through the states that produce the reference tree. A dynamic oracle evaluates moves from the current state against the reference, even if a previous error has ruled out the full tree. Dynamic oracles were already used in dependency parsing and had been adapted to constituency parsing. Here the authors extend an approach for span-based constituency parsing to a system whose phrases and partial phrases are arbitrary sets of word positions.
The method, step by step
What the parser keeps
The parser starts with the sentence in an input buffer. As it consumes words, it keeps one fragment in focus and stores the other pending fragments in a set. A fragment is identified by its member positions. Using positions makes membership unambiguous when the same word appears more than once. The parser also keeps a record of the labeled constituents it has recognized. The pending fragments tell it what remains available to join. The record of labeled constituents is what it has committed to the analysis.
A configuration has the following form.
c = (S, s_f, i, C)
Here c denotes the configuration, S is the set of pending fragments, s_f is the focus fragment, i is the position of the next word to be read and C is the set of labeled constituents already recorded. Each member of S and the focus s_f is itself a set of positions. The subscript f stands for focus. A labeled constituent has the form below.
(X, s)
Here X is a nonterminal category, such as VP for a verb phrase, and s is the yield, given as a set of word positions. An unlabeled fragment can later receive a category or take part in building a larger fragment. The set C preserves recognized constituents after their yields have been absorbed into larger fragments.
The authors use the least and greatest positions in a yield as its left and right indices. After the first word has been read, the focus always contains the most recently read position.
max(s_f) = i − 1
The function max gives the greatest member of a set. The expression i − 1 is the position immediately before the next unread position i. SHIFT makes this relation true by putting the word just read in focus. COMBINE preserves it because the old focus remains part of the union, and every fragment eligible to join it contains only positions already read. This invariant will matter when the oracle asks whether the last word of a reference phrase has already been passed.
The two decisions in each cycle
Every structural move is followed by a labeling move. The structural decision specifies the current fragment’s membership. The labeling decision declares whether this membership corresponds to a constituent and, if so, which category it has. Separating the decisions means that the parser can choose a merge partner before considering the inventory of labels. It can also assemble a larger phrase through temporary unions that never receive a label.
How the parser builds and labels fragments
The steps in order.
The paper represents the number of moves already made by j. It uses even values for structural decisions and odd values for labeling decisions. Initially there is no focus to save and no word has been read.
(∅, null, 0, ∅) : 0
The tuple follows the order of c. The symbol ∅ denotes an empty set, null indicates that the focus is absent and the first 0 is the first position in the input buffer. The colon separates the configuration from j, which initially has value 0.
A SHIFT takes the next input position as a singleton and makes it the new focus. The previous focus enters storage if there is one.
(S, s_f, i, C) : j ⇒ (S ∪ {s_f}, {i}, i + 1, C) : j + 1
The arrow ⇒ indicates one transition. The union symbol ∪ adds the old focus to S, with the absent focus omitted on the initial move. Braces around i indicate the fragment containing just that position. The expression i + 1 advances the buffer position and j + 1 records the move. The action requires an even j and an unread word, expressed by i < n, where n is the sentence length.
A COMBINE takes a fragment s directly from S and joins it to the focus. The input buffer does not advance.
(S, s_f, i, C) : j ⇒ (S ∖ {s}, s_f ∪ s, i, C) : j + 1
The operation ∖ removes the chosen member s from S. The new focus is the union of s_f and s. The action requires that s belong to S and that j be even. Any eligible s can be selected in one move, even if its positions are separated from those of the focus by the words of several other fragments. Those other fragments stay available for future joins.
A LABEL-X move records the current focus with category X.
(S, s_f, i, C) : j ⇒ (S, s_f, i, C ∪ {(X, s_f)}) : j + 1
The new member of C is the pair consisting of X and the current focus yield. This move requires an odd j. It leaves the focus, storage and buffer positions in place. In particular, assigning a label does not consume the fragment. The parser may still join it to other material, and its label remains in C.
NO-LABEL leaves the fragment available without recording a constituent.
(S, s_f, i, C) : j ⇒ (S, s_f, i, C) : j + 1
Only j changes. The move is available at an odd step while input remains or another fragment is still in storage. Once the buffer is exhausted and all fragments have been joined, the final labeling move must label the result. The terminal state is given by the following rule.
(∅, {0, 1, …, n − 1}, n, C) : 4n − 2
The ellipsis enumerates all positions from 0 through n − 1, which are now in focus together. The buffer index n indicates that the sentence has been consumed and ∅ indicates that no fragments remain pending. The value 4n − 2 is the total number of moves. The completed C holds the constituent analysis.
At a structural decision, the maximum number of candidates is |S| + 1. Vertical bars give the size of the set, and the extra candidate is SHIFT when legal. At a labeling decision the inventory is |N| + 1, where N is the set of nonterminal categories and the extra candidate is NO-LABEL when legal. The paper contrasts this with a structural decision that would have to choose both a merge partner and its label at once, with |S| × |N| + 1 candidates in its comparison. The cross sign denotes multiplication. Separating these scores makes the candidate count depend on the inventory of labels in one decision and on the number of available fragments in the other.
How the example tree is built
In the question from the introduction, what is read and labeled as a wh-noun phrase. Later SHIFT moves put that fragment into storage. The parser handles the subject locally by joining a with parent and recording a noun phrase. It can then join that noun phrase with the fragment for ’s. That larger fragment is left temporarily unlabeled. Meanwhile, the parser can read to and do without forcing either of them to join the closest available fragment.
When do comes into focus, the parser selects the stored fragment for what. The positions between the two words are available in other fragments. The merge leaves those fragments alone and makes what do the focus, which the parser labels as a verb phrase. The next join incorporates to, and the resulting yield gets a verb-phrase label of its own. This is a different node, even though its left and right endpoints match the first verb phrase. The yield has gained an internal member.
The derivation then joins this larger verb phrase with the fragment for ’s a parent. Further joins account for the opening So and the punctuation. The final focus receives the question’s root category. The example distinguishes the order of reading from the order of attachment. The buffer is traversed in sentence order throughout, whereas the next attachment can refer to any eligible fragment read earlier. A discontinuous phrase can be recognized as soon as its last word is available and its component fragments have been prepared.
Why the derivation length is fixed
For n words, there are n SHIFT moves. A SHIFT introduces a fragment, and a COMBINE reduces the number of separate fragments by one. Finishing with one fragment therefore requires n − 1 COMBINE moves. Every structural move has an accompanying labeling decision, including moves whose labeling decision records nothing. The paper gives the resulting count as follows.
T = 4n − 2
Here T denotes the total number of transitions and n is sentence length. The structural portion is 2n − 1 moves, as the paper notes. The position of a merge partner can affect which actions the scorer prefers, but it does not change the length of the route needed to reach that partner.
The bottom-up order gives an intuition for coverage. Once the last word of a constituent has arrived, any of its children that ended earlier can be held in storage. A child ending at the same word can be completed in focus before the parent takes shape. The parser can then join the other children directly. A phrase with several children can take shape through successive unions, with NO-LABEL at the intermediate stages that do not correspond to annotated phrases. This is how the procedure can finish a constituent over separated words without first filling its gaps.
A reference derivation for static training
The finished set of constituents does not always determine a unique sequence of moves. The authors illustrate this with the yield {0, 1, 2}. The parser could start by joining {0} with {1}, then attach {2}. It could first join {1} with {2} and add {0}, or join {0} with {2} before adding {1}. If the intermediate unions carry no labels and the final group receives the same category, these routes can yield the same labeled structure. The ambiguity concerns the derivation used for supervision.
The static oracle picks one route through such alternatives. It performs a compatible COMBINE as early as it can so the pending set stays small. If more than one merge partner is available, it prefers the one with the most recent right endpoint. These choices give a deterministic reference action for each step in the canonical derivation. Choosing a merge early has a direct computational rationale. It reduces the number of fragments that later structural decisions may need to score. The chosen sequence is also a way to train the parser without requiring it to distinguish every equivalent route to a reference tree.
That procedure trains a scorer on decisions made along the selected derivation. A deviation at inference time can produce a configuration absent from the supervised sequence. Even a deviation that leaves the full reference tree reachable can make the original next move inappropriate. A dynamic oracle can give a reference action based on the actual fragments currently present.
Which reference constituents remain possible
The paper defines reachability by asking whether a legal continuation can put a constituent into C. This includes a constituent that is already recorded, because a continuation can have zero moves. The transitions only add to C. More generally, a set of constituents is jointly reachable if a continuation can contain all of them in its final record. The distinction between individual and joint reachability matters for the oracle. Showing that a constituent is possible in isolation would be insufficient if preserving it could force the parser to give up some other achievable part of the reference tree.
For a new reference constituent at an odd step, the oracle checks two properties. The first is that the focus has not moved beyond the constituent’s last word.
max(s_f) ≤ max(s_g)
The set s_g is the yield of the reference constituent being checked, where g indicates the gold or reference analysis. The symbol ≤ means less than or equal to. A shift moves the focus’s right edge forward, and a merge leaves it at the most recently read position. Once the focus has passed the right edge of a phrase, the parser cannot put that phrase into focus and label it.
The other check concerns the parts that the parser has already assembled.
∀s ∈ S ∪ {s_f}, (s ⊆ s_g) or (s ∩ s_g = ∅)
The symbol ∀ means the test applies to every fragment s in the stored set together with the focus. The symbol ∈ means membership, ⊆ means subset and ∩ means intersection. A fragment must lie entirely inside the intended yield or be disjoint from it. A fragment straddling that boundary contains words that would have to be pulled apart. The transition system has no operation to split it.
These checks let the oracle reason from the current partition of the words, without enumerating every possible continuation. A missing word that is still in the buffer can be introduced later. A word already embedded in a fragment is available only together with the rest of that fragment. If the necessary fragments are compatible with the target yield, they can be held or combined as needed once the rightmost word is in focus.
The oracle orders the remaining reference constituents so that it knows which one to protect first.
s ≼ s′ ⇔ max(s) < max(s′) or (max(s) = max(s′) and s ⊆ s′)
Here s and s′ are yields, with the prime distinguishing the second yield. The symbol ≼ means that s comes no later than s′, and ⇔ means that the conditions on the right define that relation. The test < places the yield ending earlier first. For yields ending at the same position, the subset test places a child before its enclosing phrase. Applied to the yields in a tree, this reflects the order in which the system can build them. A parent and child ending at the same word must be completed from the inside outward.
The notation for the next reference target is as follows.
next(c, t*) = argmin_≼ reach(c, t*)
Here t* is the reference tree, expressed as a set of labeled constituents. The asterisk marks the reference. The function reach gives the reference constituents reachable from c, and argmin selects the least constituent under the ordering ≼. In using this rule to guide new construction, the target is the next such constituent still to be built. An already recorded constituent remains in C and requires no further move.
What the oracle chooses
On a labeling step, the oracle checks whether the current focus yield corresponds to a reference constituent.
o_odd(c, t*) = {LABEL-X} if (X, s_f) ∈ t*; {NO-LABEL} otherwise
The function o_odd returns the oracle’s action recommendation on an odd step. The braces enclose the action it recommends. With a matching reference constituent, LABEL-X records the category X. Otherwise the oracle favors leaving the yield unlabeled, subject to the transition system’s requirement to label the completed root. The reasoning is immediate at an ordinary labeling opportunity. Correctly recording the yield adds a true match, and skipping a spurious label avoids adding an error to C.
On a structural step, the key question is whether the next reachable reference target ends at the focus or farther ahead.
o_even(c, t*) = {COMBINE-s | s ∈ S and (s_f ∪ s) ⊆ s_g} if max(s_g) = max(s_f)
The function o_even returns recommended structural moves. The vertical bar in the braces means “such that.” In this case s_g ends where the focus does. A suitable merge with s from storage keeps the combined fragment inside the target. Moving the buffer forward would forfeit the chance to complete the target with its current right edge.
o_even(c, t*) = {COMBINE-s | s ∈ S and (s_f ∪ s) ⊆ s_g} ∪ {SHIFT} if max(s_g) > max(s_f)
The symbol > means greater than. When the target ends later, SHIFT can advance towards that endpoint. Any eligible merge within the target is also allowed by the oracle. The formula can therefore identify several good actions. If the focus lies outside the target, the subset test rules out every merge with it in this set of recommendations, leaving the shift.
In the correctness argument, a permitted merge preserves the next target and also protects other reachable reference constituents. A reference ancestor contains the target and therefore contains the proposed union. A reference phrase disjoint from the target remains disjoint from that union. A reachable proper descendant of the target would have to come earlier in the construction order, so it could not have been passed over when choosing the next target. Likewise, when a shift is allowed, the oracle has found no unbuilt reachable reference phrase that requires it to remain at the current right boundary. These facts explain why the procedure can protect the reachable reference tree, rather than making beneficial decisions about isolated phrases at the expense of one another.
The guarantee is relative to the starting configuration. If an earlier error has already caused a reference phrase to become unreachable, the oracle can guide later actions towards the best recoverable structure. It cannot remove a bad constituent from C or undo a structural merge. Its value for training is that both kinds of error can occur before the next decision, and the remaining correct decisions can still be supervised.
From sentence context to action scores
The scorer needs representations of words and fragments. The authors use a bidirectional LSTM, a recurrent encoder that processes a sequence in both directions. It can assign a word a representation influenced by words on either side. The parser’s moves still consume the buffer in order, but the representations used to choose those moves already incorporate context from the full sentence.
A token representation starts with a learned word embedding and a representation computed from the word’s characters. The latter is produced by a single-layer character-level bidirectional LSTM.
w(xᵢ) = [c(xᵢ) ⊕ e(xᵢ)]
Here xᵢ is the token at position i under the encoder’s indexing, w(xᵢ) is its input vector, c(xᵢ) is the character encoder’s result and e(xᵢ) is its learned word embedding. In this formula c denotes the character encoder, whereas in the transition rules c denotes the parser configuration. The symbol ⊕ denotes concatenation, which places vectors side by side. The encoder formulas count tokens from 1 to n, whereas the transition examples count positions from 0.
The sentence encoder applies successive bidirectional layers.
(h₁⁽¹⁾, …, hₙ⁽¹⁾) = biLSTM₁(w(x₁), …, w(xₙ))
Here biLSTM₁ is the first sentence-level layer. Its output hᵢ⁽¹⁾ is the contextual vector at token i from that layer. The superscript distinguishes which layer produced a vector, and the ellipses stand for the intermediate tokens and their vectors.
(h₁⁽²⁾, …, hₙ⁽²⁾) = biLSTM₂(h₁⁽¹⁾, …, hₙ⁽¹⁾)
Here biLSTM₂ is the second sentence-level layer. Its input at each position is the first layer’s output, and hᵢ⁽²⁾ is its new contextual vector at position i. The action scorer uses the second-layer vectors. The first-layer vectors also support a separate tagging task.
Representing the edges of a gap
A fragment representation begins with the vectors of its first and last words. That alone would give the two verb phrases in the question the same representation. The authors also find the first and last missing positions between those endpoints.
G(s) = {k | min(s) < k < max(s) and k ∉ s}
Here G(s) is the set of missing positions for yield s, k is a word position, min gives the least position in a set and max gives the greatest. The symbol ∉ means that k is absent from s. The strict inequalities < restrict k to the interior of the yield’s endpoints.
The fragment vector uses the outer boundaries of the yield and the outer boundaries of its missing positions.
r(s) = [h⁽²⁾_{min(s)} ⊕ h⁽²⁾_{max(s)} ⊕ h⁽²⁾_{min(G(s))} ⊕ h⁽²⁾_{max(G(s))}]
Here r(s) denotes the representation of s. Each h⁽²⁾ with a position subscript refers to the second sentence layer’s vector at that position, and ⊕ concatenates the selected vectors in the stated order. For a continuous fragment, G(s) is empty. The authors use nil as the boundary index of the empty gap and substitute a learned vector h_nil at both gap positions. This vector starts from a random initialization and is learned with the other parameters.
The paper’s question gives a concrete case. For the VP with yield {1, 6}, the outside positions are 1 and 6 and the gap boundaries are 2 and 5. For the VP with yield {1, 5, 6}, the outside positions are still 1 and 6, but the gap boundaries are 2 and 4. The features can therefore distinguish the two candidates in this sentence. For a yield with one uninterrupted gap, its outside boundaries and its gap boundaries determine membership. When a yield has several separate gaps, the representation can lose distinctions inside the region between the first and last missing positions.
Scoring joins, labels and tags
At a structural step, the scorer builds a vector for each pending fragment paired with the focus. When SHIFT is legal, it builds a further vector using the next unread word as a singleton in place of a stored fragment. These vectors form the columns of an input matrix.
M = [r(s₁) ⊕ r(s_f), …, r(sₖ) ⊕ r(s_f), r({i}) ⊕ r(s_f)]
Here M is the input matrix, s₁ through sₖ are the k fragments in S and r is the fragment vector. The ellipsis denotes the columns for the remaining stored fragments. The last column pairs the focus s_f with the singleton {i}, where i is the next buffer position, when that column is legal. The enumeration is a way to put the candidates into an array. It does not assign stack depths to the fragments.
The structural scoring network assigns a scalar to each column and converts the scores into probabilities.
P(· | c) = Softmax(FF_s(M))
Here P is the distribution over legal structural actions, the dot indicates a place for an action and the vertical bar means that the probabilities are conditional on configuration c. The symbol FF_s denotes the shared feedforward network for structural decisions. It uses two hidden layers with the tanh activation and a single output unit for each candidate evaluated. Softmax normalizes the scalar scores over the available actions.
Every stored fragment can thus be considered at the same step. The score for a particular join uses the focus and its prospective partner. Adding another candidate changes the normalization and introduces another competitor, but the raw score assigned to the original pair depends on that pair. The authors interpret this arrangement as a form of attention, with the focus as the query and the pending fragments and next input word as the options being compared.
For labeling, the network only needs the representation of the current focus.
P(· | s_f) = Softmax(FF_l(r(s_f)))
Here P is the labeling distribution, FF_l is the feedforward network for labeling and s_f is the focus. This network also uses two hidden layers with tanh. It has an output for each category and one for NO-LABEL. The action legality rules still govern whether leaving the focus unlabeled is available.
The authors train the parser jointly with part-of-speech tagging, the task of assigning each word its grammatical tag. The tagger reads the first sentence layer and predicts a tag for each token. The equation for the complete tag sequence is a product of the token-level probabilities.
P(t₁:ₙ | x₁:ₙ) = ∏ᵢ₌₁ⁿ Softmax(W⁽ᵗ⁾hᵢ⁽¹⁾ + b⁽ᵗ⁾)[tᵢ]
Here t₁:ₙ is the tag sequence and x₁:ₙ is the input sentence. The product sign ∏ combines the probability for each position from 1 through n. The matrix W⁽ᵗ⁾ and vector b⁽ᵗ⁾ are learned tagger parameters, with the superscript t marking the tagging task. They transform the first-layer vector hᵢ⁽¹⁾ into tag scores. The brackets [tᵢ] select the probability of the specified tag after softmax.
Training on canonical and sampled actions
The training objective combines losses for parsing and tagging.
L = L_t + L_p
Here L is the combined loss, L_t is the tagging loss and L_p is the parsing loss. In training, the authors alternate stochastic updates for the two tasks. Both tasks update representations shared by the tagger and parser.
L_t = −∑ᵢ₌₁ⁿ log P(tᵢ | x₁:ₙ)
The sum sign ∑ adds the contributions from token positions i = 1 through n. The term P(tᵢ | x₁:ₙ) is the probability of the reference tag tᵢ given the sentence. The minus sign turns the sum of log probabilities into a loss. Assigning a higher probability to a correct tag reduces its contribution.
L_p = −∑ⱼ₌₁⁴ⁿ⁻² log P(aⱼ | a₁:ⱼ₋₁, x₁:ₙ)
Here aⱼ is the reference action at move j for the static-oracle objective. The sequence a₁:ⱼ₋₁ consists of the previous actions, which determine the current configuration together with the sentence. The summation spans the derivation of length 4n − 2. At the first move the action history is empty. As with tagging, higher probabilities for the supervised choices give a lower loss.
Dynamic-oracle training changes where the supervised configurations come from. Before each epoch, each training sentence can be selected for exploration with probability p, set to 0.15. The parser uses its current, non-averaged parameters to run through a selected sentence. At each move, it samples from its action probabilities. Sampling takes it into some states that following the single highest-scoring action would never reach, including states where the reference derivation is no longer available.
The oracle then supplies supervision for each sampled configuration. When several actions are good, the training procedure picks a single target. It favors COMBINE over SHIFT to keep fewer fragments pending. Given a choice of merge partners, it prefers the one with the highest right index, which the authors use to discourage gaps introduced only in intermediate fragments. Accordingly, the move used to visit a training state and the move recommended from that state serve different purposes. Sampling creates experience with the parser’s behavior. The oracle turns each encountered state into a decision with an explicit training target.
Implementation and training settings
The authors implement the parser in Python with PyTorch and release the code as the open-source project discoparset. The word embeddings have dimension 32 and the character embeddings dimension 100. The character encoder has a state size of 50 for each direction, and the sentence-level bidirectional LSTM has size 200 for each direction. The hidden layers of the action scorers have dimension 200. These settings specify the contextual representations and the decision networks used in the experiments.
Training uses averaged stochastic gradient descent and a batch size of 1 sentence. The initial learning rate is 0.01. The paper gives its decay in terms of the update step.
l_t = l₀ / (1 + t · 10⁻⁷)
Here l_t is the learning rate at step t, l₀ is the initial rate and the centered dot denotes multiplication. The authors also use a linear warm-up over the first 1000 steps. Their optimizer adds Gaussian noise to gradients before each update, with mean 0 and the following variance schedule.
0.01 / (1 + t)⁰·⁵⁵
Here t is the update number and 0.55 is the exponent on the denominator, shown in superscript. The authors also clip the gradient norm using 100 as the threshold. They initialize word and character embeddings from a uniform distribution over [−0.1, 0.1] and use Xavier initialization for other parameters, including those of the recurrent encoders.
The tagger input has dropout 0.5 and the parser input has dropout 0.2. The paper describes these masks as separate for each prediction. During training, eligible less frequent words can have their word embedding replaced by the learned unknown-word embedding, with probability 0.3. That embedding is used for unknown words at inference. The character encoder continues to supply a representation based on the token’s spelling.
Experiments and results
The treebanks and the evaluation protocol
The authors test on the Discontinuous Penn Treebank, Tiger and Negra. The first is an English corpus derived from the Penn Treebank. Its conversion takes long-distance relations indicated by indexed traces and recasts them as discontinuous constituents. Tiger and Negra are German corpora whose original phrase-structure annotations already include discontinuities. The comparison thus covers both converted annotation and treebanks in which discontinuous structure is part of the native annotation.
The authors train on sections 2–21 of the Discontinuous Penn Treebank, develop on section 22, and test on section 23. They use the SPMRL split for Tiger and the Dubey and Keller split for Negra. Training runs for 100 epochs. The authors evaluate a checkpoint every 4 epochs on the development set and choose the checkpoint with the best development F-score. All their reported decoding experiments use greedy search. They report roughly a week of GPU training for an individual run.
Evaluation uses the discodop evaluation module with the standard proper.prm parameters, under which punctuation and root symbols are ignored for scoring. The main metric is F1 over all evaluated constituents. A more focused F1 uses only discontinuous constituents. It asks how accurately the parser finds the category and membership of phrases with gaps. Part-of-speech accuracy is reported separately for the auxiliary tagger.
The paper expresses precision as the share of predicted constituents that match a reference constituent.
precision(t̂, t*) = p = |t̂ ∩ t*| / |t̂|
Here t̂ is the predicted set of labeled constituents, t* is the reference set and p denotes precision. The hat marks the prediction. The intersection ∩ contains pairs whose category and yield agree in both sets, and vertical bars count members. In this formula p denotes precision, independently of the training-sentence sampling probability discussed earlier.
Recall takes the same matches as a share of the reference.
recall(t̂, t*) = r = |t̂ ∩ t*| / |t*|
Here r denotes recall. The denominator |t*| counts the reference constituents. For discontinuous recall, the evaluation restricts the comparison to discontinuous constituents.
The F1 calculation combines precision and recall.
F1(t̂, t*) = 2pr / (p + r)
Here F1 is the harmonic mean of p and r, with pr denoting multiplication. Higher scores can come from predicting fewer spurious constituents, correctly recovering more of the reference constituents, or changes in both directions. The authors report precision and recall alongside F1 in their detailed results so those cases can be distinguished.
The main comparison on held-out sentences
The authors compare their dynamic-oracle system with previous transition systems using SWAP and GAP. They also report published comparisons with other approaches, including pseudo-projective chart parsing, grammar-based parsing and conversions based on dependency structures. Their test table groups systems by how they get their part-of-speech information. Some predict the tags or use an external tagger. Others receive the reference tags as inputs, giving them access to annotation that the paper’s parser must predict for itself. The strongest comparison in the first group is with the earlier bidirectional LSTM parser using GAP.
Overall constituent F1 on the Discontinuous Penn Treebank test set
The stack-free parser finishes just below the earlier neural GAP parser.
The numbers
| System or setting | F1 |
|---|---|
| Coavoux et al. neural GAP parser | 91.0 |
| Stack-free parser with dynamic oracle (this paper) | 90.9 |
On the Discontinuous Penn Treebank test set, the stack-free parser’s overall F1 of 90.9 comes with precision of 91.3 and recall of 90.6. Its discontinuous F1 is 67.3, with precision of 73.3 and recall of 62.1. The GAP baseline achieves 71.3 discontinuous F1 under the predicted-or-own-tagging condition. The overall scores are close on this corpus, while the comparison restricted to gaps favors GAP more clearly. The paper’s own tagger reaches 97.6 accuracy on the English test set.
On Tiger, the stack-free parser reaches 82.5 overall F1 on the test set. Its precision is 83.5 and recall is 81.5. The neural GAP parser reports 82.7 overall F1. Both reach 55.9 on discontinuous test F1. Within that subset, the stack-free parser reports precision of 62.4 and recall of 50.6. Its part-of-speech accuracy on the Tiger test set is 98.0.
Negra gives a different pattern. The systems tie at 83.2 overall test F1. The stack-free parser reports precision of 83.8 and recall of 82.6. Its discontinuous precision is 64.9 and discontinuous recall is 49.8. The comparison on discontinuous F1 favors the stack-free parser, which also reports 98.0 test accuracy on part-of-speech tags.
Discontinuous constituent F1 on the Negra test set
The stack-free parser leads the earlier neural GAP parser on gapped constituents.
The numbers
| System or setting | F1 |
|---|---|
| Coavoux et al. neural GAP parser | 54.6 |
| Stack-free parser with dynamic oracle (this paper) | 56.3 |
These results give a specific meaning to the paper’s claim that the system matches the state of the art. The overall F1 scores are competitive on the three tested treebanks. Which system scores higher on discontinuous F1 depends on the corpus. Negra favors the stack-free parser, Tiger gives a tie and the Discontinuous Penn Treebank favors GAP. Overall F1 and the measure restricted to gaps answer different questions, so a close comparison on one can coexist with a clearer separation on the other.
Move counts and empirical workload
The fixed derivation length establishes how many decisions greedy decoding makes. The candidate count establishes how expensive those decisions can be. At a structural step, every member of S has to be scored as a possible partner for the focus. In a configuration reached after shifting almost the whole sentence while leaving its words uncombined, S can have n − 1 singleton fragments. The authors give the following worst-case time bound for the parser.
O(n(|N| + n))
Here O denotes asymptotic order, n is the sentence length and |N| is the number of nonterminal categories. The outer factor reflects a linear number of parsing moves. Inside the parentheses, the label inventory bounds labeling work and the sentence length bounds how many pending fragments can be scored at a structural move. Direct access eliminates the intervening moves needed to reach a remote partner. Scoring all potential partners can still make the overall work quadratic in sentence length.
On the development sets, the authors measure how often that kind of crowded state actually occurs by recording the size of S during derivations. In the German treebanks, more than 99 percent of the configurations contain 7 or fewer items in storage. In the Discontinuous Penn Treebank, 98 percent contain 11 or fewer. These are counts of items in the pending set, excluding the focus, expressed as proportions of configurations. They show that the full set of possible joins was usually small on these runs. They also show a corpus difference in the scale of that set.
The appendix reports parsing throughput on development data alongside figures for previous implementations. On one Intel i7 CPU core, the authors use their own Python parser to perform greedy decoding. The earlier systems in the table vary in implementation language and decoding settings, and the figures come from different hardware. The throughput measurements describe the workloads the authors and earlier papers observed. The derivation-length argument and the distribution of set sizes are the comparisons that directly explain the work imposed by the transition system.
What the ablations show
Dynamic training improves development F1
The paper’s main controlled comparison keeps the set-based parsing system and compares static-oracle training with dynamic-oracle training. On all three development corpora, the dynamic version has higher overall and discontinuous F1. The comparison tests the training procedure that generates exploratory configurations and supervises them with the dynamic oracle. It does not separate every ingredient of that procedure.
Discontinuous constituent F1 under static and dynamic training on the Discontinuous Penn Treebank development set
Training on sampled configurations with dynamic supervision improves recovery of gapped phrases.
The numbers
| System or setting | F1 |
|---|---|
| Static oracle | 68.2 |
| Dynamic oracle (this paper) | 70.9 |
On the Discontinuous Penn Treebank development set, overall F1 goes from 91.1 under static training to 91.4 under dynamic training. Discontinuous precision goes from 75.3 to 76.1 and discontinuous recall goes from 62.3 to 66.4. The improvement on the gap-only metric comes with gains on both sides of the comparison. The tagger reaches 97.2 accuracy under either training procedure. By the reported tagging metric, the parser’s better phrase scores occur without an accompanying improvement in tag accuracy.
On Tiger development data, static and dynamic training yield overall F1 of 87.4 and 87.6, respectively. Their discontinuous F1 values are 61.7 and 62.5. The detailed results show how the latter improvement occurs. Discontinuous precision rises from 64.4 to 68.6 while recall falls from 59.2 to 57.3. In this case the higher F1 reflects a precision gain that outweighs the reduced recovery of reference constituents. Overall recall is 87.0 in both conditions, and tag accuracy goes from 98.3 to 98.4.
On Negra development data, overall F1 is 83.6 with the static oracle and 84.0 with the dynamic one. Discontinuous F1 goes from 51.3 to 54.0. Discontinuous precision rises from 53.3 to 58.1 and recall from 49.5 to 50.5. Overall recall stays at 83.4 while overall precision goes from 83.8 to 84.7. Tag accuracy is 97.9 with static training and 98.0 with dynamic training.
Across these development comparisons, higher precision is the consistent part of the improvement. The amount of reference structure recovered can rise, stay level or fall depending on the corpus and the metric. That is an important distinction for interpreting the oracle. Its guarantee concerns the correct structures available from a configuration when the oracle itself chooses the continuation. The trained scorer can still make errors. Its measured gains need to be read from its output, and those gains do not all take the form of improved recall.
What the other comparisons can explain
The stored-fragment distributions address a practical assumption behind the parser. Early combinations are useful because they leave fewer candidates to check at later structural steps. The small sets observed on development runs support the feasibility of scoring every stored fragment on those corpora. This is a descriptive analysis of configurations produced by the parser, instead of a separate experiment that switches its early-merge preference on and off.
Similarly, the English example explains what the gap features can represent. Using the first and last missing positions gives different inputs to the scorer for verb phrases with identical outside boundaries and different internal membership. That example establishes a representational distinction. The paper does not give a controlled result for removing the gap features, so it does not measure how much of the observed accuracy depends on them.
The comparison with GAP is an external baseline comparison. It shows that the new memory organization can support accurate parsing, but the published systems differ in more than how they store fragments. The comparison between static and dynamic training offers a more direct test within the same system. Even there the intervention includes sampled exploration, oracle supervision and a policy for breaking ties among oracle-approved actions. The reported numbers measure their combined effect on this parser.
Limitations
Limits identified by the authors
The authors give a worst-case complexity bound that grows with the number of fragments awaiting combination. A linear number of transitions can therefore coexist with quadratic scoring work. Their empirical case for efficiency relies on pending sets remaining small in typical configurations on the tested corpora. The observed proportions describe those development runs and leave room for configurations with much larger candidate sets.
The authors also identify the limitation of the gap representation. Using the endpoints of the missing positions works cleanly when the gap is a single uninterrupted interval. A yield with several gaps can have the same outside boundaries and the same outermost missing positions as another yield in the sentence. The transition system distinguishes the yields because it manipulates complete sets. The scorer can see identical inputs for them because it works with selected boundaries. Expressing such a structure and assigning it a discriminating score are separate capabilities.
The experiments use greedy search throughout. The authors state that they did not test beam search, so the results give no beam comparison for the parser. Their runtime appendix also explicitly treats previously published measurements as indicative because the hardware differs. The measurements show that the implementation can run at a practical rate in its reported setting. Establishing relative speed would require runs under shared conditions.
Limits visible in the evaluation
The treebanks cover two languages and differ in how their discontinuous annotations originated. This offers evidence across several conditions, but it does not establish how large the pending set would become in treebanks with other annotation practices or distributions of sentence structures. In addition, the efficiency statistic is taken over configurations. It shows how often the parser encounters a given number of fragments, without identifying which kinds of questions or constructions account for the most demanding cases.
Discontinuous F1 groups gapped constituents together. The paper’s motivating example shows how the parser can build the verb phrases involved in a particular extraction. The aggregate scores cannot show how frequently it handles that specific pattern correctly, or whether the development gains are concentrated in other constructions. A gain in precision can occur through changes in any of the patterns counted by that metric. The paper does not break the gap-only scores down by construction type or by the number of gaps.
The static and dynamic versions are compared directly on the development sets. The paper reports the dynamic version on the held-out test sets alongside external systems. The test numbers consequently establish the performance of the final system under its evaluation conditions. They do not measure the effect of replacing its training procedure with the static oracle on each test set. The paper also gives point estimates for the comparisons, without run-to-run uncertainty. Close differences between systems deserve to be read as reported scores under the respective setups.
Finally, the correctness claim for the oracle concerns the continuation that best preserves the reference constituents from an existing parser state. A bad merge can make an otherwise valid reference structure inaccessible. Exploration exposes the scorer to such states and supplies a target for what to do next. At inference, successful recovery still depends on the learned action scores. Even perfect use of the oracle after an irreversible move could only recover what that move left possible.
What came after
Statistical Parsing of Tree Wrapping Grammars (2020) pursued statistical parsing through a grammar formalism. It connects to the stack-free paper’s question about how to parse structures with gaps, with the emphasis on the grammar used to describe the structures. Coavoux and Cohen locate that problem in the parser’s choice of actions and in the availability of fragments during a derivation. The later paper’s stated subject places the statistical parsing problem within tree wrapping grammars. The citation establishes a connection between the papers, while the later work’s title establishes the grammatical direction it takes.
What does BERT contribute to discontinuous constituency parsing? (2020) pursued a more targeted evaluation of predicted English structures. It presents a test suite for examining discontinuous constituency predictions and asks what BERT contributes. This addresses a question left open by the earlier paper’s gap-only F1. Counting exact matches among all discontinuous constituents measures performance on that subset as a whole. A test suite organized around discontinuous structure makes the predictions themselves the object of closer examination. The later work’s stated focus is the contribution of BERT to those predictions.
Cite
Cite as Maximin Coavoux and Shay B. Cohen. 2019. Discontinuous Constituency Parsing with a Stack-Free Transition System and a Dynamic Oracle. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers).
@inproceedings{coavoux2019discontinuous,
title = {{Discontinuous Constituency Parsing with a Stack-Free Transition System and a Dynamic Oracle}},
author = {Maximin Coavoux and Shay B. Cohen},
booktitle = {Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)},
year = {2019},
doi = {10.18653/v1/n19-1018},
url = {https://doi.org/10.18653/v1/n19-1018}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/coavoux-2019-discontinuous-constituency-parsing-stack-free/