MR-P: A Parallel Decoding Algorithm for Iterative Refinement Non-Autoregressive Translation

Hao Cheng, Zhihua ZhangACL 2022

Introduction

Standard Neural Machine Translation (NMT) typically relies on autoregressive decoding, generating tokens sequentially from left to right. While accurate, this process is computationally expensive and slow. Non-Autoregressive Translation (NAT) models aim to accelerate inference by predicting all tokens in a sentence simultaneously. However, NAT models often struggle with the "multimodality problem," where independent token predictions lead to structural inconsistencies, most notably the "stuttering" or repetition of words (e.g., "the the the").

To mitigate this, iterative refinement techniques like the Mask-Predict (M-P) algorithm have been developed. M-P generates an initial draft, masks low-confidence tokens, and re-predicts them. Despite this, NAT models can remain "confident" in repetitive errors, causing them to persist through iterations. This paper introduces MaskRepeat-Predict (MR-P), a model-agnostic decoding strategy that prioritizes the removal of consecutive repetitions to enhance translation quality and efficiency.

The MaskRepeat-Predict (MR-P) Algorithm

MR-P is designed to work with any Conditional Masked Language Model (CMLM) without requiring architectural changes. The algorithm modifies the standard refinement process by introducing a repetition-aware masking strategy:

  1. Repetition Identification: At each iteration, the algorithm identifies groups of consecutive identical tokens.
  2. Priority Masking: Instead of relying solely on probability scores, MR-P prioritizes masking these repetitions. Within a group of identical tokens, only the one with the highest probability is retained; all others are masked.
  3. Confidence-Based Filling: If the number of masked tokens is below the iteration's target quota, the algorithm then masks additional tokens with the lowest confidence scores, following standard M-P behavior.
  4. Early Stopping: MR-P includes a convergence-based early stopping mechanism. If the generated sequence remains unchanged between iterations, the process terminates, preventing "over-refinement" and reducing latency.
Comparison of iterative refinement between standard Mask-Predict (M-P) and MaskRepeat-Predict (MR-P).

The authors found that a hybrid approach—using standard M-P for the first half of iterations and switching to MR-P for the remainder—provides the best foundation for the final translation.

Experimental Evaluation

The performance of MR-P was evaluated on three major benchmarks: WMT’14 English-German (En-De), WMT’16 English-Romanian (En-Ro), and WMT’17 English-Chinese (En-Zh). Baseline NAT models were trained using standard knowledge distillation from high-quality autoregressive models.

Results and Discussion

MR-P consistently outperforms the standard Mask-Predict algorithm across various metrics and language pairs.

Translation Quality and Efficiency

On the WMT’14 En-De task, MR-P achieved a significant gain of +1.39 BLEU points using only two iterations. Furthermore, the early stopping mechanism effectively doubled decoding speed. When the maximum iteration count was set to 10, the average number of iterations dropped to approximately 5.97 for En-De and 4.57 for En-Ro, without sacrificing quality.

Impact of Sentence Length

A key finding is that repetitions are more prevalent in longer sentences. Consequently, MR-P provides the most substantial improvements for complex, lengthy translations where traditional NAT models typically struggle.

BLEU scores across different source sentence lengths, showing MR-P's superior performance on longer sequences.

Fluency and Naturalness

To assess the "naturalness" of the generated text, the authors measured perplexity using GPT-2. MR-P significantly lowered perplexity compared to the baseline, confirming that the reduction in repetitions leads to more fluent and human-like output.

Conclusion

MR-P offers a simple yet effective solution to the repetition problem in non-autoregressive translation. By treating repetitions as structural signals rather than just low-probability events, the algorithm forces the model to reconsider local context. Future work may involve integrating this repetition-aware logic directly into the training phase to help NAT models avoid these errors inherently.

Summary updated

BibTeX
@inproceedings{cheng2022mr,
  author = {Hao Cheng and Zhihua Zhang},
  title = {{MR-P: A Parallel Decoding Algorithm for Iterative Refinement Non-Autoregressive Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.findings-acl.25},
}
Figure