Classifier Guidance

  • Let us begin with score-based formulation of a diffusion model (because the score is an easier object to manipulate that the source noise)

  • Our goal is to learn , the score of the conditional model, at arbitrary noise levels t.

  • By Bayes rules, we have

    • adversarial gradient + unconditional score
    • adversarial gradient because it’s the gradient of the classifier on noisy input
  • Guidance

  • Drawbacks. Reliance on a separately learned classifier. Because the classifier must handle arbitrarily noisy inputs, which most existing pretrained classification models are not optimized to do, it must be learned ad hoc alongside the diffusion model.

Classifier-free guidance

  • Let’s look again at the adversarial gradient

  • We can rewrite it as

  • Plug into the guidance:

  • The unconditional score can be obtained by plugging the β€œempty” conditioning into our condition diffusion model.