TL;DR
This paper introduces a unified constrained learning framework to align and compose diffusion models without relying on ad-hoc, hard-to-tune weighted averages. By formulating these tasks as constrained optimization problems, the proposed method guarantees that the resulting models satisfy specific reward thresholds and remain close to their base distributions, significantly improving generation quality and multi-attribute control.
What Problem Does This Paper Address?
When working with diffusion models, developers often want to adapt them to specific preferences. Two common ways to do this are alignment (finetuning a model to maximize a reward, like aesthetic quality) and composition (combining multiple pretrained models to merge their capabilities, like combining a "turtle" model with a "donut" model).
Traditionally, both tasks rely on weighted averages. For alignment, this means balancing a reward loss with a penalty for drifting too far from the base model. For composition, it means linearly combining the score functions of different models.
However, these weighted approaches are notoriously difficult to tune. If you optimize for multiple rewards at once, the model often overfits to the easiest reward while completely neglecting the harder ones. In composition, equal weighting can heavily bias the output toward the most similar models, ignoring distinct or competing attributes. This paper tackles this gap by replacing arbitrary weights with explicit, mathematically rigorous constraints.
Methods
The authors reframe alignment and composition through the lens of constrained learning:
- Constrained Alignment: Instead of guessing a regularization weight, users specify a target threshold for each reward. The framework minimizes the reverse KL divergence (distance) to the pretrained model subject to meeting these reward thresholds.
- Constrained Composition: To combine $m$ models, the framework minimizes a common upper bound on the KL divergence to each individual model. This forces the composed model to stay as close as possible to all base models simultaneously, acting as a logical "AND" intersection.
To solve these problems, the authors establish strong duality and develop a Lagrangian-based primal-dual training algorithm. In high-dimensional spaces (like text-to-image generation), running full primal updates is computationally prohibitive. To fix this, they introduce a Dual-Only Algorithm (Algorithm 3) that bypasses the expensive primal steps by utilizing a surrogate product score to update the dual multipliers dynamically during training.
Datasets
The framework was evaluated on image and audio generation tasks using:
- Stable Diffusion v1.5 as the base text-to-image model.
- AudioLDM for text-to-audio composition experiments.
- Reward Models: Evaluation and alignment relied on several off-the-shelf preference models, including Aesthetic, HPS (Human Preference Score), PickScore, ImageReward, and MPS (Microsoft Prompt Score).
- Prompts: Custom lists of simple animal and concept prompt pairs/triplets (e.g., "a pineapple" + "a volcano") were used for training and evaluation.
Key Insights and Ideas
- Thresholds are more intuitive than weights: It is far easier for a human to specify "the aesthetic score must be at least 0.5" than to figure out that a regularization weight of $\lambda=0.125$ balances the loss perfectly.
- Product vs. Mixture Composition: The paper highlights that reverse KL constraints lead to product composition (a logical AND), forcing samples into the intersection of distributions. Forward KL constraints lead to mixture composition (a logical OR), sampling from the union.
- The Danger of Unconstrained Alignment: Without explicit constraints, maximizing an aesthetic reward model causes the diffusion model to overfit to the reward's blind spots—producing garish, overly saturated images with unnaturally sharp contrast just to game the score.
Key Results
1. Reward Alignment
When aligning Stable Diffusion with an aesthetic reward (MPS) while constraining saturation and local contrast to prevent artifacts, the constrained approach achieved a 50% improvement in controlling undesired artifacts compared to the equal-weights baseline.
When balancing multiple aesthetic rewards simultaneously, the unconstrained model overfit to the easiest rewards and diverzed drastically from the base model. The constrained model successfully met all thresholds while maintaining a much lower KL divergence to the pretrained model.
2. Concept Composition
For text-to-image concept composition (e.g., blending two distinct prompts), the constrained method outperformed both combined prompting and equal-weight composition on standard text-to-image similarity metrics:
| Method | Min. CLIP ($\uparrow$) | Min. BLIP ($\uparrow$) |
|---|---|---|
| Combined Prompting | 22.1 | 0.204 |
| Equal Weights | 22.7 | 0.252 |
| Constrained (Ours) | 22.9 | 0.268 |
A similar performance boost was observed in text-to-audio generation, where the constrained approach raised the minimum CLAP score from 1.57 (equal weights) to 1.92.
Limitations and Future Work
While the framework is mathematically elegant and empirically effective, the authors note a few limitations:
- Scope of Modalities: The empirical validation primarily focuses on image generation (with a brief foray into audio). Its performance on video or molecular generation remains untested.
- Algorithmic Approximations: In high dimensions, the algorithm relies on a surrogate score function rather than the exact product distribution score, introducing approximation errors.
- Theory Gaps: Further theoretical work is required to fully understand the convergence properties and sample complexity of these primal-dual training algorithms when dealing with non-convex neural network landscapes.
Summary updated