Elamur Research

Language Model Prior for Low-Resource Neural Machine Translation

Paper · 2020 · Christos Baziotis, Barry Haddow and Alexandra Birch

Summary

A translation system needs examples that show how the meaning of a sentence carries from one language to another. For many language pairs, there are relatively few aligned examples, even when substantial amounts of text exist in each language separately. Baziotis and colleagues ask how that unpaired text can improve machine translation. Their proposal uses a language model trained to predict what comes next in the target language. During translation training, this predictor supplies information about which continuations are plausible. Once training ends, the translator generates sentences on its own.

The method adds a penalty to the usual translation loss. At each position in a reference translation, the translator predicts the next token using both the source sentence and the preceding target text. The separate predictor sees the same target prefix and estimates which tokens could follow it. The added penalty encourages the translator’s distribution to stay near that estimate, while the usual loss rewards the reference token. This balance matters because the source sometimes calls for a continuation that would be surprising from the target prefix alone. Adding the penalty changes how the translator learns. The extra predictor does no work during decoding.

On the English–German and English–Turkish benchmarks, the prior improves test performance in every direction when the predictors are trained on 3M monolingual sentences per language. The paper reports gains of up to +1.8 over its strongest baseline, a translator trained with label smoothing. On the German-to-English test set, for instance, that baseline reaches 28.4, while the prior reaches 30.2 and the combination of prior and label smoothing reaches 30.3. The score is detokenized, case-sensitive BLEU, a measure of overlap with reference translations. Increasing the monolingual corpus to 30M sentences helps translation into German, while the English-target results show no corresponding test gain. A separate German-to-English experiment finds a benefit down to a training subset of 10K aligned sentences.

The paper also examines what the translators do with their probabilities. Label smoothing makes predictions less concentrated. The prior yields better German-to-English BLEU with predictions that are more concentrated than those of the label-smoothed baseline, suggesting that the identity of the tokens favored by the prior matters. A comparison with probability fusion exposes a different effect. When a fusion system multiplies the translator’s scores by the target-language predictor’s scores, it can suppress a correct word that the translator already favors. The prior avoids that direct intervention at decoding time, though its training weight still determines how strongly it can influence future predictions.

Deep dive: Language Model Prior for Low-Resource Neural Machine Translation

A target-language prior improves low-resource neural machine translation by guiding training with monolingual text while leaving decoding to the translator. · about 34 minutes to read

The problem and its context

Why target-language text can help

A parallel corpus records how sentences in a source language have been rendered in a target language. It supplies evidence about word choice, changes in word order, and constructions that can express the same meaning across languages. In a small corpus, any particular construction may appear in few contexts. The translator must learn both the connection between the languages and what a plausible sentence in the target language looks like from that limited evidence. The paper treats this as a central difficulty for low-resource languages.

A sentence written in the target language supplies evidence about the latter problem by itself. Its grammar and wording can help a predictor learn what commonly follows a particular prefix. Training on many such sentences gives the predictor estimates across a vocabulary, including estimates for continuations that an individual paired example never presents. These estimates are useful even though monolingual text leaves the cross-language connection unobserved. The challenge is to pass on the information about target-language usage while preserving the translator’s use of the source sentence.

The authors situate their approach within neural sequence-to-sequence translation. A conditional translator assigns probabilities to candidate target sequences given a source sequence. At each generation step, it uses the source along with the target tokens generated so far. Training on parallel data gives it reference continuations for that conditional prediction task. The paper cites work that established sequence-to-sequence learning and work that lets a decoder attend to the source while generating a translation. Sequence to Sequence Learning with Neural Networks and Neural Machine Translation by Jointly Learning to Align and Translate provide the architectural background.

There is a tension between what the translator and the language predictor know. If a prefix can be completed with several fluent expressions, the source may make one of them necessary. The language predictor may favor another expression because it is common after that prefix. Names and words that must be copied from the source are especially clear instances of the distinction the paper draws. The target prefix can make a slot for a name predictable while providing little evidence about which name belongs there. A useful way to incorporate the predictor therefore needs to exploit a preference for plausible wording without making every preference binding.

How earlier approaches used monolingual sentences

Back-translation supplies extra sentence pairs. A system translates real target-language sentences in the reverse direction to produce synthetic source sentences. The forward translator can then learn from those synthetic inputs paired with the original target text. The paper describes back-translation as typically effective and identifies the cost of preparing the additional data. It entails training a separate system and running it over a potentially large monolingual collection. The authors treat the prior as a separate way of using monolingual text and describe it as compatible in principle with back-translation. Improving Neural Machine Translation Models with Monolingual Data and Iterative Back-Translation for Neural Machine Translation are the earlier studies they discuss.

The noisy-channel formulation brings monolingual information into the score of a candidate translation. A good candidate should be plausible in the target language and should make the observed source plausible under a system that translates in the reverse direction. Statistical machine translation used this decomposition with a target-side language predictor. Neural versions inherit the factorization and face a decoding problem. As a candidate target sequence grows, the reverse component may have to score the source again. The paper describes approaches that alternate generation with source scoring or make repeated passes over the source. The target-language component also participates in inference, so its cost matters for each translation.

Fusion combines the two predictors more directly. In shallow fusion, both are trained separately. At generation time, the system combines the translator’s next-token scores with the language predictor’s scores. The target-language information can change the ordering of candidate tokens, and the same weight is applied at each step. That weight governs decisions in which the source is decisive as well as decisions in which the translator is unsure. Both predictors must be run during decoding. Deep fusion also starts with separately trained components, then uses the recurrent language predictor’s hidden states as extra input to the decoder. A gate controls their contribution. On Using Monolingual Corpora in Neural Machine Translation introduces these fusion approaches.

