Skip to main content
QUICK REVIEW

[Paper Review] Text-to-Image Diffusion Models are Zero-Shot Classifiers

Kevin Clark, Priyank Jaini|arXiv (Cornell University)|Mar 27, 2023
Multimodal Machine Learning ApplicationsComputer Science16 citations
TL;DR

The paper shows that text-to-image diffusion models (e.g., Imagen, Stable Diffusion) can be used as zero-shot image classifiers by treating denoising as a proxy for class likelihood, achieving competitive accuracy with CLIP and exhibiting strong robustness to texture cues and attribute binding; it also introduces efficiency techniques to make the approach more practical.

ABSTRACT

The excellent generative capabilities of text-to-image diffusion models suggest they learn informative representations of image-text data. However, what knowledge their representations capture is not fully understood, and they have not been thoroughly explored on downstream tasks. We investigate diffusion models by proposing a method for evaluating them as zero-shot classifiers. The key idea is using a diffusion model's ability to denoise a noised image given a text description of a label as a proxy for that label's likelihood. We apply our method to Stable Diffusion and Imagen, using it to probe fine-grained aspects of the models' knowledge and comparing them with CLIP's zero-shot abilities. They perform competitively with CLIP on a wide range of zero-shot image classification datasets. Additionally, they achieve state-of-the-art results on shape/texture bias tests and can successfully perform attribute binding while CLIP cannot. Although generative pre-training is prevalent in NLP, visual foundation models often use other methods such as contrastive learning. Based on our findings, we argue that generative pre-training should be explored as a compelling alternative for vision-language tasks.

Motivation & Objective

  • Investigate whether text-to-image diffusion models learn transferable representations suitable for zero-shot classification.
  • Quantitatively compare diffusion models to CLIP on diverse zero-shot image classification tasks.
  • Examine diffusion models’ robustness to texture-shape conflicts and their ability to perform attribute binding.
  • Develop efficiency improvements to enable practical zero-shot classification with diffusion models.

Proposed method

  • Convert class labels into text prompts and use the diffusion model to score images via a re-weighted variational lower bound as a proxy for log-likelihood.
  • Define the zero-shot classifier decision as choosing the class that minimizes the diffusion loss L_Diffusion over stochastic denoising steps.
  • Estimate the expectation in the diffusion loss with Monte-Carlo sampling over timesteps and forward-noise samples.
  • Improve efficiency by sharing noise across classes so the same noisy image is scored for all candidate classes, reducing variance.
  • Prune implausible classes online using a paired t-test to allocate more samples to plausible classes, forming a successive-elimination procedure.

Experimental results

Research questions

  • RQ1Can text-to-image diffusion models serve as effective zero-shot classifiers for diverse datasets?
  • RQ2How do diffusion-based zero-shot classifiers compare to CLIP in accuracy and robustness across tasks?
  • RQ3Do diffusion models exhibit robustness to texture or style cues that mislead traditional discriminative models?
  • RQ4Are diffusion models capable of attribute binding and compositional reasoning beyond what CLIP demonstrates?

Key findings

  • Diffusion models achieve zero-shot classification accuracies competitive with CLIP on a range of datasets.
  • Imagen and Stable Diffusion show strong robustness to texture cues, achieving state-of-the-art performance on the Cue-Conflict dataset.
  • Diffusion models can perform attribute binding on synthetic data, in some settings, whereas CLIP cannot.
  • The proposed efficiency techniques (shared noise and pruning) substantially reduce computation, enabling faster zero-shot evaluation albeit still slower than typical discriminative classifiers.
  • The study demonstrates that generative pre-training can yield powerful vision-language representations suitable for discriminative tasks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.