Source-linked AI summary

Correcting Length Bias in Neural Machine Translation

Kenton Murray, David Chiang

arXiv:1808.10006v2cs.CL

TL;DR

NMT often produces overly short translations, and wider beam search can unexpectedly reduce accuracy. This paper connects both failures to label bias, compares length corrections, and introduces quick perceptron-like tuning for a per-word reward.

  • Problem

    NMT has a brevity problem and a beam problem in which increasing beam size can degrade translation performance.

  • Method

    The paper applies sentence-level corrections, compares length normalization with a word reward, and learns the reward using a perceptron-like tuning method.

  • Results

    Correcting brevity almost completely eliminates the beam problem, with the word reward performing slightly better than length normalization.

  • Takeaways & Limitations

    The beam problem can largely be explained by brevity arising from locally normalized models, and a limited globally normalized correction provides a simple remedy.

  • Takeaways & Limitations

    The paper leaves open how much improvement remains from solving label bias more generally and whether broader globally normalized models can be trained as inexpensively.

Abstract

from arXiv · show

We study two problems in neural machine translation (NMT). First, in beam search, whereas a wider beam should in principle help translation, it often hurts NMT. Second, NMT has a tendency to produce translations that are too short. Here, we argue that these problems are closely related and both rooted in label bias. We show that correcting the brevity problem almost eliminates the beam problem; we compare some commonly-used methods for doing this, finding that a simple per-word reward works well; and we introduce a simple and quick way to tune this reward using the perceptron algorithm.

1 Introduction

The paper links NMT’s beam and brevity problems to label bias and evaluates sentence-level corrections, finding that a word reward works slightly better and can be tuned quickly with a perceptron-like method.

  • Motivation: NMT suffers from two related problems: wider beams can degrade translation performance, and generated translations tend to be too short.Beam search is used to navigate the intractably large translation space, but increasing beam size can hurt NMT performance.
  • Core claim: The paper argues that both problems stem from label bias in word-by-word sentence generation.Label bias is described as an undesirable property of models that generate sentences incrementally rather than all at once.
  • Approach: Sentence-level corrections almost completely eliminate the beam problem.The paper frames these corrections as a response to the brevity problem.
  • Approach: A per-word reward performs slightly better than length normalization among the compared corrections.Both are commonly used methods for correcting translation lengths.
  • Tuning: A perceptron-like method learns the word reward instead of using grid search, with tuning taking only a fraction of overall training time.The optimal reward depends on both the task and beam size, so it should be tuned for each trained model.

2 Problem

The paper explains NMT’s brevity and beam problems as consequences of label bias in locally normalized, variable-length generation. Early end-of-sentence decisions can dominate longer translations, especially as the beam widens.

  • Local normalization: Locally normalized NMT models assign sequence probability through successive conditional output probabilities.The model estimates the probability of an output sequence by multiplying conditional probabilities over its generated symbols.
  • Label bias: Label bias occurs because an overestimated prefix probability cannot be downgraded by the suffix distribution, which must sum to one.This prevents later completions from correcting some earlier probability errors.
  • Toy example: In the toy word-by-word example, the partial translation “an” concentrates suffix probability on “autogyro,” producing the incorrect translation “an autogyro.”The competing prefix “a” must distribute probability across several consonant-initial translations.
  • NMT length bias: In variable-length NMT, generating </s> creates a zero-entropy suffix distribution and can cause the model to truncate the translation.An overestimated probability of ending may lead the model to ignore the remaining input.
  • Beam problem: The model’s end-of-sentence score imposes a limit on the total remaining score, placing a heavy burden on predicting the full translation score early.Figure 2 illustrates this budget effect, with the empty translation initially ranked 622nd yet overtaking the correct translation by the third decoding step.
  • Beam problem: Beam search can worsen brevity because wider beams retain high-scoring short or complete translations that prune longer alternatives.The paper claims the beam and brevity problems are essentially the same and that solving one solves the other.

3 Correcting Length

The paper treats brevity corrections as model modifications addressing local normalization, compares common correction methods, and tunes a word reward with a perceptron-style approximation.

  • Model perspective: Brevity corrections are framed as model modifications rather than merely search-procedure changes.Because the root problem is local normalization, the authors argue these modifications should be trained as globally normalized models.
  • Correction methods: Three common approaches adjust scores to favor longer sentences: length normalization, Google’s correction, and a constant word reward.Length normalization divides by m, while the word reward adds a constant for each word.
  • Correction methods: The constant word reward is slightly better than length normalization among the two compared corrections.The reward is also easy to integrate into beam search because it can be computed on partial translations.
  • Training: Globally normalized training is expensive because it requires inference on every training example or heuristic approximations.A two-tiered alternative first trains s and then trains s′ while keeping s fixed, possibly on a smaller dataset.
  • Training: Approximating the expectation with the 1-best translation yields a familiar perceptron update for tuning the word reward.Because only one parameter is trained, the authors can use a relatively small dataset.
  • Training: Length normalization has no additional parameters, so the model change has no corresponding training adjustment.The perceptron approximation for tuning GNMT’s α drives α to ∞, requiring another method.

4 Experiments