The paper describes subsequent fusion methods in terms of how they combine the signals and when the translator first sees the additional signal. Cold fusion trains the translator from scratch alongside the language predictor and uses the predictor’s logits, the scores before conversion to probabilities, as features. Gating offers flexibility in how much information enters a decision and requires changes to the network. POSTNORM takes a simpler route by combining the two output distributions during training as well as decoding. Its designers hoped the translator could concentrate on representing the source while getting help with fluency from the fixed target-language predictor.

These approaches reveal a practical distinction in where the cost falls. A data augmentation system spends time preparing synthetic inputs before the forward translator is trained. Fusion spends computation on the language predictor while producing translations, and some variants spend it during training too. A training penalty places the additional predictor inside the learning procedure. The proposal follows from asking whether that procedure can absorb useful information into the translator’s own weights, where it will be available when the system encounters a new sentence.

Other places to put prior information

Earlier research also used monolingual pretraining to initialize the encoder and decoder. The authors describe work that first applied this strategy to sequence-to-sequence translation and work that extended it to the Transformer. Initialization transfers learned parameters into the translation system, so the components need compatible architectures. A very large pretrained predictor can make that requirement inconvenient when a smaller translator is appropriate for the available parallel data. The Transformer used in the paper’s main experiments comes from the architecture introduced in Attention Is All You Need.

A related approach gives the translation system a language prediction task in addition to translation. In one study described by the authors, the translator’s decoder is trained to act as a language predictor on target-only examples. In another, monolingual examples are supplied with a NULL source. These setups let the decoder learn from unpaired sentences within its own training. The paper describes their reported gains as marginal and their outcomes as mixed. It instead uses predictions from a separately trained component as information about particular target prefixes.

The paper also places the work alongside earlier uses of posterior regularization. This strategy expresses prior information as preferences over a system’s output distributions. In previous translation studies discussed by the authors, dictionaries and length ratios helped construct such preferences, or a statistical translator supplied guidance to a neural system during iterative back-translation for unsupervised translation. A monolingual predictor offers a different kind of preference. It can provide a new distribution for every target prefix, reflecting how plausible each possible continuation appears in that context. The training objective can use that distribution even when the two networks have different sizes.

The method, step by step

From unpaired text to a training signal

The method starts by training a predictor on sentences in the target language. Given the beginning of a sentence, it assigns a probability to each token that might follow. Repeating the procedure along a sentence exposes it to a range of target contexts. Its output is a distribution over the target vocabulary. For translation training, the authors keep this predictor fixed. Its estimates remain tied to the monolingual task throughout the updates to the translator.

The translator trains on pairs of source and reference sentences. At each target position, the two systems receive the same preceding reference tokens. The translator also receives the source sentence. Both predict a distribution for the next target token, using a shared inventory of target symbols so that entries in the distributions can be compared. The translator has the additional evidence it will need at deployment, namely the sentence it is supposed to translate.

The reference supplies the ordinary translation loss. If the translator places little probability on the observed token, that loss is large. The prior supplies a separate penalty using the rest of the distribution as well. For instance, a reference can establish that a certain continuation worked in an aligned sentence. The monolingual predictor can also indicate which other continuations look plausible after the same prefix. Since those judgments lack the source sentence, the method gives them an adjustable influence through the added penalty.

The authors soften the distributions before computing the penalty. This makes it easier for the translator to learn from alternatives that the language predictor ranks below its favorites. The translation loss still uses the translator’s ordinary scores. The optimizer updates the translator using both losses, and the fixed language predictor can be set aside once the translator has finished training. During inference the translator works from the source and the partial translations it generates.

Training and decoding with a target-language prior

The steps in order.

Training and decoding with a target-language priorStep 1: Train a predictor on target-language sentences1. Train a predictor on target-language sentencesStep 2: Freeze the predictor for translation training2. Freeze the predictor for translation trainingStep 3: Score reference continuations from the same target prefix3. Score reference continuations from the same target prefixStep 4: Give the translator the source sentence as well4. Give the translator the source sentence as wellStep 5: Soften both distributions for the divergence penalty5. Soften both distributions for the divergence penaltyStep 6: Update the translator using reference and prior losses6. Update the translator using reference and prior lossesStep 7: Decode with the trained translator alone7. Decode with the trained translator alone

How the translation probabilities enter the objective

The paper starts from the conventional conditional translation decision. In principle, the goal is to choose the target sequence with the highest score among possible translations of the source.

ŷ = arg maxᵧ log p(y | x)

Here x is the source sentence, y is a candidate target sequence, and ŷ is the selected output. The expression p(y | x) gives the candidate’s probability conditioned on the source, with the vertical bar indicating the conditioning. The function log takes its logarithm. The operation arg maxᵧ returns the candidate y at which the score is highest. In the experiments the paper uses beam search to approximate the search at test time.

During training, the paper applies a loss at each position in the reference target sequence. The following form makes the two contributions at each position explicit.

L = Σₜ₌₁ᴺ [−log pₜₘ(yₜ | y₍<ₜ₎, x) + λ Dₖₗ(pₜₘ(· | y₍<ₜ₎, x) ∥ pₗₘ(· | y₍<ₜ₎))]

L is the training loss for the pair. The summation runs from the first target position, indexed by t, through N, the number of target positions. The observed token at position t is yₜ, and y₍<ₜ₎ is the sequence of earlier reference tokens. The source is x. The symbol pₜₘ denotes probabilities from the translator and pₗₘ denotes probabilities from the monolingual predictor. A dot in the token slot means the full distribution over possible next tokens. Dₖₗ is the Kullback–Leibler divergence and the double bar gives the order of its arguments. The plus sign adds the divergence contribution, weighted by λ, to the negative log probability of the reference token. As before, the single vertical bar separates what is predicted from the information used to predict it.

