Source-linked AI summary
Prevent the Language Model from being Overconfident in Neural Machine Translation
Mengqi Miao, Fandong Meng, Yijin Liu, Xiao-Hua Zhou, Jie Zhou
TL;DR
NMT can generate fluent but inadequate translations when excessive attention to partial translations neglects source content. The paper defines the Margin as the NMT probability minus the LM probability and proposes MTO and MSO to maximize it. The approaches bring significant improvements of +1.36, +1.50, and +0.63 BLEU points, respectively.
Problem
Method
The paper defines the Margin as the NMT probability minus the LM probability and proposes MTO and MSO to maximize it.
Source: §1 · p. 2, §3.2 · p. 3Results
The approaches bring significant improvements of +1.36, +1.50, and +0.63 BLEU points, respectively.
Source: §1 · p. 2Takeaways & Limitations
Human evaluation further verifies improved translation adequacy and fluency.
Source: §7 · p. 9A small Margin does not always indicate LM overconfidence, because some target words require greater reliance on partial translation.
Source: §3.1 · p. 3
Abstract
from arXiv · showhide
The Neural Machine Translation (NMT) model is essentially a joint language model conditioned on both the source sentence and partial translation. Therefore, the NMT model naturally involves the mechanism of the Language Model (LM) that predicts the next token only based on partial translation. Despite its success, NMT still suffers from the hallucination problem, generating fluent but inadequate translations. The main reason is that NMT pays excessive attention to the partial translation while neglecting the source sentence to some extent, namely overconfidence of the LM. Accordingly, we define the Margin between the NMT and the LM, calculated by subtracting the predicted probability of the LM from that of the NMT model for each token. The Margin is negatively correlated to the overconfidence degree of the LM. Based on the property, we propose a Margin-based Token-level Objective (MTO) and a Margin-based Sentencelevel Objective (MSO) to maximize the Margin for preventing the LM from being overconfident. Experiments on WMT14 English-to-German, WMT19 Chinese-to-English, and WMT14 English-to-French translation tasks demonstrate the effectiveness of our approach, with 1.36, 1.50, and 0.63 BLEU improvements, respectively, compared to the Transformer baseline. The human evaluation further verifies that our approaches improve translation adequacy as well as fluency.
1 Introduction
NMT can generate fluent but inadequate translations when its language-model mechanism overweights partial translations and neglects the source. The paper measures this overconfidence with a Margin and proposes MTO and MSO to improve adequacy.
- NMT hallucination produces fluent but inadequate translations when excessive attention to partial translations causes source segments to be neglected.Source: §1 · p. 1
- The paper defines the Margin as the NMT token probability minus the LM token probability to indicate LM overconfidence.Source: §1 · pp. 1–2
- MTO and MSO maximize the Margin, with MSO adding a dynamic weighting function to reduce the effect of training sentences containing many negative-Margin tokens.Source: §1 · p. 2
- The cited passage reports significant improvements of +1.36, +1.50, and +0.63 BLEU points for English-to-French results, respectively.Source: §1 · p. 2
- Human evaluation reports improvements in both translation adequacy and fluency.Source: §1 · p. 2
2 Background
NMT predicts each target word from both the source sentence and the partial translation, thereby incorporating a language-model mechanism. Excessive reliance on partial-translation fluency can neglect source segments and cause inadequacy.
- NMT predicts each target word using the source sentence together with the preceding partial translation.Source: §2 · p. 2
- The LM component predicts from the partial translation alone, while NMT additionally conditions prediction on the source sentence.Source: §2 · p. 2
- Overemphasizing translation fluency can cause NMT to neglect source segments, producing inadequate translations.Source: §2 · p. 2
3 The Approach
The approach uses the Margin between NMT and LM predictions to diagnose LM overconfidence, then maximizes it with token-level and sentence-level objectives trained in two stages.
3.1 Margin between the NMT and the LM
- The Margin is the difference between NMT and LM probabilities for each token, with smaller values indicating greater LM overconfidence and possible source neglect.The NMT probability conditions on the source and partial translation, whereas the LM probability conditions only on the partial translation.Source: §3.1 · pp. 2–3
3.2 Margin-based Token-level Objective
- The Margin-based Token-level Objective (MTO) adds a Margin loss to cross-entropy to maximize the Margin, weighting poorly learned tokens more strongly.The weighting factor 1 − pNMT(t) reduces attention to tokens already predicted with high probability.Source: §3.2 · p. 3
- MTO uses monotonically decreasing Margin functions, including Linear, Cube, Quintic, and Log; nonlinear functions are more stable near zero Margin than Linear.Figure 1 compares their slopes, with α in Log set to 10.Source: §3.2 · p. 3, Figure 1 · p. 3
3.3 Margin-based Sentence-level Objective
- MSO measures the sentence-level ratio of negative-Margin tokens and ignores losses for sentences exceeding threshold k, which may be inadequate or unrelated to their sources.The sentence-level weight is dynamic and equals one only when R(x,y) is below k; otherwise it is zero.Source: §3.3 · p. 4
3.4 Two-stage Training
- The method jointly pretrains NMT with an auxiliary LM, then finetunes NMT using MTO and MSO; the LM is not used during inference.Joint training aligns the auxiliary LM with NMT’s language-model mechanism while avoiding abundant extra parameters.Source: §3.4 · p. 4
4 Experimental Settings
The experiments evaluate the proposed methods on three large-scale translation tasks using Transformer-based models, standardized training settings, and case-sensitive BLEU.
4 Experimental Settings
- Experiments use WMT14 En→De, WMT14 En→Fr, and WMT19 Zh→En datasets with task-specific training and validation/test splits.Training data sizes are 4.5M, about 36M, and 20.5M sentence pairs, respectively.Source: §4 · p. 5
- The study measures case-sensitive BLEU and selects the best validation model for test-set evaluation, with paired bootstrap resampling for significance testing.Source: §4 · p. 5
- The implementation uses Transformer-Base settings with six encoder and decoder layers, 512-dimensional hidden states, eight V100 GPUs, and beam size 5.Source: §4 · p. 5
- Training uses 150K jointly pretrained steps followed by 150K finetuning steps, while the vanilla Transformer and NMT+LM baselines use 300K steps.Source: §4 · p. 5
5 Results and Analysis
Across three translation benchmarks, MTO and MSO improve BLEU over Transformer baselines and improve human-rated adequacy and fluency. Analyses associate these gains with larger NMT–LM Margins and show that the proposed weighting and sentence-level filtering components matter.
5 Results and Analysis
- +1.36, +0.63, and +1.50 BLEU improve Transformer baselines on En→De, En→Fr, and Zh→En, respectively.The improvements are reported for the proposed approaches across the three benchmark tasks.Source: §5.1 · p. 6, §5.2 · p. 6, Table 1 · p. 6
5.1 Results on En→De
- +0.50 BLEU from MTO over NMT+LM and +0.11 BLEU from MSO over MTO are reported on En→De.The authors attribute the additional MSO gain to reducing the impact of harmful training data.Source: §5.1 · p. 6
5.2 Results on En→Fr and Zh→En
- +0.42 and +1.04 BLEU from MTO over NMT+LM, followed by +0.14 and +0.31 BLEU from MSO over MTO, are reported on En→Fr and Zh→En.Source: §5.2 · p. 6
5.3 Human Evaluation
- MTO and MSO improve adequacy by 0.22 and 0.37 scores over the NMT baseline, while their further fluency gains over NMT+LM are 0.01 and 0.05.NMT+LM itself improves adequacy by 0.08 and fluency by 0.2 over NMT.Source: §5.3 · p. 7, Table 3 · p. 7
5.4 Analysis
- MSO shifts token Margins away from 0 toward [0.75, 1.0], while MTO and MSO reduce negative-Margin tokens and increase average Margin from 0.33 to 0.44.The average Margin increase is 33% relative to NMT+LM.Source: §5.4 · p. 7, Figure 3 · p. 7, Table 4 · p. 7
- Among the tested Margin functions, all improve over NMT and NMT+LM, with Quintic performing best; MSO also outperforms MTO at most finetuning steps.Source: §5.4 · pp. 7–8, Table 5 · p. 8, Figure 4 · p. 8
- Removing MTO’s weight decreases test BLEU by 1.09 relative to weighted MTO, showing that the weight 1 −pNMT (t) is important.Source: §5.4 · p. 8, Table 6 · p. 8
- Translation examples show that the proposed approach captures more source segments that Transformer mistranslates or neglects.Source: §5.4 · p. 8
6 Related Work
Related work addresses NMT inadequacy through architectural changes, adequacy-oriented objectives, language-model augmentation, and data selection. This paper instead directly optimizes the NMT–LM Margin and dynamically uses it to identify problematic training data.
6 Related Work
- Prior approaches improve adequacy through coverage tracking, enhanced cross-attention, source-side representations, source partitioning, and multi-task learning.Source: §6 · p. 8
- Other methods optimize reconstruction, coverage, or evaluation-based adequacy objectives, whereas this work directly maximizes the Margin between NMT and LM probabilities.Source: §6 · pp. 8–9
- Language models have been used for fusion, representation enhancement, prior knowledge, and data augmentation, but this work requires no additional data and avoids LM use during inference.Source: §6 · p. 9
- Unlike prior data-selection methods, MSO dynamically combines language and translation models for data selection during training.Source: §6 · p. 9
7 Conclusion
The paper addresses inadequate translation by measuring LM overconfidence with the Margin and optimizing it through token-level and sentence-level objectives. Experiments and human evaluation show improved translation adequacy and fluency.
- Margin-based token-level and sentence-level objectives maximize the Margin to prevent LM overconfidence.Source: §7 · p. 9
- Experiments on three large-scale translation tasks demonstrate the effectiveness and superiority of the proposed approaches.Source: §7 · p. 9
- Human evaluation verifies improvements in both translation adequacy and fluency.Source: §7 · p. 9
A Loss of the Language Model
The pretrained LM loss stabilizes after approximately 80K training steps on all three translation tasks, indicating convergence during pretraining.
- The LM loss remains stable after about 80K training steps for En→De, Zh→En, and En→Fr.This stability indicates that the LM converges during the pretraining stage.Source: A Loss of the Language Model · p. 12, Figure 5 · p. 12
- LM convergence provides the basis for evaluating the pretrained language model in the subsequent approach.Source: A Loss of the Language Model · p. 12
- Figure 5 tracks LM validation loss during pretraining across the three translation tasks.Source: Figure 5 · p. 12
B Hyperparameters Selection
Hyperparameter searches identify effective ranges for the Margin weight and task-specific thresholds for the sentence-level objective. The selected thresholds align with the observed relationship between negative Margins and hallucination.
- The best k is 30% for En→De and Zh→En, and 40% for En→Fr.These thresholds correspond to the proportion of negative-Margin tokens in a target sentence.Source: B Hyperparameters Selection · p. 12
- All three datasets perform better for λM ∈[5, 10], with peaks at λM =5, 8, and 8 for the three tasks, respectively.Source: B Hyperparameters Selection · p. 12
- Figure 6 reports validation BLEU scores for different λM values and MSO thresholds k across WMT14 En→De, WMT14 En→Fr, and WMT19 Zh→En.Source: Figure 6 · p. 12
- Sentences with negative-Margin token proportions above 30% or 40% are most likely to be hallucinations.Source: B Hyperparameters Selection · p. 12
C Case Study
The case study compares Transformer translations with the MSO method on examples from WMT19 Zh→En. MSO improves adequacy by recovering omitted information, correcting hallucinations, and preserving source chronology.
- MSO outperforms the Transformer baseline in translation adequacy across the illustrated examples.Figure 7 compares source, reference, baseline, and MSO translations, highlighting baseline errors and corrections.Source: C Case Study · p. 12, Figure 7 · p. 13
- MSO translates source segments that the baseline hallucinates over, under-translates, or neglects.Source: C Case Study · p. 12
- MSO corrects a baseline error that reverses the chronological order of the source sentence.Source: C Case Study · p. 12
- Figure 7 marks baseline mistranslations in red and baseline errors corrected by MSO in blue.Source: Figure 7 · p. 13