pith. sign in

arxiv: 2303.16203 · v3 · pith:FWBECQKZnew · submitted 2023-03-28 · 💻 cs.LG · cs.AI· cs.CV· cs.NE· cs.RO

Your Diffusion Model is Secretly a Zero-Shot Classifier

classification 💻 cs.LG cs.AIcs.CVcs.NEcs.RO
keywords diffusionmodelsclassificationclassifierdiscriminativegenerativeresultstasks
0
0 comments X
read the original abstract

The recent wave of large-scale text-to-image diffusion models has dramatically increased our text-based image generation abilities. These models can generate realistic images for a staggering variety of prompts and exhibit impressive compositional generalization abilities. Almost all use cases thus far have solely focused on sampling; however, diffusion models can also provide conditional density estimates, which are useful for tasks beyond image generation. In this paper, we show that the density estimates from large-scale text-to-image diffusion models like Stable Diffusion can be leveraged to perform zero-shot classification without any additional training. Our generative approach to classification, which we call Diffusion Classifier, attains strong results on a variety of benchmarks and outperforms alternative methods of extracting knowledge from diffusion models. Although a gap remains between generative and discriminative approaches on zero-shot recognition tasks, our diffusion-based approach has significantly stronger multimodal compositional reasoning ability than competing discriminative approaches. Finally, we use Diffusion Classifier to extract standard classifiers from class-conditional diffusion models trained on ImageNet. Our models achieve strong classification performance using only weak augmentations and exhibit qualitatively better "effective robustness" to distribution shift. Overall, our results are a step toward using generative over discriminative models for downstream tasks. Results and visualizations at https://diffusion-classifier.github.io/

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. A probabilistic framework for crystal structure denoising, phase classification, and order parameters

    cond-mat.mtrl-sci 2025-12 unverdicted novelty 6.0

    A unified probabilistic model uses per-atom logits over crystal prototypes to denoise atomic configurations, classify phases, and derive order parameters from a single differentiable scalar field.

  2. gen2seg: Generative Models Enable Generalizable Instance Segmentation

    cs.CV 2025-05 unverdicted novelty 6.0

    Finetuning generative models on limited instance segmentation data produces zero-shot generalization to unseen object categories and styles, matching or exceeding supervised baselines like SAM on ambiguous boundaries.

  3. ConjNorm: Tractable Density Estimation for Out-of-Distribution Detection

    cs.LG 2024-02 unverdicted novelty 6.0

    ConjNorm reframes OOD detection score design as optimizing norm p in an exponential family density model via a Bregman divergence theorem, with a tractable Monte Carlo estimator, claiming SOTA gains on CIFAR-100 and I...