Intriguing Properties of Generative Classifiers
Authors: Priyank Jaini
Kevin Clark
Robert Geirhos
Venue: ICLR 2024 spotlight (2024)
Keywords: diffusion models
zero-shot
text-to-image
generative models
human visual perception
psychophysics
cognitive science
neuroscience
Primary area: generative models
TL;DR: Generative classifiers based on text-to-image generative models approximate human object recognition data surprisingly well.

Abstract: What is the best paradigm to recognize objects---discriminative inference (fast but potentially prone to shortcut learning) or using a generative model (slow but potentially more robust)? We build on recent advances in generative modeling that turn text-to-image models into classifiers. This allows us to study their behavior and to compare them against discriminative models and human psychophysical data.
We report four intriguing emergent properties of generative classifiers: they show a record-breaking human-like shape bias (99% for Imagen), near human-level out-of-distribution accuracy, state-of-the-art alignment with human classification errors, and they understand certain perceptual illusions. Our results indicate that while the current dominant paradigm for modeling human object recognition is discriminative inference, zero-shot generative models approximate human object recognition data surprisingly well.

Published as a conference paper at ICLR 2024
INTRIGUING PROPERTIES OF GENERATIVE CLASSIFIERS
Priyank Jaini" Google DeepMind
Kevin Clark Google DeepMind
Robert Geirhos" Google DeepMind
ABSTRACT
What is the best paradigm to recognize objects discriminative inference (fast but potentially prone shortcut learning) or using generative model (slow but poten- tially more robust)? We build on recent advances in generative modeling that turn text-to-image models into classifiers. This allows us to study their behavior and compare them against discriminative models and human psychophysical data. We report four intriguing emergent propertics of generative classifiers: they show a record-breaking human-like shape bias (99% for Imagen), near human-level out- of-distribution accuracy, state-of-the-ar alignment with human classification er- rors, and they understand certain perceptual illusions. Our results indicate that while the current dominant paradigm for modeling human object recognition is discriminative inference, zero-shot generative models approximate human object recognition data surprisingly well.
Test image example: Is this a cat (decision based on shape) or an elephant (decision based on texture)?
strong shape bias
strong texture bias
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
Shape categories
Most discriminative models (grey symbols) are strongly texture biased
Humans are strongly shape biased (92-99%)
Like humans, generative classifiers are shape blased: 99% for imagen, 93% for Stable Diffusion, and 92% for Parti
Simply adding diffusion noise to ResNet-50 training evaluation increases shape bias from 21% to 78%
Figure 1: Zero-shot generative classifiers achieve a human-level shape bias: 99% for Imagen, 93% for Stable Diffusion, 92% for Parti and 12-99% for individual human observers (96% on average). Most discriminative models are texture biased instead.
"Equal contribution

---

Published as a conference paper at ICLR 2024
test image
F
346
add noise
10
reconstruct
image conditioned on each class label (visualized as icons)
classification decision = image with minimal L2 distance to test image (here: dog H+)
Classification with diffusion generative classifier. Given a test image, such as dog with clock texture (1). rext-to-image generative classifier adds random noise (2) and then reconstructs the image conditioned on the prompt "A bad photo The reconstructed image closest to the test image in L2 distance is taken as the classification decision (4); this estimates the diffusion variational lower bound (Clark & Jaini, 2023). For visualization purposes, icons corresponding the prompt class superimposed the reconstructed images.
Figure 2:
<class>" for each class (3).
INTRODUCTION
Many discriminative classifiers perform well on data similar the training distribution, but struggle on out-of-distributio images. For instance, a cow may be correctly recognized when photographed in typical grassy landscape, but not correctly identified when photographed on beach (Beery et al., 2018 8). In contrast to many discriminatively trained models, generative text-to-image models appear to have acquired a detailed understanding of objects: they have no trouble generating cows on beaches or dog houses made of sushi (Saharia al., 2022). This raises the question: If we could somehow get classification decisions out of a generative model, how well would perform out-of- distribution? For instance, would it be biased towards textures like most discriminative models or towards shapes like humans (Baker et al., 2018; Geirhos et al., 2019; Wichmann & Geirhos, 2023)?
We here investigate perceptual properties of generative classifiers, i.e., models trained generate images from which we extract zero-shot classification decisions. We focus on two of the most successful types of text-to-image generative models diffus-ooifonnnnnno models and autoregressive models- and compare them to both discriminative models (e.g., ConvNets, vision transformers, CLIP) and human psychophysical data. Specifically, we focus on the task of visual object recognition (also known as classification) of challenging -ftttf-distribution datasets and visual illusions.
On a broader level, the question of whether perceptual processes such as object recognition are best implemented through discriminative or generative model has been discussed in various research communities for long time. Discriminative inference typically described as fast yet potentially prone to shortcut learning (Geirhos et al., 2020a), while generative modeling is often described as slow yet potentially more capable of robust inference (DiCarlo et al., 2021). The human brain appears to combine the best of both worlds, achieving fast inference but also robust generaliza- tion. How this is achieved, iee. how discriminative and generative processes may be integrated has been described as "the deep mystery in vision" (Kriegeskorte, 2015, p. 435) and seen widespread interest in Cognitive Science and Neuroscience (see DiCarlo et al., 2021, for an overview). This mystery dates back to the idea of vision inverse inference proposed more than 150 years ago by
2

---