The negative log probability is the standard translation term, which the paper calls the translation loss. It encourages the translator to give the observed continuation a high conditional probability. The divergence term specifies a preference for how probability should be distributed across possible continuations. The source can give the translation term a reason to favor a token that is improbable under the prior. The weight λ controls the cost of the disagreement during training. In that sense, the prior is weakly informative. It represents partial knowledge about the target, and the system can trade off that information against the evidence that comes with the reference.

The divergence has a direction. In the paper’s objective, the translator is the first argument and the language predictor is the second. The usual discrete definition clarifies how this choice affects the loss.

Dₖₗ(P ∥ Q) = Σᵢ Pᵢ log(Pᵢ / Qᵢ)

P is the translator’s distribution at a target position, and Q is the language predictor’s distribution at the same position. The index i identifies a token in the common target vocabulary. Pᵢ and Qᵢ are the probabilities of that token, and Σᵢ adds the contributions across all tokens. The slash indicates the ratio inside the logarithm, and the double bar separates the two distributions in their specified order. Each log ratio is multiplied by the translator’s own probability for that entry.

One consequence is that a token receiving substantial probability from the translator can carry a substantial penalty if the prior considers it highly implausible. The loss depends on the entire distribution and on how much mass the translator places on such entries. The order of the divergence therefore matters when interpreting the method. The expression is also different from a posterior score used directly to rank candidates: here the penalty affects the gradient during training. At decoding time, token scores come from the translator that those updates produced.

The authors use posterior regularization to describe this arrangement. The prior is applied to the output probabilities that the translator assigns in context. This lets them express a preference in the same space in which the information is available, namely the target vocabulary at a particular position. A prior over all the weights of a neural network would express that preference indirectly and be harder to specify. With output regularization, the language predictor can be trained independently and can have a larger capacity than the translator.

What temperature exposes

The prior resembles knowledge distillation, in which a teacher’s distribution supplies information beyond a single correct label. In the standard setup discussed by the paper, teacher and student have been trained for the same task. A translation teacher requires parallel sentences and can take the source into account. Here the teacher is trained for monolingual continuation, and the student is trained to translate. Its range of plausible alternatives can still be informative even though its most probable continuation need not be appropriate for a particular source. The paper draws the same-task comparison with Sequence-Level Knowledge Distillation.

The authors use temperature to control the distribution seen by the prior loss. Each raw token score is divided by the temperature before applying softmax, the operation that turns scores into probabilities.

pᵢ = exp(sᵢ / τ) / Σⱼ exp(sⱼ / τ)

The token of interest is indexed by i. Its unnormalized score, or logit, is sᵢ, and its resulting probability is pᵢ. The temperature is τ. The function exp exponentiates the scaled score. The index j runs across the vocabulary in the denominator, where Σⱼ adds the exponentiated scaled scores so that the probabilities form a distribution. Both slash marks denote division. At τ = 1 the formula gives the ordinary softmax. For τ > 1, the score differences have less influence on the output probabilities, making the distribution smoother.

A strongly preferred continuation can dominate an ordinary distribution. A higher temperature gives the rest of the distribution more influence in the comparison. Among the low-probability alternatives, some may be better supported by the context than others. The paper’s idea is to let the translator learn more of these relative preferences, even where the language predictor has a very clear favorite. The same temperature applies on both sides of the divergence so that the two distributions are compared at the same degree of score scaling.

Changing temperature also changes the magnitude of the divergence. The paper describes its scaling as 1/τ² and compensates by multiplying the softened divergence by τ². This keeps the temperature choice from implicitly down-weighting the regularization as the authors expose more of the distribution’s tail.

Lₖₗ = τ² Dₖₗ(pₜₘ(· | y₍<ₜ₎, x; τ) ∥ pₗₘ(· | y₍<ₜ₎; τ))

Lₖₗ is the regularization loss for one position before applying λ. The symbol τ² is the square of the shared temperature. Dₖₗ is the same ordered divergence, with the translator distribution pₜₘ first and the language predictor distribution pₗₘ second. The dot denotes the candidate-token slot, and y₍<ₜ₎ is the reference prefix before position t. Both predictors use that prefix, and the translator also uses the source x. Within each argument, the semicolon separates the conditioning inputs from the temperature used to produce the distribution. This is the divergence contribution inside the sum for L. The reference-token loss and the decoder’s test-time probabilities use the ordinary softmax.

How label smoothing and fusion differ from the prior

Label smoothing also exposes training to a distribution over tokens. It gives some weight to the uniform distribution when constructing the target for the translation loss. The observed label retains the largest weight, and alternative labels are treated equally by the uniform component.

yᵢᴸˢ = yᵢ(1 − α) + α / K

Here i indexes a token. The indicator yᵢ represents the one-hot reference label, which places all its original mass on the observed token. The new target weight for i is yᵢᴸˢ. The value α sets the amount of smoothing, K is the vocabulary size, and α / K is the uniform contribution for each label. The term 1 − α is the weight retained by the one-hot distribution. The plus sign adds the two contributions.

Label smoothing changes the target used by the ordinary translation term. The prior contributes a separate loss whose distribution changes with the context. This gives the two methods different jobs. Label smoothing reduces the pressure to put almost all the mass on the observed word. The prior tells the translator which alternatives the monolingual predictor favors in that part of the sentence. They can be applied together to a translator. The authors leave label smoothing out of monolingual pretraining because they want the distinctions among alternatives in the prior to remain informative.

