NLP-Cube: End-to-End Raw Text Processing With Neural Networks
Paper · 2018 · Tiberiu Boros, Stefan Daniel Dumitrescu and Ruxandra Burtica
Summary
A dependency tree tells you which words in a sentence belong together and what grammatical relationships connect them. To build one from raw text, a system first has to find the sentences, identify the words, and sometimes expand a single written token into several grammatical units. NLP-Cube is an open-source Python system that handles this process and writes the result in CoNLL-U, the annotation format used by Universal Dependencies. The paper describes its entry in the CoNLL 2018 shared task, where the available training material varied widely across treebanks. Most inputs went through NLP-Cube from raw text. In cases with little or no training data, it started from CoNLL-U input supplied by the UDPipe baseline.
The system uses recurrent networks implemented in DyNet. Its sentence splitter and tokenizer share an architecture but are trained separately. Both combine evidence from preceding characters, a short look ahead, units already identified, and the stretch of text that might become the next unit. The tagger and parser draw on pretrained FastText vectors, trainable word vectors, and a representation they build from a word’s characters. The authors found that feeding the parser grammatical tags predicted by a preceding component generally hurt performance. They instead trained the parser to predict tags as an additional task while deriving its input from the words themselves. The standalone tagger still supplies the grammatical labels written to the output.
For lemmatization, which recovers a word’s canonical form, and for expanding tokens into their component words, the authors use a decoder that moves through the input in order. It can copy the current character, advance to the next input position, emit a new character, or stop. During training, an alignment identifies characters that can be copied without rearranging them. The resulting design avoids a separate attention search over input positions at every decoding step. The authors report a 3-5% absolute gain in word-level accuracy against their attention-based counterpart. The lemmatizer also takes grammatical information from the tagger, an exception to the usual preference for inputs derived from the text.
In the official evaluation across all treebanks, NLP-Cube scored 76.16 for identifying dependency heads and 70.82 for identifying heads together with their relation labels. Both scores ranked 10 in the paper’s comparison of 25 entries. On large treebanks, the labeled score was 80.48, at rank 8. Tokenization was especially competitive on that subset, with 99.46% F1 against the leading 99.51%. The official lemma scores were much weaker in the rankings. The authors traced part of the damage to a late-discovered bug in the character features that also affected word expansion. They released NLP-Cube with pretrained components for large treebanks, while the official scores in the paper record the system as submitted.
Deep dive: NLP-Cube: End-to-End Raw Text Processing With Neural Networks
NLP-Cube turns raw multilingual text into grammatical annotations and dependency trees, with separate networks for each stage. · about 37 minutes to read
The problem and its context
From a character stream to grammatical structure
The shared task combines two problems that are easy to separate in an experiment and harder to separate in an application. One is dependency parsing. Given a sentence represented as a sequence of words, a parser identifies the head that each word depends on and names the relation. The other problem is preparing that sequence from the text a user actually has. Participants could concentrate on parsing or address the whole path from raw text. NLP-Cube takes the broader route for most of its inputs.
A raw-text interface changes what a parsing score can tell you. When the input already has the reference word boundaries, the parser needs to decide how those words are connected. When it starts from characters, earlier decisions determine which words the parser has available in the first place. A sentence boundary placed too early may separate words that need to be analyzed together. An omitted word boundary may give the parser a single unit where the reference contains separate words. A system can therefore lose credit for a syntactic relation even if its scoring of relations is otherwise sound.
Tokenization identifies the written units presented to the next stage. The paper also distinguishes a token boundary from the boundaries of the grammatical words represented by that token. In the shared task, a token can stand for a collapsed form that has to be expanded. Locating the token in the string and recovering its constituents are different operations. One assigns boundaries between characters already present in the text. The other generates a sequence of words that can include spelling material absent from the original form. The parser needs the resulting grammatical units as candidates for links.
The output includes more than a tree. A canonical form records the lexical identity of an inflected word. Part-of-speech tagging assigns categories that describe a word’s grammatical role or class. The task distinguishes a universal tag, UPOS, from a language-dependent tag, XPOS. Another field represents morphology, including properties such as number, case, or gender. The details available for a particular corpus depend on its annotations. Putting these fields alongside the dependency information lets the output retain distinctions that a list of unlabeled links would lose.
The shared task uses treebanks, corpora in which sentences have been annotated with grammatical structure. The paper frames the competition around 82 targets and reports results by treebank, with separate entries for some languages. The training situation varies considerably. In some cases, NLP-Cube can learn its processing components from a substantial corpus. At the other end are targets for which the authors have little or no data. A common output format makes the systems comparable under a single evaluation. It still leaves substantial differences in what can be learned from each corpus.
The authors use UDPipe as a starting point for the low-resource exceptions. UDPipe appears in the paper both as the shared-task baseline and as an existing trainable pipeline for linguistic analysis. This matters because the decision to enter the full pipeline does not imply that NLP-Cube discovers every boundary in every official run. Its aggregate performance includes runs in which it receives already structured input. The paper’s account of the CoNLL 2018 shared task makes that distinction part of the experimental setting.
Where the design builds on earlier work
For the parser, the authors identify recurrent feature learning and graph-based scoring as starting points. Their immediate precedents include work on bidirectional LSTM representations for dependency parsing and the Stanford graph-based neural parser from the preceding shared task. Bidirectionality lets a word’s representation incorporate surrounding words on both sides. A graph-based parser then scores possible links between words and uses those scores to assemble a tree. NLP-Cube adopts both ideas and asks how the parser should use grammatical supervision in a pipeline that predicts its own annotations.
A natural way to connect a tagger to a parser is to give the parser the tagger’s labels as input. Tagging can capture information relevant to attachments. A distinction such as noun versus verb, for example, describes something the parser might need to recognize when deciding where a word belongs. The authors’ objection concerns the conditions under which the parser learns to use that distinction. In the setup they discuss, training supplies reference labels. At runtime, the equivalent input comes from a tagger and can be wrong. The parser may learn to rely on features whose accuracy changes when the system moves from training to use.
The paper also points out that the shared-task tagger and parser have access to the same annotated training examples. That observation motivates a different connection between the tasks. The parser can learn about grammatical categories through an additional prediction objective. Its internal representations can serve both tagging and parsing, while the arc scorer continues to receive representations derived from the words. The distinction is between letting grammatical labels supervise learning and requiring a particular predicted label to be correct for a later computation to make sense.
For lemmatization and expansion, the precedent is the sequence-to-sequence encoder and decoder with attention. This approach treats a source string and its target as separate sequences, with a mechanism that lets the decoder choose which encoded positions to consult. The flexibility is attractive when input and output can differ substantially. The authors observe that their examples frequently preserve the order of the characters that survive the transformation. That makes a simpler operation plausible. A decoder can go through the input in order, preserving matched characters and explicitly generating the rest.
These choices respond to different kinds of uncertainty. Boundary detection benefits from seeing both context and plausible word forms. Parsing benefits from grammatical information during training, while at runtime it has to contend with uncertain annotations. String transduction can give up some freedom in how it reads the input if the expected transformations have predictable alignments. NLP-Cube uses a common recurrent toolkit across these problems, with specialized inputs, outputs, and decoding decisions for each.
The method, step by step
What happens to a document
For a raw-text run, the sentence splitter first determines where each sentence ends. The tokenizer then works within those sentence spans. The expansion component identifies the grammatical words represented by collapsed forms. The standalone tagger assigns grammatical labels to the resulting words. The parser attaches those words and labels their relations. Finally, the lemmatizer fills the canonical-form field, using morphological information as well as the spelling of each word. The annotated result is written in CoNLL-U.
The order matters in two ways. The expansion stage needs actual surface tokens to expand, and the parser’s possible attachments depend on the resulting sequence of words. The lemmatizer needs the grammatical analysis assigned to the word. The parser and standalone tagger, by comparison, have independent inputs and outputs at the level of grammatical labels. Their order in the implementation does not turn the tagger’s chosen categories into parser features. The parser can produce its own auxiliary tagging predictions, but those predictions serve a different role in the system.
NLP-Cube’s processing path from raw text
The steps in order.
Representing the word from several sources
A word can be familiar to the system in several ways. It might appear in an external collection of vectors learned before the shared-task training. It might occur often enough in the current training corpus to warrant an embedding of its own. Its characters might also show recognizable patterns, independently of whether that entire spelling has been seen. The authors concatenate these sources of lexical evidence. Concatenation preserves the components as separate parts of the input vector, allowing a later network to learn how much weight to give each source.
The external component starts with 300-dimensional FastText word embeddings. The system maps them into a 100-dimensional space with a linear projection and includes a trainable <UNK> representation for an unknown word. FastText is the source of the external vectors. NLP-Cube also builds a distinct character representation of its own, using a recurrent network applied to the spelling. The paper traces the pretrained-vector component to Enriching Word Vectors with Subword Information.
A second lookup stores whole-word vectors learned from the training set for the task. Words with a training frequency of at least 2 receive their own entries. These vectors have 100 dimensions. A separate <UNK> entry supplies a value when the lookup lacks the requested word at test time. The frequency threshold applies to this trainable vocabulary. Availability in this vocabulary and availability in the external FastText vocabulary are separate questions. A word can lack a task-specific entry and still have useful external or character evidence.
The third component builds an embedding from the characters that make up the word. A bidirectional long short-term memory network, or LSTM, scans the characters in their normal order and in reverse. An LSTM is a recurrent network that maintains a state as it consumes a sequence. The forward scan can use what preceded each character. The backward scan can use what follows it. A two-layer stack lets the top layer build on the sequence representations produced below. The paper gives a size of 200 for the recurrent character network and uses dropout of 0.33 on its recurrent connections.
The final forward output and final backward output summarize the word from opposite directions. A separate attention calculation collects evidence from positions throughout the word. The paper describes a combined character representation of 400 values, with 100 from each terminal direction and 200 from attention, and describes a projection to a 100-dimensional input feature. The motivation for retaining both kinds of information is straightforward. The terminal outputs summarize what the scans have accumulated. The weighted component can emphasize particular internal positions when their evidence is useful to the word representation.
How the character attention works
The paper’s character equations describe a score for each position, a normalization across positions, and a weighted sum. The scoring equation compares information at the current character with terminal information from the whole word.
sᵢ = V · tanh(W₁ · (fₖ,ᵢ ⊕ bₖ,ᵢ) + W₂ · (f*ₖ,ₙ ⊕ b*ₖ,₁))
Here sᵢ is the attention score for character position i. The word has n characters, and k identifies the top recurrent layer. The vectors fₖ,ᵢ and bₖ,ᵢ are the top-layer forward and backward outputs at that position. The star identifies an internal LSTM state, so f*ₖ,ₙ is the terminal forward state at character n, and b*ₖ,₁ is the terminal backward state at the first character. The symbol ⊕ joins vectors by concatenation. W₁ and W₂ are learned transformations for the local and terminal information, + adds the transformed vectors, and tanh applies the hyperbolic tangent. V is the learned projection that yields the score. The dots denote multiplication by the corresponding transformations.
The scores become relative weights over the positions of this word.
αᵢ = exp(sᵢ) / Σⱼ₌₁ⁿ exp(sⱼ)
αᵢ is the weight of character position i. The function exp exponentiates its score sᵢ. The sum Σ in the denominator runs over character positions j from 1 to n, with sⱼ the score at each such position. The slash divides the current position’s exponentiated score by the total for the word. The index j denotes a character here, leaving k available for the recurrent layer. The normalization lets evidence at one position receive more weight than evidence at another position in the same spelling.
The weighted character information is then pooled across the word.
E꜀ = Σᵢ₌₁ⁿ αᵢ · (fₖ,ᵢ ⊕ b*ₖ,ᵢ)
E꜀ is the pooled character vector in the equation. The summation adds contributions from character positions i running from 1 to the word length n. At each position, the scalar weight αᵢ multiplies the concatenated state vectors. The equation writes fₖ,ᵢ as the forward output of layer k and b*ₖ,ᵢ as its backward internal state. The dot denotes scaling by the weight and ⊕ denotes concatenation. The surrounding architecture description also includes the two terminal outputs in the character representation. The sum itself describes the attended contribution and does not display those terminal vectors being appended.
Attention in this part of the system serves to build one feature vector for a word. When the paper later calls the lemmatizer and expander attention-free, it is discussing the way the decoder selects the input position for its next action. These are separate computations. A system can pool character evidence in a word encoder and still use an explicit cursor for a string transformation elsewhere in the pipeline.
When morphology is used as input, the authors represent it with embeddings for UPOS, XPOS, and the morphological bundle, which they call ATTRS. Each embedding has size 100. The vectors are added to form the morphological input. That operation differs from the concatenation used to assemble the lexical input. For lemmatization, the resulting morphology vector is in turn concatenated with the encoder information at the decoder’s current position. It is the same word-level grammatical information as the decoder moves across the spelling.
Finding boundaries with past and future context
A sentence boundary is a decision after a character. A token boundary can be formulated in the same way. This lets NLP-Cube use the same network design for both, with different trained parameters. It first runs the sentence splitter and then applies the tokenizer to the resulting spans. The authors say the settings that worked best for the two problems differed, which is why they did not combine the predictions into a single pass in the submitted pipeline.
The first input to the boundary classifier comes from a forward LSTM that reads the symbols in order. Its state can reflect the characters that led to the current position. If earlier context makes a boundary more plausible, the classifier has a representation through which to use it. The second input comes from a recurrent look-ahead component. This component looks in front of the current character through a window of 5 symbols, presented in reverse order. The paper says that window size came from empirical observation. The classifier thus gets future evidence without waiting for a backward scan of the entire remaining text.
A third component keeps track of previously recognized words using external embeddings. It updates when the system predicts another word. That gives it a different clock from the character networks. The forward character state changes on each character, whereas the word-history state changes at a committed boundary. The architecture can therefore represent both what the recent characters look like and what sequence of words the predictions so far have established. The authors describe this component as a language model network.
The remaining input describes the string currently under consideration as a word. The system takes the characters since the most recently accepted boundary through the current position and checks whether their combination has an external embedding. It uses that embedding when available and the unknown-word embedding otherwise. The vector passes through the same 300-to-100 projection. This is a soft source of evidence. A known candidate can help justify a boundary, and an unknown candidate can still receive one if the character and history evidence supports it.
These last two inputs depend on earlier predictions during processing. A boundary changes where the next candidate starts and can add a word to the history. That is particularly relevant to the authors’ examples of Chinese and Japanese, where spaces outside the token under consideration do not provide a general solution for finding word boundaries. Word history can help assess whether a candidate makes sense in sequence, while the character networks can continue to provide information when the candidate lacks an embedding.
A final softmax layer combines the four representations to predict the boundary label. A softmax makes the scores for the possible labels into a probability distribution. During training, auxiliary classifiers also predict the boundary label from the forward and look-ahead representations separately. The authors want those components to learn evidence that is useful on its own. They also allow whole recurrent outputs to be dropped from the input to the final classifier during training. An auxiliary classifier can still supply a training signal for its own component when the final classifier does not receive that component’s output.
Turning one string into another with a cursor
Lemmatization and compound word expansion have a shared computational shape. The input is a sequence of symbols, and the output is a sequence of symbols. The output of lemmatization is the canonical spelling. The output of expansion represents the constituent words of a collapsed token. Either operation can preserve much of the original spelling, remove source material, or introduce characters. The authors’ design starts with the observation that the preserved characters can frequently be matched in order.
At training time, a dynamic alignment procedure pairs identical characters in the input and target. The pairs are monotonic: as the alignment proceeds through the source, it proceeds through the target without reversing the order of the matches. This identifies places where the decoder can reuse a source character. The training procedure translates the alignment into a sequence of output actions. It aims to make extensive use of copying, advancing past source positions when necessary and emitting literal characters where copying cannot supply the desired output.
A bidirectional LSTM encodes the input. Its output at each position has information from both directions in the word. The unidirectional decoder has an internal cursor that starts at position 1. At each step it receives the encoder output corresponding to that cursor. For expansion, that output is the input supplied to the decoder. For lemmatization, the system appends the morphology representation, so the decoder can use the grammatical analysis while choosing how to transform the spelling.
The decoder can predict a character from the alphabet or one of the special actions <COPY>, <INC>, and <EOS>. A literal character goes into the output without moving the cursor. <COPY> appends the source character at the current position, also without moving the cursor. <INC> advances the cursor without appending anything. <EOS> ends generation. Moving and copying as separate actions gives the system a way to skip input characters, produce inserted material, or copy a character more than once. The authors explicitly note that a copy need not be followed by an advance.
For the Romanian example in the paper, the input is fetelor and the target is the canonical form fată. The alignment marks source-to-target pairs 1-1 and 3-3. The retained characters are f and t. The decoder can copy f, emit a directly, advance twice to reach t, and copy it. It then generates the final vowel and ends. The alignment illustrates the mechanism more clearly than the printed action string illustrates the spelling. The paper’s string writes the final generated character as a, while its target form ends in ă.
Ending generation is distinct from exhausting the source. In the Romanian case, the information needed for the lemma has been produced while characters of the inflected form still remain to the right of the cursor. The decoder can finish immediately. Direct character emission also gives it room to generate material that the alignment cannot account for by copying. The restriction concerns how the model visits the encoded source positions and which matches count as copies. It does not force the output to be a substring or even a subsequence of the input.
The transducer analogy comes from this inventory of actions and their effect on the cursor and output. A learned recurrent decoder chooses those actions using context. In an attention-based counterpart, a decoding step can combine information from positions across the encoded input through a fresh attention calculation. Here the cursor singles out the encoder position supplied to that step. The authors argue that the resulting computation better matches the structure of the word transformations they examined.
The lemmatization setup applies an additional heuristic that leaves numbers and proper nouns unchanged. The authors report results for the proposed transduction approach without a lexicon of known words. In that setting, a familiar spelling does not trigger a dictionary result in place of generation. The unchanged-form heuristic is still part of the conditions under which the authors discuss the method’s accuracy.
Predicting the grammatical fields
A bidirectional LSTM with two layers lets the standalone tagger process the word sequence. Its input consists of the lexical representations described above. For each word, the final representation goes to separate softmax classifiers for UPOS, XPOS, and ATTRS. The three classifiers see representations from the same recurrent stack but each makes a decision over its own label inventory. The tagger uses the same layer sizes across languages.
UPOS and XPOS can both be treated as choices among categories. ATTRS needs a further decision about what counts as a category. The reference annotation can express multiple properties together, such as a value for case and another for number. NLP-Cube takes the full string of properties for a word as one class. Predicting the class selects the bundle together. The authors tried predicting attributes individually and found that their overall accuracy deteriorated, so they retained the bundled prediction.
An auxiliary set of classifiers reads the representation after the first recurrent layer and predicts the same fields as the final classifiers. During training, the earlier layer thus receives a more direct signal about the labels it should help distinguish. The auxiliary classifiers leave the final output interface the same. The standalone tagger can produce the three requested fields without running the dependency parser.
Scoring attachments and assembling a tree
The parser begins with the word-derived features and places them in sentence context using 5 bidirectional LSTM layers. Their sizes in order are 300, 300, 200, 200, 200. After the first two layers, auxiliary classifiers predict UPOS, XPOS, and ATTRS. The error on these predictions contributes to training the parser’s shared recurrent representation. The predicted label identities are not fed back as features that the remaining layers must accept as correct.
After the final recurrent layer, the parser projects 4 specialized representations for each word. These are used to distinguish the roles a word can play in scoring arcs and relation labels. An arc is a candidate link between a dependent word and a head. The arc-scoring mechanism uses biaffine attention. In this context that is a learned way to score a pair of word representations, allowing the score to reflect how information from the head and dependent interacts. The scores define a graph of possible attachments before the parser chooses a tree.
Choosing individually plausible links is only part of the problem. A dependency tree imposes constraints on the selected set of links, such as avoiding cycles. The paper discusses a greedy procedure that considers arcs from highest to lowest scoring and accepts compatible arcs. It also examines a maximum spanning tree procedure that aims to maximize the total score of the chosen tree. The score for the tree comes from the network and can disagree with the evaluation based on reference attachments. The authors use that disagreement to analyze the results of changing the decoder.
After choosing the links, the parser classifies their relation labels using a softmax. This order distinguishes the head decision from the label decision. A word can be attached to the reference head and still receive the wrong relation. The evaluation accordingly reports an unlabeled score for head selection and a labeled score that requires both decisions to agree with the reference.
Training and selecting the components
DyNet builds computation graphs dynamically, which lets the authors accumulate batches of sentences without arranging them in fixed-length buckets or padding them to a common length. NLP-Cube adds complete sentences until the number of tokens in a batch reaches the threshold of 1000. Because a sentence is kept whole, the final addition can put the batch above that threshold. The unit of the threshold is tokens rather than sentences. The paper says this batch size gave better results than the settings the authors started from. The training implementation uses DyNet.
The shared dropout strategy independently removes input representations and rescales the surviving ones. This creates training cases where a component must make a prediction while one source of information is missing. In the tokenizer, the procedure can remove a complete recurrent output from the inputs used by the final classifier. In the character LSTM, the paper separately specifies its dropout on recurrent connections. These choices regularize different portions of the computation and should be read at the level at which the paper describes them.
Where auxiliary classifiers are present, their total loss has weight 0.2. If the network uses two auxiliary loss layers, the paper’s example assigns 0.1 to each. In that scheme, adding a loss layer splits the auxiliary contribution rather than increasing the total weight held by auxiliary supervision. The main and auxiliary objectives let the system learn from labels at different depths while keeping the main prediction task central.
The global stopping rule looks for 20 consecutive training epochs without an improvement on the task’s development-set metric. Each task can have its own hyper-parameters. The authors chose those settings using a few languages initially and reused them for the others. Reuse here applies to the training and architecture choices. The training description still selects task components using their own metrics, and the toolkit exposes most recurrent sizes through task configuration files.
At runtime, the assembled pipeline draws from the saved components. The authors use their best-accuracy variants for sentence splitting, tokenization, compound expansion, and lemmatization. They choose the saved tagger variants by performance on UPOS, XPOS, and ATTRS respectively. For dependency parsing, the pipeline uses the variant selected by UAS, although the authors also save the one selected by LAS. This is a concrete choice about how the official pipeline is assembled. The labeled and unlabeled results therefore belong to the same selected run, with checkpoint selection favoring the head metric.
The Python package can train components on CoNLL-U data. The authors released the code under the NLP-Cube project and supplied pretrained components for large Universal Dependencies treebanks. The release makes the training and runtime organization part of the contribution alongside the competition entry. Its raw-text path and its ability to start from prepared input serve different data conditions.
Experiments and results
What the official evaluation measures
The official results come from the CoNLL 2018 shared-task evaluation on Universal Dependencies treebanks. The paper reports the official scores for individual treebanks, an aggregate over all treebanks, and a separate aggregate for large treebanks. Development data are used for stopping and selecting trained components. The competition scores describe the evaluation runs after those choices. The data also include the cases in which the baseline supplies existing CoNLL-U input. That qualification is important when reading the aggregate as a measure of processing from raw text.
For sentence splitting and tokenization, the paper specifies F1. This metric balances how many predicted units are correct against how many reference units are recovered. The evaluation has separate columns for sentences, surface tokens, and grammatical words. A good token score therefore does not automatically settle whether collapsed tokens were expanded correctly. The lemma, UPOS, XPOS, and morphology columns give separate views of how well the resulting words were annotated. The paper directs readers to the shared task for the detailed definitions of the official scores.
For syntax the paper emphasizes UAS, the unlabeled attachment score, and LAS, the labeled attachment score. UAS asks whether the proposed head is correct. LAS requires both the correct head and the correct relation label. The paper lists CLAS, BLEX, and MLAS for individual treebanks as well. The aggregate ranking tables center on UAS and LAS. This article uses those two scores for the overall comparison and treats the other values as distinct official metrics when discussing individual treebanks.
UDPipe has a specific baseline role in the experiment. It supplies input for the low-resource exceptions. The paper’s main ranking tables, however, compare NLP-Cube with the competition field using the range, mean, median, and rank. They do not identify the system behind every leading score or give a separate named UDPipe line in those aggregate tables. The authors exclude the lowest-scoring submission when summarizing the field, and describe the rank comparison as covering 25 entries. The chart labels below identify the competition statistics instead of assigning them to unnamed systems.
Sentence splitting and tokenization
On the large treebanks, tokenization was one of NLP-Cube’s strongest results. The submitted pipeline achieved 99.46% F1, at rank 2. The leading score was 99.51%, and the median was 99.24. At this level of performance, relative placement partly reflects how closely several systems approach the top of the scale. The result establishes the standing of the completed tokenization stage under the shared-task conditions. It does not tell how often any individual source of tokenizer evidence changed the boundary decision.
Tokenization F1 on large CoNLL 2018 treebanks
NLP-Cube finished close to the leading score and above the competition median.
The numbers
| System or setting | F1 % |
|---|---|
| Competition leader | 99.51 |
| NLP-Cube (this paper) | 99.46 |
| Competition median | 99.24 |
Sentence splitting on the same large-treebank subset scored 86.83% F1 and placed at rank 5. The leading figure was 89.52%, and the competition median was 86.09. The sentence score is based on a different unit from the token score. A sentence can have numerous correctly recognized tokens even if the system chooses the wrong point at which to end the sentence. Reading the two numbers as parallel measurements of the same kind of error would obscure that distinction.
Sentence-splitting F1 on large CoNLL 2018 treebanks
NLP-Cube scored above the competition median while the leader retained a higher sentence-splitting score.
The numbers
| System or setting | F1 % |
|---|---|
| Competition leader | 89.52 |
| NLP-Cube (this paper) | 86.83 |
| Competition median | 86.09 |
In the aggregate over all treebanks, the sentence-splitting score was 82.55, at rank 21, and tokenization scored 97.36, at rank 19. The corresponding competition medians were 83.01 and 97.39. Both NLP-Cube scores lay below those medians and above the respective competition means of 79.35 and 95.90. This is one reason the descriptive statistics need to be read together. A comparison with the mean, a comparison with the median, and a rank summarize different features of the field. The large-treebank rankings tell a substantially different story from the aggregate rankings for these stages.
The Word metric was 96.8 across all treebanks, at rank 21. For large treebanks it was 98.87, at rank 5, with a leading score of 99.21. Word recognition is downstream of tokenization and includes successful expansion. A difference between Tok and Word can flag that identifying written spans is easier for a system than recovering the corresponding grammatical units. The reported aggregate figures do not partition the Word errors into errors caused by the expander and errors inherited from segmentation.
The individual rows show some of the heterogeneity behind the averages. On the en ewt evaluation entry, the token, sentence, and word scores were 99.88, 89.61, and 99.24 respectively. On zh gsd, the corresponding scores were 93.14, 98.80, and 93.14. These rows show that relative strength at sentence splitting and at tokenization can change between treebanks. They also put the aggregate results in context. A single average describes the field comparison on the chosen set of treebanks. It is a much coarser account of what a user would see on a particular corpus.
Grammatical annotation and canonical forms
The standout ranking across all treebanks was for XPOS. NLP-Cube’s 86.46 placed at rank 2, compared with a leading 86.67. The overall UPOS score was 88.5, at rank 10, and the morphology score was 85.08, at rank 7. Those results are for the annotations supplied by the tagger in the assembled system. They should be distinguished from the paper’s internal comparisons with the parser’s auxiliary predictions. The separately reported rankings show where the pipeline stood on each annotation target.
On the large treebanks, NLP-Cube’s UPOS score was 95.02, at rank 10. Its XPOS and morphology scores were 93.71 and 92.68, at ranks 5 and 7 respectively. The size of an aggregate score alone does not determine the rank. The XPOS score is higher on the large-treebank subset, while its competition placement is stronger across the full set. What matters for placement is the score in relation to other systems on that same set of treebanks.
The lemma result is weaker in both rankings. Across all treebanks, NLP-Cube scored 81.21, at rank 20 in the overall table. On large treebanks, 86.85 placed at rank 21. The paper attributes weak lemmatization and expansion in the submitted system to a bug that degraded the character features, as well as to errors accumulated through the pipeline. In the discussion of lemmatization accuracy, the authors associate an average loss of 5% with the bug. The paper does not supply a complete corrected leaderboard from which to establish what rank the repaired system would have attained.
That limitation is important for interpreting the attention-free decoder. The reported 3-5% absolute gain comes from the authors’ comparison of decoder designs at the word level. The official lemma averages come from a full run with faulty character features and downstream consequences from earlier decisions. The two measurements have different comparison conditions. The official score indicates how well the submitted pipeline annotated lemmas. The decoder comparison addresses the effect of replacing one architecture with another within the authors’ experiments.
Dependency attachments
Across all treebanks, NLP-Cube’s UAS was 76.16 and its LAS was 70.82. Each placed at rank 10 in the paper’s comparison. The field’s median values were 74.72 for UAS and 69.11 for LAS. The corresponding maximum values were 80.51 and 75.84. There is thus room between the NLP-Cube results and the leaders even though both attachment scores exceed the middle of the comparison field.
Labeled attachment score across all CoNLL 2018 treebanks
NLP-Cube exceeded the competition median for labeled attachments and finished below the leading score.
The numbers
| System or setting | LAS |
|---|---|
| Competition leader | 75.84 |
| NLP-Cube (this paper) | 70.82 |
| Competition median | 69.11 |
On large treebanks, NLP-Cube obtained 84.55 UAS and 80.48 LAS, with both at rank 8. The leading values on that subset were 87.61 for UAS and 84.37 for LAS. The submitted system performed better on large treebanks in both score and relative placement. This is a comparison between subsets of the shared-task evaluation. It takes account of the pipeline as a whole, including the quality of the word sequence on which the dependency decisions are made.
The per-treebank results give a fuller view of that variation. For en ewt, the paper gives 89.12 UAS and 86.19 LAS. The same row records 81.62 CLAS, 66.38 BLEX, and 71.28 MLAS under the shared task’s additional criteria. For zh gsd, it reports 73.44 UAS and 69.60 LAS. Those figures illustrate why the official results table keeps individual corpora visible. An average across treebanks is suitable for ranking the shared-task entry, while the individual rows describe the result of the pipeline for each combination of data and annotations.
The paper also has separate rows for different Latin treebanks. On la ittb, it reports 89.20 UAS and 86.34 LAS. The la perseus row records 63.46 UAS and 51.92 LAS. For la proiel, the figures are 72.74 UAS and 67.36 LAS. The results are sufficiently different that substituting any one of these rows for a general statement about parsing Latin would lose important context. They are measurements on separate evaluation targets with their own data and annotation conditions.
Taken together, the official tables show a competitive multilingual submission with uneven component results. The large-treebank token score was close to the competition maximum, and the overall ranking for XPOS was especially strong. The attachment rankings were higher on large treebanks, and the lemma ranking was weak even there. The paper’s claim about the usefulness of the release rests in part on packaging a full pipeline, so its contribution and its leaderboard positions describe different aspects of the work.
What the ablations show
Predicting morphology inside the parser
The paper presents targeted comparisons and observations in place of a single table removing every component in turn. Its clearest parser comparison concerns the use of grammatical information. The authors discuss a pipeline that trains on reference morphology and receives predicted morphology at runtime. They observed that parser performance generally deteriorated under that arrangement. Their lexical-input approach lets the parser use word embeddings and character representations at both training and runtime, avoiding a change in the source of its grammatical input between those conditions.
They then add grammatical prediction as a joint task within the parser. The shared representation is trained to predict tags in addition to the arcs and relation labels. The authors report absolute improvements of up to 1.5% in UAS and LAS for their own parser experiments. The wording “up to” matters because the paper does not establish that value as an average improvement on the official set of all treebanks. The comparison supports a narrower claim. Their parser could benefit from morphology as supervision while operating on lexical features, without having to treat the output of the external tagger as its input annotation.
The auxiliary labels also provide a diagnostic way to compare what the parser and tagger learned. The parser’s auxiliary UPOS predictions were slightly more accurate than the standalone tagger’s in the authors’ comparison. Its XPOS and ATTRS predictions were less accurate. The authors consider whether universal part of speech might contribute more to parsing than the other labels. They also point to a reason for caution. Because the parser relies on lexicalized features, tag accuracy alone does not identify which information actually changes an attachment decision. Learning a representation useful for predicting UPOS can go together with better parsing without proving that explicit UPOS categories produce the gain.
The pipeline consequently uses the standalone tagger for all three fields. This was a choice about the interface as well as prediction quality. Combining UPOS from the parser with XPOS and ATTRS from the tagger would make access to a complete tagging result depend on separate components. Someone requesting only tags would have to run the parser to obtain UPOS. The authors judged the small gain in the internal UPOS comparison insufficient to justify that dependency.
What changes when the parser optimizes the tree score
The decoding comparison exposes a different distinction, between the network’s preferred tree and the evaluation’s preferred tree. The authors’ initial greedy procedure sorted possible arcs by score and added them in descending order while avoiding cycles. It typically did not recover the tree with the highest possible total score. For directed graphs, greedily choosing the next strong edge gives no guarantee that the resulting set is optimal.
Replacing that procedure with maximum spanning tree decoding raised the score of the selected trees under the network’s arc scores. Yet UAS and LAS went down. The authors checked that the trees produced by the spanning tree decoder really did score higher, and they tried multiple implementations. The observed direction therefore survived a check of the quantity the decoder was supposed to optimize. The result is a reminder that improving search can make the final metric worse when the objective used in search and the reference-based metric favor different outputs.
The authors’ explanation concerns individual strong arcs. A global decoder can replace a highly scored arc with a group of weaker arcs if the resulting tree has a higher total. In their experiments, keeping strong local decisions was more favorable for the attachment metrics. The experiment demonstrates that behavior for their trained parser. It leaves open how a system trained with the tree decoder in the learning loop would distribute its scores. The authors propose incorporating the decoder during training and identify computational cost as the obstacle to testing that idea.
Changing the string decoder and the tagging target
The transduction comparison examines the authors’ cursor-based sequence decoder against an attention-based counterpart. They report the 3-5% absolute advantage in word-level accuracy and describe the cursor design as requiring less computation. Both the quality claim and the computational argument matter. The operation at each step is simpler because the decoder consumes the encoding at its current position. Accuracy also improves in the authors’ comparison, suggesting that the restriction fits the alignments in their data. The paper gives neither a detailed breakdown of the gain by treebank nor a timing table from which to quantify the cost difference.
For morphological annotation, the comparison changes the target a classifier predicts. Predicting individual attributes lets a system choose values separately. Predicting the complete bundle makes the model choose a joint class learned from the training data. The bundled approach yielded higher overall accuracy in the authors’ tests. One way to interpret the setup is that bundle prediction models the co-occurrence of attributes directly at the level of the label. The paper reports the observed ordering of the approaches. It does not isolate whether the performance difference came from attribute dependencies, the label inventory, or the way the independently predicted properties were assembled and scored.
The boundary network has a smaller reported regularization comparison. Adding auxiliary predictions to the forward and look-ahead networks slightly reduced overfitting. This gives qualitative support to supervising the two representations directly. The official tokenization rank also reflects the use of past characters, look-ahead, previously predicted words, and candidate-word embeddings together. The paper does not report a separate removal experiment for each of those signals. It is therefore possible to describe what each input was designed to contribute while leaving its individual effect on the final F1 unquantified.
Limitations
Limits identified by the authors
The official scores reflect a submission with a late-discovered bug in the lexicalized character features. The authors could not retrain the affected components in time for the shared-task deadline. They point to compound expansion and lemmatization as particularly affected because those stages depend heavily on character information. They also explain that errors in early processing can carry forward into later fields. The official figures consequently give a valid record of the shared-task entry under its submitted conditions, with an acknowledged defect that complicates architectural attribution.
The proposed decoder also depends on the usefulness of monotonic alignments. The authors motivate the design with observed examples and emphasize the restriction in their conclusion. It works naturally when the characters that survive occur in the same order in the source and target. Literal character emission gives the decoder a route to generate missing material. If a transformation would be explained more naturally by rearranging source material, the copying mechanism cannot express that rearrangement by moving its cursor backward. The paper does not identify how common such cases are across its treebanks.
A further author-identified limit concerns the spanning tree experiment. The paper suggests that better integration of tree construction and training may change the result, while acknowledging the training cost of such a test. The experiment evaluates a decoder change applied to a trained parser. Evidence for the proposed training change would require a distinct experiment, since it could alter the arc scores that made the original comparison come out as it did.
The authors also use UDPipe output for cases where their own data are insufficient for the usual raw-text path. This makes the shared-task system usable under those conditions. It limits a claim that the same set of learned NLP-Cube components successfully handles raw input across all targets. The paper’s account of those exceptions should travel with its overall rankings, especially in comparisons focused on low-resource languages.
Limits of what the setup establishes
The aggregate improvement on large treebanks is informative about that subset of the competition. It is more difficult to treat it as an experiment on training-set size. The paper compares different groups of treebanks. It does not hold a treebank fixed, vary the amount of training material, and trace the resulting changes. The large-treebank group can differ in many ways relevant to performance, including the distribution of boundary decisions and the annotations presented to the parser. The scope of the result is the performance of the submitted system on the two reported groups.
The official submission is also a test of connected components. It does not give a stage-by-stage account of how frequently correct reference inputs would eliminate downstream errors. For instance, an incorrect word boundary could make a lemma impossible to match, or an erroneous grammatical prediction could change a lemma even when the word is identified. The paper documents the pipeline order and identifies a faulty feature source. It leaves the share of the final score attributable to particular error pathways open.
For the joint parser, the reported gain is specific to the authors’ implementations and comparisons. A parser could in principle be trained under circumstances closer to its runtime inputs, including ones where the tags during training have the kinds of errors encountered at inference. The paper recognizes that the reference-to-prediction mismatch can be mitigated in different ways. Its evidence establishes how its alternatives behaved in the experiments described. It does not provide a ranking of all possible ways to pass grammatical information between a tagger and parser.
The choice of a full morphological bundle also has a boundary the paper’s experiment does not quantify. A classifier over bundles learns from the combinations available in its training labels. Separate attribute prediction offers a different way to represent combinations. The paper reports lower accuracy for its attempts at separate prediction, but gives no breakdown for rare bundles or bundles absent from training. The reported advantage therefore applies to the authors’ overall comparison, with the question of coverage for sparsely represented combinations still open.
Likewise, the lemmatizer’s unchanged-form heuristic matters to the interpretation of its internal accuracy comparison. Numbers and proper nouns handled by that rule are treated differently from words passed through character generation. The paper reports the use of the heuristic and the absence of a known-word lexicon, but it does not disaggregate scores by the cases resolved by the rule. The experiments support the stated result for the evaluated setup. A comparison of transduction quality on words that always require a learned decision would need its own evidence.
The character network’s equations and architectural description also leave a small ambiguity for someone reproducing it. The text describes a vector that includes the terminal outputs, while the pooling equation displays just a weighted sum. It distinguishes output states from internal states, and the printed state markings differ between the scoring and pooling expressions. The account makes the broad computation clear, but resolving how every displayed quantity maps to the implementation would require checking the released code.
Finally, the authors’ reasons for offering NLP-Cube as a toolkit include possible use in higher-level text processing. The experiments here establish component scores and dependency performance, together with comparisons inside the pipeline. They do not measure how changing any of those scores would affect a later application. The fact that the output is designed to be consumed by other systems gives a reason to study that transfer. The shared-task evaluation itself stops at the annotated document.
What came after
The closest companion to NLP-Cube is the CoNLL 2018 Shared Task report. It covers the competition that supplies the data conditions, evaluation criteria, and comparison field in which the NLP-Cube results make sense. The two papers belong to the same shared-task proceedings. The report supplies the context for comparing complete pipelines and parsing-centered entries under a common evaluation. The system paper accounts for one entry’s architectural choices, from the segmentation networks to the decoder used for dependency trees.
Other citing work moves from a shared multilingual evaluation to the needs of particular languages and collections. Latin BERT addresses contextual representations for classical philology. The point of contact with NLP-Cube is language processing for Latin, a language for which the NLP-Cube paper gives separate evaluation rows. It is possible to connect the two papers at that level of scope. The citation alone does not establish that Latin BERT adopted NLP-Cube’s segmentation, tagging, or parsing components.
Machine Learning for Ancient Languages is a survey, placing the citation in a broader discussion of work on ancient-language material. NLP-Cube’s shared-task evaluation includes ancient-language treebanks, and its individual results show why the treebank is an important unit when judging coverage. The survey’s scope connects to that multilingual evaluation. The citation record does not identify which component of NLP-Cube the survey discusses or establish an additional evaluation of the pipeline.
EstNLTK 1.6 describes a remastered Estonian processing pipeline. This work has the closest overlap in deliverable among the language-specific citations. NLP-Cube organizes sentence segmentation, word analysis, and parsing as components of a pipeline, and it reports an Estonian treebank result. EstNLTK is another pipeline contribution, with Estonian as its focus. The citation records that connection in the literature. It does not specify whether a component was adopted, replaced, or compared experimentally.
The corpus papers cite NLP-Cube from settings where the annotated collection is itself the contribution. RONEC introduces a Romanian corpus for named entity recognition. Collection and Annotation of the Romanian Legal Corpus concerns collecting and annotating Romanian legal text. The former centers on identifying entities and the latter on a domain-specific collection. Both are related to NLP-Cube’s Romanian processing scope, which includes a Romanian treebank evaluation and the lemmatization example. The citation records do not specify which processing stages, if any, were used to produce those resources.
An Annotated Dataset of Discourse Modes in Hindi Stories concerns a layer of annotation at a different scale. NLP-Cube records grammatical properties and relations among words, while the Hindi dataset studies discourse modes in stories. The shared multilingual setting makes this a citation from a language that also appears in the NLP-Cube evaluation. The available record establishes the citation and the dataset’s subject. It does not identify a preprocessing role for NLP-Cube or supply a measurement of how the pipeline affects discourse annotation.
These publications document citations to NLP-Cube from a competition report, language-specific processing and research, a survey, and corpus construction. Their titles identify where the questions overlap. The detailed experimental evidence for the cursor decoder, joint parser training, and graph decoding remains in the NLP-Cube paper itself.
Cite
Cite as Tiberiu Boros, Stefan Daniel Dumitrescu and Ruxandra Burtica. 2018. NLP-Cube: End-to-End Raw Text Processing With Neural Networks. Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies.
@inproceedings{boros2018nlp,
title = {{NLP-Cube: End-to-End Raw Text Processing With Neural Networks}},
author = {Tiberiu Boros, Stefan Daniel Dumitrescu and Ruxandra Burtica},
booktitle = {Proceedings of the CoNLL 2018 Shared Task: Multilingual Parsing from Raw Text to Universal Dependencies},
year = {2018},
doi = {10.18653/v1/k18-2017},
url = {https://doi.org/10.18653/v1/k18-2017}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/boros-2018-nlp-cube-end-end-raw/