Published as a conference paper at ICLR 2024
0.9
0.8
human-level OOD accuracy
0.7
OOD accuracy
0.6
0.4
epe promps
BIOO 20 promect
Sundett INT-200 E (2000))
l lentiee S0iiee---o.. (34M))
Reshelt (94CM
pi L3 opd 88
cul 20 Huaat 3.
MC0022 Noghee 50
Sin N wee 50x1
scslec 10
R Nos Sbott
and eeeeesd mllkke (ishert
0.2
BRL Reshett de0i
made T03
2011
0.0
Figure 3: Out-of-distribution accuracy across 17 challenging datasets (Geirhos et al., 2021). De-
tailed results for all parametric datasets are plotted Figure 5; Table 3 lists accuracies.
von Helmholtz (1867), who argued that the brain may need to infer the likely causes of sensory information-al process that requires generative model of the world. In machine learning, this idea inspired approaches such as the namesake Helmholtz machine (Dayan et al., 1995), the concept of vision Bayesian inference (Yuille & Kersten, 2006) and other analysis-by- analysisby--ynntheiis methods (Revow et al., 1996; Bever & Poeppel, 2010; Schott et al., 2018; Zimmermann et al., 2021). How- ever, when comes to challenging real-world tasks like object recognition from photographs, the ideas of the past often lacked the methods (and compute power) of the future: until very recently, was impossible to compare generative and discriminative models of object recognition simply because the only models capable of recognizing challenging images were standard discriminative models like deep convolutional networks (Krizhevsky al., 2012; He et al., 2015) and vision trans- formers (Dosovitskiy et al., 2021). Excitingly, this is changing now and thus enables us to compare generative classifiers against both discriminative models and human object recognition data.
Concretely, in this work, we study the properties of generative classifiers based on three different text-to-image generative models: Stable Diffusion (SD), Imagen, and Parti on 17 challenging OOD generalization datasets from the model-vs-humann performance of these generative classifiers with 52 discriminative models and human psychophysi- cal data. Based our experiments, we observe four intriguing properties of generative classifiers:
toolbox (Geirhos et al., 2021). We compare the
1. human-like shape bias (Subsection 3.1).
2. near human-level dii-t---iitiitti accuracy (Subsection 3.2),
3. state-of-the-arn еиrо consistency with humans (Subsection 3.3),
4. an understanding of certain perceptual illusions (Subsection 3.4).
2 METHOD: GENERATIVE MODELS AS ZERO-SHOT CLASSIFIERS
We begin with dataset, D, ( //) (I2, v2) (In, yn)} of images where each image belongs to one of K classes jyx] = {y1," ... ,Ys Our method classifies an image by predicting the most probable class assignment assuming uniform prior over classes:
y arg max plu yι|=²) arg p(æly yk) ply = yı) arg max logp(æal = yι) (1) Yk
Yk
ye
A generative classifier (Ng Jordan, 2001) uses conditional generative model estimate the likelihood pe (xly yι) where 0 are the model parameters.
Generative models: We study the properties of three different text-to-image generative models namely Imagen (Saharia et al., 2022) which is pixel space based diffusion model, Stable Diffusion (SD) (Rombach et al., 2022) which is a latent space based diffusion model, and Parti (Yu et al., 2022) which is -euseecc-t--sequencce based autoregressive model. Since these models conditioned
3

---

Published as a conference paper at ICLR 2024
0.5
numan-to-humant error consistency
0.4
error consistency
0.3-
Bient (300M)
RUMPN (348)) procuss
O1 -8 8o prompts
oeigin 10200 s0 (9400))
Wi RESINE 2213 100
Binc ls Rer 3i1
50 ugo 3.0
0.1
In50s Reshee
Reshet
L2 ope
Res
repeen 1n mereent 32odd mide MEL01
callin tn 23
Red 30 an0
On 0111220 10:600
Figure 4: Error consistency across 17 challenging datasets (Geirhos et al., 2021). This metric
measures whether errors made by models align with errors made by humans (higher is better).
on text prompts rather than class labels, we modify each label, yk. to a text prompt using the tem- plate Yı - A bad photo of a yx. generate classification decisions. Conceptually, our approach to obtain classification decisions is visualized in Figure 2.
Following Clark Jaini (2023), we generate classification decisions from diffusion models like Stable Diffusion and Imagen by approximating the conditional log-likelihood log (zll = yz) using the diffusion variational lower bound (see Appendix for background on diffusion models):
= arg max log po = ys) ss arg min E., [we ||a Ca Yk, 1)
y
yk
yk
For SD, x is a latent representations whereas for Imagen a consists of raw image pixels.
Evaluating pa( y Yu) for Parti amounts to performing one forward pass of the model since is an autoregressive model that provides an exact conditional likelihood. Thus, for each of these models we evaluate the conditional likelihood, po(xly yk), for each class yı E [yx] and assign the class with the highest likelihood obtained via Equation (1).
Model-vs-human datasets: We study the performance of these generative classifiers on 17 chal- lenging out-of-distribun (OOD) datasets proposed in the model-vs-human toolbox (Geirhos al., 2021). Of these 17 datasets, five correspond to non-parametric single manipulation (sketches, edge-filtered images, silhouettes, images with texture-shape cue conflict, and stylized images where the original image texture is replaced by the style of painting). The other twelve datasets consist of parametric image distortions like low-pass filtered images, additive uniform noise, etc. These datasets designed test. OOD generalization for diverse models in comparison man object recognition performance. The human data consists of 90 human observers with a total of 85,120 trials collected in dedicated psychophysical laboratory (see Geirhos et al., 2021, for details). This allows us to compare classification data for zero-shot generative models, discriminative models and human observers in a comprehensive, unified setting.
hu-
carefully calibrated screen
Preprocessing: We preprocess the 17 datasets in the model-vs-human toolbox by resizing the images to 64 x 64 resolution for Imagen, 256 x 256 for Parti, and 512 x 512 for SD since these are the resolutions for the each of the base models respectively. We use the prompt, A bad photo of a yk. for each dataset and every model. Although Imagen (Saharia et al., 2022) is cascaded diffusion model consisting of 64 x 64 low-resolution model and two super-resolution models, we only use the 64 x 64 base model for our experiments here. We use v1.4 of SD (Rombach et al., 2022) for our experiments that uses a pre-trained text encoder from CLIP to encode text and pre-trained VAE to map images to a latent space. Finally, image tokenizer and an secoder-decoder transformer model that converts text-to-image generation to sequence-to-sqqueee modeling problem.
the Parti-3B model (Yu al., 2022) consisting of an
4

---

Published as a conference paper at ICLR 2024
260
3..0
66
60
0.3
60 aight
eeallied
(a) Colour greyscale
(b) True false colour
(c) Power equalised
(d) Rotation
Eua
02
62
Ustarmndie with
Cerruthh Serer:
(au sandar devidas
(e) Uniform noise
(I) Contrast
(g) Low-pass
(h) High-pas passs
16
12 52 246 (i) Phase noise
Eidolon I
(k) Eidolon
(l) Eidolon
Figure 5: Detailed out-of-distribution accuracy for Imagen, Stable Diffusion and Parti in com- parison to human observers. While not always aligning perfectly with human accuracy, the overall robustness achieved by Imagen and Stable Diffusion is comparable that of human observers though these models are zero-shot, i.e. neither designed nor trained to do classification.
Baseline models for comparison: As baseline discriminative classifiers, we compare Imagen, SD, and Parti against 52 diverse models from the sesl--s-huann toolbox (Geirhos et al., 2021) that are either trained or fine-tur tenettunddde on ImageNet, three ViT-22B variants (Dehghani et al., 2023) (very large 22B parameter vision transformers) and CLIP (Radford al., 2021) as a zero-shot classifier baseline. The CLIP model is based the largest version, ViT-L/14 224px, and consist of vision and text transformers trained with contrastive learning. We use the CLIP model that uses an ensemble of 80 different prompts for classification (Radford et al., 2021). We plot all bascline discriminative models in grey and human subject data red.
Metrics: We compare all the models over the 17 OOD datasets based on three metrics: (a) shape bias, (b) OOD accuracy and, (c) error consistency. Shape bias is defined by Geirhos al. (2019) as the fraction of decisions that are identical to the shape label of an image divided by the fraction of decisions for which the model output dataset with texture-shape cue conflict. OOD accuracy is defined as the fraction of correct decisions for dataset that is not from the training distribution. Error consistency (see Geirhos al., 2020b, for details) is measured in Cohen's 's kappa (Cohen, 1960) and indicates whether two decision makers (e.g., model and human observer) systematically make errors on the same images. If that the case, it may be an indication of deeper underlying similarities in terms of how they process images and recognize objects. Error consistency between models fi and f2 is defined over a dataset on which both models are evaluated on exactly the same images and output label prediction; the metric indicates the fraction of images on which 1 (x) y. is identical to 1 (=())m= (i.e., both models are either correct wrong the same image) when corrected for chance agreement. This ensures that an error consistency value of 0 corresponds to chance agreement, positive values indicate beyond- chance agreement (up 1.0) and negative values indicate systematic disagreement (down to -1.0).
identical to either the shape the texture label
5

---

Published as a conference paper at ICLR 2024
model
model type
shape bias
OOD accuracy
error consist.
Imagen (1 prompt)
zero-shot
99%
0.71
0.31
StableDiffuson (1 prompt)
zero-shot
93%
0.69
0.26
Parti (1 prompt)
zero-shot
92%
0.58
0.23
CLIP prompt)
zero-shot
80%
0.55
0.26
CLIP (80 prompts)
zero-shot
57%
0.71
0.28
ViT-22B-384 trained on 4B images
discriminative
87%
0.80
0.26
ViT-L trained on IN-21K
discriminative
42%
0.73
0.21
RN-50 trained on IN-IK
discriminative
21%
0.56
0.21
RN-50 trained w/ diffusion noise
discriminative
57%
0.57
0,24
RN-50 train+eval w/ diffusion noise
discriminative
78%
0.43
0.18
Table Benchmark results for model-vs-hume metrics (Geirhos et al., 2021). Within each model type (zero-shot discriminative), the best result for each category is shown in bold.
RESULTS: FOUR INTRIGUING PROPERTIES OF GENERATIVE CLASSIFIERS
3.1 HUMAN-LIKE SHAPE BIAS
Introduced by Geirhos et al. (2019), the shape bias of a model indicates to which degree the model's decisions are based on object shape, as opposed object texture. We study this phenomenon us- ing the cue-conflict dataset which consists of images with shape-texture cue conflict. As shown in Geirhos et (2021), most discriminative models are biased towards texture whereas humans are biased towards shape (96% shape bias average: 92% to 99% for individual observers). Interest- ingly, we find that all three zero-shot generative classifiers show a human-level shape bias: Imagen achieves a stunning 99% shape bias, Stable Diffusion 93% and Parti 92% shape bias.
As we show Figure/ 1, Imagen closely matches or even exceeds human shape bias across nearly all categories, achieving a previously unseeen shape bias of 99%. In Table we report that all three generative classifiers significantly outperform ViT-22B (Dehghani et al., 2023), the previous state- of-the-art method in terms of shape bias, even though all three models smaller in size, trained on less data, and unlike ViT-22B were not designed for classification.
3.2 NEAR HUMAN-LEVEL OOD ACCURACY
Humans excel at recognizing objects even if they are heavily distorted. Do generative classifiers also possess similar out-of-distribution robustness? We find that Imagen and Stable Diffusion achieve an overall accuracy that is close to human-level robustness (ef. Figure 3) despite being zero-shot models; these generative models are outperformed by some very competitive discriminative models like VIT-22B achieving super-human accuracies. The detailed plots in Figure 5 show that most datasets (except rotation and high-pass), the performance of all three generative classifiers approx- imately matches human responses. Additional results are in Table and Figure 11 and 12 in the appendix. Notably, all three models are considerably worse than humans in recognizing rotated images. Curiously, these models also struggle generate rotated images when prompted with the text "A rotated image of a dog." "An upside down image of dog." etc. This highlights an ex- citing possibility: evaluating generative models on downstream tasks like OOD datasets may be quantitative way of gaining insights into the generation capabilities and limitations of these models.
On high-pass filtered images, Imagen performs much worse than humans whereas SD and Parti ex- hibit more robust performance. The difference in performance of Imagen and SD may be attributed to the weighting function used Equation (2). Our choice of weighting function, w; := exp(-7t) as used in Clark & Jaini (2023) tends to give higher weight the lower noise levels and is thus bad at extracting decisions for gighfrrequecy images. SD on the other hand operates the latent space and thus the weighting function in Equation (2) effects its decisions differently than Imagen. Never- theless, this indicates that even though Imagen and SD are diffusion- based models, they exhibit very different sensitivities high spatial frequencies. Despite those two datasets where generative clas-

