Quality-Aware Decoding for Neural Machine Translation

Patrick Fernandes, António Farinhas, Ricardo Rei, José Guilherme Camargo de Souza, Perez Ogayo, Graham Neubig, André F. T. Martins

Introduction

Standard Neural Machine Translation (NMT) has long relied on Maximum-a-Posteriori (MAP) decoding, typically approximated through beam search. The objective is straightforward: find the sentence $y$ that maximizes the probability $P(y|x)$ according to the model. However, researchers have identified a persistent "beam search curse," where larger beams and higher model probabilities often lead to shorter, lower-quality translations. This paper introduces Quality-Aware Decoding, a framework that leverages modern, learnable metrics to rank translation candidates, consistently outperforming traditional beam search in both automated evaluations and human studies.

The Problem: Probability vs. Quality

The core issue in NMT decoding is that models are trained to minimize cross-entropy loss. While this makes them proficient at predicting the next word in a sequence, it does not necessarily equip them to judge the overall "goodness" or "fluency" of a complete sentence. Furthermore, the field of MT evaluation has evolved significantly with the introduction of "learnable" metrics like COMET and BLEURT, which correlate much more closely with human judgment than traditional lexical metrics like BLEU. This research explores why these superior metrics should not be used directly during the decoding process to identify the best possible translation.

The Quality-Aware Decoding Framework

The authors propose a two-stage framework designed to decouple the generation of text from the assessment of its quality:

  1. Candidate Generation: Instead of searching for a single most likely path, the system generates a set of $N$ diverse candidates. This can be achieved using beam search, vanilla sampling, or nucleus ($p$) sampling.
  2. Ranking: Sophisticated metrics are then used to select the best candidate from the generated set. The authors explore four specific ranking strategies:
  3. Fixed N-best Reranker: Utilizes a single reference-free quality estimation (QE) metric (such as COMET-QE) to score candidates.
  4. Tuned N-best Reranker: Combines multiple QE metrics and model likelihood, with weights optimized using Minimum Error Rate Training (MERT).
  5. Minimum Bayes Risk (MBR) Decoding: A computationally intensive method that uses a reference-based metric (like COMET) as a "utility function." It compares every candidate against every other candidate in the set, selecting the one with the highest average similarity to the rest.
  6. Two-Stage (Reranking → MBR): To optimize performance, this hybrid approach uses a fast reranker to select the top $M$ candidates, then applies MBR only to that smaller subset.

Experimental Setup

The framework was evaluated across four language pairs and two model scales:

  • High-resource (Large Models): WMT20 English-to-German (EN→DE) and English-to-Russian (EN→RU).
  • Constrained-resource (Small Models): IWSLT17 English-to-German (EN→DE) and English-to-French (EN→FR).
  • Metrics: Evaluation utilized standard lexical metrics (BLEU, chrF), modern learnable metrics (COMET, BLEURT), and expert-level Multidimensional Quality Metrics (MQM) human evaluations.

Key Insights

The Power of Diversity

Nucleus sampling often provides a superior pool of candidates for ranking compared to beam search. While an individual sample might be of low quality, a diverse set of samples is more likely to contain a "hidden gem" that a quality-aware ranker can successfully identify.

The "Metric Gap"

A notable divergence exists between BLEU scores and human judgment. Quality-aware decoding often results in lower BLEU scores but significantly higher human ratings. This suggests that optimizing for exact word matches (BLEU) may actually be hindering progress in NMT quality.

Efficiency through Hybridization

The two-stage approach (Tuned Reranking followed by MBR) offers the most effective balance. It achieves state-of-the-art results while mitigating the quadratic computational cost ($O(N^2)$) typically associated with MBR decoding.

Results and Impact

Quality-aware decoding outperformed the beam search baseline across all datasets when measured by COMET and BLEURT. In human studies, the "Tuned Reranker + MBR" approach was significantly preferred. For EN→RU, it achieved an MQM score of 86.78, compared to the baseline's 79.78.

Furthermore, MQM analysis demonstrated that these methods specifically reduce "critical" and "major" errors. In the EN→RU task, the proposed method reduced lexical selection errors by nearly 50% compared to the baseline.

Limitations and Future Work

Despite its success, Quality-Aware Decoding introduces computational overhead, making it slower than standard beam search. There is also a risk of "metric overfitting," where a ranker might exploit the weaknesses of a specific metric rather than improving actual translation quality. Future research will focus on more sophisticated pruning strategies for MBR and methods to "distill" these high-quality decoding results back into the original model to improve inference speed.

Summary updated

BibTeX
@inproceedings{fernandes2022quality,
  author = {Patrick Fernandes and António Farinhas and Ricardo Rei and José Guilherme Camargo de Souza and Perez Ogayo and Graham Neubig and André F. T. Martins},
  title = {{Quality-Aware Decoding for Neural Machine Translation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.100},
}
Figure