A Stochastic Decoder for Neural Machine Translation

Philip Schulz, Wilker Aziz, Trevor Cohn

Abstract

Standard Neural Machine Translation (NMT) models often ignore the inherent ambiguity of language by treating translation as a deterministic process. We present a Stochastic Decoder (SDEC) that incorporates a chain of latent variables to capture word-level variations. By utilizing variational inference and a look-ahead mechanism, our model better accounts for the diverse ways a source sentence can be translated, leading to improved performance across multiple language pairs.

Introduction

If you ask three professional translators to translate a sentence, you’ll likely get three different—but equally correct—results. They might use different synonyms or rearrange the sentence structure. This "translation ambiguity" is a fundamental property of language. Standard NMT models, however, are typically built on a deterministic framework, assuming a single "ground truth" mapping from source to target. While powerful, these models struggle to account for the natural variation found in training data. Previous attempts to address this used a single "sentence-level" random variable, which is often too coarse to capture the specific, local choices—such as word order or vocabulary—that occur throughout a sentence.

The Stochastic Decoder Architecture

The proposed model extends the classic attention-based NMT architecture by introducing a deep generative framework. The key innovation is the use of a chain of latent variables. Instead of one global variable for the entire sentence, the model introduces a latent Gaussian variable ($z_i$) for every position in the target sentence. This allows the model to make stochastic choices at each step of the decoding process.

Graphical representation of the stochastic decoder (a) and the inference network (b) with its look-ahead mechanism.

To train this model, the authors utilize Variational Inference (VI). An inference network acts as a guide, helping the model learn the distribution of latent variables based on the actual target sentence. A crucial component is the "look-ahead" mechanism; during training, the inference network can observe the entire target sentence, informing the latent variables about future context. To prevent the decoder from ignoring the latent variables (the "strong generator" problem), the authors employ KL scaling (annealing), gradually increasing the influence of the latent space during training.

Experimental Setup

The model was evaluated on the IWSLT 2016 dataset, consisting of TED talk translations. The authors tested four language pairs, translating from English into Arabic, Czech, French, and German. Training sets ranged from approximately 114k to 224k sentence pairs.

Results and Discussion

Quantitative Performance

The Stochastic Decoder (SDEC) consistently outperformed both the standard deterministic baseline (Sockeye) and the previous state-of-the-art sentence-level latent model (SENT) across all tested languages.

Quantitative comparison of BLEU scores across Arabic, Czech, French, and German for the baseline, SENT, and SDEC models.

As shown in the results table, SDEC achieved a BLEU score of 25.3 on English-to-French, compared to the baseline's 24.4. The results demonstrate that placing latent variables at every time step allows the model to capture specific syntactic shifts and local variations that a single sentence-level variable misses.

Qualitative Analysis

Sampling from the model multiple times for the same input sentence revealed its ability to produce grammatically distinct but correct variations. For example, in German, the model successfully toggled between the simple past and the past perfect tense while maintaining complex long-range dependencies between verbs. This suggests the latent variables effectively act as "contextual shortcuts" for diverse translation choices.

Conclusion and Future Work

By embracing ambiguity through a chain of latent variables, the Stochastic Decoder provides a more robust framework for NMT. Future work may explore more flexible distributions, such as Normalizing Flows, to capture even greater linguistic complexity. Additionally, disentangling latent factors (e.g., style vs. meaning) and applying these principles to Transformer architectures represent promising avenues for further research.

Summary updated

BibTeX
@inproceedings{schulz2018stochastic,
  author = {Philip Schulz and Wilker Aziz and Trevor Cohn},
  title = {{A Stochastic Decoder for Neural Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2018},
  url = {https://openreview.net/forum?id=H1Vrr2gdbH},
}
Figure