Sequence-Level Training for Non-Autoregressive Neural Machine Translation

Chenze Shao, Yang Feng, Jinchao Zhang, Fandong Meng, Jie Zhou

Introduction

Non-Autoregressive Translation (NAT) has emerged as a promising approach to accelerate Neural Machine Translation (NMT) by generating all tokens in a sequence simultaneously. However, NAT models typically suffer from a significant quality gap compared to standard autoregressive (AT) models. This paper proposes a sequence-level training framework designed to bridge this gap by moving beyond token-level objectives toward more holistic sequence-level optimization.

The Multimodality Problem and Over-correction

The primary challenge in NAT is the multimodality problem. Because NAT models predict each word position independently, they struggle when a source sentence can be translated in multiple valid ways. If a model is trained using standard word-level cross-entropy loss, it may attempt to average different valid translations or get penalized for choosing a correct word that doesn't align with the specific reference token at that position.

This often results in "over-correction," where the model generates garbled or repetitive text to satisfy the loss function. For instance, instead of "I have to get up and start working," a model might produce "I have to up up start start working."

Figure 1: Illustration of the over-correction problem in NAT models, where independent word predictions lead to repetitive outputs.

Proposed Methods

To address these issues, the authors introduce two sequence-level training objectives that evaluate the translation as a whole.

1. Customized Reinforcement Learning (RL)

Standard RL techniques like REINFORCE often exhibit high variance in NMT. The authors leverage the independence property of NAT to develop more stable variants:

  • Reinforce-Step: Assigns specific rewards to individual word positions rather than a single global reward.
  • Reinforce-Topk: Reduces variance by calculating exact gradients for the top-k most likely words and sampling for others.
  • Traverse-Ref: A novel approach that restricts gradient calculation to words present in the reference sentence, significantly reducing training noise.

2. Bag-of-Ngrams (BoN) Objective

The authors propose a differentiable BoN loss that minimizes the discrepancy between the n-gram counts of the model's output and the reference. Unlike AT models, the independence of NAT allows for efficient and exact calculation of this loss without the need for expensive approximations. This objective is particularly robust to misalignment errors, as it focuses on the presence of n-grams rather than their exact positions.

Three-Stage Training Strategy

The authors employ a pipeline to optimize performance:

  1. Pretraining: Initial training with standard cross-entropy for a fast warmup.
  2. BoN Finetuning: Improving the global n-gram distribution of the outputs.
  3. RL Finetuning: Final optimization for specific sequence-level metrics like BLEU or ROUGE.

Experimental Setup

The framework was evaluated on four standard benchmarks: WMT14 English-German (En-De) and WMT16 English-Romanian (En-Ro) in both directions. Knowledge distillation from a standard AT model was used to simplify the target distribution, a standard practice in NAT research.

Key Results and Insights

The proposed "Seq-NAT" method demonstrates substantial improvements over baseline NAT models. On the WMT14 En-De task, the method achieved a BLEU score of 29.91, an improvement of over 5 points compared to the baseline. This performance brings NAT within 1.7 BLEU points of the state-of-the-art Transformer while maintaining a 15.6x speedup during inference.

Figure 2: Qualitative comparison of translation outputs. The baseline NAT model exhibits significant repetition compared to the autoregressive (AT) model.

Qualitative analysis confirms that Seq-NAT effectively mitigates common NAT errors such as "over-translation" (word repetition) and "under-translation" (missing content). Furthermore, the BoN loss shows a high Pearson correlation (0.87) with human-judged quality, far exceeding the correlation of standard cross-entropy (0.56).

Conclusion

By treating the independence of NAT as a mathematical advantage rather than a limitation, the authors developed sequence-level objectives that significantly enhance translation quality. The combination of differentiable n-gram matching and stable RL variants allows NAT models to achieve competitive accuracy without sacrificing their inherent speed advantage.

Summary updated

BibTeX
@inproceedings{shao2021sequence,
  author = {Chenze Shao and Yang Feng and Jinchao Zhang and Fandong Meng and Jie Zhou},
  title = {{Sequence-Level Training for Non-Autoregressive Neural Machine Translation}},
  booktitle = {Comput. Linguistics},
  year = {2021},
  url = {https://openreview.net/forum?id=Gid0oTyGS27},
}
Figure