[Paper Review] Diffusion Models Beat GANs on Image Classification
The paper shows that pre-trained diffusion models can serve as unified self-supervised representations that achieve strong image classification performance, outperforming BigBiGAN on both generation and classification at 256x256 resolution and enabling competitive FGVC transfer.
While many unsupervised learning models focus on one family of tasks, either generative or discriminative, we explore the possibility of a unified representation learner: a model which uses a single pre-training stage to address both families of tasks simultaneously. We identify diffusion models as a prime candidate. Diffusion models have risen to prominence as a state-of-the-art method for image generation, denoising, inpainting, super-resolution, manipulation, etc. Such models involve training a U-Net to iteratively predict and remove noise, and the resulting model can synthesize high fidelity, diverse, novel images. The U-Net architecture, as a convolution-based architecture, generates a diverse set of feature representations in the form of intermediate feature maps. We present our findings that these embeddings are useful beyond the noise prediction task, as they contain discriminative information and can also be leveraged for classification. We explore optimal methods for extracting and using these embeddings for classification tasks, demonstrating promising results on the ImageNet classification task. We find that with careful feature selection and pooling, diffusion models outperform comparable generative-discriminative methods such as BigBiGAN for classification tasks. We investigate diffusion models in the transfer learning regime, examining their performance on several fine-grained visual classification datasets. We compare these embeddings to those generated by competing architectures and pre-trainings for classification tasks.
Motivation & Objective
- Motivate unified unsupervised representation learning that supports both discriminative and generative tasks.
- Demonstrate that diffusion model embeddings are discriminative enough for high-accuracy image classification.
- Explore effective extraction and pooling strategies from diffusion features for classification.
- Evaluate transfer learning capabilities of diffusion-derived features on fine-grained visual classification (FGVC).
- Characterize representations across diffusion layers and time steps and compare to other pre-training methods with CKA.
Proposed method
- Use a pre-trained unconditional guided diffusion model (ADM U-Net, 256x256) to extract features from intermediate blocks and diffusion time steps.
- Define feature extraction f_theta(x0,t,b) as activation after block b when passing the noisy x_t through the U-Net.
- Evaluate linear probing, MLP/CNN/attention heads, and various pooling strategies to convert feature maps into vectors for classification.
- Compare diffusion-based classifiers against BigBiGAN and MAGE baselines on ImageNet-1k in terms of accuracy and FID.
- Assess transferability to FGVC datasets and analyze representations with centered kernel alignment (CKA).
- Conduct ablations over time steps t, block indices b, and pooling sizes to identify optimal feature extraction settings.
Experimental results
Research questions
- RQ1Can diffusion model embeddings be repurposed for discriminative image classification without fine-tuning the diffusion model?
- RQ2What are the best ways to pool and classify diffusion features (linear, MLP, CNN, attention heads)?
- RQ3How do diffusion-derived representations compare to GAN-based and self-supervised baselines for ImageNet and FGVC tasks?
- RQ4Do diffusion features transfer well to fine-grained datasets, and how sensitive are they to hyperparameters across tasks?
- RQ5How do diffusion representations evolve across layers and diffusion time steps as measured by CKA?
Key findings
- Diffusion models achieve 61.95% accuracy with an attention-based head (b=24, t=90) on ImageNet-1k using frozen features, outperforming BigBiGAN on classification.
- GD variants reach 64.96% (L, pool 2x2) and 71.89% (Attention) accuracy with the same FID 26.21, surpassing several unified baselines.
- Linear probing with diffusion features yields 61.86% accuracy (b=24, t=150) with an Attention head on ImageNet-1k; stable diffusion features also support classification.
- On FGVC datasets, diffusion features show competitive performance, with Aircraft often outperforming SimCLR-based baselines for several heads, though gaps remain on others.
- CKA analyses reveal early layers share more similarity across models, while bottleneck layers yield discriminative representations similar to ResNets/ViTs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.