Confidence-Aware Scheduled Sampling for Neural Machine Translation

Yijin Liu, Fandong Meng, Yufeng Chen, Jinan Xu, Jie Zhou

Abstract

Neural Machine Translation (NMT) models typically rely on teacher forcing during training, which creates a discrepancy known as exposure bias during inference. This paper proposes Confidence-Aware Scheduled Sampling, a technique that dynamically adjusts the training curriculum based on the model's own confidence. By utilizing a two-pass decoding mechanism, the model selectively replaces ground-truth tokens with its own predictions or random noise. Experimental results across multiple WMT benchmarks demonstrate that this approach improves translation quality by up to 1.0 BLEU and achieves peak performance up to 3x faster than standard Transformer models.

Introduction

The standard training paradigm for NMT, Teacher Forcing, provides the model with perfect reference tokens as history for predicting the next word. However, at inference time, the model must rely on its own previous (and potentially erroneous) predictions. This mismatch, termed Exposure Bias, allows errors to accumulate throughout a sequence. While traditional Scheduled Sampling attempts to bridge this gap by occasionally sampling model predictions during training, it often employs a static, time-based decay that ignores the model's actual competence or the difficulty of specific tokens.

Methods: Confidence-Aware Sampling

The authors propose a fine-grained sampling strategy that evaluates model competence at every token position.

Two-Pass Decoding and Confidence Estimation

To determine when to sample, the model employs a Two-Pass Decoding strategy. In the first pass, the model generates a "draft" translation along with associated confidence scores. The second pass then performs the actual parameter updates. The authors utilize Predicted Translation Probability (PTP)—the raw output probability from the softmax layer—as the confidence metric, finding it nearly as effective as computationally expensive Monte Carlo Dropout.

The Confidence-Aware Scheduled Sampling architecture involving two-pass decoding.

Sampling Strategy

The training curriculum is divided into three regimes based on confidence thresholds:

  1. Low Confidence: The model receives the ground-truth token to facilitate basic learning.
  2. High Confidence: The model is fed its own prediction, forcing it to learn how to handle its own output and potential errors.
  3. Very High Confidence (Target Denoising): When the model is overly confident, its predictions often match the ground truth. To maintain a challenge, the authors replace the token with a random word from the sentence, acting as a "Target Denoising" task that improves robustness against noisy inputs.

Experimental Results

The approach was evaluated on three large-scale benchmarks: WMT14 English-German (4.5M pairs), WMT14 English-French (36M pairs), and WMT19 Chinese-English (20M pairs).

Translation Quality and Convergence

The confidence-aware model outperformed the baseline Transformer by 1.01 BLEU on EN-DE and 0.98 BLEU on ZH-EN. Crucially, the model reached the baseline's peak performance 3x faster, and was 1.8x faster than vanilla scheduled sampling.

Performance on Long Sequences

Exposure bias is most detrimental in long sequences where errors have more opportunity to propagate. As shown in the performance breakdown by sequence length, the proposed method provides significant gains for sequences exceeding 80 tokens.

Performance comparison between the proposed approach and the Transformer base across different sequence lengths.

Discussion and Key Insights

  • Competence-Based Curriculum: By using confidence as a proxy for competence, the training difficulty scales naturally with the model's progress.
  • The Teacher Forcing Trap: Vanilla scheduled sampling often fails because a large majority of predicted tokens are identical to the ground truth. The introduction of Target Denoising ensures the model continues to learn even when it becomes highly accurate.
  • Decoder Scaling: This strategy effectively alleviates the "decoder bottleneck," allowing deeper decoder layers to contribute meaningfully to performance—a result rarely seen in standard NMT training.

Limitations

While highly effective, the method introduces a 30% increase in computational cost per training step due to the two-pass decoding. However, this is largely offset by the drastically reduced number of total steps required for convergence. Additionally, the model's performance is sensitive to the selection of confidence thresholds ($t_{golden}$ and $t_{rand}$), which may require tuning for different architectures.

Conclusion

Confidence-Aware Scheduled Sampling offers a robust solution to exposure bias by aligning the training curriculum with model competence. The significant improvements in both translation quality and convergence speed suggest that confidence-based feedback is a powerful tool for training sequence generation models.

Summary updated

BibTeX
@inproceedings{liu2021confidence,
  author = {Yijin Liu and Fandong Meng and Yufeng Chen and Jinan Xu and Jie Zhou},
  title = {{Confidence-Aware Scheduled Sampling for Neural Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.findings-acl.205},
}
Figure