NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Latent Diffusion for Language Generation

Justin Lovelace, Varsha Kishore, Chao Wan, Eliot Seo Shekhtman, Kilian Q Weinberger

TL;DR

This paper introduces LD4LG, a framework that brings the power of latent diffusion models—the technology behind image generators like Stable Diffusion—to natural language processing. By training diffusion models in a compact, continuous latent space derived from pretrained models like BART and T5, the authors achieve state-of-the-art text generation that is significantly more efficient and coherent than previous diffusion-based language models.

What Problem Does This Paper Address?

Diffusion models have revolutionized image and video generation because they excel at modeling continuous data. However, language is inherently discrete (composed of individual tokens), making the gradual addition and removal of Gaussian noise awkward and mathematically challenging.

Previous attempts to bridge this gap usually involved applying diffusion directly in the high-dimensional space of word embeddings. This often led to "representation collapse" or required thousands of sampling steps to produce coherent text. Furthermore, standard encoder-decoder models produce variable-length representations, which are difficult for standard diffusion architectures to handle. The authors aim to find a way to make diffusion and large language models (LLMs) complementary rather than treating diffusion as a standalone replacement for autoregressive models.

Methods

The core innovation of LD4LG is a two-stage approach that separates high-level semantic planning from low-level syntactic realization:

The LD4LG framework showing the language autoencoder and the latent diffusion process.
  1. The Language Autoencoder: Instead of training a new model from scratch, the authors leverage frozen, pretrained encoder-decoder models (like BART or T5). They insert two small, learnable modules:
  2. Compression Network: Uses a "Perceiver Resampler" to map variable-length text features into a fixed-size, low-dimensional latent space (specifically, a $32 \times 64$ matrix).
  3. Reconstruction Network: Maps these compact latents back into the high-dimensional space the original decoder expects. This creates a "semantic bottleneck" that captures high-level meaning while offloading the "high-frequency" task of word-by-word grammar to the pretrained decoder.

  4. Latent Diffusion: A continuous diffusion model is trained specifically to operate within this $32 \times 64$ latent space. Because the space is continuous and fixed-length, the authors can use standard techniques like v-prediction and self-conditioning directly from the continuous diffusion literature.

The framework is versatile, supporting unconditional generation, class-conditional generation (e.g., "write a sports story"), and sequence-to-sequence tasks (e.g., summarization or translation) via cross-attention to a source encoder.

Datasets

The authors evaluated LD4LG across a diverse set of benchmarks:

  • ROCStories: For unconditional story generation.
  • AG News: For class-conditional news generation across four topics.
  • XSum & QQP: For summarization and paraphrasing (Seq2Seq).
  • WMT 2014 English-German: For machine translation.

Key Insights and Ideas

  • The "Aha" Moment - Fixed-Length Latents: By forcing the model to compress text into a fixed-size latent regardless of input length, the authors simplified the diffusion process. This allowed them to use architectures optimized for images and continuous data without modification.
  • Efficiency Gains: LD4LG requires only 250 sampling steps, a massive improvement over the 2,000 steps typically required by previous models like Diffusion-LM.
  • Reduced Memorization: Interestingly, the latent diffusion approach appears less prone to verbatim memorization of the training set compared to strong autoregressive baselines like GPT-2, suggesting it learns more generalized semantic patterns.
  • Semantic vs. Syntactic Split: The autoencoder handles the "how to speak" (syntax/grammar), while the diffusion model handles the "what to say" (high-level semantics). This division of labor makes the training much more stable.

Key Results

  • Massive Quality Jump: On the ROCStories dataset, LD4LG achieved a MAUVE score of 0.716, dwarfing the 0.043 achieved by the previous state-of-the-art Diffusion-LM.
Unconditional generation results comparing LD4LG against baselines like Diffusion-LM.
  • Summarization Success: On the challenging XSum benchmark, LD4LG reached a ROUGE-L of 31.9, whereas previous diffusion models like DiffuSeq struggled to produce coherent summaries (scoring only 14.1).
  • Speedup: The compact latent space provided a 3.86x speedup in training and inference compared to diffusing in the uncompressed encoder feature space.
  • Competitive with Fine-tuning: In Seq2Seq tasks, LD4LG performed nearly as well as (and sometimes better than) direct fine-tuning of BART/T5, while offering the diverse sampling benefits of diffusion.

Limitations and Future Work

  • Inference Latency: While faster than previous diffusion models, LD4LG is still slower than pure autoregressive models because it requires multiple iterative denoising steps. The authors suggest distillation (reducing the process to a single step) as a future direction.
  • The "Best Candidate" Problem: The authors noted that while their model generates many high-quality candidates, the standard selection method (Minimum Bayes Risk decoding) doesn't always pick the absolute best one. Improved re-ranking or sampling procedures could further boost performance.
  • Scaling: The current work uses "base" sized models; exploring how this scales to multi-billion parameter models remains an open question.

Summary updated

BibTeX
@inproceedings{lovelace2023latent,
  author = {Justin Lovelace and Varsha Kishore and Chao Wan and Eliot Seo Shekhtman and Kilian Q Weinberger},
  title = {{Latent Diffusion for Language Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=NKdtztladR},
}
Figure