It helps to place this loss alongside the scoring formulas that motivate the paper. The noisy-channel decomposition begins with the same conditional translation probability and writes it as proportional to a product.

p(y | x) ∝ p(x | y) × p(y)

Here x is the source and y is the candidate target sentence. The left-hand side is the probability of the target given the source. The term p(x | y) is the probability of generating or explaining the source from the candidate target, and p(y) is the target sentence’s probability on its own. The multiplication sign combines the two terms. The proportionality symbol indicates that a source-dependent normalization factor can be omitted when ranking target candidates for the same source. Both factors contribute to the candidate’s score when the system uses this formulation to translate.

Shallow fusion uses a weighted sum of the systems’ log probabilities at each generation step.

log p(yₜ) = (1 − β) log pₜₘ(yₜ | y₍<ₜ₎, x) + β log pₗₘ(yₜ | y₍<ₜ₎)

The left-hand side denotes the combined log score of a candidate next token yₜ at position t. The translator probability pₜₘ uses the target prefix y₍<ₜ₎ and source x. The target-language probability pₗₘ uses the prefix. During decoding this prefix comes from the candidate being extended. The logarithm is log, and β is the interpolation weight on the language contribution. The translator contribution receives weight 1 − β. The plus sign adds the two weighted log scores. The paper gives this formula as a log-linear score for decoding.

POSTNORM instead adds the two log probabilities and normalizes across the vocabulary. The same combination is used while training the translator with the fixed predictor and while decoding with the pair.

p(yₜ) = softmax[log pₜₘ(yₜ | y₍<ₜ₎, x) + log pₗₘ(yₜ | y₍<ₜ₎)]

The output p(yₜ) is the normalized fused probability for token yₜ at position t. The two distributions pₜₘ and pₗₘ have the same inputs as in the shallow-fusion formula, with y₍<ₜ₎ the target prefix and x the source. The logarithm is log, and the plus sign gives the summed score. The softmax operation converts those summed scores, taken across candidate tokens, into a distribution. The pₗₘ term in the paper’s displayed shorthand leaves the prefix implicit.

Exponentiating a sum of log probabilities gives the product of the probabilities. POSTNORM accordingly allocates probability using the normalized products. A token strongly preferred by one system can fall in the ranking if the other system assigns it little mass. Conversely, a candidate that is moderately plausible to both can rise above their separate favorites. Output regularization affects how the translator learns to score such tokens. Fusion applies the product directly to the tokens being considered by the decoder.

How the authors built and trained the systems

The authors normalize punctuation and apply truecasing before segmenting text. They filter parallel pairs when either member exceeds 60 words or when the length ratio exceeds 1.5. They also apply a 50-word length cutoff to the monolingual sentences. These decisions define the examples from which the two systems learn. The length-ratio rule is about the relative lengths of the paired sentences, whereas the monolingual data require only a cutoff on each individual sentence.

For subword tokenization, the authors use the unigram option in SentencePiece. The vocabulary for each language contains 16K symbols and is learned from that language’s side of the parallel training data. They pool the English sides of the two parallel training corpora for this purpose, so the same English vocabulary and language predictor can serve both translation pairs. Vocabulary alignment is what lets the prior compare probabilities for corresponding tokens. The language predictor and translator can produce very different internal representations and still supply distributions over those same entries. SentencePiece provides the segmentation procedure.

The main systems use Transformers. In the translator the embedding size is 512, the hidden size is 1024, and the architecture uses 6 layers and 8 attention heads. The language predictor uses embeddings of size 1024, a hidden size of 4096, 6 layers, and 16 attention heads. Both list dropout of 0.3. These choices make the monolingual predictor larger in dimensions that help determine capacity, while the translator is deliberately constrained for the size of the parallel corpora. The authors report that limiting capacity and using strong regularization were important for avoiding overfitting in the translator.

The authors use Glorot-uniform initialization and pre-norm residual connections, which they found helpful for stabilizing training. They share the weights of the decoder’s token embedding and its output projection. This means that the learned weights used to represent input tokens also help score output tokens. The translation systems use the Transformer implementation in JoeyNMT, and the authors developed and released the implementation for their experiments in PyTorch. The weight-sharing design follows work including Using the Output Embedding to Improve Language Models.

Optimization uses a learning rate of 0.0002 with Adam. For the main systems the paper describes a linear warmup across the first 8K steps followed by decay, and mini-batches of 5000 tokens. The translators are checked on the development set every 5000 batches using greedy decoding. The authors stop when development BLEU has failed to improve for 10 such checks. The language predictors follow the same optimization approach, with a stopping decision based on their own prediction task. The appendix specifies a held-out development set of 10K sentences and stopping when perplexity fails to improve for more than 10 epochs. Adam is the optimizer for both tasks.

Experiments and results

What was held constant

The English–German data come from News Commentary v13, and the English–Turkish data come from the WMT-2018 parallel collection drawn from SETIMES2. The paper uses the official WMT-2017 test sets for development and the official 2018 test sets for the final evaluation. After preprocessing, English–German has 275,561 training pairs, 3,004 development pairs, and 2,998 test pairs. English–Turkish has 192,482 training pairs, 3,007 development pairs, and 3,000 test pairs. Each bilingual corpus supports translation in both directions. Changing directions changes which language predictor supplies the prior.

The monolingual English and German data come from the 2016 News Crawl. For Turkish, the authors pool available News Crawl data from 2010-2018, which they describe as containing 3M sentences. They sample English and German at 3M sentences each for the main comparison so that each language starts with the same amount of monolingual training text. They also prepare English and German samples of 30M sentences to see whether a stronger prior translates into better system performance. The matched comparison controls the amount of text used to train the predictors. Language and translation direction can still matter, including through differences in how easily each target language can be predicted.

