Classifier-Free Guidance: From High-Dimensional Analysis to Generalized Guidance Forms

Krunoslav Lehman Pavasovic, Jakob Verbeek, Giulio Biroli, Marc Mezard
2/11/2025
cs.LGcs.AIstat.ML

No confident code implementation found for this paper.

Abstract

Classifier-Free Guidance (CFG) is a widely adopted technique in diffusion and flow-based generative models, enabling high-quality conditional generation. A key theoretical challenge is characterizing the distribution induced by CFG, particularly in high-dimensional settings relevant to real-world data. Previous works have shown that CFG modifies the target distribution, steering it towards a distribution sharper than the target one, more shifted towards the boundary of the class. In this work, we provide a high-dimensional analysis of CFG, showing that these distortions vanish as the data dimension grows. We present a blessing-of-dimensionality result demonstrating that in sufficiently high and infinite dimensions, CFG accurately reproduces the target distribution. Using our high-dimensional theory, we show that there is a large family of guidances enjoying this property, in particular non-linear CFG generalizations. We study a simple non-linear power-law version, for which we demonstrate improved robustness, sample fidelity and diversity. Our findings are validated with experiments on class-conditional and text-to-image generation using state-of-the-art diffusion and flow-matching models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pavasovic2025classifierfree,
  title  = {Classifier-Free Guidance: From High-Dimensional Analysis to Generalized Guidance Forms},
  author = {Krunoslav Lehman Pavasovic and Jakob Verbeek and Giulio Biroli and Marc Mezard},
  year   = {2025},
  eprint = {2502.07849},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.07849v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.07849.svg)](https://codeofpaper.com/paper/2502.07849)

Discussion