Benchmarking Diffusion Models for Machine Translation

Yunus Demirag, Danni Liu, Jan NiehuesStudent Research Workshop @ EACL 2024

TL;DR

This paper investigates the application of diffusion models, a powerful generative technique, to machine translation (MT). While diffusion models show promise, they face challenges similar to other non-autoregressive MT models, particularly with long-range dependencies and output fluency. The authors find that knowledge distillation and autoregressive sampling offer some improvements but don't fully bridge the performance gap with traditional Transformer models.

What Problem Does This Paper Address?

Machine translation (MT) is a sequence-to-sequence task that requires translating text from one language to another while preserving meaning and ensuring fluency. While autoregressive (AR) models have dominated MT, non-autoregressive (NAR) models offer faster decoding. However, NAR models often lag in translation quality due to a conditional independence assumption, leading to issues like multimodality (multiple valid translations for the same input, which the model struggles to capture). Diffusion models, a recent advancement in generative AI, are typically non-autoregressive and have shown success in other domains. This paper explores whether diffusion models can overcome the limitations of existing NAR MT models and achieve competitive translation quality, or if they inherit similar challenges.

Methods

The authors adapt two prominent diffusion-based text generation models, Diffusion-LM and DiffuSeq, for machine translation.

  • Diffusion-LM-MT: This approach adapts Diffusion-LM by treating machine translation as a conditional generation task. It models the joint distribution of source and target sequences, using an infilling algorithm to approximate the conditional distribution of the target given the source.
  • DiffuSeq: This model, originally designed for sequence-to-sequence tasks, is directly applied to MT. It uses a classifier-free approach and conditional noising, where only the target sequence is noised during training and sampling.
  • Sequence-Level Knowledge Distillation: To address the multimodality problem, the researchers apply sequence-level knowledge distillation. This involves training the diffusion model on translations generated by a strong autoregressive "teacher" model, aiming to produce more deterministic and less noisy target sequences.
  • Autoregressive Sampling: The authors explore an autoregressive sampling strategy for diffusion models. Instead of generating the entire sequence at once, this method iteratively generates tokens, using previously generated tokens as prior information.

Datasets

The primary dataset used for training and evaluation is the German-English text-to-text partition of the CoVoST dataset. For knowledge distillation, a pre-trained model by Ng et al. (2019) was used as the teacher model. The test set was reduced to 2010 samples for efficiency.

Key Insights and Ideas

  • Diffusion models inherit NAR challenges: Diffusion models, despite their non-autoregressive nature, face similar issues to other NAR MT models, particularly the "multimodality problem" and difficulties with long-range dependencies.
  • Knowledge distillation offers a boost: Sequence-level knowledge distillation provides a clear improvement in both training speed and model performance for diffusion-based MT, suggesting it helps mitigate the multimodality problem by reducing syntactic conditional entropy.
  • Autoregressive sampling has limited impact: While autoregressive sampling for diffusion models shows a slight improvement in BLEU, it doesn't significantly enhance COMET scores, indicating that this approach might not be a strong solution for improving translation quality in this context.
  • Infilling algorithm struggles with MT complexity: The infilling algorithm, while effective for some text generation tasks, appears ill-suited for the complex conditional distributions required for machine translation.
  • Long-range dependencies are a hurdle: Diffusion models fall off in performance more rapidly than standard Transformer models on longer source sequences, highlighting their struggle with capturing long-range dependencies.

Key Results

  • Underperformance compared to baselines: All diffusion-based models significantly underperformed compared to standard Transformer and Levenshtein Transformer models, with a gap of over 15 BLEU points.
  • DiffuSeq-distilled shows modest gains: The DiffuSeq model with knowledge distillation showed a modest improvement of +2.5 BLEU and +1.7 COMET over standard DiffuSeq.
  • Autoregressive sampling's impact is unclear: DiffuSeq with autoregressive sampling gained +0.7 BLEU but no COMET improvement, making its impact on translation quality uncertain.
  • Slow decoding times: Diffusion-based models suffer from prohibitively long training and decoding times, largely due to the iterative nature of the diffusion process (e.g., 2000 iterations for decoding).
  • Fluency issues with longer inputs: For longer input sequences, diffusion models, like other NAR models, exhibit fluency problems, with Diffusion-LM sometimes hallucinating unrelated translations.

Limitations and Future Work

  • Decoding Speed: The current diffusion-based models are too slow for practical deployment, even if translation quality were to match state-of-the-art models. Future work could explore methods like DDIM or image diffusion techniques to speed up inference.
  • Comparison to SOTA: The Transformer baseline used was trained on a smaller dataset. A more comprehensive comparison would involve larger models trained on millions of sentence pairs, potentially initialized from pre-trained weights.
  • Output Diversity: The impact of knowledge distillation on output diversity was not explored. Future work could investigate this trade-off.
  • Diffusion-LM-MT: The infilling algorithm needs improvement to properly approximate conditional distributions for complex tasks like MT.
  • Hybrid AR/NAR approaches: The authors suggest exploring hybrid approaches where diffusion models generate a few tokens at a time, potentially leveraging the strengths of both AR and NAR generation.

Summary updated

BibTeX
@inproceedings{demirag2024benchmarking,
  author = {Yunus Demirag and Danni Liu and Jan Niehues},
  title = {{Benchmarking Diffusion Models for Machine Translation}},
  booktitle = {Student Research Workshop @ EACL},
  year = {2024},
  url = {https://openreview.net/forum?id=U4e26-gFhAN},
}
Figure