Sampling-Based Approximations to Minimum Bayes Risk Decoding for Neural Machine Translation

Bryan Eikema, Wilker Aziz

Introduction: The Beam Search Curse

In Neural Machine Translation (NMT), the standard approach is Maximum-a-posteriori (MAP) decoding, typically implemented via beam search. The goal is to find the single most probable translation according to the model. However, this decision rule is prone to the "beam search curse": as the search space (beam size) increases, translation quality often stagnates or even degrades. The most likely strings are frequently short, repetitive, or even empty, failing to capture the true semantic intent.

Minimum Bayes Risk (MBR) Decoding

An alternative to MAP is Minimum Bayes Risk (MBR) decoding. Instead of seeking the mode of the distribution, MBR identifies the translation $h$ that maximizes the expected utility $u$ over the model's posterior distribution $P(Y|X)$:

$$\hat{h} = \arg \max_{h \in \mathcal{H}} \mathbb{E}_{Y|X} [u(Y, h) | x]$$

By using metrics like BLEU or BEER as utility functions, MBR finds translations that are "centrally located" and robust. However, calculating this expectation is computationally expensive. Standard sampling-based MBR requires $O(N^2)$ utility evaluations for $N$ samples, making it nearly impossible to explore the large hypothesis spaces needed for high-quality translation.

Efficient Approximations

To make MBR viable, the authors propose two primary efficiency gains:

1. Decoupling Hypotheses and Samples ($MBR_{N\text{-by-}S}$)

The complexity can be reduced to $O(N \times S)$ by using a smaller set of $S$ samples to estimate the expected utility for a larger set of $N$ candidate hypotheses. Experiments show that even with $S \ll N$, translation quality remains high.

2. Coarse-to-Fine MBR ($MBR_{C2F}$)

This two-step process further accelerates decoding:

  • Coarse Step: A "cheap" proxy utility (e.g., skip-bigram F1) quickly prunes $N$ candidates down to a small "top-T" set.
  • Fine Step: A robust, more expensive target utility (e.g., BEER) performs final selection on the remaining candidates.

This method achieves up to a 22x speedup, reducing wall-clock time from over 23,000 seconds to just 726 seconds for a set of 405 hypotheses.

Translation quality (BEER and BLEU) as a function of hypothesis set size $N$ for various sample sizes $S$. Unlike beam search, MBR quality improves with larger search spaces.

The Role of Sampling Bias

A critical finding is that the choice of sampling method significantly impacts MBR performance. While beam search and nucleus sampling are effective for finding the mode, they introduce a bias that harms utility estimation. Ancestral sampling, despite producing noisier individual outputs, provides an unbiased estimate of the true distribution, which is essential for MBR's success.

Expected utility vs. its estimate for different sampling strategies. Ancestral sampling provides an unbiased estimate (following the diagonal), whereas nucleus sampling and beam search exhibit significant bias.

Key Results

The proposed methods were evaluated across high (En-De), mid (En-Ro), and low-resource (En-Ne) language pairs.

  • Lifting the Curse: MBR consistently improves as the hypothesis space $N$ grows, effectively solving the beam search curse.
  • Superior Performance: $MBR_{C2F}$ outperformed beam search across all tasks. On English-German, it achieved gains of +1.3 BEER and +2.4 BLEU points.
  • Robustness: MBR proved particularly valuable in low-resource settings where MAP decoding is notoriously unstable.

Conclusion

By rethinking the decision rule and introducing efficient sampling-based approximations, this work makes Minimum Bayes Risk decoding a practical alternative to beam search. While still slower than MAP, the significant gains in translation quality and robustness suggest that MBR is a superior choice for high-quality offline translation tasks. Future work may explore even faster neural utility functions or incremental pruning techniques.

Summary updated

BibTeX
@inproceedings{eikema2022sampling,
  author = {Bryan Eikema and Wilker Aziz},
  title = {{Sampling-Based Approximations to Minimum Bayes Risk Decoding for Neural Machine Translation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  url = {https://openreview.net/forum?id=4Ano8vav1b},
}
Figure