CADS: Unleashing the Diversity of Diffusion Models through Condition-Annealed Sampling

Seyedmorteza Sadat, Jakob Buhmann, Derek Bradley, Otmar Hilliges, Romann M. Weber

TL;DR

CADS (Condition-Annealed Diffusion Sampler) is a simple, plug-and-play sampling technique that significantly boosts the diversity of conditional diffusion models without requiring any retraining. By strategically adding noise to the conditioning signal early in the generation process, it allows models to explore a wider variety of outputs, achieving new state-of-the-art FID scores on ImageNet.

The "Diversity-Quality" Trade-off

Conditional diffusion models (like Stable Diffusion or DALL-E) are masters of generating high-quality images based on a prompt or class label. However, they suffer from a well-known "diversity-quality" trade-off. To get the best-looking images, researchers often use Classifier-Free Guidance (CFG) at high scales. While this makes images look sharp and well-aligned with the prompt, it frequently causes the model to collapse onto a few "safe" modes.

The result? If you ask for a specific class, you might get images that look nearly identical in composition, pose, and lighting. This lack of diversity is exacerbated when models are trained on smaller datasets, where the model essentially learns a one-to-one mapping between a condition and a specific image. The authors argue that this "sameness" happens because the conditioning signal is too dominant during the early, critical stages of sampling when the global structure of the image is decided.

Introducing Condition-Annealed Diffusion Sampling (CADS)

To address this, the authors introduce Condition-Annealed Diffusion Sampling (CADS). The core idea is to "anneal" (gradually introduce) the conditioning signal during the inference process.

Instead of giving the model the clean conditioning vector $y$ (like a text embedding or class ID) at every step, CADS corrupts it with Gaussian noise. The amount of noise follows a specific schedule:

  1. Early Sampling: High noise is added to the condition. This effectively "blinds" the model to the specific prompt, forcing it to rely on the general data distribution and explore different compositions.
  2. Middle Sampling: The noise is gradually reduced.
  3. Late Sampling: The noise drops to zero, allowing the model to "lock in" and refine the image to perfectly match the input condition.

Technically, this is implemented as a simple additive operation: $\hat{y} = \sqrt{\gamma(t)}y + s\sqrt{1-\gamma(t)}n$, where $s$ is the noise scale and $\gamma(t)$ is the annealing schedule. Because this happens only during inference, CADS can be used with any pretrained diffusion model and any existing sampler (e.g., DDPM, DDIM).

Key Insights

  • Early Steps Matter Most: Diversity is largely determined at the very beginning of the denoising process. By adding noise early, CADS breaks the deterministic "pull" of the conditioning signal, allowing the random seed to actually influence the global layout.
  • Smoothing the Distribution: Theoretically, adding noise to the condition acts as "score smoothing." It prevents the model from rushing toward the most obvious or strongest mode in the learned distribution.
  • Resolving the CFG Trade-off: Usually, increasing the CFG scale kills diversity. CADS allows you to use high CFG scales for optimal quality while maintaining or even increasing diversity (measured by Recall and Vendi Score).
  • No Retraining Necessary: Many diversity-boosting methods require expensive fine-tuning. CADS proves that diversity is already "latent" within the model; we just need a better way to extract it during sampling.

Key Results and Visual Variety

CADS delivers both quantitative state-of-the-art (SOTA) performance and striking qualitative improvements across various tasks, including class-conditional ImageNet, pose-to-image generation (DeepFashion), and text-to-image generation (Stable Diffusion v2.1).

  • New SOTA on ImageNet: Using a pretrained DiT-XL/2 model, CADS achieved an FID of 1.70 (256×256) and 2.31 (512×512), surpassing previous records held by models like MDT.
  • Massive Diversity Gains: On the DeepFashion dataset, CADS improved the Recall (a measure of distribution coverage) from a dismal 0.02 to 0.48, and nearly doubled the Vendi Score (a diversity metric).

Qualitatively, CADS produces images with varied poses, backgrounds, and lighting for the same prompt, whereas standard sampling often produces "carbon copies" of the same composition.

Comparison of standard sampling versus CADS

Limitations and Future Work

While CADS is highly effective for global conditions (like text or class labels), the authors note challenges when applying it to dense spatial conditions, such as segmentation maps. In these cases, adding too much noise might cause the model to lose track of the required spatial structure entirely.

Future work could involve exploring more sophisticated noise distributions or adaptive schedules that change based on the complexity of the prompt. The authors also suggest that CADS could be a promising avenue for improving the "creativity" of models in more complex semantic contexts.

Summary updated

BibTeX
@inproceedings{sadat2024cads,
  author = {Seyedmorteza Sadat and Jakob Buhmann and Derek Bradley and Otmar Hilliges and Romann M. Weber},
  title = {{CADS: Unleashing the Diversity of Diffusion Models through Condition-Annealed Sampling}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=zMoNrajk2X},
}
Figure