---

Published as a conference paper at ICLR 2024
Most models make similar errors as other models
error consistency
Generative classifiers show high consistency with humans and lower consistency with "traditional" models
Figure 6: Model-to-model error consistency for 'cue conflict' images. The matrix sorted accord- ing mean consistency with humans (higher consistency from left to right top bottom).
sifiers show varied performance, they overall achieve impressive zero-shot classification accuracy (near human-level performance as shown in Figure 3).
3.3 SOTA ERROR CONSISTENCY WITH HUMAN OBSERVERS
Humans and models may both achieve, say, 90% accuracy on a dataset but do they make errors on the same 10% of images, or on different images? This is measured by error consistency (Geirhos et al., 2020b). In Figure 4, we show the overall results for all models across the 17 datasets. While substantial gap towards human-to-human error consistency remains, Imagen shows the most human- aligned eиror patterns, surpassing previous state-of-ther the-art (SOTA) set by ViT-22B, large vision transformer (Dehghani et al., 2023). SD also exhibits error consistency closer to humans but trails significantly behind Imagen. These findings appear consistent with the MNIST results by Golan et al. (2020) reporting that a generative model captures human responses better than discriminative models.
Additionally, a matrix plot of error consistency of all the models on cue-conflict images is shown in Figure 6. Interestingly, the plot shows clear dichotomy between discriminative models that exhibit error patterns similar to each other, and generative models whose error patterns more closely match humans, thus they end up the human cluster. While overall a substantial gap between the best models and human-to-human consistency remains (Figure 4), Imagen best captures human classification errors despite never being trained for classification. We report more detailed results in the appendix in Table 2 and Figures 11-18.
3.4 UNDERSTANDING CERTAIN VISUAL ILLUSIONS
Beyond quantitative benchmarking, we investigated more qualitative aspect of generative models: whether they can understand certain visual illusions. In human perception, illusions often reveal as- pects of perceptual abilities that would otherwise go unnoticed. We therefore tested generative models on images that are visual illusions for humans. contrast to discriminative models, gener- ative classifiers offer straightforward way test illusions: for bistable images such as the famous

---

Published as a conference paper at ICLR 2024
Original Image
Prompt
An image a duck.
image a face.
rock.
A bowl of vegetables.
An image an woman.
An imagee of young woman.
Muse
Stable Diftusion
Imagen
Figure 7: Generative classifiers understand certain visual illusions as indicated by their ability reconstruct ambiguous images a way that aligns with how humans perceive those images. For instance, they reconstruct right- rabbit a left-facing duck in the case of the bistable rabbit-duck illusion and place the face in the right location and pose for an image where humans show pareidolia (secing patterns in things, like face in rock). Image attribution: Appendix D
rabbit-duck, we can prompt them to reconstruct based on 'an image of a duck' and 'an image of rabbit'. If they can (a) reconstruct images resembling the respective animal and (b) they place the reconstructed animal the same location and pose as humans would, this can seen as evidence that they "understand" the illusion. We find that this is indeed the case for generative models like Imagen, Stable Diffusion, and Muse (Chang et al., 2023). Since Parti cannot directly be used for image editing, used Muse masking-based generative model that operates VQ-VAE tokens similar to Parti-for this analysis instead of Parti; Muse on the other hand cannot be used as a clas- sifier explained in Appendix B. This ensures that our conclusions not limited diffusion models but cover generative models more broadly.
four different images that either bistable illusions for humans images for which humans exhibit parcidolia (a tendency to see patterns in things, like face in rock). In all cases, the text-to-image generative models are able to recognize the illusion and recreate correct images conditioned on the respective text prompts. This indicates that these generative models share certain bistable illusions and pareidolia with human visual perception.
In Figure 7,
ANALYSIS: WHERE DOES THE INCREASED SHAPE BIAS ORIGINATE FROM?
In Section 3, we highlighted four intriguing properties of generative classifiers. The striking emergent property amongst the four is the human-level shape bias demonstrated by these generative classifiers; bias that discriminative models far was able to show. natural question to ask is thus: What aspect of these generative models causes such an increase in shape bias?
We observed that for diffusion models like Imagen and Stable Diffusion, the recreated images used for classification were usually devoid of texture cues (for example see Figure 2). We posit that the denoising process used for classification (cf. Equation (2)) of the diffusion model might bias it towards capturing low-frequency information and thereby focuses on the global structure of the image as captured by the shape of an object. Indeed, in Figure 5, we observe that while generative classifiers are well within the range of other models for most datasets, they demonstrate very dis- tinctive results on low-pass filtered images (also known as blurred); Imagen- the most shape-biased model-is par with humans. Conversely, Imagen struggles to classify high-pass images. Could it be the case that these generative models put more emphasis on lower spatial frequencies whereas most textures high frequency in nature?
8

---

