Diffusion models have recently revolutionized image and audio generation, powering tools like DALL-E 2 and Stable Diffusion. However, applying these models to natural language has proven difficult because text is inherently discrete (composed of distinct words or tokens), whereas diffusion typically operates on continuous signals.
While previous work successfully generated text unconditionally or based on simple attributes, it struggled with Sequence-to-Sequence (Seq2Seq) tasks. In Seq2Seq tasks—such as translation, summarization, or paraphrasing—the model must generate a target sequence that is semantically tied to a specific source sequence. Traditional methods rely on Autoregressive (AR) models like GPT that predict one word at a time, which can sometimes lead to repetitive or generic outputs.
To address this, researchers introduced DiffuSeq, a novel diffusion-based model designed specifically for Seq2Seq text generation. By mapping discrete text into a continuous space and employing a unique "partial noising" strategy, DiffuSeq achieves performance comparable to large pre-trained models like GPT-2 while offering significantly higher generation diversity.
How DiffuSeq Works
The core of DiffuSeq is a classifier-free diffusion model that treats the source and target texts as a single joint distribution. Here is the step-by-step breakdown of the architecture:
- Continuous Embedding: Discrete words from both the source ($w^x$) and target ($w^y$) sequences are mapped into a continuous feature space using an embedding function.
- Partial Noising: Unlike standard diffusion that adds noise to the entire input, DiffuSeq only adds Gaussian noise to the target embeddings. The source embeddings remain "clean" to serve as a constant anchor or condition.
- Transformer Backbone: The model uses a standard Transformer architecture to learn the reverse process—predicting the original, clean target embeddings from the noisy ones, conditioned on the clean source.
- Iterative Denoising: During inference, the model starts with pure Gaussian noise for the target area and iteratively refines it over many steps until a coherent sentence emerges.
- MBR Decoding: To ensure high quality, the model generates several candidate samples and uses Minimum Bayes Risk (MBR) decoding to select the best one based on a metric like BLEU.
Key Insights and Innovations
- Classifier-Free Guidance: Previous text diffusion models required training a separate "classifier" to guide the generation process. DiffuSeq simplifies this by training the model to handle the condition (the source text) implicitly within its own architecture.
- Diversity is a Feature: Because DiffuSeq starts from random Gaussian noise, it naturally explores a much wider variety of ways to express the same idea, avoiding the "degeneration" (repetitive text) often seen in AR models.
- Theoretical Bridge: The researchers provide mathematical proof connecting DiffuSeq to Iterative Non-Autoregressive (iter-NAR) models, suggesting that diffusion is essentially a generalized, continuous version of the iterative refinement used in fast modern translation models.
- Joint Training: Training the source and target embeddings together, rather than relying on fixed pre-trained embeddings like BERT, proved crucial for the model's performance.
Performance and Results
DiffuSeq was evaluated across four diverse Seq2Seq tasks: Dialogue (Commonsense Conversation), Question Generation (Quasar-T), Text Simplification (Wiki-Auto), and Paraphrasing (Quora Question Pairs).
- Competitive Quality: DiffuSeq achieved comparable or better BLEU and ROUGE scores than six established baselines, including GPT-2 Large, which has over 8 times more parameters (91M vs 774M).
- Superior Diversity: In the Paraphrase task, DiffuSeq's diversity score (div-4) was 0.8641, vastly outperforming GPT-2 Large (0.5020). This confirms the model's strength in generating varied expressions of the same semantic meaning.
- The MBR Boost: As the number of candidate samples increases, DiffuSeq’s performance scales significantly better than AR models. While GPT-2's quality plateaus quickly, DiffuSeq continues to improve as it samples more of its diverse latent space.
Limitations and Future Directions
The primary drawback of DiffuSeq is inference speed. Generating text via thousands of diffusion steps is significantly slower than the one-pass approach of AR models. While techniques like DDIM can reduce the required steps, it still lags behind traditional methods. Additionally, while outputs are highly diverse, they can occasionally be less fluent or grammatically perfect than those from a finely-tuned GPT-2.
Despite these limitations, DiffuSeq successfully demonstrates the massive potential of diffusion models in complex conditional language generation. Future work scaling DiffuSeq to the billion-parameter range could potentially surpass the current state-of-the-art in both quality and diversity.
Summary updated