Lune

ICCV2023Top-tier venue

Your Diffusion Model is Secretly a Zero-Shot Classifier

Alexander C. Li, Mihir Prabhudesai, Shivam Duggal, Ellis Brown, Deepak Pathak

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 on our website: diffusion-classifier.github.io/

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

145 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • High-Resolution Image Synthesis with Latent Diffusion Models cites Diffusion Models Beat GANs on Image Synthesis
  • High-Resolution Image Synthesis with Latent Diffusion Models cites Denoising Diffusion Probabilistic Models
  • Robust Classification via a Single Diffusion Model cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Robust Classification via a Single Diffusion Model cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Robust Classification via a Single Diffusion Model cites Diffusion Models Beat GANs on Image Synthesis
  • Robust Classification via a Single Diffusion Model cites Denoising Diffusion Probabilistic Models
  • A Tale of Two Features: Stable Diffusion Complements DINO for Zero-Shot Semantic Correspondence cites High-Resolution Image Synthesis with Latent Diffusion Models
  • A Tale of Two Features: Stable Diffusion Complements DINO for Zero-Shot Semantic Correspondence cites Diffusion Models Beat GANs on Image Synthesis
  • A Tale of Two Features: Stable Diffusion Complements DINO for Zero-Shot Semantic Correspondence cites Denoising Diffusion Probabilistic Models
  • Diffusion Models Beat GANs on Image Synthesis cites Learning Transferable Visual Models From Natural Language Supervision
  • Diffusion Models Beat GANs on Image Synthesis cites Denoising Diffusion Probabilistic Models
  • Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Cambrian-1: A Fully Open, Vision-Centric Exploration of Multimodal LLMs cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Cambrian-1: A Fully Open, Vision-Centric Exploration of Multimodal LLMs cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Cambrian-1: A Fully Open, Vision-Centric Exploration of Multimodal LLMs cites Learning Transferable Visual Models From Natural Language Supervision
  • SlotDiffusion: Object-Centric Generative Modeling with Diffusion Models cites High-Resolution Image Synthesis with Latent Diffusion Models
  • SlotDiffusion: Object-Centric Generative Modeling with Diffusion Models cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • SlotDiffusion: Object-Centric Generative Modeling with Diffusion Models cites Diffusion Models Beat GANs on Image Synthesis
  • SlotDiffusion: Object-Centric Generative Modeling with Diffusion Models cites Learning Transferable Visual Models From Natural Language Supervision
  • SlotDiffusion: Object-Centric Generative Modeling with Diffusion Models cites Denoising Diffusion Probabilistic Models
  • DreamLLM: Synergistic Multimodal Comprehension and Creation cites High-Resolution Image Synthesis with Latent Diffusion Models
  • DreamLLM: Synergistic Multimodal Comprehension and Creation cites Learning Transferable Visual Models From Natural Language Supervision
  • DreamLLM: Synergistic Multimodal Comprehension and Creation cites Denoising Diffusion Probabilistic Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers145

  1. Cambrian-1: A Fully Open, Vision-Centric Exploration of Multimodal LLMsPeter Tong, Ellis Brown, Penghao Wu, Sanghyun Woo et al.NeurIPS 2024 · 1,004 citations
  2. A Tale of Two Features: Stable Diffusion Complements DINO for Zero-Shot Semantic CorrespondenceJunyi Zhang, Charles Herrmann, Junhwa Hur, Luisa Polania Cabrera et al.NeurIPS 2023 · 371 citations
  3. DreamLLM: Synergistic Multimodal Comprehension and CreationRunpei Dong, Chunrui Han, Yuang Peng, Zekun Qi et al.ICLR 2024 · 315 citations
  4. SlotDiffusion: Object-Centric Generative Modeling with Diffusion ModelsZiyi Wu, Jingyu Hu, Wuyue Lu, Igor Gilitschenski et al.NeurIPS 2023 · 106 citations
  5. Robust Classification via a Single Diffusion ModelHuanran Chen, Yinpeng Dong, Zhengyi Wang, Xiao Yang et al.ICML 2024 · 94 citations

Builds on32

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
  3. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  4. Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
  5. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations

Related papers

  1. Text-to-Image Diffusion Models are Zero Shot ClassifiersKevin Clark, Priyank JainiNeurIPS 2023 · 192 citations
  2. Fake it Till You Make it: Learning Transferable Representations from Synthetic ImageNet ClonesMert Bülent Sariyildiz, Karteek Alahari, Diane Larlus, Yannis KalantidisCVPR 2023
  3. Wayward Concepts In Multimodal ModelsBrandon Trabucco, Max Gurinas, Kyle Doherty, Russ SalakhutdinovICLR 2025
  4. Text2Video-Zero: Text-to-Image Diffusion Models are Zero-Shot Video GeneratorsLevon Khachatryan, Andranik Movsisyan, Vahram Tadevosyan, Roberto Henschel et al.ICCV 2023 · 800 citations
  5. Generative Classifiers Avoid Shortcut SolutionsAlexander Cong Li, Ananya Kumar, Deepak PathakICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines