Classifier-Free Guidance is a Predictor-Corrector

Arwen Bradley, Preetum Nakkiran
8/16/2024
cs.LGcs.AIcs.CV

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

We investigate the theoretical foundations of classifier-free guidance (CFG). CFG is the dominant method of conditional sampling for text-to-image diffusion models, yet unlike other aspects of diffusion, it remains on shaky theoretical footing. In this paper, we disprove common misconceptions, by showing that CFG interacts differently with DDPM (Ho et al., 2020) and DDIM (Song et al., 2021), and neither sampler with CFG generates the gamma-powered distribution $p(x|c)^γp(x)^{1-γ}$. Then, we clarify the behavior of CFG by showing that it is a kind of predictor-corrector method (Song et al., 2020) that alternates between denoising and sharpening, which we call predictor-corrector guidance (PCG). We prove that in the SDE limit, CFG is actually equivalent to combining a DDIM predictor for the conditional distribution together with a Langevin dynamics corrector for a gamma-powered distribution (with a carefully chosen gamma). Our work thus provides a lens to theoretically understand CFG by embedding it in a broader design space of principled sampling methods.

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. 1 weaker match is hidden by default — 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{bradley2024classifierfree,
  title  = {Classifier-Free Guidance is a Predictor-Corrector},
  author = {Arwen Bradley and Preetum Nakkiran},
  year   = {2024},
  eprint = {2408.09000},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.09000v2}
}

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/2408.09000.svg)](https://codeofpaper.com/paper/2408.09000)

Discussion