Compress Guidance in Conditional Diffusion Sampling

Anh-Dung Dinh, Daochang Liu, Chang Xu

Abstract

Enforcing guidance throughout the entire diffusion sampling process often leads to "model-fitting," where generated samples overfit to the specific parameters of the guiding classifier rather than generalizing the intended condition. We introduce Compress Guidance (CompG), a method that identifies and mitigates this issue by reducing guidance frequency and prioritizing early-stage sampling. CompG improves image quality and diversity while reducing guidance computation by approximately 40%. Our approach is validated across label-conditional and text-to-image tasks on multiple datasets and architectures.

The Problem: Model-Fitting in Diffusion Guidance

Conditional diffusion models rely on guidance—either through external classifiers or classifier-free methods—to align generated outputs with specific prompts or labels. However, standard sampling treats every timestep with equal importance, forcing the image to match the guiding model's internal quirks. This "model-fitting" phenomenon results in images that satisfy the classifier's mathematical criteria but often exhibit "weird" artifacts, lack diversity, or over-emphasize certain features (e.g., unnatural colors or distorted textures).

To quantify this, we conducted an "off-sampling" test: images generated with one classifier were evaluated by a different, independent classifier. While the guiding model reported high accuracy (90.8%), the independent model saw significant flaws (34.2%), confirming that standard guidance produces adversarial-like features rather than generalized high-quality representations.

Compress Guidance (CompG)

We propose Compress Guidance (CompG), treating the sampling process as a stochastic gradient descent optimization where image pixels are the weights. CompG is built on three pillars:

  1. Gradient Reuse: Instead of computing expensive gradients at every step, CompG reuses gradients from previous steps. This maintains "magnitude sufficiency" for the guidance signal while significantly lowering computational overhead.
  2. Strategic Distribution: Analysis shows that guidance is most critical during early sampling stages when the global structure is established. We use a scheduling parameter ($k$) to concentrate guidance steps at the beginning and sparsify them as the image reaches finer detail.
  3. Balance and Continuity: The schedule ensures that the model doesn't "forget" the condition due to large gaps in guidance, maintaining a continuous steering signal.

Results and Qualitative Improvements

CompG demonstrates that less is often more. By reducing the number of guidance timesteps by 40%, we observed up to a 42% improvement in sampling speed. More importantly, image quality metrics like FID and sFID improved on ImageNet benchmarks.

Standard guidance can lead to over-emphasized, unnatural features due to model-fitting.

Qualitatively, CompG corrects the "over-emphasized" features typical of heavy guidance. For instance, in landscape generation, standard guidance might produce harsh, unnatural outlines (as seen in Figure 1), whereas CompG results in more realistic textures and lighting (Figure 2). Diversity also increases, as the generator is no longer strictly bound to the narrow "preferences" of the guiding classifier.

Conclusion

Compress Guidance addresses a fundamental inefficiency in conditional diffusion sampling. By recognizing the diminishing returns of guidance in later stages and the risks of model-fitting, CompG provides a more efficient and effective framework for high-quality image synthesis. Future work will explore applying these principles to video and audio generation.

Summary updated

BibTeX
@misc{dinh2024compress,
  author = {Anh-Dung Dinh and Daochang Liu and Chang Xu},
  title = {{Compress Guidance in Conditional Diffusion Sampling}},
  year = {2024},
  eprint = {2408.11194},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2408.11194},
}
Figure