Published as a conference paper at ICLR 2024
If this is indeed the case, then performance on blurred images and shape bias should have signif- icant positive correlation. We tested this hypothesis empirically and indeed found a strong positive and highly significant correlation between the two (Pearson's 's r(58) = .59. p < 0.001; Spearman's 's r(58) = .64. p < 0.001); a finding consistent with Subramanian et al. (2023) observing a signif- icant correlation between shape bias and spatial frequeney channel bandwidth. While correlations establish a connection between the two, they are of course not evidence for a causal link. We hy- pothesized that the noise applied during diffusion training might encourage models to ignore high- frequency textures and focus on shapes. To test this prediction, we trained a standard ResNet-50 on ImageNet- 1K (Russakovsky et al., 2015) by adding diffusion-style noise as a data augmentation during both training and evaluation. Interestingly, such a model trained with data augmented with diffusion style noise causes an increase in shape bias from 21% for a standard ResNet-50 to 78% as shown in Figures I and 14 and Table 1. This simple trick achieves substantially higher shape bias than the 62% observed by prior work when combining six different techniques and augmentations (Hermann et al., 2020).
This result shows that (i) diffusion style training biases the models to emphasize low spatial fre- quency information and (ii) models that put emphasis on lower spatial frequency noise exhibit in- creased shape bias. Other factors such as generative training, the quality and quantity of data, and the use of powerful language model might also play a role. However, given the magnitude of the observed change in shape bias this indicates that diffusion-style training is indeed a crucial factor.
5 DISCUSSION
While generative pre-training has been prevalent in natural language processing, in computer vision it is still common to pre-train models on labeled datasets such as ImageNet (Deng al., 2009) or JFT (Sun et al., 2017). At the same time, generative text-to-image models like Stable Diffusion, Imagen, and Parti show powerful abilities to generate photo-realiste images from diverse text prompts. This suggests that these models learn useful representations of the visual world, but so far it has been unclear how their representations compare to discriminative models. Furthermore, discriminative models have similarly dominated computational modeling of human visual percep- tion, even though the use of generative models by human brains has long been hypothesized and discussed. In this work, we performed an empirical investigation on out- cuttof-distribution datasets to assess whether discriminative or generative models better fit human object recognition data.
Motivation.
Key results. We report four intriguing human-likk properties of generative models: (1) Generative classifiers are the first models that achieve a human-like shape bias (92-99%); (2) they achieve near human-level OOD accuracy despite being zero-shot classifiers that were neither trained nor designed for classification; (3) one of them (Imagen) shows the most human-aligned error patterns that machine learning models have achieved to date; and (4) all investigated models qualitatively capture the ambiguities of images that are perceptual illusions for humans.
Implications for human perception. Our results establish generative classifiers as one of the lead- ing behavioral models of human object recognition. While we certainly don't 't resolve the "deep mystery of vision" (Kriegeskorte, 2015, p. 435) in terms of how brains might combine generative and discriminative models,
work paves the way for future studies that might combine the two. Quoting Luo (2022, p. 22) on diffusion, "It is unlikely that this is how we, as humans, naturally model and generate data; we do not seem to generate novel samples as random noise that we itera- tively denoise." we fully agree, but diffusion may just be one of many implementational ways to arrive at representation that allows for powerful generative modeling. Human brains are likely to use different implementation, but they still may (or may not) end up with a similar representation.
Implications for machine perception. We provide evidence for the benefits of generative pre- training, particularly in terms of zero-shot performance on challenging duttof-distribution tasks. In line with recent work on using generative models for depth estimation (Zhao al., 2023) or segmentation (Burgert et al., 2022; Brempong et al., 2022; Li et al., 2023), this makes the case for generative pre-training as a compelling alternative to contrastive or discriminative training for vision tasks. Additionally, our experiments provide framework to find potential bugs of generative models through classification tasks. For example, all the generative models performed poorly on the rotation dataset; those models also struggled to generate "rotated" or supside-down images of objects. Similar experiments could be used to evaluate generative models for undesirable behaviour, toxicity and bias.

---

Published as a conference paper at ICLR 2024
Limitations. A limitation of the approach used in the paper is the computational speed (as we also alluded to in Section 1). The approach does not yield a practical classifier. Secondly, all three models have different model sizes, input resolutions, and are trained on different datasets for different amounts of time, so the comparison different language encoders which may be confounding factor. Through including diverse generative models, our comparisons aim to highlight the strengths and weaknesses of generative models. We explore number of ablations and additional analyses in the appendix, including shape bias results for image captioning models that are of generative nature, but not trained for text-to- image modeling.
not perfect. Furthermore, different models
Future directions. Beyond the questions regarding how biological brains might combine generative and discriminative models, we believe it will be interesting to study how, and to what degree, lan- guage cross-attention influences the intriguing properties we find. Moreover, is denoising diffusion training a crucial component that explains the impressive performance of Imagen and SD? We hope our findings show how intriguing generative classifiers are for exploring exciting future directions.
ACKNOWLEDGMENTS
We would like to express our gratitude to the following colleagues (in alphabetical order) for helpful discussions and feedback: David Fleet, Katherine Hermann, Been Kim, Alex Ku, Jon Shlens, and Kevin Swersky. Furthermore, we would like to thank Michael Tschannen and Manoj Kumar for suggesting the CapPa model analysis and providing the corresponding models.
REFERENCES
Nicholas Baker, Hongjing Lu, Gennady Erlikhman, and Philip Kellman. Deep convolutional networks do not classify based on global object shape. PLOS Computational Biology, 14(12): c1006613, 2018
Sara Beery, Grant Van Hor, and Pietro Perona. Recognition in terra incognita. In Proceedings of the European Conference on Computer Vision, pp. 456-473, 2018.
Thomas G Bever and David Poeppel. Analysis by synthesis: a (re-) emerging program research for language and vision. Biolinguistics, 4(2-3):174-200 2010.
Emmanuel Asiedu Brempong, Simon Kornblith, Ting Chen, Niki Parmar, Matthias Minderer, and Mohammad Norouzi. Denoising Pretraining for Semantic Segmentation. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 4175-4186, 2022.
Ryan Burgert, Kanchana Ranasinghe, Xiang Li, and Michael S Ryoo. Peekaboo: Text to Image Diffusion Models are Zero-Shot Segmentors. arXiv preprint arXiv:2211. 2022.
Huiwen Chang. Han Zhang, Jarred Barber, AJ Maschinot, Jose Lezama, Lu Jiang, Ming-Hsuan Yang, Kevin Murphy, William T Freeman, Michael Rubinstein, et al. Muse: Text-To Imagee Generation via Masked Generative Transformers. arXiv preprint vrXiv:2301.00704 2023.
Kevin Clark and Priyank Jaini. Text-to-image diffusion models are zero-shot classifiers. arXiv preprint arXiv:2303. 2tt.:23333./33333 15233, 2023.
Jacob Cohen. A coefficient of agreement for nominal scales. Educational and Psychological Mea- surement, 20(1):37 -6, 1960.
Peter Dayan, Geoffrey E Hinton, Radford M Neal, and Richard S Zemel. The Helmholtz machine. Neural Computation, 7(5)8889-904, 1995.
Mostafa Dehghani, Josip Djolonga, Basil Mustafa, Piotr Padlewski, Jonathan Heek, Justin Gilmer, Andreas Peter Steiner, Mathilde Caron, Robert Geirhos, Ibrahim Alabdulmohsin, et al. Scaling vision transformers to 22 billion parameters. In International Conference on Machine Learning, pp. 7480-7512. PMLR, 2023.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hi- erarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248-255 leee, 2009.
10

---