The authors report perplexity on held-out monolingual data, with lower values indicating that the predictor gives more probability to observed continuations. At the 3M scale, Transformer perplexity is 29.70 for English, 22.71 for German, and 22.78 for Turkish. With 30M English sentences, the English value is 25.02. With 30M German sentences, the German value is 19.22. The larger sample improves the held-out prediction score for each language in which the scale comparison is possible. Perplexity measures the prior’s own task and is interpreted separately from translation BLEU.

The translation comparisons use a standard system called Base, its label-smoothed variant, and two fusion methods. The authors also train POSTNORM with label smoothing to see how it affects the fused system. For the prior, they compare the basic regularized system with a version adding label smoothing, and they examine the effect of substituting a prior trained on more monolingual text. In POSTNORM and the prior, the monolingual predictor stays fixed during translation training. The shared 3M setting is the one in which all language-based methods can be compared at the same monolingual data scale.

The authors tune the method-specific settings on German-to-English development data. The shallow-fusion weight β is 0.1, and the label smoothing parameter α is 0.1. The prior uses a regularization weight λ of 0.5 and a divergence temperature τ of 2. Final translations are generated with a beam size of 5. A beam keeps a limited set of promising partial translations as generation proceeds, allowing the final decision to consider continuations of several candidates. The greedy procedure used during training checks chooses a single continuing candidate at each step.

The final score is case-sensitive BLEU on detokenized output, reported with sacreBLEU. Detokenization restores the text from the units used inside the systems before scoring. BLEU evaluates agreement with the reference translations through overlap in sequences of tokens. The paper reports the mean and standard deviation of 3 runs for each setting. The charts below show means, and the prose identifies the spread alongside selected comparisons. A Call for Clarity in Reporting BLEU Scores gives the scoring context cited by the authors.

German and English as targets

In German-to-English translation, the base system scores 26.9 ±0.1 BLEU on the test set. Shallow fusion reaches 27.8 ±0.1. Adding label smoothing to Base produces 28.4 ±0.7 and makes it the strongest baseline in this direction. The 3M prior yields 30.2 ±0.1 without label smoothing and 30.3 ±0.3 with it. The paper reports a gain of +1.8 for the prior alone over the strongest baseline in this direction. The comparison uses the same test set, with a monolingual predictor used at inference by shallow fusion and used during training by the prior.

German-to-English WMT-2018 test BLEU with matched monolingual data

The prior gives the highest mean when combined with label smoothing, and the prior alone leads every baseline.

German-to-English WMT-2018 test BLEU with matched monolingual dataBase: 26.9Base26.9Shallow fusion: 27.8Shallow fusion27.8POSTNORM: 24.5POSTNORM24.5POSTNORM with label smoothing: 26.4POSTNORM with label smoothing26.4Base with label smoothing: 28.4Base with label smoothing28.4Base with prior: 30.2Base with prior30.2Base with prior and label smoothing (this paper): 30.3Base with prior and label smoothing(this paper)30.3
The numbers
System or settingBLEU
Base26.9
Shallow fusion27.8
POSTNORM24.5
POSTNORM with label smoothing26.4
Base with label smoothing28.4
Base with prior30.2
Base with prior and label smoothing (this paper)30.3

The German-to-English development scores follow the same broad ordering. Base yields 22.6 ±0.1 dev BLEU, Base with label smoothing reaches 23.8 ±0.6, and the prior gives 24.9 ±0.0. The combined prior and label smoothing system reaches 25.1 ±0.3. POSTNORM improves when label smoothing is applied, from 20.4 ±0.2 to 22.0 ±0.3 on development and from 24.5 ±0.3 to 26.4 ±0.2 on test. Its test means with and without smoothing fall below Base. That pattern prompted the authors to study what the fused distribution was doing at individual positions.

In English-to-German translation, the test baseline is 25.6 ±0.2. Shallow fusion reaches 26.0 ±0.1 and the label-smoothed translation baseline reaches 27.3 ±0.3. The prior trained on 3M German sentences gives 29.1 ±0.7, also a +1.8 test gain over the label-smoothed baseline as highlighted by the paper. With label smoothing as well, it reaches 29.7 ±0.7. On development, the label-smoothed baseline reaches 19.2 ±0.3, the prior alone scores 20.5 ±0.3, and the combination scores 20.8 ±0.4. POSTNORM test performance is 22.9 ±0.3, rising to 23.3 ±0.5 with label smoothing.

English-to-German WMT-2018 test BLEU by training setting

The larger German prior leads the comparison, with the smaller prior plus label smoothing close behind.

English-to-German WMT-2018 test BLEU by training settingBase: 25.6Base25.6Shallow fusion: 26.0Shallow fusion26.0Base with label smoothing: 27.3Base with label smoothing27.3Base with 3M prior: 29.1Base with 3M prior29.1Base with 3M prior and label smoothing: 29.7Base with 3M prior and label smoothing29.7Base with 30M prior (this paper): 29.8Base with 30M prior (this paper)29.8
The numbers
System or settingBLEU
Base25.6
Shallow fusion26.0
Base with label smoothing27.3
Base with 3M prior29.1
Base with 3M prior and label smoothing29.7
Base with 30M prior (this paper)29.8

When German is the target, increasing the prior’s monolingual training sample to 30M raises the standalone prior result to 29.8 ±0.3 test BLEU and 21.0 ±0.4 development BLEU. The larger English prior behaves differently. In German-to-English translation it yields 30.0 ±0.1 on the test set and 24.9 ±0.1 on development. The smaller English prior scores 30.2 ±0.1 on test and has the same development mean. The fact that English perplexity improves while the test translation score does not rise shows why the two evaluations need to be read separately.

