Better Character Language Modeling through Morphology
Paper · 2019 · Terra Blevins and Luke Zettlemoyer
Summary
A system that reads text one character at a time can assign a probability to a word it has never seen in training. It already has the pieces it needs to spell the word. The harder question is whether it can anticipate which spelling belongs in a sentence. A language may have many forms of the same word, and even a large collection of text can provide few examples of particular forms. Terra Blevins and Luke Zettlemoyer ask whether explicit instruction about how words change with grammar can improve a character-level language model.
Their approach adds a task during training. Alongside predicting the next character, the same network learns to predict grammatical properties such as number and tense. The authors take labels originally attached to whole words and assign them to each word’s first character. The network thus practices recognizing the relevant properties while it is still early in the word. The labels serve as answers to a training task. When the system assigns probabilities to new text, it works from the characters it reads. This is a way to teach the network about morphology.
The paper evaluates performance in bits per character, a measure that decreases as the system assigns higher probabilities to the characters that actually occur. Adding the task lowers test bits per character across 24 languages in Universal Dependencies, where the treebank supplies both text and grammatical labels. It also improves results for all seven languages in the Multilingual Wikipedia Corpus when the annotations come from separate treebank sentences. In the English Wikipedia test set, the character-only baseline scores 1.488 bits per character, the previously published hierarchical system with caching scores 1.538, and the system trained with morphology scores 1.256.
The analyses help identify where the improvement comes from and how far it extends. On the treebank development sets, the gain is greater for inflected words in 16 of the 24 languages. The average improvement for inflected words is 31% greater than for words whose spelling matches their dictionary form. Providing more Wikipedia text for Czech and Russian leaves the advantage of grammatical training intact over the sizes tested. The paper also finds that text and grammatical labels from Czech can help predict Slovak text, and that Russian data can help predict Ukrainian text. For each target, the best development score comes from adding both kinds of source-language supervision.
Deep dive: Better Character Language Modeling through Morphology
A study of how learning to predict grammatical features helps character language models assign better probabilities to text across languages. · about 33 minutes to read
The problem and its context
Spelling a word and anticipating its form
A word-level predictor distributes probability among word entries. A character-level predictor distributes it among possible next characters. The latter can give a probability to a previously unseen spelling by working through it one character at a time. This removes the need to reserve an entry for every distinct word in a training collection. It also means the system sees the internal spelling of every word it reads. Similar endings can therefore contribute evidence about more than one word, even if those words would occupy separate entries in a word vocabulary.
That flexibility addresses a problem of representation. The paper is interested in a problem of learning. To expect a particular continuation, a system needs evidence about when it is used. A form may have a regular spelling and still be rare in the collection from which the system learns. A predictor can represent the form as a sequence of familiar characters while assigning a low probability to the sequence in the context where it belongs. Having the pieces to construct a spelling gives the predictor a way to express a generalization. The training task must lead it to discover the generalization.
Take the paper’s example of a short text containing the plural noun cats and the past-tense verb ran. The characters encode the forms, while the labels name two grammatical properties of those forms. The number label describes the noun as plural. The tense label describes the verb as past. A useful prediction can depend both on what is already visible in a word and on what the earlier text leads the reader to expect. By the time the final character in a word appears, much of the spelling decision has already been made.
The paper uses inflection for the grammatical variation at issue. A word form is the particular form that occurs in the text. A lemma is the base or dictionary form associated with it in the annotation. One of the paper’s analyses separates tokens whose observed form differs from their lemma from those whose observed form matches it. This gives the authors a practical way to ask whether a gain averaged over running text is especially visible where the surface spelling changes.
That distinction matters because a corpus is a collection of instances of use. It can contain many words and still give uneven evidence about the forms of each word. The authors motivate the study with earlier research on the relationship between the structure of languages and the difficulty of assigning probabilities to their text. They point in particular to work on how prediction challenges vary among languages and on the relationship between those challenges and linguistic typology, the grouping of languages by structural characteristics. Are All Languages Equally Hard to Language-Model? and On the Relation between Linguistic Typology and (Limitations of) Multilingual Language Modeling
What earlier approaches changed
One line of work asked how much grammatical structure a neural network learns while solving another task. The authors cite investigations of morphology learned during language modeling and studies of what can be recovered from networks trained for machine translation. These studies motivate a distinction between the information made available by the training text and the information the resulting network learns to represent. Blevins and Zettlemoyer change the training objective itself. The question becomes whether requiring the network to predict grammatical labels makes it better at its original job. What Do Neural Machine Translation Models Learn about Morphology?
A second line of work changed how language predictors handle words. The paper discusses character-aware architectures for predicting at the word level and hybrid systems that can handle unfamiliar words through their spellings. A hybrid architecture can exploit recurring whole words while retaining a way to score a rare spelling. That is a response to the problem of an open vocabulary, where future text can contain words absent from training. The authors compare their approach with hybrid systems on the same Wikipedia benchmark under the respective vocabulary settings. Language Modeling for Morphologically Rich Languages
A third approach supplied grammar as an input. In the examples described by the authors, the features came either from labels already attached to the language-modeling corpus or from a separately trained system that added annotations to it. The paper cites uses of this general strategy in dependency parsing and semantic role labeling as well. Those settings make clear what the input feature is supposed to do. It gives the system information about a word when the system has another decision to make about that word or its sentence.
The availability of such labels changes what can be trained on any particular collection. If every training sentence requires grammatical features as part of its input, those features need to be obtained for the sentences the system actually reads. Blevins and Zettlemoyer consider a different allocation of the available data. A large corpus can teach prediction from ordinary text, and an annotated collection can teach prediction of grammar on its own sentences. The connection is the network that learns from both. This makes the treatment of separate data sources part of the central experiment.
The closest precedent the authors identify uses multitask training in the decoder of a translation system, the component that produces the translated sequence. There, an extra grammatical objective accompanies the translation objective. This paper investigates a related training design for character prediction. It has to solve a specific alignment problem along the way. The grammatical annotations describe words, while the network advances through a sentence one character at a time. The position at which a word’s labels are taught determines how much of its spelling the network has already seen.
The method, step by step
Predict the text one character at a time
The starting point is a recurrent network. It reads a character, updates a state that carries information forward from the preceding characters, and predicts the character that follows. The particular recurrent architecture is a long short-term memory network, abbreviated LSTM. Several LSTM layers are stacked so that each step can build on a representation produced by the layer below. To score a piece of text, the network follows the observed sequence and assigns a probability to each successive character given the preceding ones.
The authors then add a second prediction task. In an annotated sentence, the first character of each labeled word is associated with that word’s grammatical properties. The network reads the same kinds of character sequences for this task as it does for the main task. Its state is trained to support predictions of those properties as well as predictions of what character comes next. The two tasks supply different information about how a useful state should behave.
Training and evaluating the character predictor
The steps in order.
The sequence probability in the paper follows the chain rule. Each factor scores one character after the characters to its left.
p(c) = ∏ᵢ₌₁…|c| p(cᵢ | c₁, c₂, …, cᵢ₋₁)
Here c is the full character sequence and |c| is its length. The index i identifies a character’s position, from the first to the last. The notation cᵢ means the character at that position, and c₁, c₂, …, cᵢ₋₁ lists the preceding characters. The ellipsis stands for the intervening positions. The vertical bar in the probability expression means given, and the two vertical bars around c indicate its length. The product sign ∏ means to multiply the factors across the indicated positions. The p on the left denotes the probability of the sequence, while each p on the right denotes a conditional probability for the observed character. At the initial position, the character prefix in the expression is empty.
This factorization makes the prediction problem local in the order of its outputs. At any step the system produces a distribution over possible next characters, then the score for the observed continuation is taken from that distribution. The context can extend further back than the previous character because the recurrent state is carried forward through the sequence. A difficult spelling may incur prediction cost in several places. A familiar continuation can be easy to predict once enough of its prefix has arrived, even when the beginning of that word was surprising.
The next equation describes the operation at a single step.
p(cₜ₊₁ | c≤ₜ) = g(LSTM(wₜ, hₜ₋₁))
The index t is the current step. The notation cₜ₊₁ refers to the next character and c≤ₜ denotes the prefix through the current character, including cₜ. The vertical bar again marks the conditioning context. The symbol wₜ is the learned embedding of cₜ, a vector used to represent that character. The symbol hₜ₋₁ denotes the preceding hidden state, the internal representation passed from the previous step. LSTM is the recurrent computation that uses the embedding and state. The function g is the softmax over the character vocabulary. It turns scores into probabilities that sum to one over that inventory. The expression p refers to the resulting conditional prediction, from which the probability of a particular candidate for cₜ₊₁ can be read.
The authors use character embeddings of 512 dimensions and recurrent hidden states of 1024 dimensions. The treebank systems have two hidden layers, and the Wikipedia systems have three. The layer from which the grammatical features are predicted is itself a setting the authors tune. Attaching the auxiliary predictions at a particular layer asks the representation at that depth to carry information that is useful for them. The next-character prediction still uses the stacked network.
Put the grammatical targets where they can guide training
In Universal Dependencies, the units that carry grammatical labels are words. The authors transform an annotated sentence into a sequence in which each entry pairs a character with whatever labels are assigned at that position. In cats ran, the c carries Number=Pl and the r carries Tense=Past. The other letters and the intervening space have no word labels in the example. Keeping that space in the sequence preserves the text the character predictor reads. The labels create supervision at selected positions within it.
A predictor that reads the c in cats has the preceding sentence context and the opening character. The training target at that point asks its internal state to support a prediction about the word’s number. In the same way, the target paired with the r in ran gives the state a reason to represent tense while it still has letters of the verb to predict. The timing is the authors’ motivation for placing labels at the beginning. Their preliminary comparison favored the first character over the last.
There are two distinct routes by which the tasks are related. The tasks read through characters with shared parameters, and the changes made to those parameters while learning the grammatical task affect the representations used by the text task. The label itself is a target that the grammatical prediction is compared against. On held-out text, the next-character probabilities come from the character input and the learned network.
The auxiliary task uses a separate loss for each annotated feature. Number and tense illustrate the distinction between a feature and its value. Number is a kind of property, and plural is a possible annotation for it. Tense is another property, and past is a possible annotation for that one. Learning with a separate loss for each feature lets the system address both properties without treating the whole feature bundle as a single joint prediction. Any information the tasks share can still be reflected in the representation from which their predictions are made.
Combine the training objectives
The character objective is the negative log-likelihood of the observed sequence. It adds a cost for each observed character. A highly probable continuation contributes a smaller cost than a continuation the network assigned a low probability.
Lₗₘ(c) = NLL(c) = −∑ᵢ₌₁…|c| log p(cᵢ | c<ᵢ)
The quantity Lₗₘ is the language-modeling loss applied to the sequence c. NLL stands for negative log-likelihood. The sign ∑ adds the terms over the positions i, starting at the first and ending at the sequence length |c|. Inside the sum, p is the conditional probability of cᵢ, the observed character at position i. The prefix c<ᵢ consists of the characters before that position, and the bar separates the event being scored from its context. The function log takes the logarithm of each probability, and the minus sign converts the resulting log-likelihood into a cost to minimize.
The joint objective adds the losses for grammatical predictions to this text loss. One weighting parameter controls their contribution.
L(c, m) = Lₗₘ(c) + δ ∑ᵢ₌₁…n Lᵢ(m)
Here L is the combined loss, c is the character sequence for language modeling, and m is the sequence of character positions paired with their morphology labels. A position in m contains a character and the set of labels attached to it, which can be empty in the alignment illustrated by the authors. The term Lₗₘ(c) is the original text objective. The plus sign adds the auxiliary contribution. The symbol δ weights that contribution, and ∑ adds the feature losses Lᵢ over the n annotated feature types in the language. In this expression i indexes features, such as number or tense, rather than positions in a text. Each Lᵢ(m) is the auxiliary loss for its own feature on the labeled data.
The presence of both c and m is important. They can come from the same material, in which case a treebank supplies both character sequences and labels. They can also come from separate datasets. In that case the equation describes the objectives the network is trained to serve over the course of training. The authors alternate batches from the two collections. A batch from Wikipedia supplies examples for character prediction. A batch from the treebank supplies grammatical supervision, with the characters as its input. In the distant setting, the characters in a treebank batch are there to support the grammatical task. The authors reserve language-modeling supervision for the Wikipedia corpus.
This design gives a straightforward comparison in each setting. The baseline uses the character objective. The multitask version learns with the added grammatical objective and the shared recurrent representation. In the treebank setting, the comparison asks what can be gained from labels attached to the text already available. In the distant setting, it asks what can be gained from teaching those labels on a separate collection. The second test is particularly informative about whether annotating the main corpus is necessary for the approach.
Select the network by its text predictions
For evaluation, the paper divides the text prediction cost by the number of characters. Expressing the logarithms in base two gives bits per character, abbreviated BPC.
BPC(c) = −(1 / |c|) ∑ᵢ₌₁…|c| log₂ p(cᵢ | c<ᵢ)
Here BPC(c) is the average cost in bits for a character in sequence c. The count |c| is the length of that sequence and 1 / |c| is the reciprocal used to take the average. The sum sign adds the contributions for positions i across that length. At each position, p gives the probability of the observed character cᵢ given the earlier characters c<ᵢ, with the bar marking the conditional relationship. The function log₂ measures the log probability in bits. The minus sign makes lower assigned probabilities correspond to higher costs. Parentheses group the normalization factor.
This score rewards a predictor for putting probability on the actual continuation. It distinguishes between assigning the observed character a little probability and assigning it a great deal, even in cases where both systems would choose the same most likely character. Because the units are characters, the treatment of the vocabulary matters. A change in the character inventory can change the prediction task. The paper accordingly keeps the vocabulary aligned for its within-setting comparisons and runs a separate evaluation to compare with a system that used another inventory.
The character vocabulary for a treebank run includes characters that occur more than 5 times in that language’s training split. In the main distant-supervision runs, the authors use the vocabulary supplied with the Wikipedia benchmark. They apply it to both the Wikipedia data and the treebank inputs used in the auxiliary task. On the treebank side, this decision affects 11 or fewer character types per language. The two sources thus operate with a common character inventory even when they supply different objectives.
The training setup uses Adam with an initial learning rate of 0.002. The authors clip the gradient norm to 5 to limit the size of updates, apply dropout of 0.5 at each layer, and train on sequences of 150 characters. For the treebank runs, they specify 150 epochs and a batch size of 10. For the Wikipedia runs, they specify 250 epochs and a batch size of 32. The procedure uses early stopping with a patience of 10, so the development score can end training when its improvement stalls.
The authors select the auxiliary loss weight and the attachment layer separately by language. Candidate weights for δ are 0.01, 0.1, 0.5, 1, 1.5, and 2. The paper reports selected layers and weights by setting. In the published configuration list, some distant runs attach the task at layer 3. Development-set BPC governs both hyper-parameter selection and early stopping. The grammatical heads supply training losses, while the selection criterion remains the probability the network assigns to text. The authors implement their networks in PyTorch.
Experiments and results
Wikipedia prediction with a separate annotation source
The first comparison uses the Multilingual Wikipedia Corpus, abbreviated MWC, for character prediction. It covers seven languages: English, Czech, French, German, Russian, Spanish, and Finnish. The training collections differ in size. Czech has 6.1M training characters and Russian has 9.3M, while German has 13.6M and English has 15.6M. The development and test sets are separate from training. For example, the English development set has 1.5M characters and its test set has 1.3M. The Czech development and test sets contain 0.4M and 0.5M characters, respectively.
Universal Dependencies v.2.3 supplies the labels. These come from treebanks, collections of sentences annotated with grammatical information. The Wikipedia and treebank collections can both include material originating in Wikipedia. The authors check that the MWC test sentences have no duplicates in the treebanks for any of the seven benchmark languages. The distant experiment uses annotated treebank sentences for the auxiliary task and Wikipedia sentences for next-character training.
The paper’s LM baseline is its own character predictor trained only on the main task. MTL denotes the multitask version. The previously published comparison is HCLM-cache, a hierarchical language predictor with caching. The baseline isolates the benefit of adding the auxiliary training to the authors’ approach. HCLM-cache provides a benchmark from a different architecture designed for open-vocabulary prediction. The two comparisons answer different questions even though both use the same reported metric.
English test bits per character on the Multilingual Wikipedia Corpus
The character predictor trained with morphology scores lower than both comparison systems.
The numbers
| System or setting | BPC |
|---|---|
| HCLM-cache | 1.538 |
| Character LM | 1.488 |
| Character LM with morphology (this paper) | 1.256 |
The multi-objective training produces the lowest BPC of these systems on every MWC language, on both development and test. In English, the reported test improvement over the character-only baseline is 0.232 BPC. Spanish shows a test improvement of 0.309 BPC, with the character-only system at 1.505 and the multitask system at 1.196. On the Spanish test split, HCLM-cache scores 1.498. Here the character-only system trails the published comparison, while the multitask version achieves the lowest score of the group.
German shows a similar-sized benefit from the extra objective. The MWC test scores are 1.538 BPC for the character baseline and 1.241 for the multitask system, with a reported improvement of 0.297. On French test text the scores are 1.305 and 1.167, and the corresponding improvement is 0.138 BPC. The German and French outcomes therefore support the same direction of effect while showing different sizes of gain.
The remaining languages help give the result its scale. On the Czech MWC test set the baseline scores 1.972 and multitask training reaches 1.900, a reported improvement of 0.072 BPC. Russian test BPC goes from 1.724 to 1.619, with an improvement of 0.105. Finnish has the smallest test gain shown in this comparison. Its baseline is at 1.699 BPC and its multitask system at 1.669, for a reported improvement of 0.030. The contribution of the extra task is therefore consistent in direction across the benchmark and uneven in magnitude.
The improvement also survives a change in the character inventory. The appendix retrains the authors’ systems with the vocabulary used by Mielke and Eisner. Any character with over 25 occurrences in the MWC training set is included in that inventory. In English, the vocabulary supplied with the main benchmark has 307 characters, while this alternative has 167. The new comparison keeps each system within the same inventory for its language. It is an additional comparison on MWC under a different scoring setup, with its own results.
Under that alternative setup, MTL improves on the authors’ character-only baseline across the test languages. On French test text the scores are 1.565 BPC for their baseline and 1.104 for MTL, compared with 1.317 and 1.319 for the two Mielke and Eisner configurations. The pattern against the external comparator varies by language. In German, MTL and the stronger external result tie at 1.414 BPC on test text. In Finnish, MTL scores 1.658, the character-only baseline scores 1.705, and the lower Mielke and Eisner score is 1.652. The evidence for the auxiliary task comes from the repeated within-vocabulary improvement over the character baseline.
Prediction and grammatical supervision from the same treebanks
The fully supervised setting uses the treebank text for the main task and the annotations on that text for the auxiliary task. The authors select 24 languages whose treebanks supply morphology and meet their criterion for a sufficiently large annotated collection. The tables group the languages by fusional, agglutinative, and introflexive typologies. The grouped presentation lets the reader see how the comparison behaves across these categories. The training-set size and the observed frequency of inflected forms are also recorded, since the authors investigate both as possible influences on the result.
The selected treebanks range considerably in size. The Czech training set has 6.9M characters and the Russian set has 5.3M. Slovak training has 0.4M characters, while Ukrainian has 0.5M. Some of the labels originate in manual annotation, sometimes subsequently converted to the treebank format. The appendix identifies the German, English, and French treebanks as automatically annotated. The paper’s setup uses the annotations already available in these treebanks.
The multitask approach improves test BPC relative to the language-modeling baseline for every language in the fully supervised comparison. Czech is an example of a large gain within this setting. Russian also benefits substantially. Its UD test score is 1.993 BPC for LM and 1.824 for MTL, with a reported gain of 0.169 BPC.
Czech test bits per character on Universal Dependencies
The predictor trained with the treebank’s grammatical labels assigns better probabilities to held-out text.
The numbers
| System or setting | BPC |
|---|---|
| Character LM | 2.045 |
| Character LM with morphology (this paper) | 1.832 |
Other languages illustrate how much the effect varies within the shared general setup. In the Finnish UD test set, the baseline scores 1.981 BPC and the multitask system scores 1.921, with a reported gain of 0.060. Polish has a test gain of 0.064, with scores of 2.218 and 2.154. Estonian’s scores are 2.089 and 1.993 on the test set, with a gain of 0.096.
There are also cases where the scores are close. Portuguese test BPC is 1.787 for the baseline and 1.785 with multitasking, a reported improvement of 0.002. For Bulgarian, the test scores are 1.890 and 1.887, a gain of 0.003. In Arabic the test score moves from 1.724 to 1.708, a gain of 0.016. The statement that the intervention helps throughout the table concerns the direction of the reported results. The table gives distinctly different reasons to care about the size of the gain in individual languages.
The authors generally see smaller improvements in the fully supervised comparison than in the distant comparison. Czech and Russian are prominent exceptions. For these languages, the sizes of the Wikipedia and treebank resources are more comparable than they are in some of the other matched cases. The authors suggest that the usually smaller treebank training collections may help explain the overall pattern. Because switching between the two experiments also changes the source and domain of the language-modeling text and the depth of the network, the paper examines data size more directly in its follow-up experiments.
Transferring supervision to a related language
The cross-lingual experiment draws both the main-task and auxiliary-task data from Universal Dependencies. The authors designate Slovak and Ukrainian as the lower-resource targets, using Czech and Russian, respectively, as related sources. The scores are computed on the development set of the target language. This makes each comparison about prediction in the language with less training material, even when a run learns from text or labels in both languages.
In Slovak, the character-only system trained on Slovak scores 2.806 BPC. Giving it Slovak grammar supervision yields 2.779. Keeping the character-prediction task on Slovak while using Czech morphology yields 2.752. With the main task still Slovak-only, combining the two sources of morphological labels yields 2.777. The best setting extends the text task as well as the auxiliary task to both languages.
Slovak Universal Dependencies development bits per character with cross-lingual transfer
Combining Czech and Slovak text and labels gives the lowest target-language score.
The numbers
| System or setting | BPC |
|---|---|
| Slovak text only | 2.806 |
| Slovak text and Slovak labels | 2.779 |
| Slovak text and Czech labels | 2.752 |
| Slovak text and both languages’ labels | 2.777 |
| Both languages’ text without labels | 2.668 |
| Both languages’ text and labels (this paper) | 2.446 |
The Slovak improvement reported for full transfer of both kinds of data is 0.333 BPC relative to the multitask system trained only on Slovak. In Ukrainian, that same comparison is between a target-only multitask score of 2.348 and a joint Russian–Ukrainian score of 2.316 on the Ukrainian development set. The reported gain is 0.032 BPC. These results establish the best configuration for each of the two targets on its development text. The size of the benefit depends on which pair is used and which kinds of data the training arrangement shares.
What the ablations show
The gain is concentrated in inflected words, with exceptions
An overall BPC score pools a diverse set of spelling decisions. To see where the grammatical task helps, the authors take the development text of each Universal Dependencies language and divide its words according to the relationship between the observed spelling and the annotated lemma. A difference between the two puts the word in the inflected group. A match puts it in the uninflected group. They then calculate prediction cost for the groups and compare how much each improves when moving from the character-only system to multitasking.
This is a comparison of improvements within word groups. The group with the larger benefit can be identified by examining how far its score falls between the two training conditions. Its original score answers a different question about how difficult those characters were for the baseline. Czech illustrates this point. In the UD development set, the baseline BPC for inflected words is 2.205 and the MTL BPC is 1.940, with the paper reporting a gain of 0.265. For uninflected words, the scores are 2.539 and 2.322, with a reported gain of 0.217. The inflected group in Czech benefits more even though the uninflected group has the higher baseline BPC.
Russian shows the same direction of improvement by group. The paper reports a gain of 0.210 BPC for inflected words on the Russian UD development set and 0.159 for uninflected words. Its inflected scores are 2.130 for the baseline and 1.920 with multitasking. In Finnish, the corresponding reported improvements are 0.068 and 0.063 BPC. The direction agrees with the authors’ hypothesis in these examples, while the size of the group difference varies.
There are counterexamples. On the German UD development set, the reported gain for inflected words is 0.048 BPC and the gain for uninflected words is 0.060. For Arabic, the reported gains are 0.023 and 0.027, respectively. In Hebrew, the development score for inflected words improves from 3.426 to 3.360 BPC, while the score for its uninflected words rises from 2.168 to 2.211. The Hebrew result shows how an aggregate improvement can coexist with worse predictions in one part of the text.
Across the development sets, inflected words see the greater improvement in 16 of the 24 languages. The authors report a 31% greater average improvement for the inflected group. This supports the idea that morphology contributes to predicting forms whose spelling reflects a change from the lemma. The fact that many uninflected groups also improve is compatible with a shared representation that helps in several contexts. In reading the result, the operative grouping is the difference from the annotated lemma, and the measured effect is a change in probabilities for characters belonging to words in that group.
Inflection frequency and training size answer different questions
The paper also asks whether languages with more inflected words are the languages that benefit most. Here the unit of comparison is the language and its treebank, instead of the word group within a language. The proportion of development words classed as inflected serves as a rough index of morphological complexity. The outcome it is compared against is the improvement from adding morphology in the UD experiment.
The relationship is weak. The paper reports a correlation of r=0.15 between the development-set inflection rate and improvement from multitasking. For example, the Arabic treebank has an inflection rate of 86% and a test improvement of 0.016 BPC. Czech has a development-set rate of 43% and a test improvement of 0.213. English has a rate of 15% and a test improvement of 0.010. These examples give a sense of the spread that underlies the modest overall correlation.
The comparison by word group and the correlation across languages can coexist. Inflected words can benefit more than uninflected ones within a treebank while the overall benefit of multitasking depends on other properties of that treebank. A collection’s proportion of inflected words says how frequently the authors’ operational criterion is met. It gives limited information about the amount of training evidence available for predicting those words or about how consistently any particular grammatical feature is annotated.
The authors compare improvement with the amount of UD training data as well. They report a much stronger positive correlation of r=0.93. In those runs a larger treebank means more character prediction examples and more annotated words. This comparison therefore supports an association between having more training material and obtaining a larger gain from the auxiliary task. It combines changes in text exposure and annotation supply. The follow-up experiments vary those quantities separately for Czech and Russian.
More plain text leaves room for the grammatical task
One plausible account of the main result is that labeled morphology is most valuable when a character predictor has little text. With greater exposure, it might learn enough about recurrent patterns in word forms for the label prediction task to contribute progressively less. The Czech and Russian MWC experiments vary the amount of text used for the main task and compare LM against MTL at each size. Both are evaluated on the MWC development set.
The Czech series starts at 5% of the standard MWC training text, or 0.31M characters. At that size the baseline scores 2.829 BPC and the multitask system scores 2.793, with a gain of 0.036. At 25%, using 1.5M training characters, the gain is 0.076 BPC. At 50%, when the text amounts to 3.1M characters, it is 0.071. The gain persists throughout the series, though the Czech improvements fluctuate as the amount of data grows.
At 100% of standard Czech MWC training, with 6.1M training characters, the development scores are 2.013 for the baseline and 1.938 with morphology. The reported improvement is 0.075 BPC. The MWC-large condition uses 10.2M Czech training characters and gives scores of 1.835 and 1.729, with a reported improvement of 0.106. More text improves the plain character baseline substantially over the series. The extra training objective still improves prediction at the largest size considered.
The Russian series gives a clearer increase in the gain across these settings. At 5%, with 0.47M Russian MWC training characters, the development BPC is 2.492 for the baseline and 2.486 for MTL, an improvement of 0.006. With 100% of the standard training text, or 9.3M characters, the scores are 1.745 and 1.645, with a reported gain of 0.100. On the MWC-large condition using 18.2M training characters, the development scores are 1.554 and 1.377, with a gain of 0.177.
This comparison makes room for two conclusions at once. More raw text improves the character-only predictor, and the best measured score at a given text size still comes from training with morphology. Within the ranges tested for these languages, learning to predict grammar can complement what the system acquires from additional character prediction. The contrast between the Czech fluctuations and the Russian series is a reason to describe the broad pattern across the tested amounts without assuming that each increment in training text will enlarge the gain.
The amount of labeled material matters as well
The complementary experiment varies the amount of treebank annotation while measuring prediction on MWC development text. The 0% condition is the character-only language-modeling baseline. The other conditions send progressively larger portions of the relevant treebank training split to the auxiliary task. This separates the question about more grammatical annotations from the question about more Wikipedia text.
For Czech, the baseline development score is 2.013 BPC. The run with 5% of the annotations, representing 0.34M characters of auxiliary training input, scores 2.040. At 10%, with 0.69M characters, it scores 2.019. These small labeled subsets yield higher prediction costs than the character-only condition. At 25%, with 1.7M characters of auxiliary data, the score is 2.000. The full annotated set gives 1.938 BPC. The direction of the effect in this series depends on how much annotation the auxiliary task receives.
For Russian, the baseline development result is 1.745 BPC. At 5% and 10% of the annotations, the scores are 1.758 and 1.761. At 25%, with 1.3M characters in the selected treebank material, MTL reaches 1.673. The score for 50% is 1.700 and the full set reaches 1.645. Thus 25% and all larger reported subsets improve on the baseline, while the intermediate steps again show that improvements need not be smooth.
Taken together, the data-size tests explain why more training data can have two meanings for this method. A larger collection of ordinary text increases exposure to the spellings and contexts the primary task predicts. A larger annotated collection gives the network more examples from which to learn the auxiliary distinctions. The Wikipedia-text experiments show gains from the auxiliary task at all tested text sizes. The annotation experiments show that the smallest portions of the labeled collections can make the text predictions worse. The two findings concern different controls and help interpret the strong correlation with treebank size.
Which source is transferred makes a difference
The transfer comparison introduces more than one possible source of improvement. Text from a related language can contribute additional examples for character prediction. Grammatical supervision from that language can affect the shared representations directly through the auxiliary objective. The experiment includes configurations that change these sources independently enough to show that they are not interchangeable.
In Slovak, adding Czech labels while keeping Slovak as the sole source of language-modeling text produces lower development BPC than the Slovak-only multitask system. Pooling Czech and Slovak labels with that same target-only text does slightly better than using only Slovak labels but worse than using only Czech labels. When the primary task is trained on both languages, the setting with both sets of labels gives the best score. In that setting the language-modeling-only comparison also uses both languages’ text. The advantage of the combined training therefore extends beyond the effect of pooling plain text in the Slovak experiment.
For Ukrainian, the transfer settings in which the primary task uses Ukrainian text alone show relatively little separation among choices of labels. On the Ukrainian UD development set, the target-only predictor scores 2.369 BPC. Ukrainian labels and Russian labels each give 2.348 when used separately with Ukrainian text. Both sets of labels with that same text give 2.351. The system trained for character prediction on Russian and Ukrainian without grammar supervision scores 2.495, while the run that adds both languages’ labels reaches 2.316. Here the combination yields the best development result, and the plain-text pooling condition itself scores worse than the original character-only predictor.
The comparisons favor a specific description of the outcome. The best run uses both supervision sources in both languages, for each tested pair. Individual components have effects that depend on the target and configuration. It is possible, for instance, for the complete transfer system to improve on the target-only system even when one intermediate transfer condition worsens the score. That is visible in the Ukrainian comparison.
Limitations
Limits identified by the authors
The authors call their inflection rate a rough measure of morphological complexity. It is built from a binary check against an annotated lemma in a particular development collection. It captures how often the observed spellings differ from their lemmas under that check. The correlation analysis consequently speaks directly to this corpus statistic. The authors suggest that differences in the amount of available training data can overwhelm an association between their measure of complexity and how much the grammatical task helps.
The motivation for varying the amount of Wikipedia text is also a caveat raised by the authors. Ordinary training text is easier to obtain than morphology annotations, and sufficient exposure could conceivably teach a character predictor some of the same regularities. The paper puts that possibility to a test by comparing Czech and Russian over a range of text sizes, including MWC-large. The positive result applies across that range. The ranges define the amount of added text over which the paper tests the hypothesis.
Another explicit qualification concerns comparisons with previously published results. The authors identify incompatible MWC character vocabularies and train separate versions for the comparison with Mielke and Eisner. BPC under one vocabulary belongs to the task defined by that inventory. For instance, the English test BPC in the principal comparison belongs with the benchmark-supplied vocabulary, while the English numbers in the appendix comparison belong with the alternative inventory. A valid comparison of predictors needs to account for that distinction.
The transfer experiments are presented for closely related language pairs. The authors tie their design to the availability of more text and labels in Czech and Russian than in the respective target treebanks. Their finding describes what can be gained by sharing supervision under those pairings. Their own conclusion about transfer is scoped to closely related languages.
Limits of what the design measures
The overall experiments measure better probability assignment to held-out characters. The paper uses that as evidence that the grammatical task helps the network learn useful information about word structure. Establishing what that information is in each layer would require a distinct measurement. Development BPC is the selection criterion, and the main results report that quantity or its test-set counterpart. The paper therefore gives stronger evidence about the effect on text prediction than about the accuracy of the auxiliary predictions or the representation of particular grammatical distinctions.
The word-group comparison sharpens the evidence without isolating the reason for every improvement. Characters in inflected and uninflected words are encountered in context, and the groups are defined from complete observed forms. An improvement for a group can reflect better expectations about which words will occur, better guesses about their initial characters, better anticipation of endings, or a mixture of these. Group-level BPC shows where prediction cost changes in the observed text. It gives no position-by-position attribution of the gains to particular letters or parts of words.
The lemma test has an additional interpretive limit. A spelling that matches a lemma can still occur in a grammatical context involving properties such as number or tense. Conversely, all observed differences from the lemma are put into a single category for this analysis. The split is useful because it can be applied consistently to the word-form and lemma fields the treebanks supply. Its scope is the analysis of surface forms under that operational definition.
The data selection also shapes the breadth of the claim. The 24 languages in the fully supervised comparison had to have suitable annotated treebanks. The distant-supervision result covers the seven Wikipedia benchmark languages with usable treebank supervision. The paper tests transfer on Slovak and Ukrainian because those targets have relatively small training sets alongside the larger Czech and Russian sources. These settings provide evidence across several languages and annotation collections. Each result depends on the availability of material that meets the corresponding training design.
Several comparisons reflect variation in the data along more than one dimension. The UD and MWC settings differ in corpus source, sizes, character vocabulary construction, and recurrent depth. The stronger gain in a particular setting may depend on several of those differences. In the correlation across UD languages, text and label volume rise together. The Czech and Russian subset experiments provide more direct evidence about the two kinds of training material. Extending that explanation to all languages in the study remains an inference from the combined pattern.
The first-character comparison is described as preliminary. The paper gives its direction and explains why early supervision could help when the system proceeds through the rest of the word. The detailed results support the first-character method as a whole. The report supplies no comparable breakdown of the size of the placement effect by language or by grammatical feature. Similarly, the paper’s explanation that different features are predicted independently describes the chosen objective. The reported experiments give no comparison with a joint predictor of feature bundles.
There is also a discrepancy in how the appendix describes the layer search. The training prose describes considering the first and second hidden layers, whereas the configuration table records some distant runs at layer 3, consistent with the paper’s description of a three-layer Wikipedia network. The selected configurations can be read from the table. The precise search procedure that produced those entries is less clear from the prose.
Finally, the tables give point estimates of BPC. The consistent direction in the main comparisons is evidence about the reported runs. Very small differences, such as the Portuguese treebank test gain of 0.002 BPC, come without an accompanying estimate of run-to-run uncertainty. The transfer findings are development-set results, and their evidentiary scope is the pairings, architecture, and data configurations evaluated. This places a natural limit on extrapolating either the amount of gain or the value of pooling data in a new setting.
What came after
The later citations place the paper alongside work on tokenization-free encoders, morphological resources, and vocabulary design. Each connects to a different experimental choice made by Blevins and Zettlemoyer. The links establish that the works cite the study. Their titles identify the direction of that work. The specific role of the citation in each later method remains unspecified.
Canine pursues efficient pretraining for an encoder that works without tokenization. Its stated aim is language representation. The connection is the unit from which a system builds those representations. Blevins and Zettlemoyer show how to add word-level grammatical targets to a network that starts with characters. In Canine, the title makes the design of the tokenization-free encoder itself the focus. The citation connects character-level prediction with a later line of work on learning representations without relying on fixed word units at input. Whether Canine uses the first-character supervision rule is unspecified. Canine: Pre-training an Efficient Tokenization-Free Encoder for Language Representation
UniMorph 3.0 provides a later connection through the description of morphology across languages. In the earlier experiment, Universal Dependencies supplies the word-level features, and the authors translate that source of supervision into prediction targets for a character network. The title of UniMorph 3.0 places the cross-language representation of morphology at the center. This matters to the relationship between the papers because the auxiliary task depends on the existence of grammatical distinctions that can be represented as labels. In the transfer experiments in particular, the training design has to make use of annotated information from more than one language. The later citation links that application to work on universal morphology. Its role in the design of the UniMorph resource is unspecified. UniMorph 3.0: Universal Morphology
Vocab Diet approaches the choice of units through a different intervention. Its title describes reshaping the vocabulary of large language models through vector arithmetic. Blevins and Zettlemoyer keep a character inventory and use grammatical labels to change what the network learns during training. Vocabulary reshaping, as named in the later work, makes the inventory itself an object of change. The common question is how the units a language system works with relate to the structure found within words. The citation connects the study’s character-based approach to later work on changing an existing vocabulary. The details of any methodological borrowing remain unspecified. Vocab Diet: Reshaping the Vocabulary of LLMs via Vector Arithmetic
Cite
Cite as Terra Blevins and Luke Zettlemoyer. 2019. Better Character Language Modeling through Morphology. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.
@inproceedings{blevins2019better,
title = {{Better Character Language Modeling through Morphology}},
author = {Terra Blevins and Luke Zettlemoyer},
booktitle = {Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics},
year = {2019},
doi = {10.18653/v1/p19-1156},
url = {https://doi.org/10.18653/v1/p19-1156}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/blevins-2019-better-character-language-modeling-through/