Published as a conference paper at ICLR 2024
James J DiCarlo, Ralf Haefner, Leyla Isik, Talia Konkle, Nikolaus Kriegeskorte. Benjamin Peters, Nicole Rust, Kim Stachenfeld, Joshua B Tenenbaum, Doris Tsao, et al. How does the brain combine generative models and direct discriminative computations in high-level vision? 2021.
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszko- reit, and Neil Houlsby. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. In International Conference on Learning Representations, 2021.
Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A. Wichmann, and Wieland Brendel. ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness. In International Conference Learning Representations, 2019.
Robert Geirhos, Sörn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix A Wichmann. Shortcut Learning in Deep Neural Networks. Nature Machine Intelligence, 2:665-673, 2020a.
Robert Geirhos, Kristof Meding, and Felix A Wichmann. Beyond accuracy: quantifying trial- by-trial behaviour of CNNs and humans by measuring error consistency. Advances in Neural Information Processing Systems, 33, 2020b.
Robert Geirhos, Kantharaju Narayanappa, Benjamin Mitzkus, Tizian Thieringer, Matthias Bethge, Felix Wichmann, and Wieland Brendel. Partial success in closing the gap between human and machine vision. Advances in Neural Information Processing Systems, 34:23885-23899 2021.
Tal Golan, Prashant C
Raju, and Nikolaus Kriegeskorte. Controversial stimuli: Pitting neural net- works against each other models of human cognition. Proceedings of the National Academy of Sciences, (17(47):99330-2333 2020.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on ImageNet classification. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1026-1034, 2015.
Katherine Hermann, Ting Chen, and Simon Korbblith. The origins and prevalence of texture bias in convolutional neural networks. Advances Neural Information Processing Systems, 33:19000- 19015, 2020.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840 6851, 2020.
Diederik Kingma, Tim Salimans, Ben Poole, and Jonathan Ho. Variational diffusion models. Ad- vances Neural Information Processing Systems, 34:21696-21707, 2021.
Diederik Kingma and Max Welling, Auto-encoding Variational Bayes. International Conference on Learning Representations, 2014.
Nikolaus Kriegeskorte. Deep neural networks: a new framework for modeling biological vision and brain information processing. Annual Review of Vision Science, 1:417-446, 2015.
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. ImageNet classification with deep convo- lutional neural networks. In Advances in Neural Information Processing Systems, pp. 1097-1105, 2012.
Daiqing Li, Huan Ling, Amlan Kar, David Acuna, Seung Wook Kim, Karsten Kreis, Antonio Tor- ralba, and Sanja Fidler. DreamTeacherr Pretraining Image Backbones with Deep Generative Models. In Proceedings of the IEEF/VV International Conference on Computer Vision, pp- 16698-16708, 2023.
Calvin Luo. Understanding diffusion models: A unified perspective. arXiv preprint arXiv:2208. 1970, 2022.

---

Published as a conference paper at ICLR 2024
Andrew Ng and Michael Jordan. On discriminative vs. generative classifiers: A comparison of logistic regression and naive Bayes. Advances in Neural Information Processing Systems, 14, 2001.
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning. pp. 8748-8763. PMLR, 2021.
Michael Revow, Christopher KI Williams, and Geoffrey E Hinton. Using generative models for handwritten digit recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(6):522-666, 1996.
Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Bjöm Ommer. High- resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Con- ference on Computer Vision and Patlern Recognition, pp. 10684-10695, 2022.
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision,
115(3):211-252) 2015.
Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily Denton, Seyed Kam- yar Seyed Ghasemipour, Burcu Karagol Ayan, S Sara Mahdavi, Rapha Gontijo Lopes, et al. Photorealistic Lext-to-Image Diffusion Models with Deep Language Understanding. Advances in Neural Information Processing Systems, 2022.
Lukas Schott, Jonas Rauber, Matthias Bethge, and Wieland Brendel. Towards the first adversarially robust neural network model on MNIST. In International Conference on Learning Representa- tions, 2018.
Jascha Sohl- -ickkickst,in, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In International Conference Machine Learn- ing. pp. 2256-2265 PMLR, 2015.
Yang Song and Stefano Emnon. Improved techniques for training score- based generative models. Advances in Neural Information Processing Systems, 33: 1e.11224812444 2020.
Yang Song. Jascha Sohl-Dickstein, Diederik Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456. 2020.
Ajay Subramanian, Elena Sizikova, Najib J Majaj, and Denis G Pelli. Spatial-frequency channels, shape bias, and adversarial robustness. In Advances in Neural Information Processing Systems, 2023.
Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable ef- fectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pp. 843 852, 2017.
Michael Tschannen, Manoj Kumar, Andreas Steiner, Xiaohua Zhai, Neil Houlsby, and Lucas Beyer. Image Captioners Are Scalable Vision Learners Too. In Advances in Neural Information Process- ing Systems, 2023.
Hermann von Helmholtz. Handbuch der physiologischen Optik: mit 213 in den Text eingedruckten Holzschnitten und 11 Tafeln, volume 9. Voss, 1867.
Felix A Wichmann and Robert Geirhos. Are Deep Neural Networks Adequate Behavioral Models of Human Visual Perception? Annual Review of Vision Science, 9, 2023.
Jiahui Yu, Yuanzhong Xu, Jing Yu Koh, Thang Luong, Gunjan Baid, Zirui Wang. Vijay Vasudevan, Alexander Ku, Yinfei Yang, Burcu Karagol Ayan, et al. Scaling autoregressive models for content- rich text-to-image generation. arXiv preprint arXiv: 10789, 2(3):5, 2022.
12

---

Published as a conference paper at ICLR 2024
Alan Yuille and Daniel Kersten. Vision as Bayesian inference: analysis by synthesis? Trends in Cognitive Sciences, 10(7):301-308, 2006.
Wenliang Zhao, Yongming Rao, Zuyan Liu, Benlin Liu, Jie Zhou, and Jiwen Lu. Unleashing Text- to-Image Diffusion Models for Visual Perception. arXiv preprint urXiv:2303.02153, 2023.
Roland Zimmermann, Lukas Schott, Yang Song. Benjamin Dunn, and David Klindt. Score- based generative classifiers. arXiv preprint arXiv:21 2021.
13

---

