Easy Guided Decoding in Providing Suggestions for Interactive Machine Translation

Ke Wang, Xin Ge, Jiayi Wang, Yuqi Zhang, Yu ZhaoACL 2023

Abstract

Interactive Machine Translation (IMT) aims to assist human translators by providing real-time suggestions. A key challenge is Translation Suggestion (TS), where a model must fill a specific span within a sentence given a fixed prefix and suffix. We present Prefix-Suffix Guided Decoding (PSGD), an unsupervised, plug-and-play algorithm that optimizes the probability of the entire sequence. PSGD achieves significant improvements in translation quality, outperforming state-of-the-art constrained decoding by over 10 BLEU points while reducing latency by 63%.

Introduction

In professional translation workflows, "post-editing" machine-generated drafts is more common than translating from scratch. Translation Suggestion (TS) is a sophisticated interaction mode where a translator identifies a problematic span and requests an alternative from the machine. For these suggestions to be effective, they must seamlessly integrate with the surrounding context—the prefix and the suffix.

Overview of the PSGD process for translation suggestion.

As shown in Figure 1, the goal is to replace a "span with error" with a "translation suggestion" $\hat{r}$ such that the resulting sequence $\langle p, \hat{r}, s \rangle$ is coherent and fluent. Current solutions face a "quality-speed" dilemma: supervised models are expensive to train and adapt, while existing constrained decoding methods are often slow and prone to ignoring suffix constraints.

Methods

PSGD addresses these issues by redefining the decoding objective. Instead of maximizing only the probability of the generated tokens, PSGD maximizes the probability of the entire sequence: $P(p, \hat{r}, s | x)$, where $x$ is the source sentence.

Transformer architecture adaptation for PSGD.

The technical implementation, illustrated in Figure 2, leverages several key innovations:

  1. Span-Only Decoding: The decoder bypasses the prefix $p$ and begins generation at the start of the highlighted span.
  2. Parallel Probability Calculation: By utilizing the causal masking inherent in Transformer decoders, PSGD calculates the probability of the fixed suffix $s$ in parallel with each new token generated for the suggestion $\hat{r}$. This allows the model to evaluate how well a potential suggestion fits the existing ending without significant computational overhead.
  3. Early Stopping Mechanism: Since the suffix is already present, the model does not generate an end-of-sentence token. Instead, it uses a "patience" hyperparameter ($pt$) to monitor the average log-probability of the full sequence, stopping when no further improvement is likely.

Experimental Setup

The researchers evaluated PSGD across multiple benchmarks:

  • WeTS: A dedicated translation suggestion dataset covering German-English, English-German, Chinese-English, and English-Chinese.
  • WMT 2022 TS Task: Data from the Conference on Machine Translation.
  • WMT News Sets: Used to test robustness against varying "mask ratios"—the proportion of the sentence being replaced.

Key Results

PSGD demonstrates a remarkable leap in both quality and efficiency. On the WeTS dataset, it outperformed the previous state-of-the-art constrained decoding method (VDBA) by an average of 10.87 BLEU points. On the WMT22 dataset, the improvement was 8.62 BLEU.

Crucially, this quality boost does not come at the cost of speed. PSGD reduced decoding time overhead by 63.4% compared to previous constrained methods. This sub-second latency is vital for interactive CAT tools where human translators expect immediate feedback. Furthermore, PSGD proved highly robust. While competing methods often fail when asked to replace large portions of a sentence (high mask ratios), PSGD's performance remained stable even when replacing up to 50% of the text.

Conclusion

Prefix-Suffix Guided Decoding offers a powerful, training-free solution for interactive machine translation. By shifting the focus to whole-sequence probability and exploiting Transformer architectures for parallel calculation, PSGD resolves the long-standing quality-speed dilemma in translation suggestions. Future work will explore extending this guided approach to non-autoregressive models to further enhance speed and bidirectional context integration.

Summary updated

BibTeX
@inproceedings{wang2023easy,
  author = {Ke Wang and Xin Ge and Jiayi Wang and Yuqi Zhang and Yu Zhao},
  title = {{Easy Guided Decoding in Providing Suggestions for Interactive Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.434},
}
Figure