Turkish and English as targets

In Turkish-to-English translation, Base scores 16.6 ±0.3 on the test set. Shallow fusion reaches 17.3 ±0.3 and the label-smoothed baseline scores 18.4 ±0.2. The 3M English prior reaches 19.5 ±0.2. Adding label smoothing to that prior gives 19.5 ±0.2 as well, and the configuration with the 30M English prior also yields 19.5 ±0.2. The development mean is 18.5 for each 3M prior variant, with spreads of ±0.2 without label smoothing and ±0.3 with it. The larger prior scores 18.6 ±0.0 on development. Those development and test results give different impressions of the practical value of growing the English corpus.

English-to-Turkish shows a separate advantage for combining the prior with label smoothing. On test, Base yields 11.2 ±0.2 and shallow fusion reaches 11.5 ±0.1. Label smoothing alone reaches 12.6 ±0.0. The prior alone scores 13.8 ±0.1, and the combined setting reaches 14.1 ±0.2. On the development set the two prior configurations score 15.1 ±0.1 and 15.5 ±0.1, respectively, compared with 13.8 ±0.2 for label smoothing alone. The Turkish prior is evaluated at 3M sentences. The larger-corpus comparison applies only to English and German.

English-to-Turkish WMT-2018 test BLEU with matched monolingual data

The Turkish prior improves on label smoothing alone, and using both produces the highest mean.

English-to-Turkish WMT-2018 test BLEU with matched monolingual dataBase: 11.2Base11.2Shallow fusion: 11.5Shallow fusion11.5POSTNORM: 10.2POSTNORM10.2POSTNORM with label smoothing: 11.0POSTNORM with label smoothing11.0Base with label smoothing: 12.6Base with label smoothing12.6Base with prior: 13.8Base with prior13.8Base with prior and label smoothing (this paper): 14.1Base with prior and label smoothing(this paper)14.1
The numbers
System or settingBLEU
Base11.2
Shallow fusion11.5
POSTNORM10.2
POSTNORM with label smoothing11.0
Base with label smoothing12.6
Base with prior13.8
Base with prior and label smoothing (this paper)14.1

Across the main Transformer comparisons, the prior alone beats the label-smoothed baseline on every direction’s test mean. Label smoothing is itself effective against the plain baseline in each direction, which gives the prior a more demanding comparison than Base. Shallow fusion helps consistently over Base with smaller gains. POSTNORM gives lower test BLEU than Base in each direction. Applying label smoothing raises every POSTNORM test mean, but the resulting systems still trail the corresponding label-smoothed translation baselines. In Turkish-to-English translation, for instance, POSTNORM moves from 14.8 ±0.1 to 16.0 ±0.0 with label smoothing, while the label-smoothed baseline reaches 18.4 ±0.2.

Less parallel data and a recurrent architecture

The paper tests how the prior behaves when the aligned training corpus shrinks. The authors take subsets of the English–German parallel corpus and report the comparison on the German-to-English test set. The comparison keeps the English prior trained on 30M monolingual sentences and contrasts the regularized translator with Base plus label smoothing. The plotted measure is test BLEU averaged across 3 runs at each parallel data scale. The authors observe a benefit even at 10K parallel sentences. They describe the gain as only weakly related to the amount of parallel data over the range they tested.

This experiment varies the number of aligned examples available to train the translator. The predictor can continue offering the same kind of distribution at each observed target prefix when fewer pairs are available. A larger parallel sample lets training encounter more such prefixes, which the authors propose as one reason a translator might gain more from the same prior. The study’s evidence for the smallest aligned subset concerns the 30M English prior. The main matched comparison addresses the separate question of whether 3M monolingual sentences suffice to improve translation on the full low-resource training sets used there.

The appendix repeats the matched 3M comparison using recurrent systems. The translator uses an attentional encoder–decoder, with a bidirectional long short-term memory encoder and a unidirectional decoder. Its global attention mechanism can use encoded source information at each step. The language predictor uses the form of the recurrent decoder at a larger size. The authors say they selected settings from earlier low-resource work and aimed for parameter counts roughly comparable to their Transformer counterparts, without running a separate hyper-parameter search for the recurrent setup. The global attention mechanism comes from the earlier recurrent translation work they cite.

The prior without label smoothing yields 25.3 ±0.4 German-to-English test BLEU in the recurrent setup, compared with 25.2 ±0.3 for Base with label smoothing. English-to-German test BLEU is 23.0 ±0.7 with the prior and 22.8 ±0.2 with label smoothing. Turkish-to-English gives 14.5 ±0.2 against 14.4 ±0.1. English-to-Turkish is tied at a test mean of 9.8, with spreads of ±0.1 for the prior and ±0.2 for label smoothing. The prior combined with label smoothing reaches recurrent test means of 25.3 ±0.3 for German-to-English, 23.53 ±0.2 for English-to-German, 14.8 ±0.1 for Turkish-to-English, and 10.0 ±0.2 for English-to-Turkish.

The recurrent systems give lower translation scores overall and their monolingual predictors have higher held-out perplexity. At 3M sentences the English recurrent predictor scores 37.04 perplexity, and the German and Turkish recurrent predictors each score 31.26. The recurrent comparisons show that the training penalty can be used with this architecture, and the smaller gaps show how much the size of the observed benefit depends on the experimental setting. They also add a case in which the combined loss improves the test result over either component alone in the same recurrent setup, as seen in English-to-German.

What the ablations show

Distribution shape gives a separate test of the explanation

