Pre-trained diffusion models are incredibly powerful generalists, capable of generating a vast array of images or sequences. However, in practical applications, we often need them to be specialists—fine-tuned to maximize specific downstream rewards, such as producing "highly aesthetic" images or DNA sequences with "high biological activity." This fine-tuning process is known as alignment.
While existing alignment methods achieve considerable success in maximizing rewards, they often suffer from severe drawbacks like mode collapse and over-optimization. A new framework, Diffusion Alignment as Variational Expectation-Maximization (DAV), reformulates this alignment process to maximize rewards while preserving the natural diversity of the original model.
The Alignment Bottleneck: Mode Collapse and Over-Optimization
Existing alignment methods generally fall into two camps, both with significant limitations:
- Reinforcement Learning (RL) based methods: These techniques typically optimize a "reverse-KL" objective. Mathematically, this is a "mode-seeking" behavior. The model tends to collapse onto a few safe, high-reward samples, effectively destroying the rich diversity of the original pre-trained model.
- Direct Backpropagation: While computationally efficient, this approach relies on the gradients of a reward model. These gradients are often brittle, leading to over-optimization. The model learns to generate unnatural artifacts that "trick" the reward model into giving a high score, but fail to satisfy the actual human or biological goal.
The core challenge is finding a way to maximize these downstream rewards while keeping the model's output diverse, natural, and true to its pre-trained capabilities.
The DAV Framework: An Expectation-Maximization Approach
To solve this, DAV treats model alignment as an iterative Variational Expectation-Maximization (EM) process. Instead of directly forcing the model to maximize a reward gradient, DAV alternates between two complementary phases:
- The E-step (Exploration): The goal here is to discover diverse, high-reward trajectories. Instead of just sampling from the current model, DAV uses test-time search. By employing gradient-based guidance (using a derived soft Q-function) and importance sampling, the process is "pushed" toward promising, high-reward regions of the latent space.
- The M-step (Amortization): Once these successful trajectories are found, the model parameters ($\theta$) are updated. The model is trained to maximize the log-likelihood of the diverse samples discovered in the E-step. Mathematically, this corresponds to minimizing the forward KL divergence. Unlike the reverse-KL used in RL, forward KL is "mode-covering"—it forces the model to distribute probability mass across all the diverse modes found during exploration.
The authors also introduce DAV-KL, a variant that incorporates a penalty to prevent the model from drifting too far from its original pre-trained state, further ensuring the naturalness of the outputs.
Key Insights: Forward KL and Amortized Search
The most significant conceptual shift in DAV is the move from reverse-KL to forward-KL via the EM framework. By treating the high-reward search results as "data" for a maximum likelihood objective, the model learns to cover the entire distribution of successful samples rather than collapsing to a single point.
Furthermore, while test-time search is powerful, it is typically too slow for real-time inference. DAV solves this by "amortizing" the search cost. The expensive exploration happens entirely during the training phase. At inference time, the fine-tuned model generates samples just as fast as the original pre-trained model.
Experimental Results: Aesthetics, Diversity, and Efficiency
The researchers demonstrated DAV’s versatility across two distinct modalities: continuous text-to-image synthesis (using Stable Diffusion v1.5) and discrete DNA sequence design (using a Masked Discrete Diffusion model).
- Superior Aesthetics and Preserved Diversity: In image generation, DAV achieved an impressive aesthetic score of 8.04, significantly outperforming RL-based baselines like DDPO (6.83) and TDPO (6.78). Crucially, while baselines saw a sharp drop in diversity, DAV maintained high diversity scores (LPIPS of 0.53 vs. 0.39 for TDPO), producing varied images rather than repetitive, "safe" outputs.
- Biological Validity: In the discrete task of DNA design, DAV’s samples reached the highest predicted biological activity (9.24) and validity (0.920 ATAC-Acc) while maintaining the naturalness of the sequences, outperforming specialized discrete alignment methods.
- Efficiency in Non-Differentiable Tasks: For tasks where gradients aren't available (like optimizing for image compressibility), DAV-KL reached optimal reward levels in just 6 epochs, a stark contrast to DDPO, which required 100 epochs to reach a similar level.
Limitations and Future Directions
While DAV offers a robust solution to mode collapse, it does come with increased computational costs during training, as the E-step requires multiple particles and gradient-guided search steps. Additionally, the method relies on "Tweedie’s formula" to approximate the posterior mean, which can be less accurate at high noise levels early in the generation process.
However, because DAV is a highly modular framework, future work could easily swap in more advanced search algorithms (such as Monte Carlo Tree Search) into the E-step, potentially unlocking even higher quality sample discovery and further refining the alignment of generative models.
Summary updated