Models and Inference for Prefix-Constrained Machine Translation

Joern Wuebker, Spence Green, John DeNero, Sasa Hasan, Minh-Thang LuongACL 2016

In the evolving landscape of computer-assisted translation, the objective is shifting from total automation to the creation of "centaur" systems—environments where human translators and artificial intelligence operate in a tight, interactive feedback loop. A critical component of these systems is the ability to accurately predict the remainder of a sentence given a human's partial translation. This research, a collaboration between Lilt and Stanford University, investigates the models and inference techniques required to make these real-time suggestions both accurate and performant.

The Challenge of Prefix-Constrained Decoding

Interactive Machine Translation (IMT) assists humans by providing "autocompletes" as they type. This necessitates prefix-constrained decoding: given a source sentence and a target prefix (the text already typed by the human), the system must predict the most likely suffix.

Standard translation models are typically optimized to translate entire sentences from scratch. When forced to adhere to a specific prefix, traditional "naïve" decoding often fails due to the alignment bottleneck. If the model cannot accurately align the human's specific word choices back to the source text, it may repeat words, skip content, or produce ungrammatical suggestions.

Qualitative comparison of translation outputs showing how prefix-aware decoding improves alignment and fluency by fixing errors like word repetition and garbled syntax found in baseline models.

Methods: Adapting PBMT and NMT

The researchers explored two primary architectures to solve this problem:

1. Improved Phrase-Based MT (PBMT)

The authors introduced several innovations to make traditional phrase-based systems "prefix-aware":

  • Target Beam Search: A two-step process that first aligns the target prefix to the source (relaxing reordering limits for a better fit) and then generates the suffix using standard beam search.
  • Synthetic Phrase Pairs: The system generates "on-the-fly" phrase pairs using word-level lexical statistics when the pre-computed phrase table is insufficient to cover the human's prefix.
  • Diverse n-best Extraction: A lattice-based algorithm was developed to extract the $n$ most likely distinct next words, ensuring that autocomplete suggestions offer meaningful variety rather than minor morphological variations.

2. Neural Machine Translation (NMT)

The authors adapted an RNN-based encoder-decoder model. NMT models are inherently suited for this task because they predict words sequentially based on previous context. By feeding the human prefix into the decoder, the model naturally continues the sequence, handling complex morphology and long-range reordering (such as German verb placement) more gracefully than PBMT.

Key Results: The Latency-Accuracy Trade-off

The models were evaluated using pxBleu (Prefix-Bleu), which scores the suffix independently of the prefix, and Word Prediction Accuracy (WPA), which measures how often the suggested next word matches the reference.

While NMT demonstrated clear superiority in prediction quality, a massive rift exists regarding speed. In tests on English-German data, the NMT system achieved significantly higher WPA but at a cost of several seconds per segment. In contrast, the optimized PBMT system provided suggestions in under 100 milliseconds, making it the only viable option for real-time "suggest-as-you-type" interfaces on 2016-era hardware.

Performance comparison between phrase-based (PBMT) and neural (NMT) models, highlighting the 100x difference in inference speed despite NMT's higher prediction accuracy.

Conclusion

The research highlights that while NMT is a "native" next-word predictor with superior linguistic capabilities, PBMT remains the "speed king" for production IMT. The authors suggest that future systems may find success in hybrid approaches—leveraging PBMT for immediate responsiveness and NMT for background re-ranking or complex completions. Improving the alignment of human prefixes remains the most vital step in making interactive translation systems feel seamless and helpful to professional linguists.

Summary updated

BibTeX
@inproceedings{wuebker2016models,
  author = {Joern Wuebker and Spence Green and John DeNero and Sasa Hasan and Minh-Thang Luong},
  title = {{Models and Inference for Prefix-Constrained Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2016},
  doi = {10.18653/v1/p16-1007},
}
Figure