Abstract
Discrete diffusion models enable parallel token sampling for faster inference than autoregressive approaches. However, prior diffusion models use a decoder-only architecture, which requires sampling algorithms that invoke the full network at every denoising step and incur high computational cost. Our key insight is that discrete diffusion models perform two types of computation: 1) representing clean tokens and 2) denoising corrupted tokens, which enables us to use separate modules for each task. We propose an encoder-decoder architecture to accelerate discrete diffusion inference, which relies on an encoder to represent clean tokens and a lightweight decoder to iteratively refine a noised sequence. We also show that this architecture enables faster training of block diffusion models, which partition sequences into blocks for better quality and are commonly used in diffusion language model inference. We introduce a framework for Efficient Encoder-Decoder Diffusion (E2D2), consisting of an architecture with specialized training and sampling algorithms, and we show that E2D2 achieves superior trade-offs between generation quality and inference throughput on summarization, translation, and mathematical reasoning tasks.
Introduction
Discrete diffusion models have emerged as a promising alternative to standard autoregressive (AR) models because they can sample tokens in parallel, potentially offering much faster inference. However, most current diffusion models use a decoder-only architecture. The problem is that denoising—the core process of diffusion—requires two distinct types of work: representing clean context (understanding the prompt and previously generated "clean" tokens) and denoising corrupted tokens (iteratively refining "noisy" or masked tokens into actual words).
In a decoder-only setup, the entire massive network must be run for every single denoising step. This makes inference computationally expensive and slow, often negating the parallelization benefits. Furthermore, "block diffusion"—a technique that improves quality by processing tokens in chunks—is notoriously expensive to train on decoder-only models, requiring twice the FLOPs of standard training.
The E2D2 Framework
The authors introduce E2D2 (Efficient Encoder-Decoder Diffusion), which shifts from a decoder-only to an encoder-decoder architecture to decouple these tasks.
Architecture and Training
- The Encoder: A large, powerful module that processes only the "clean" tokens. It is invoked only periodically to update the context, significantly reducing redundant computation.
- The Decoder: A lightweight module that performs the iterative denoising. Its small size allows it to be called many times at a very low computational cost.
- Vectorized Training: The framework includes a specialized training algorithm for block diffusion using custom attention masks. This allows the model to process clean and noisy sequences in a single pass, effectively halving the training cost compared to previous block-diffusion methods.
- Design Variants: Two connection methods were explored: attending to the last hidden state (similar to T5) and a shared KV cache, which is particularly effective when fine-tuning from pretrained AR models.
Experimental Results
E2D2 was evaluated on standard benchmarks including CNN/DailyMail (summarization), WMT14 (translation), GSM8K (math), and OpenWebText (pretraining).
Efficiency vs. Quality
By varying the size of the lightweight decoder, the authors mapped a new "efficiency vs. quality" frontier. E2D2 consistently provides better quality for the same computational budget compared to previous models like BD3LM.
- Inference Speed: On the CNN/DailyMail task, E2D2 achieved 155.8 tokens/sec, compared to 89.1 tokens/sec for a standard AR model—a ~75% improvement.
- Generation Quality: On GSM8K, E2D2 achieved a 47.9% pass@1 accuracy, significantly outperforming the previous state-of-the-art block diffusion model (BD3LM) at 33.2%, while also being faster.
- Training Efficiency: When training on OpenWebText, E2D2 demonstrated 40% higher training throughput than comparable decoder-only block diffusion models.
Key Insights
The core innovation of E2D2 is the realization that clean tokens are static during a denoising block, while noisy tokens are dynamic. Decoupling these allows for massive efficiency gains. Additionally, the diffusion process acts as a natural regularizer; on summarization tasks, E2D2 outperformed AR models that began to overfit the training data.
Conclusion
E2D2 demonstrates that an encoder-decoder architecture is essential for making discrete diffusion models practical. By decoupling context representation from denoising, E2D2 achieves superior trade-offs between generation quality and inference throughput. Future work will explore scaling these models to larger parameter counts and integrating them with other efficiency techniques like speculative decoding.
Summary updated