Since ordinary label smoothing gives strong results, the authors ask whether the prior helps simply by discouraging extreme confidence. They compare next-token entropy on the German-to-English test set. Entropy expresses how spread out the probability mass is. A distribution that puts almost all its mass on a single continuation has low entropy, and one that spreads mass across many continuations has higher entropy. The authors compute the value at every target token for each system. They fit a Gaussian kernel with bandwidth 0.3 to display how common different entropy values are across those positions.

The plain translation baseline produces concentrated distributions, which the authors interpret as consistent with overfitting to the small parallel corpus. Label smoothing makes its probabilities less concentrated. The monolingual predictor is the most uncertain of the plotted systems, consistent with the fact that it has only the target prefix. It may be able to predict the kind of word that fits next while remaining uncertain about which particular token the source requires.

The prior-trained translator has lower entropy than the label-smoothed baseline and higher BLEU in this comparison. If spreading out the translator’s probability mass were the entire explanation for the improvement, the stronger translation result would be hard to reconcile with the ordering of these distributions. The authors take that ordering as evidence that the prior conveys information about which alternatives fit particular contexts. Entropy itself discards the identities of the tokens receiving probability. The study can therefore use entropy to challenge a general confidence-based explanation without identifying exactly which acquired preferences account for the BLEU gain.

The result with both training losses offers another view of their relationship. In the matched experiments, adding label smoothing to the prior raises several test means and leaves the Turkish-to-English mean unchanged. Both losses can influence how concentrated the distribution becomes, but they supply different information. Label smoothing changes the reference target in a uniform way, while the prior’s preference varies with the prefix. The combination results are consistent with complementary effects. The size of the individual changes and the run-to-run spreads matter when judging how much the joint method adds in any particular direction.

Probability multiplication can undo a good prediction

POSTNORM produces the lowest-entropy predictions in the German-to-English analysis. Its score depends on the overlap of two distributions. If each concentrates on a small set of tokens, their product can concentrate most of the resulting mass on a still narrower set. In particular, the source-aware translator’s top token can be penalized because the language predictor sees only the target prefix and considers that token unlikely. An alternative with enough support from both sides can then move ahead.

The authors illustrate this behavior with a German sentence about Republicans in Congress seeking a broader rewrite of ozone rules. In the example, the translator already favors the correct continuation, and the multiplication with the prior predictor’s probabilities leads to a wrong choice. The fused distribution also gives relatively high probability to more, even though neither predictor ranks it among its top candidates. That behavior follows from the product rule. Moderate probabilities in both distributions can produce a larger product than a high value paired with a low one.

The example connects a mathematical property of the fused score to a concrete decoding error. It also sets a boundary on the comparison. The prior-trained translator can still make errors and can learn preferences that are poorly suited to a given source. Its advantage in this example’s mechanism is that at the point of decoding, no separate predictor can directly replace its preferred continuation through multiplication. The question is how the prior has influenced the translator over training, and the regularization weight offers a way to adjust that influence.

Label smoothing recovers some POSTNORM performance in the controlled comparison. The authors suggest that its use in the earlier POSTNORM experiments may have partly masked the difficulty with concentrated predictions. They also note that the original POSTNORM study used language predictors trained with label smoothing. A flatter language distribution would make differences among its log probabilities smaller and could reduce its influence on the product. The authors advance this as a possible explanation for why their setup yields a less favorable result. The reported comparison varies smoothing in the fused translation training. It gives no isolated estimate of what smoothing the monolingual predictor would have changed.

The strength of the penalty matters more than its temperature

The paper varies the weight λ and temperature τ together and plots development BLEU in German-to-English translation. Each plotted setting averages 3 runs. The weight governs how much the divergence matters relative to the translation loss. The temperature affects how narrowly the divergence comparison is dominated by the highest-scoring tokens, with the scale correction included. Varying the two together tests whether giving more influence to the tail changes how much overall regularization the translator can tolerate.

The authors find that stronger regularization helps up to a point and that the development scores are more sensitive to the weight than to the temperature. Using τ > 1 generally helps in the tested grid and makes performance less sensitive to λ. The authors interpret this as evidence that it helps to transfer the language predictor’s relative preferences over a wider range of tokens. Softer distributions make the comparisons less dominated by the prior’s strongest guesses, leaving the training objective more room to account for the source.

The high-weight setting illustrates what happens when these controls interact. Performance deteriorates when the translation loss and the prior term have equal coefficients, λ = 1, and the distributions remain at τ = 1. The authors suggest that this setting pushes the translator too strongly toward the language predictor’s top choices. Since those choices have no access to the source, a strong penalty for departing from them can reduce the incentive to account for source details. The grid establishes a sensitivity pattern for one development setup. The explanation about source attention is the authors’ account of that pattern.

A stronger monolingual predictor gives uneven translation gains

The comparison between 3M and 30M monolingual sentences tests whether better target-language prediction is enough to improve the prior. The held-out perplexities improve for both English and German. The translation scores show a test benefit when translating into German, a tie when translating from Turkish into English, and a slightly lower mean when translating from German into English. The controlled comparison changes the monolingual training scale while retaining the same named translation setup. It demonstrates that a better predictor on its own task can have different effects depending on which translation problem uses it.

The authors suggest that German’s richer morphology may make the stronger prior more valuable for German output. A decoder that has learned from a small parallel corpus could benefit from better guidance about target forms. The paper also considers whether the limited capacity of the translators constrains what they can learn from a stronger teacher. Neither explanation is isolated by the scale comparison. The experiments vary the strength of the prior as obtained from these corpora, and the broader claims about morphology and capacity remain hypotheses.

Limitations

Limits the authors identify