Published as a conference paper at ICLR 2024
Appendix
Table of Contents
A Background on diffusion models
14
B Muse as a classifier
15
Limitations
D Image attribution
15
E Details on ResNet-50 training with diffusion noise
17
F Shape bias of image captioning models
G Additional plots for model-vs-human benchmark
18
H Quantitative benchmark scores and rankings
19
A BACKGROUND ON DIFFUSION MODELS
Diffusion models (Sohl-Dickstein al., 2015; Ho et al., 2020; Song al., 2020; Song Ermon, 2020) are latent variable generative models defined by forward and reverse Markov chain. Given an unknown data distribution, g(zo), over observations, zp E R the forward process corrupts the data into sequence of noisy latent variables, 11. = {11, T2,, BT). by gradually adding Gaussian noise with a fixed schedule defined as:
((LTT) = II (())))))))
where g( (2r;-1) = Normal (#tz v 1, The reverse Markov process gradually de- noises the latent variables to the data distribution with learned Gaussian transitions starting from Normal(æy;
po(xur) == p(xr)
II
pe (xx)) 1=
(o(x:-1/z;) == Normal (o t), Eg (Ix, t)). The aim of training is for the forward process distribution {æt Y to match that of the reverse process {æ, ) i.e., the generative model pe (æ:) closely matches the data distribution q g(xp). Specifically, these models can be trained by optimizing the variational lower bound of the marginal likelihood (Ho et al., 2020; Kingma et al., 2021):
log (o < -VLB(z)) == Cprio LRecon + LDiffssion
Lprio and LRecon are the prior and reconstruction loss that can be estimated using standard tech- niques in the literature (Kingma & Welling, 2014). The (re-weighted) diffusion loss can be written as:
LDiffusion = Exz.,,t w. 1 - 2g (æx, 1)
with 2o g(xo), Normal(O, I). and t u(10, 7J). Here, w, is weight assigned to the timestep, and (0 t) is the model's prediction of the observation By from the noised observation Te. Diffusion models can be conditioned on additional inputs like class labels, text prompts, seg- mentation masks or low-rest oowrussoutionn images, in which case To also takes a conditioning signal y as input.
14

---

Published as a conference paper at ICLR 2024
Design choices zero-shot classification using diffusion models: We follow the exact experiment setting here as in Clark & Jaini (2023) for Imagen and Stable Diffusion to obtain classification decisions. Specifically,
the heuristic weighting function w, exp(-7t) in Equation (2) to aggregate scores across multiple time steps. We use a single prompt for each image instead of an ensemble of prompts used in CLIP to keep the experiments simple.
Loss function: We use the L2 loss function for diffusion-based models since it approximates the diffusion variational lower bound (see Equation (2)) and thus results in a Bayesian classifier. Fur- thermore, both Stable Diffusion and Imagen are trained with the L2 loss objective. Thus, different loss function will no longer result in a Bayesian classifier and will not work well due to differences from the training paradigm.
Algorithm Classification using diffusion models. given: Example classify æ, diffusion model w/ params 0, weighting function w.
Map from classes to diffusion model scores.
scores {y: : for y, [yk]}
= 0
< max scores:
n +1
Noise the image
t ~~ [I(0,1]] 11)
3t ~ (( (x)
Score against the remaining classes.
for Y; scores:
add un ||=: To (22,, ()
to scores[y.]
return !/
B MUSE AS A CLASSIFIER
In Figure 8, we visualize why we were not able to include Muse as a (successful) classifier in our experiments. Even on clean, undistorted images Muse achieved only approximately chance-level accuracy. This may, however, just be limitation on how we attempted to extract classification decisions out of the model; it is very well possible that other approaches might work better.
C LIMITATIONS
As mentioned in the introduction, using a generative model comes with advantages and disadvan- tages: potentially better generalization currently comes the cost of being slower computationally compared to standard discriminative models. While this doesn't 't matter much for the purpose of anal- yses, is big drawback in practical applications and any approaches that improve speed would be most welcome-in in particular, generating at least one prediction (i.e., image generation) per class as currently do both expensive and slow.
Furthermore, the models we investigate all differ from another in more than one ways. For instance, their training data, architecture, and training procedure is not identical, thus any differences between the models cannot currently be attributed to a single factor. That said, through the inclusion of a set of diverse models covering pixel-bacc based diffusion, latent space diffusion, and autoregressive models we seek to at least cover a variety of generative classifiers in order to ensure that the conclusions we draw are not limited a narrow set generative models.
D IMAGE ATTRIBUTION
Rabbit-duck image:
Attribution: Unknown source, Public domain, via Wikimedia Commons.
15

---

Published as a conference paper at ICLR 2024
2536
3640
3994
3597
3882 001
2985
Figure 8: Muse as classifier. This figure illustrates why Muse reconstructions are often chal- lenging to use for classification. Given a starting image of bottle with bear texture, we here plot 16 reconstructions each prompted with a different label. The L2 distance to the original image is shown in red for all categories except the one with the lowest distance (here: top left), for which the distance is plotted in green. The images with the lowest distance (row column airplane; row 2 column 3: car,
4 column 4: truck) appear be categories for which the model is unable to generate a realistic reconstruction, and thus simply sticks close to the original image. The image generated by prompting with the correct shape category (bottle) is shown in column 2. Since Muse returns images fairly close to the original one if is not able to generate realistic reconstruc- tion, the approach of measuring L2 distance between original and reconstruction not feasible classification approach for Muse.
Link:
Duck-Rabbit.pnn
Rock image:
Attribution: Mirabeau, CC BY-SA 3.0, via Wikimedia Commons.
Link: https:t////.......m //tp///ommoo//// wikimedia wtw.ww/www///eleaaaaaaa.aaaa.aa.
ipg
Vegetable portrait image:
Attribution: Giuseppe Arcimboldo, Public domain, via Wikimedia Commons.
Link:
https: /tppppppddd wikimedia http///iii.eeea//coooooss/////// jpg
Begimboldd__eeeetabee
Woman image:
Attribution: W. E. Hill, Public domain, via Wikimedia Commons.
Link: https: /ttp:://ppllad.// wikimedia org/ htt.immmeeaa.ogggiieeeeeeeaaaaaa http//wwiie///////////ee
/ttpa///coooooo/o/ce///// _ife________
and_My M
-n 22wh:aww__81111111111 svg
16

---

Published as a conference paper at ICLR 2024
E DETAILS ON RESNET-50 TRAINING WITH DIFFUSION NOISE
We trained ResNet-50 in exactly the same way as for standard, 90 epoch JAX ImageNet train- ing with the key difference that we added diffusion noise described by the code below. Since this makes the training task substantially more challenging, of 90 epochs. The learning rate was 0.1 with cosine learning rate schedule, 5 warmup epochs, SGD momentum of 0.9, weight decay of 0.0001, and a per device batch size of 64. For diffusion style denoising we used a flag named "sqrt.alphas" which ensures that the noise applied doesn't t completely destroy the image information in most cases. The input to the AddNoise method is in the [0. 1] range; the output of the AddNoise method exceeds this bound due to the noise; we did not normalize / clip it afterwards but instead directly fed this into the network. We did not perform ImageNet mean/std normalization. The training augmentations we used were 1. random resized crop, 2. random horizontal flip. 3. add diffusion noise. We did optimize any of those settings with respect to any of the observed findings (e.g., shape bias) since we were interested in generally applicable results.
trained the model for 300 instead
Listing I: Python example of how diffusion noise added data augmentation technique.
# #Copyright 2023 DeepMind Technologies Limited. Apache -2.0
#SPDX- BrrDX-Liense--demiiipp
import dataclasses
from typing import Sequence. Tuple import grain. tensorflow as tf-grain import jax
import tensorflow as if
@ @dataclasses. dataclass (frozen=True) class AddNoise tf. www.g.aaaaliiiiio... MapTransform)
""" Addd diffusion cetisionnssylee style noise to the image. "** sqrt_alphas: bool True
def map(self, features: FlatFeatures) FlatFeatures:
image
(nntturss"imaaee"" alpha if random. . (())
if self sqrt sqrt_alphas:
alpha std tf sqrt alpha alpha)
(aripa
image = image * alpha + std * tf random. normal (image shape)
"ectures["image"
image
features ceatures""nonn nonoie level"] = std
return features
F SHAPE BIAS OF IMAGE CAPTIONING MODELS
We discovered that text-to-image generative models, when turned into classifiers, have a high shape bias. We were interested in understanding whether other forms of generative modeling (beyond text-to-image) could lead to similar results. As an initial step towards exploring this question, we tested the CapPa models from Tschannen instead of text-to-image modeling they are trained to produce image captions. The results are shown Figure Both CapPa variants (B16 and L16) are more shape biased than most discriminative models, but the same time both are less shape biased than the text-to-ine to-iiage generative classifiers we tested. This could indicate that generative modeling is helpful when it comes to shape bias, while the objective function and data determine how strong the shape bias is.
(2023); those models are of generative nature but
Method details for CapPa evaluation. We obtained the original B16 and L16 checkpoints from the CapPa paper. We used the identical prompt as for the generative classifiers, A bad photo of class where "class" is substituted for e.g. "car" (and using 'an' for classes starting
17

---

Published as a conference paper at ICLR 2024
with vowel). We only used this single prompt since initial experiments showed that CapPa Ima- geNet validation accuracy decreases when using the 80 CLIP ImageNet template prompts (w.r.. just using single prompt). This could be attributed to the fact that the CapPa models were not designed to handle different prompts well.
Fraction of 'shape' decisions
1
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
Shape categories
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Fraction of 'texture' decisions
Figure 9: Shape bias of CapPa models. This plot is identical Figure but contains two additional datapoints: the CapPa models which are trained to produce text captions for images. The grey stars correspond to CapPa B B16; the black stars correspond CapPa I.16. Both models are trained on image-text pairs.
G ADDITIONAL PLOTS FOR MODEL-VS-HUME BENCHMARK
We here plot detailed performance for all models with respect to few different properties of interest. metrics:
Aggregated performance across datasets: Figure 10
Nut-of-distributin accuracy: Figure 11 for parametric datasets and Figure 12 for nonpara- metric datasets
Model-to-human error consistency: Figure 11
Hlman-to-humall model-to-mode. error consistency (for nonparametric datasets): Fig- ures 6 and 15 to 18
Shape bias: Figure 13 and Figure 14
All metrics are based on the model-ve vs-human toolbox and explained in more detail (Geirhos et al., 2021).
18

---

Published as a conference paper at ICLR 2024
0OD accurace
928
by
062
(a) OOD accuracy (higher better).
(b) Accuracy difference (lower better).
observed consistency
47-
0.4
consistency
2
(c) Observed consistency (higher better).
(d) Error consistency (higher better).
Figure 10: Benchmark results for different models, aggregated over datasets.
H QUANTITATIVE BENCHMARK SCORES AND RANKINGS
Table 2 and Table list the detailed performance aggregated across 17 datasets for each model, with the former focusing on metrics related "most human-like object recognition behavior" and the latter focusing on out-of-distribution accuracy.
19

---

Published as a conference paper at ICLR 2024
Accuracy
Error consistency
Accuracy
Error consistency
14
14
360
ariviatle
Obour
(a) Colour / greyscale
(b) True / false colour
10.
66
DO 2F FA
60
13
Uniform
Low-pass
1.0
(e) Contrast
(l) High-pass
68.
8
60-
00-
20 6
220
100
240
Fidolon
(h) Phase
1.-
50.0
00
2ighal
(i) Eidolon II
(j) Power equalisation
68.
Zoa
68.
05
60
60
279
(-)
(k) Eidolon III
(1) Rotation
Figure 11: OOD accuracy and error consistency across all twelve parametric datasets from Geirhos al. (2021). Error consistency results for nonparametric datasets are plotted in Figures 6 and 15 to 18.
20

---

Published as a conference paper at ICLR 2024
1.
03
00D accuracy
(a) Accuracy on 'sketch' images.
(b) Accuracy on 'edge' images.
69
000 accuracy
0.5
000
1.4
(c) Accuracy on 'silhouette" images.
(d) Accuracy 'stylized" images.
Figure 12: OOD accuracy on all four nonparametric datasets (i.e., datasets with only a single cor- ruption type and strength).
1.0
Shape bies
0.5
0.0
v0gi bn
saueatreet 0
Senseettt
wide nanitt0 mnnriee
Simi DU Rember dod
proipg
Part
St lasion
Imagan
hummer
vgg31
veg22
v033/0
moblen Peblleet
Sin P. Rorbec
Rushet 50 12
Rosked 50 L3
wide
simnt
SWGLL
SWILL
Figure 13: Zero-shot generative classifiers achieve a human-level shape bias: 99% for Imagen, 93% for Stable Diffusion, 92% for Parti and 92-99% for individual human observers (96% on average). This figure shows boxplots highlighting the spread across 16 categories for each model as a different way of visualizing the data from Figure
21

---

Published as a conference paper at ICLR 2024
Fraction of 'shape' decisions
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
Shape categories
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Fraction of 'texture' decisions
Figure 14: Shape bias before and after training with diffuusion noise: This figure shows how ResNet- 50 shape bias increases from 21% for vanilla model (dark grey circles) to 78% when trained and evaluated with diffusion noise (black circles). Horizontal lines indicate the average shape bias across categories. Other models in Figure 13.
22

---

Published as a conference paper at ICLR 2024
Figure 15: Error consistency for 'sketch' images.
1.0
66
Hedle
DEA
Figure 16: Error consistency for 'stylized' images.
23

---

Published as a conference paper at ICLR 2024
Figure 17: Error consistency for 'edge' images.
Figure 18: Error consistency for 'silhouette" images.
24

---

Published as a conference paper at ICLR 2024
Table 2: Benchmark table of model results for most human-like behaviour, aggregated over all 17 datasets from Geirhos et al. (2021). The three metrics "accuracy difference" "observed consistency" and "error consistency" each produce different model ranking. The mean rank of model across those three metrics is used to rank the models our benchmark.
model
accuracy diff. +
obs. consistency f
error consistency 1
mean rank +
ViT-22B_ft-388 (4B)
0.018
0.783
0.258
2.333
Imagen (860M)
0.023
0.761
0.309
3.000
ViT-22B ft-560 (4B)
0.022
0.739
0.281
4.333
CLIP: ViT-B (400M), 80 prompts
0.023
0.758
0.281
4.333
StableDiffusion
0.023
0.743
0,264
5,000
SWSL: ResNeXt-101 (940M)
0.028
0.752
0,237
8,000
BiT-M: ResNet- 101xl (14M)
0.034
0.733
0.252
9,333
BiT-M: ResNet- (14M)
0.035
0.737
0.243
10.000
VYT-L
0.033
0,738
0,222
11.667
BiT-M: ResNet- (14M)
0.035
0.732
0,233
12.667
ViT-L. (14M)
0.035
0.744
0,206
14,000
ViT-22B. ft--244 (4B)
0.030
0.781
0.197
14.000
BiT-M: ResNet-50x3 (14M)
0.040
0.726
0,228
14.333
BiT-M: ResNet-50x1 (14M)
0.042
0.718
0,240
14.667
CLIP: VIT-B (400M). 1 prompt
0.054
0.688
0,257
16,000
SWSI.: ResNet-50 (940M)
0.041
0.727
0,211
16.667
VIT-B
0.044
0.719
0.223
17.000
BiT-M: ResNet- 101x3 (14M)
0.040
0.720
0.204
19.333
ViT-B (14M)
0.049
0.717
0,209
20,000
densenet201
0.060
0.695
0,212
20.333
Noisy Student: ENeIL2 (300M)
0.040
0.764
0.169
22.333
VIT-S
0.066
0.684
0.216
22.333
densenet169
0.065
0.688
0.207
23,000
inception_y3
0.066
0.677
0,211
23,333
ResNet-50 1.2 eps 1.0
0.079
0.669
0,224
26.667
ResNet-50 1.2 eps 3.0
0.079
0.663
0.239
27.667
SimCLR: ResNet-50x4
0.071
0.698
0.179
30.333
wide resnet101 2
0.068
0.676
0.187
30.333
ResNet-50 L2 eps 0.5
0.078
0.668
0,203
31,000
densenet121
0.077
0.671
0,200
31,000
SimCLR: ResNet-50x2
0.073
0.686
0.180
31.333
resnet152
0.077
0.675
0.190
31.667
resnet101
0.074
0.671
0.192
31.667
1d02xx 32x8d
0.074
0.674
0.182
32,667
ResNet-50 L2 eps 5.0
0.087
0.649
0.240
32,667
resnet50
0.087
0.665
0.208
34.333
resnet34
0.084
0.662
0.205
35,000
vgg19.bn
0.081
0.660
0,200
35,667
resnext50_32x44
0.079
0.666
0.184
36.333
SimCLR: ResNet-50x1
0.080
0.667
0.179
38,000
resnet18
0.091
0.648
0.201
40.333
vggló bn
0.088
0.651
0.198
40,333
wide resnet50 2
0.084
0.663
0.176
41,667
MoCoV2: ResNet-50
0.083
0.660
0.177
42,000
mobilenet_v2
0.092
0.645
0.196
43,000
ResNet-50 L2 eps 0.0 mnasnet1_0
0.086
0.654
0.178
43.333
0.092
0.646
0.189
44,333
vggl1 [ggll_bn
0.106
0,635
0.193
44,667
InfoMin: ResNet-50
0.086
0,659
0.168
45.333
vgg13_bn
0.101
0.631
0.180
47,000
mmasnet0.5
0.1
0.617
0.173
51,000
MoCo: ResNet-50
0.107
0.617
0.149
53,000
alexnet
0.118
0,597
0.165
53,333
squeezenetl_1
0.131
0.593
0.175
53.667
PIRL: 50
0.119
0.607
0.141
54,667
shufficnet_v2.x0.55
0.126
0.592
0.160
55.333
InsDis; ResNet-50
0.131
0.593
0.138
56.667
squeezenet1 0
0.145
0.574
0.153
57.000
25

---

Published as a conference paper at ICLR 2024
Table 3: Benchmark table of model results for highest out-of-distribution robustness, aggregated
over all 17 datasets from Geirhos et al. (2021).
model
OOD accuracy t
rank +
ViT-22B ft-224 (4B)
0.837
1,000
Noisy Student: ENetL2 (300M)
0.829
2.000
ViT-22B ft-384 (4B)
0.798
3.000
VIT-L (14M)
0.733
4.000
CLIP: VIT-B (400M). 80 prompts
0.708
5,000
Imagen (860M)
0.706
6.000
ViT-I.
0.706
7.000
SWSL: ResNeXt-101 (940M)
0.698
8.000
BiT-M: ResNet-152x2 (14M)
0.694
9.000
StableDiffusion
0.689
10.000
BiT-M: ResNet-152x4 (14M)
0.688
11.000
BiT-M: ResNet-101x3 (14M)
0.682
12,000
BiT-M: ResNet-50x3 (14M)
0.679
13.000
SimCLR: ResNet-50x4
0,677
14.000
SWSL: ResNet-50 (940M)
0.677
15.000
BiT-M: ResNet-101xl (14M)
0.672
16.000
ViT-B (14M)
0.669
17.000
ViT-B
0.658
18.000
BiT-M: ResNet-50xl (14M)
0,654
19,000
SimCLR: ResNet-50x2
0.644
20.000
ViT-22B_ft-565 ft-560 (4B)
0.639
21.000
densenet201
0.621
22.000
densenet169
0.613
23.000
SimCLR: ResNet-50xl
0.596
24.000
resnext101 32x8d
0.594
25.000
resmet152
0.584
26.000
wide.resnet101.2
0.583
27.000
resnet101
0.583
28.000
ViT-S
0.579
29,000
densenet121
0,576
30.000
MoCoV2: ResNet-50
0.571
31.000
inception_và
0.571
32.000
InfoMin: ResNet-50
0.571
33.000
resnext50 32x4d wide resnet50 resner50
0.569
34.000
0.566
35.000
0.559
36,000
resnet34
0,553
37.000
ResNet-50 1.2 eps 0.5
0.551
38.000
CLIP: ViT-B (400M), prompt
0.550
39.000
ResNet-50 L2 eps 1.0
0.547
40.000
Vgg19.bn
0.546
41.000
ResNet-50 I2 eps 0.0
0.545
42.000
ResNet-50 1.2 eps 3.0
0.530
43.000
vggl6.bn
0.530
44.000
mmasnetl_0
0.524
45.000
resnet18
0.521
46.000
mohilenet_y2
0.520
47.000
MoCo: ResNet-50
0.502
48.000
ResNet-50 1.2 eps 5.0 Iggl3 bn
0.501
49.000
0.499
50.000
vgg 1lbn
0.498
51.000
PIRL: ResNet-50
0.489
52.000
mmasneto_5
0.472
53.000
InsDis: ResNct-50
0.468
54,000
0.440
55.000
alexnet
0.434
56.000
squeezenet1_1
0.425
57.000
squeezenet1 0
0.401
58.000
26


Reviews:
[{"review_id": "BI5i4ekMUK", "reviewer": "Reviewer_e2eW", "summary": "The paper revisit the idea of generative classifiers, which performs classification based on comparing class-conditional likelihood of a generative model, particularly focusing on the recent state-of-the-art generative models such as Imagen, Stable Diffusion, and Parti. The paper conducts a set of extensive comparison between discriminative vs. generative modeling paradigm, including comparisons in terms of shape bias, out-of-distribution accuracies, and error consistency, largely adopting the setups from Geirhos et al., 2021. The experimental results highlight that generative classifiers with state-of-the-art models are now capable, unlike previous attempts, to achieve human-like shape bias and OOD-accuracy, also advancing the error consistency with respect to humans.", "questions": "- Technically, it seems the paper applies different resizing resolutions for different generative models considered - e.g., 64x64 for Imagen and 512x512 for Stable Diffusion. I would like to see a discussion on the more reasons for this and its effect to the final performance. \n- If possible, it would be helpful for the readers if there could be any discussion on practical considerations and design choices on the proposed method. It seems the current version ended up with computing pixel-wise mean-squared errors to measure conditional likelihoods, but wonder if there was other considerations in attempts to improve the performance of generative classifier. Such an ablation study would help for the future research on developing generative classifiers.", "limitations": "", "rating": 8, "confidence": 4, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "Overall, the presentation is very clear, and the manuscript is well-written. The introduction section nicely summarizes the historical and related literature on generative classifiers, which can help the readers. I think the significance of empirical results are the key novelty of the paper. As an additional point, the method considered in this paper is simple and easy-to-implement.", "weaknesses": "I do not see major weaknesses from the paper. Although I do not much concern about it, some readers may do regarding the lack of technical novelties, considering the previous methods on generative classifiers. As a minor point, I think a more discussion with \"ViT-22B-384 trained on 4B images\", given that this discriminative model is still fairly possible to be considered as a competitive state-of-the-art compared to the generative modeling results that the paper highlights.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "C5RDIWTc8p", "reviewer": "Reviewer_tjak", "summary": "This submission compares recently proposed generative image classifiers to human perceptual decisions. It builds on a previous work (Clark & Jaini, 2023) which suggested employing image generation models as \"analysis-by-synthesis\" classifiers: Each test image is classified by attempting to reconstruct a noised version of it, conditioned on different classes. The class that best supports the reconstruction is chosen as the classifier's prediction. This approach is similar to that proposed by Schott, Rauber, Bethge & Brendel (ICLR 2019), but it leverages state-of-the-art generative AI to form generative classifiers, instead of relying on the non-scalable solution of class-specific variational autoencoders.\n\nIn the current work, three such generative classifiers (based on Stable Diffusion, Imagen, and Parti) are compared to human decisions through evaluation on out-of-distribution challenges published by Geirhos, et al., NeurIPS 2021. In addition, the ability of the classifiers to comprehend bi-stable stimuli is assessed. The experiments find high human-alignment of the proposed generative classifiers, rivaling almost all previously tested models.", "questions": "- The loss guiding the classification score (Eq. 2) averages the error over the entire diffusion process. How does the model behavior compare if only the final, resulting image is considered? \n- The authors may wish to cite Golan, Raju & Kriegeskorte (2020, PNAS), which showed evidence of greater human alignment of generative classifiers over discriminative classifiers in simpler image domains.", "limitations": "", "rating": 8, "confidence": 4, "soundness": 2, "presentation": 4, "contribution": 4, "strengths": "1. The task of comparing contemporary generative classifiers with discriminative classifiers in terms of human alignment is both important and timely. Generative modeling might be key to emulating human perceptual behavior.\n2. Overall, the evaluation is well-executed and includes a wide array of benchmarks.\n3. Including three different generative classifiers enhances the generality of the results.\n4. The new experiments using ambiguous stimuli are both creative and compelling.\n5. The control analysis, in which a ResNet is trained with additive image noise, sheds light on confounding factors in play.", "weaknesses": "1. My primary concern is whether the alignment between the generative models and human behavior should be attributed to the models' generative nature or their rich semantic representations. In this context, a particularly relevant comparison is between CLIP and Stable Diffusion. Both models employ the same semantic representation, while CLIP is discriminative and Stable Diffusion is generative. However, CLIP demonstrates better OOD accuracy and error consistency than Stable Diffusion. Stable Diffusion outperforms CLIP as a human perception model only in the shape-bias benchmark. However, as suggested by the control experiment, this effect might be attributed to the high-frequency content of the additive noise.  \nFor Imagen, there is no corresponding discriminative counterpart; such a counterpart would require training a network to map images to T5-XXL encodings. Given the absence of such a control, Imagen's alignment with human perception does not provide strong evidence in favor of generative models over discriminative models.  \nIn summary, the reported results do not conclusively indicate whether human alignment necessitates generative modeling or merely rich semantic representation. The authors could strengthen the submission by addressing this issue, either through new experiments or by revising the conclusions and abstract to reflect the existing uncertainty.\n\n2. The clustering analysis is misleading, since CLIP has better error consistency than most of the generative classifiers. I would omit this analysis completely.\n\n3. The lack of an open code repository undermines the transparency and potential impact of the submission.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "s6PwTgj3M1", "reviewer": "Reviewer_QCiG", "summary": "The rebuttal addresses my concerns well so I raised my score.  \n\n---\n\nThe tradeoff between generative and discriminative classifiers is a long-running issue in ML research (the earliest that I can recall is Andrew Ng's paper in the early 2000s).  It's generally been understood that generative classifiers can be more robust and more sample efficient but suffer if the generative model is mis-specified or under-powered.  Due to progress in the quality of generative models, it is worthwhile to revisit this tradeoffs, and it seems that generative classifiers now have realized these substantial advantages in robustness.  This paper is a useful contribution to this ongoing research trend by performing more detailed analysis on the inductive biases of generative classifiers.  \n\nnotes: \n  -Discriminative vs. generative classifier analysis.  \n  -Analysis is that generative classifiers have much higher shape bias, good OOD accuracy, alignment with human errors, and understand some perceptual illusions.  \n  -Generative classifier adds noise and reconstructs with the class label as the prompt, and then the reconstruction error is used to classify.", "questions": "-Do you think it would be possible to distill the generative classifier into a much stronger discriminative classifier, so that the computational benefits could be achieved while improving robustness and other properties like shape bias?   \n\n-Have you thought about probing to find places where discriminative classifiers have an advantage over generative classifiers?  Conceptually, I might try to think about types of images or classes which generative models are currently unable to generate well.", "limitations": "", "rating": 8, "confidence": 3, "soundness": 4, "presentation": 3, "contribution": 3, "strengths": "-The findings of this paper are interesting, and shows the power of generative classifiers in OOD accuracy as well as consistency with human classification.  \n  -The discussion is generally interesting, and I liked the idea that deficiencies of generative models could be probed through this approach (for example the inability to recognize rotated images as well as humans).  \n  -The study on the duck-rabbit and old woman - young woman illusions are nice.", "weaknesses": "-This is an analytical study of an existing approach with existing methods.  The general direction of the findings is also not terribly surprising, although the exact degree of the results and the precision of this study is still useful I think.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (spotlight)