Auto-Encoding Variational Neural Machine Translation

Bryan Eikema, Wilker Aziz

TL;DR

Standard neural machine translation (NMT) models only the conditional probability of a target sentence given a source, ignoring valuable statistical signals in the source text distribution. This paper introduces Auto-Encoding Variational NMT (AEVNMT), a deep generative model that jointly generates source and target sentences from a shared continuous latent representation. Paired with a fast maximum a posteriori (MAP) decoding approximation that requires only a single forward pass, AEVNMT consistently outperforms conditional and non-latent joint baselines across in-domain, mixed-domain, and synthetic-data settings.

What Problem Does This Paper Address?

Typical NMT systems are trained conditionally: given source sentence $x$, maximize $P(y|x)$. Statistically, this assumes that the marginal distribution over source sentences $P(x)$ provides zero information about the translation mapping $P(y|x)$.

However, real-world translation datasets are almost always heterogeneous mixtures:

  • Parallel data often combine diverse domains, registers, and translator idiosyncrasies.
  • Low-resource setups frequently rely on noisy crowdsourced text or synthetic back-translations.

Under standard conditional modeling, gradient updates do not account for whether a source sentence is natural or an unnatural synthetic artifact. The authors address this gap by framing translation as joint density modeling over $(x, y)$, using a shared latent variable to capture unobserved global factors of variation.

Methods

AEVNMT formulates bilingual sentence generation as a directed graphical model:

  1. Prior: Sample a global sentence embedding from a standard Gaussian: $z \sim \mathcal{N}(0, I)$.
  2. Generative Model: Generate the source via a neural language model $P(x|z)$, then generate the target via an attentional sequence-to-sequence model $P(y|x, z)$. Crucially, the source embedding parameters are shared between both modules.
  3. Amortised Variational Inference: Because the marginal $P(x, y)$ is intractable, the model trains via variational auto-encoding (maximizing the ELBO). An inference network predicts the mean and diagonal covariance of Gaussian posterior $q_\lambda(z|x, y)$ (or simplified $q_\lambda(z|x)$) using the reparameterisation trick.
  4. Preventing Posterior Collapse: Standard recurrent decoders tend to ignore latent variables. The authors employ KL annealing and target word dropout to force the decoder to rely on $z$.
  5. Efficient MAP Decoding: Exact test-time decoding over marginals is intractable. Rather than running slow iterative sampling or stochastic hill-climbing, the authors approximate the lower bound by conditioning directly on the expected latent vector $\mathbb{E}[z]$ from an auxiliary network $r(z|x)$ (or directly $q(z|x)$). This enables standard beam search in a single forward pass, preserving the decoding speed of conditional NMT.
       z ~ N(0, I)
      / \
     v   v
    x --> y  (Joint Generative Process)

Datasets

The authors evaluated German $\leftrightarrow$ English translation tasks across several data regimes:

  • WMT16 News Task: News Commentary v12 (NC, ~256k sentence pairs) for training; newstest2014+2015 for dev; newstest2016 for test.
  • IWSLT14 TED Talks: ~153k training pairs; dev/test split follows Ranzato et al. (2016).
  • Synthetic Data: 1 million monolingual sentences subsampled from News Crawl 2016, back-translated into the source language.
  • Out-of-Domain Robustness: The TAUS benchmark across five unseen domains (Computer Hardware, Computer Software, Industrial Electronics, Professional & Business Services, Legal).

No new datasets were introduced.

Key Insights and Ideas

  • Moralisation of the Latent Graph: Marginalising the latent variable $z$ introduces undirected dependencies between all source and target words (moralisation). This yields a richer class of marginal distributions than simply multi-tasking a language model and translation model.
  • Source-Only Inference is Sufficient: Experiments revealed that conditioning the inference network on the source alone ($q(z|x)$) performed on par with conditioning on both $(x, y)$ and learning an auxiliary prediction network $r(z|x)$, while requiring fewer parameters and simpler training.
  • Latent Space Probing: Diagnostic linear classifiers trained on $z \sim q(z|x)$ successfully distinguished domains (news vs. transcripts) and data quality (gold-standard vs. synthetic back-translations) with >90% accuracy. However, deterministic baseline encoders also captured these coarse features, suggesting AEVNMT's gains stem from more nuanced regularities.

Key Results

AEVNMT demonstrated consistent gains across translation directions (EN-DE and DE-EN) measured by BLEU and BEER over 5 independent runs:

Scenario Task / Direction COND Baseline (BLEU) JOINT (No Latent) (BLEU) AEVNMT (Ours) (BLEU)
In-Domain WMT16 EN-DE 17.8 17.9 18.4
WMT16 DE-EN 20.1 20.1 20.6
IWSLT14 EN-DE 23.0 23.2 23.4
IWSLT14 DE-EN 27.3 27.5 28.0
Mixed-Domain WMT16 EN-DE 17.6 18.1 18.4
(Trained on NC+IWSLT) IWSLT14 DE-EN 29.1 29.2 29.2
Synthetic Data WMT16 EN-DE 22.3 22.2 22.5
(NC + 1M Back-trans) WMT16 DE-EN 26.9 26.7 27.4

The simple JOINT baseline (without a latent space) underperformed AEVNMT, proving that sharing source embeddings alone does not account for the improvements.

Limitations and Future Work

  • Diminishing Returns on High Variability: Counter-intuitively, the relative gains of AEVNMT over baselines were larger in-domain than in mixed-domain or large synthetic settings. The authors hypothesize that a simple unimodal diagonal Gaussian prior $\mathcal{N}(0, I)$ cannot adequately model complex multi-modal domain distributions.
  • Scalability with Data Volume: The relative benefits of latent joint modeling may diminish as parallel dataset sizes grow substantially.
  • Future Directions: Incorporating more expressive priors, such as Gaussian mixture models or hierarchical latent priors, to better capture fine-grained demographic, personal, and stylistic variations.

Summary updated

BibTeX
@inproceedings{eikema2019auto,
  author = {Bryan Eikema and Wilker Aziz},
  title = {{Auto-Encoding Variational Neural Machine Translation}},
  booktitle = {RepL4NLP @ ACL},
  year = {2019},
  url = {https://openreview.net/forum?id=OGoySGOKOQb},
}

Loading related content...

Figure