Across four resource and language-pair settings, larger uncorrected beams cause large BLEU and METEOR drops, while optimal correction parameters vary with task conditions and beam size.

  • Results: Across four settings, larger beams produce large BLEU and METEOR drops when no correction is applied.The settings span high-resource German–English, medium-resource Russian–English, and low-resource French–English and English–French systems.
  • Results: Optimal correction parameters depend on the task, language pair, training-data size, and beam size.These parameter differences can affect performance strongly.

4.1 Data and settings

The experiments use German–English, Russian–English, French–English, and English–French NMT systems with differing data resources, architectures, BPE sizes, and tuning sets.

  • Systems and data: The high-resource German–English system uses 2016 WMT data and a bidirectional attention-based encoder-decoder model.Its word representation layer has 512 hidden units and other hidden layers have 1024 nodes.
  • Systems and data: The medium-resource Russian–English system uses roughly 1 million 2017 WMT training sentences and 512-node layers.It uses 16k BPE operations and dropout of 0.2.
  • Systems and data: The low-resource systems use French and English data from the 2010 IWSLT TALK task in both translation directions.They use the medium-system architecture with 6k BPE operations.
  • Parameter tuning: Correction parameters are tuned on selected development data, initialized with γ = 0.2, and optimized using batch gradient descent.The learning rate is η = 0.2, gradients for γ are clipped to 0.5, and training stops under an update-based criterion.

4.2 Solving the length problem solves the beam problem

Across language pairs, larger beams substantially degrade uncorrected NMT by producing increasingly short translations, while length corrections largely restore both output length and translation quality. A tuned word reward generally performs slightly better than normalization, and its optimal value varies by task and beam size.

  • Baseline: As beam size increases, uncorrected systems show significant BLEU and METEOR declines alongside decreasing output-to-reference length ratios.Larger beams can produce outputs that are only a fraction of the correct translations.
  • Tuning: The optimal word reward varies with both beam size and translation task, but perceptron-style tuning is a quick posttraining step.Tuning typically takes from a few minutes to hours and requires decoding only a small development set.
  • Russian–English baseline: Over 20 BLEU points are lost by the Russian–English baseline when the beam grows from 10 to 1000.At beam 1000, 37.3% of translated outputs have length zero, and outputs contain less than one third as many words as references.
  • Length correction: Tuned word rewards set length ratios near 1.0 across language pairs and generally eliminate the beam problem.Reward and normalization improve over baselines in most BLEU comparisons, while optimized rewards always improve METEOR over the best baselines.
  • Method comparison: The word reward slightly outperforms normalization overall, although normalization obtains the best BLEU in some settings.The German–English table reports the best BLEU for normalization, while the French–English and English–French results favor word reward on METEOR.
  • Sentence-length analysis: Figure 3 shows that the beam-1000 baseline retains relatively high BLEU on short sentences but performs very poorly across the full test set.Length-corrected models largely remove this degradation on the full test set, with a slight hit on the shortest sentences.

4.3 Tuning word reward

The optimal word reward varies with beam size, system, task, dataset, and language pair, but perceptron tuning consistently improves evaluation outcomes and is inexpensive to run.

  • BLEU varies by more than 5 points for German–English and over 4.5 points for Russian–English as the word reward changes.These measurements use beam size 50 and 1000 heldout development sentences.
  • The optimal word reward differs for every beam size within a language pair and for every system at a given beam size.Even systems sharing architecture, data, and training criteria can have different tuned rewards.
  • As training data decreases, tuned reward penalties produce larger BLEU gains.
  • Tuned rewards consistently improve METEOR scores and length ratios across all systems and language pairs.Table 5 reports that tuning alleviates the beam problem, with lower-resource systems more susceptible to it.
  • Perceptron-based reward tuning usually takes a few minutes to hours, only a fraction of overall training time.The process requires decoding a small development dataset multiple times.

4.4 Word reward vs. length normalization

The tuned word reward generally outperforms length normalization on METEOR, while BLEU results depend on language pair and beam size.

  • Tuned word rewards generally achieve higher METEOR scores than length normalization across all settings.
  • For the largest beam of 1000, the tuned word reward achieves higher BLEU than length normalization.Length normalization otherwise wins on German–English and French–English, ties on English–French, and loses on Russian–English.
  • The tuned word reward has a more theoretically justified globally normalized derivation in the context of label bias and brevity.Overall, the two correction methods have relatively similar performance.

5 Conclusion

The paper explains the beam problem largely through brevity caused by local normalization, compares model corrections, and presents parameter learning as a practical route toward stronger NMT baselines.

  • The beam problem can largely be explained by the brevity problem resulting from the model’s locally normalized structure.
  • The paper compares two model corrections and introduces a method to learn their parameters.
  • The brevity problem is presented as an instance of label bias, with limited global normalization as its solution.The paper frames this as the simplest case of broader label-bias and globally normalized modeling problems in NMT.
  • Solving the brevity problem yields significant BLEU gains, while the remaining benefit of solving label bias generally is left open.
  • The proposed solution uses globally normalized training on only a small dataset, leaving its broader training cost as a future question.
Loading 1808.10006v2…