Zero-Shot Translation using Diffusion Models

Eliya Nachmani, Shaked DovratarXiv 2021

Abstract

In this work, we show a novel method for neural machine translation (NMT), using a denoising diffusion probabilistic model (DDPM), adjusted for textual data, following recent advances in the field. We show that it's possible to translate sentences non-autoregressively using a diffusion model conditioned on the source sentence. We also show that our model is able to translate between pairs of languages unseen during training (zero-shot learning).

Introduction

Most modern translation models, such as the standard Transformer, are autoregressive, generating text token-by-token from left to right. While effective, this approach is computationally sequential and prevents the model from revising earlier tokens based on later context during generation.

This paper introduces the first application of Denoising Diffusion Probabilistic Models (DDPM) to conditional text generation for Neural Machine Translation. By adapting multinomial diffusion for categorical data, we demonstrate a non-autoregressive model capable of parallel translation and generalization to unseen language pairs, known as zero-shot learning.

Methodology

The proposed architecture utilizes a Transformer-based encoder-decoder framework adapted for the diffusion process. Unlike standard NMT, which predicts the next word in a sequence, this model predicts the probability distribution of all tokens in the target sentence simultaneously at each denoising step.

The proposed diffusion-based NMT architecture, featuring a Transformer encoder-decoder structure conditioned on time-step t and source sentence x.

Multinomial Diffusion and Conditioning

The authors employ "multinomial diffusion," replacing the Gaussian noise typical in image models with a uniform distribution over a vocabulary of $K$ categories. The model is conditioned on the source sentence via cross-attention mechanisms. To enable zero-shot capabilities, special language tokens (e.g., [DE], [EN], [FR]) are included, allowing the model to learn a latent space that bridges language pairs not explicitly paired during training (such as DE-FR).

Experimental Setup

The model was trained on standard benchmarks from the Workshop on Machine Translation (WMT), specifically the WMT14 German-English (DE-EN) and French-English (FR-EN) datasets. Zero-shot evaluation was conducted on the WMT19 German-French (DE-FR) dataset.

A critical finding during experimentation was the importance of vocabulary size ($K$). While higher resolution is often better in image diffusion, a vocabulary that is too large in text diffusion spreads the noise probability too thin. The researchers identified $K=4096$ as the optimal balance for these translation tasks.

Results and Discussion

The results serve as a proof of concept for diffusion-based NMT. While there remains a performance gap compared to state-of-the-art (SOTA) autoregressive models, the diffusion approach successfully demonstrates both supervised and zero-shot translation capabilities.

Performance metrics across supervised and zero-shot translation tasks.

As shown in the results, the model achieved supervised BLEU scores ranging from 3.54 to 8.62. Notably, the model successfully performed zero-shot DE-FR translation with a BLEU score of 4.17, proving that the diffusion process can generalize to unseen language directions. Qualitatively, the model occasionally produced better translations for complex sentences than for simple ones, suggesting that global context handling in diffusion differs fundamentally from autoregressive methods.

Conclusion and Future Work

While current results are not yet competitive with production-level Transformers, this work establishes the viability of diffusion models for discrete text generation. Future improvements may lie in developing non-uniform transition matrices—noise that respects semantic word similarity—to bridge the quality gap and reduce the high computational cost associated with the current iterative denoising process.

Summary updated

BibTeX
@misc{nachmani2021zero,
  author = {Eliya Nachmani and Shaked Dovrat},
  title = {{Zero-Shot Translation using Diffusion Models}},
  year = {2021},
  eprint = {2111.01471},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.01471},
}
Figure