Abstract
This paper introduces an Error Correction Mechanism (ECM) for Neural Machine Translation (NMT) to combat "exposure bias"—the performance drop that occurs when a model encounters its own mistakes during inference. By adapting the two-stream self-attention architecture, the authors enable the decoder to simultaneously correct erroneous previous tokens and predict the next one, leading to significant gains in translation quality across multiple benchmarks.
Addressing Exposure Bias in NMT
Most NMT models are autoregressive, generating text one word at a time by using previous outputs as context. However, a fundamental mismatch exists between training and inference:
- During Training: Models use "Teacher Forcing," where ground truth tokens are provided as context.
- During Inference: Models rely on their own previously generated words, which may contain errors.
This discrepancy, known as exposure bias, causes early mistakes to propagate and "snowball," often derailing the entire translation. While techniques like scheduled sampling introduce noise during training, they typically do not explicitly teach the model how to recover from or fix those errors.
The Error Correction Mechanism (ECM)
The proposed architecture utilizes a Two-Stream Self-Attention decoder, a concept originally introduced in the XLNet model. This design manages two parallel streams of information to decouple the correction of past tokens from the prediction of future ones:
- The Content Stream: This stream accepts previous (potentially erroneous) tokens. Its primary objective is to "correct" these tokens layer-by-layer, generating a hidden representation that approximates the ground truth.
- The Query Stream: This stream utilizes the refined representations from the content stream to predict the subsequent token in the sequence.
By processing these streams simultaneously, the model performs error correction and translation in a single pass, avoiding the latency of separate post-editing models.
Training Strategy and Dual-Loss
To optimize this architecture, the authors employ a hybrid training strategy. They use scheduled sampling to intentionally inject errors into the input sequence, then apply a dual-loss function:
- Next-Token Prediction Loss: The standard cross-entropy loss for predicting the next correct word.
- Error Correction Loss (ECM): A novel loss that penalizes the content stream if its refined representation deviates from the ground truth representation of a token, even when the input was incorrect.
Evaluation and Key Results
The researchers evaluated the ECM on five translation tasks: IWSLT 2014 (De-En, Es-En, He-En) and WMT (2014 En-De, 2016 En-Ro). The method consistently outperformed both standard Transformer baselines and traditional scheduled sampling approaches.
- BLEU Score Improvements: On IWSLT De-En, the model achieved a 35.70 BLEU score (+0.92 over baseline). On WMT En-Ro, it saw a significant jump of +1.8 BLEU.
- Ablation Studies: The authors found that the Error Correction loss was critical. Using the two-stream architecture without the correction loss ($\lambda = 0$) yielded negligible improvements, confirming that explicit correction is the primary driver of performance gains.
Qualitative analysis showed that when the model predicted a slightly inaccurate word (e.g., "movie" instead of "film director"), the ECM allowed it to maintain grammatical coherence for the remainder of the sentence, whereas baseline models often collapsed.
Limitations and Future Work
Despite its success, the two-stream decoder introduces higher computational complexity compared to a standard Transformer. Additionally, performance is sensitive to hyperparameters like the sampling decay rate and the weight of the correction loss ($\lambda$). Future research may explore applying this mechanism to other sequence generation tasks plagued by error propagation, such as text summarization or unsupervised machine translation.
Summary updated