The paper’s main findings concern news-related datasets, and the authors identify a discrepancy between the domains of monolingual and parallel text as a condition for future work. The prior’s influence is context-dependent. If its monolingual corpus favors wording and continuations from a different setting, the strength of that influence could matter in a different way. The experiments establish usefulness under their corpus choices. The authors leave the effect of a substantial domain mismatch open.

The authors also describe preliminary efforts to use GPT-2 as the prior. These produced no measurable gains over the baseline. They suggest two obstacles. The translator’s capacity may be too limited to benefit from such a teacher, and the pretrained vocabulary of 50K symbols is large for low-resource translation. They cite earlier evidence favoring vocabularies of 2K-10K symbols in that setting. Adapting the pretrained predictor to the translator’s smaller vocabulary is proposed as a possibility, with no outcome reported. The paper establishes that the architecture can exclude the predictor at inference and leaves open how to obtain useful training guidance from a large generic predictor.

There is also a limit on the form of pretraining examined. The proposed prior is autoregressive. At each step its distribution comes from the prefix, which provides a direct interpretation as a prediction of the next token. The authors distinguish this from work that uses representations obtained from bidirectional context. They discuss BERT in connection with transfer, feature fusion, and concurrent distillation research. The experiments with the proposed objective provide evidence for the autoregressive predictors actually used.

The authors anticipate that the gain may diminish in higher-resource conditions. A translator with access to many more aligned examples may already learn more of the target regularities that the prior supplies. Their reduced-data experiment varies the amount of available parallel data within the German-to-English setup and finds continued benefit at the smallest tested size. The proposed behavior outside that range remains a prediction. Likewise, the authors position back-translation as compatible with the prior. The reported comparisons give no joint result from which to measure the benefit of combining them.

Limits apparent from the comparisons

The matched experiments cover two bilingual datasets, both paired with English. The availability of an English prior that can be reused makes the design practical and also limits the language configurations observed. The results show gains across the specific translation directions tested. They leave open whether a prior trained on a smaller or differently sourced monolingual collection would retain a comparable effect for other language pairs. The reduced-parallel experiment illustrates the distinction especially clearly. Its gain at 10K parallel sentences uses an English prior built from 30M monolingual sentences.

The strongest reported comparison is with label smoothing and with the particular shallow-fusion and POSTNORM configurations evaluated. The POSTNORM findings are sensitive to training conditions, as the improvement from label smoothing shows. The paper also points to a difference in how the language predictor was trained in the earlier fusion study. Together these observations limit a general ranking of the methods to the regimes tested. The prior’s inference cost advantage follows structurally from running only the translator. The experiments provide no elapsed-time benchmark for the complete training and inference pipelines, so the amount of wall-clock time saved is unspecified.

The central metric is BLEU, and the paper supplements it with entropy distributions and a decoding example. Those observations can connect a proposed mechanism to changes in predictions. They cannot allocate the BLEU gain to improvements in target grammar, preservation of source meaning, or successful handling of rare names. A single example illustrates how probability multiplication can override a correct prediction and leaves the frequency of that kind of error unknown. The analysis is strongest when it explains a possible route from the scoring rule to an error and relates that route to the distribution shape observed in German-to-English translation.

The paper reports standard deviations across 3 runs. These describe variation within the experiment and are relevant to small differences between settings. The distinction between 30.2 and 30.3 on German-to-English test BLEU, for example, comes with spreads of ±0.1 and ±0.3, respectively. The broad takeaway about adding the prior rests on gains over the matched baselines across the tested directions. The ranking between closely spaced prior variants is less firmly established. Likewise, one development direction supplies the main hyper-parameter choices and the sensitivity grid. The analysis does not map out a separate range of useful penalty weights and temperatures for every language direction.

Finally, the architecture comparison pairs recurrent translators with recurrent language predictors and Transformer translators with Transformer predictors. It establishes that the loss works in both kinds of setup and shows different magnitudes of improvement. Several aspects change together, including the held-out perplexity of the monolingual predictors and the translation accuracy of the underlying systems. The comparison cannot identify which of those differences explains the smaller recurrent gains. The ability to compare output distributions provides an architectural reason the method could work with other pairings. The experiments give direct evidence for the pairings that the authors ran.

What came after

Bilex Rx: Lexical Data Augmentation for Massively Multilingual Machine Translation cites the paper and addresses lexical data augmentation in a massively multilingual setting. The title places its intervention in the training data. Baziotis and colleagues’ contribution instead concerns the objective used to learn from translation examples. Their prior supplies probabilities over possible target tokens at each position, and the reference sentence still supplies the observed labels. The connection is between approaches that bring additional linguistic evidence into translation training.

The citation establishes that the later study draws on the literature that includes the language-model prior. Its task description identifies lexical augmentation as the contribution, while leaving open how the citation is used within the study. There is consequently no basis for attributing the divergence loss, the temperature setting, or the training-only teacher to Bilex Rx. What the two titles and the citation support is a narrower connection across different points of intervention. Bilex Rx takes up augmentation in massively multilingual translation, while the earlier study shows what a target-language predictor can contribute through a loss applied to the examples already used to train the translator.

Cite

Cite as Christos Baziotis, Barry Haddow and Alexandra Birch. 2020. Language Model Prior for Low-Resource Neural Machine Translation. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.emnlp-main.615

@inproceedings{baziotis2020language,
  title = {{Language Model Prior for Low-Resource Neural Machine Translation}},
  author = {Christos Baziotis, Barry Haddow and Alexandra Birch},
  booktitle = {Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.615},
  url = {https://doi.org/10.18653/v1/2020.emnlp-main.615}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/baziotis-2020-language-model-prior-low-resource/