Classifier guidance and classifier-free guidance are both techniques used in the context of generative modeling, particularly in applications like image generation. The main difference lies in how they utilize auxiliary classifiers to steer the output of a generative model, such as a diffusion model.
In classifier guidance, a separate classifier is trained to evaluate the generated samples and provide feedback on how closely they align with desired attributes or classes. This classifier, once trained, is used during the generation process to adjust the model’s outputs. For instance, if you are generating images of cats, the classifier can provide a signal that encourages the model to generate more cat-like attributes. While effective, this approach requires maintaining an additional model and can introduce complexities in terms of synchronization between the generator and the classifier.
On the other hand, classifier-free guidance operates without a separate classifier. Instead, it relies on modifying the generation process directly through variations in the model's conditioning. For example, the model could operate in two modes: one that generates samples conditioned on some input (like a textual description) and one that generates samples unconditioned. By blending outputs from these two modes, you can achieve guidance. This can lead to more coherent outputs since the main generative model itself learns to adapt based on the provided context rather than relying on an external evaluation. This method is often simpler to implement and can produce high-quality results because the model can focus purely on learning the desired attributes through the training data itself.