Do Vision Transformers See Like Convolutional Neural Networks?

Abstract: Convolutional neural networks (CNNs) have so far been the de-facto model for visual data. Recent work has shown that (Vision) Transformer models (ViT) can achieve comparable or even superior performance on image classification tasks. This raises a central question: how are Vision Transformers solving these tasks? Are they acting like convolutional networks, or learning entirely different visual representations? Analyzing the internal representation structure of ViTs and CNNs on image classification benchmarks, we find striking differences between the two architectures, such as ViT having more uniform representations across all layers. We explore how these differences arise, finding crucial roles played by self-attention, which enables early aggregation of global information, and ViT residual connections, which strongly propagate features from lower to higher layers. We study the ramifications for spatial localization, demonstrating ViTs successfully preserve input spatial information, with noticeable effects from different classification methods. Finally, we study the effect of (pretraining) dataset scale on intermediate features and transfer learning, and conclude with a discussion on connections to new architectures such as the MLP-Mixer. 


Reviews and author responses:

 Thank you for your detailed response. Several of my concerns have been addressed, I provide more details on two aspects in the following.

**ResNets vs other CNNs** I agree that ResNets perform generally well for many tasks and substantially inspired subsequent architectures. For the present study, comparing to a ResNet is justified choice. However I am still not fully convinced that the results necessarily transfer to other architectures and still see this as a limitation of the present work. I appreciate that you "will clarify this in the text".

**Set of analysis methods**  I think the number of analysis is impressive and see that they're clearly linked. In the paper, the results are grouped in four sections (5-8). I still think it would have been interesting to focus more deeply on only one of those, e.g. local and global information processing. As stated when discussing the limitations it is acknowledged that "more fine-grained methods may reveal additional insights and variations in the representations." and you "agree there are further interesting questions, but were unable to explore all of these due to space and time constraints". Of course this focus also means some form of compromise, although a different one, which I think is slightly more interesting. However I think the set of experiments performed in the paper can well be justified when explicitely discussing the necessary comprise of approaching a general research question such as "Do Vision Transformers See Like Convolutional Neural Networks?".

Overall, I think this work studies an interesting question with an impressive range of experiments, but also has some weaknesses. However, I don't think any of those is severe enough to jusitfiy rejecting the paper. In this light, I will stick to my original rating.

 Thank you very much for the review and helpful references! We are happy that you find that the work provides valuable insights! Responses in detail below:

**Thank you very much for the references to hybrid models.** We will include more discussion of these in the current paper, and hope to do a more thorough study in future work!

**Substituting early ViT layers for convolutional layers for data efficiency:** we have seen preliminary results that this does help data efficiency, and are exploring it further

**Removing residual connection for ResNet:** We were primarily motivated to study removing residual connections due to the uniform representation structure seen in ViT. Our belief is that removing residual connections for ResNets will have less of an effect, both due to results in our paper showing that residual norm ratios for ResNets are smaller (Figure 7 right), and prior work such as Stochastic Depth showing some layers can be removed with limited effects. We leave full exploration of this to future work! 

**Thank you also for the suggestions on societal impact.** We will add further discussion of this to the paper.


 Thank you for your review and feedback! We are happy that the paper findings were interesting. Below we respond to the specific points:

**Normalization across ViT and ResNets, and effect on representations:** One note that the ResNets we study are the Big Transfer ResNets (*General Visual Representation Learning, Kolelesnikov et al*), which use group norm in place of batch norm. Our belief is that normalization has limited effects on representation structure/similarity. For example, previous work has found little difference between the representations of networks trained with and without batch norm (see Appendix Figure F.6 of *Similarity of Neural Networks Revisited, Kornblith et al*). To further address this concern, we have recomputed CKA heatmaps for ResNet models after normalizing the representations across the channels dimension (analogous to Layer Norm.) The resulting similarity heatmaps https://drive.google.com/file/d/16LmltTd50spsdAk3twv6HJceqD1r_g9l/view?usp=sharing   are qualitatively indistinguishable from the heatmap in Figure 1, suggesting that the choice of normalization does not affect the structure of representations in the network. 

**ResNet representation structure:** The ResNet representation heatmaps in Figure 1 do indeed show some blocks of higher similarity arising from ResNet stages. But the main purpose of these figures is to be a comparison to the representation structure of ViT, which looks markedly different.

**Attention in intermediate blocks:** the intermediate layer attention blocks did not show significantly different behavior than what is pictured --- the lower intermediate layers broadly look like the pictured lower layers, and as one goes up the network, the higher intermediate layers see the lowest mean distances increase, with all heads being much more global. We plotted the two lowest and two highest layers as they communicate the general conclusion.

**Figure 4 training data and attending locally:** Indeed for training dataset size, the model size must also be taken into account --- as demonstrated even in the original Vision Transformer paper, performance differences are only seen when dataset and model size are both increased. Specifically, the original paper shows that for ViT-L/16 and ViT-H/14, there are significant performance gains when the models are pretrained on JFT and finetuned on ImageNet vs solely trained on ImageNet. The original paper also shows that this is not the case for ViT-B/32. In Figure 4, we show that this increase in training dataset size (through JFT pretraining) has an important representational effect --- ViT-L/16 and ViT-H/14  learning to attend locally. Exploring this further, Figure C.5 in the Appendix shows that for ViT-B/32, this is *not* the case: the model learns to attend locally even when trained only on ImageNet. Putting all of this together, this suggests that ViTs learning to attend locally (i) requires a large enough training dataset size with respect to the size of the model (ii) learning to attend locally may also contribute to better performance

**Figure 5 and first encoder block of ViTs:** There is an important reason as to why only the first ViT encoder block is examined. The goal of this experiment is to see whether access to global information in early layers of ViT through self-attention leads to quantitative differences in the representations across ViTs and ResNets. To do this, we wanted to take ViT representations that incorporated different amounts of global information. One natural way to get such representations is to take the outputs of subsets of the attention heads, ordered by mean attention distance, which is what is done in the Figure. However, this only works in the lowest ViT layer, as even local attention heads in higher layers have access to more global information *implicitly*, thanks to the attention layer in the first encoder block (and other previous layers). Hence, we focused on the first encoder block, which has clear separation for different amounts of local/global information. Figure 5 show that the conclusions of this analysis generalize across different ResNet layers and ResNet/ViT models. 

**Figure 6 additional results:** We have not tried the DeiT model, but we include additional results on effective receptive fields in Appendix Figures C.1, C.2, C.3, C.4 Specifically, Figure C.3 also shows results for ViT-L/16 (which has a more granular patch size.) We observe broad similar behavior to ViT-B/32, with lowest layer receptive fields concentrated on the center patch, and more global patches clearly visible around a third of the way through and increasing in strength through the higher layers of the network

**CLS token and spatial tokens through the network:** we find the differences between the norm ratios for these striking because of the “phase transition” like results observed --- the CLS token is very strongly reliant on the skip connection in the first ~half of the network while the spatial tokens show more dependence on the longer branch, and this is clearly reversed in the upper half of the network. There are several possibilities to how the network forms the final class token, e.g. perhaps the network gradually aggregates spatial tokens and continually updates the class token with this information throughout. But the results of Figure 7 suggest that this is not happening, instead the network first aggregates all spatial information, and then switches “phase” to transferring all of this information into the class token, which was interesting to discover!

**Linear probes on intermediate ViT layers:** Our results suggest that this, as well as the uniform structure of ViT, likely arise from the effect of the attention layers and the residual connections: the attention layers incorporating global spatial information into the representations even at lower layers results in better earlier representations (with higher linear probe accuracy). These early representations are then strongly propagated by the ViT residual layers (which are stronger than ResNet, Figure 7 right), which give a more uniform structure and also continue to increase linear probe accuracy.

**Different ViT Models:** we tried to run most experiments on ViT models of multiple different sizes to ensure the conclusions were generalizable and also explore any scale effects. The space limitations mean that some model results/figures are in the Appendix.

**Minor**
Certainly other advances, such as skip connection and normalization, have contributed significantly to the success of CNNs. But the inductive bias of convolutional layers has been very successful for visual tasks, as seen by its explicit use in all top performing computer vision neural networks (until now), and neuroscience work connecting it to the animal/human visual cortex (e.g. *Hierarchical Modular Optimization of Convolutional Networks Achieves Representations Similar to Macaque IT and Human Ventral Stream, Yamins et al*)  

**Final Note** We again thank the reviewer for their feedback, and respectfully ask if they might consider increasing their score in light of our responses. 


 Thank you for your review and feedback! 

We are happy that you find the paper results interesting and timely. We also believe that with the strong interest and rapid developments around CNNs/ViTs, the fundamental questions studied in the paper on how the different architectures are working should help inform future directions.

 Thank you for your review and feedback! We are happy that you find the questions explored to be of general interest to researchers in the field, and provide responses to the specific points below:

**ResNets vs other CNNs:** We chose to study ResNets as they were the architectures used (as a strong set of baselines) in the original ViT paper, and other prior work (General Visual Representation Learning, Kolelesnikov et al), has demonstrated that ResNet variants provide state of the art performance. In the context of CNNs more broadly, ResNets are high performing and have been very popular for a variety of computer vision tasks. Furthermore, the characteristic skip connection (combined with blocks reducing spatial size) have become ubiquitous in subsequent CNN architectures such as DenseNet and EfficientNets. These common structural aspects of CNN architectures suggest that properties of hidden representations found in ResNets will generalize to other popular CNN architectures also. There are also some results in prior work, e.g. (*Similarity of Neural Network Representations Revisited, Kornblith et al*), which show natural correspondences between ResNets and other CNN representations.  We leave detailed exploration of this to future work, and will clarify this in the text!

**Set of analysis methods in the paper:** We respectfully disagree that only a couple of analysis methods are performed for each aspect. For instance, the CKA heatmaps in Figures 1, 2 (done across multiple ViT and ResNet architectures) reveal representational differences in ViTs vs ResNets. This then motivates a detailed study of (1) attention (2) residual connections to understand how these representation differences might arise. For the study on attention, we look at attention distances, the effect of scale on learned attention distances, how much local vs global information is utilized in the different architectures and computations of effective receptive fields, and how these evolve over the layers. For the study of residual connections, we look at per-token and aggregated representation norm ratios, as well as interventional experiments training models without residual connection at multiple layers. All in all, these numerous analysis methods provide a clear picture of the effects of attention and residual connections for representations in ViTs vs ResNets, and the differences observed in Figures 1, 2.

**ViTs mimicking CNNs:** While ViTs and CNNs have some differences, there are also architectural similarities, which make the question of whether they learn similar representations very interesting. For example, the fully connected layers of ViT share weights across tokens, analogous to spatial weight sharing in convolutional layers. With this in mind, it is relatively easy to see that ViTs can mimic CNNs --- ViT fully connected layers can act like convolutional layers, and additionally, attention heads can be made to mimic pooling layers, by setting the key and query matrices to matrices with k by k blocks of ones (where k by k is the pooling window) and the value matrix to be the identity. However, it is hard to determine similarities/differences in practice from this observation (where optimization, datasets and scale all play a role), which is the focus of the paper. 

**CKA vs linear probes:** CKA and linear probes measure different aspects of the representation. Linear probes are focused on the directions in the representation that are most useful for classifying the data. However, these may be different to the directions of the representation that account for the most variance, and it is this latter set that is important in determining CKA similarity. (Note that the benefits of this approach, such as isotropic invariance, and comparisons to other similarity measures are discussed in the original paper on CKA, (*Similarity of Neural Network Representations Revisited, (Kornblith et al)*). We will reference this further in the text!

**Local information in ViTs and performance:** Our results suggest there is a connection between these, especially as both Figures 3, 4, the training set is the same ImageNet, but in Figure 3, the models are first pretrained on JFT. Figure C.5 in the Appendix also shows that for ViT-B/32, which shows no performance difference when pretrained on JFT and finetuned on ImageNet vs just trained on ImageNet, the model learns to attend locally in both of these settings. We leave a more detailed exploration for future work, where as suggested, one experiment could be to try and change attention distances through regularization!

**Performance decrease through removing skip connection:** We observed some variation in the exact performance decrease when removing a skip connection depending on the location of the skip connection. If the skip connection is removed at the beginning or end, the performance drop is less. We hypothesize this is because the network acts as if it has one less layer. Removing skip connections in the middle gives the largest performance drops, of 4%. Note that this is in fact a very significant performance drop, corresponding to a few years of advances, see e.g. https://paperswithcode.com/sota/image-classification-on-imagenet 

**Localization across architectures:** we agree there are further interesting questions, but were unable to explore all of these due to space and time constraints. We are working on one additional analysis of location sensitivity in both architectures (which we hope to add to the appendix in the revised version), and we hope to study many of these other questions in future work!

**Thank you for the text suggestions on paper clarity**, we will include these in the revised version! 

**Mean distance in Figure 5** refers to the mean attention distance of the subset of attention heads being analyzed.

**Societal Impact discussion** As this paper was primarily focused on analyzing and understanding existing models, we weren’t sure of societal impact introduced solely by this paper. We will add statements on considerations around transparency + interpretability!

**Final note** We thank the reviewer for their detailed review, and in light of our responses, respectfully ask if they might consider increasing their score to support acceptance of this paper.


Neural network architectures based on self-attention instead of convolutions (e.g., the Vision Transformer, ViT), have recently be shown to reach similar or better performances on ImageNet classification than CNNs. In this work, the authors investigate whether the "internal representation structure" learned by Vision Transformers is also similar to CNNs. Using Centered Kernel Alignment as main metric to compare internal representations, the authors perform several analyses comparing aspects of three Vision Transformer variants (ViT-B/32, ViT-B/16, ViT-L/16) and two ResNet variants (ResNet50x1, ResNet152x2). The analyses performed look at similarity of representations across different depths, local vs. global information aggregation, importance of skip connections, spatial localization of information and effects of the amount of training data. The analyses reveal several differences between the ViTs and ResNets, indicating that despite similar classification performance, the image processing strategies are quite different for the two model families.  ### Originality
- The models discussed in the paper as well as the analysis methods in the paper are not new. Both are cited appropriately. To my knowledge, the analysis presented in the paper have not been performed before.

### Quality
- The main message of the paper is that ViTs and CNNs have a very different "internal representation structure" (L6). The authors perform a broad range of analyses targeting many aspects of the internal representation structures. Regarding ResNets, those analyses in its entirety support the main message well.

- However the authors claim generalizability of their results to CNNs in general, by considering the two Resnet variants a "representative set of CNN [...] models" (L.65f). In my view, testing only two variants of a single model family is not sufficient to support this general claim.

- A downside of the broad analysis strategy in my opinion, is that the individual analyses and the individual insights obtained into the inner workings of ViTs are rather shallow. Only few analyses are performed for every aspect. They suggest some underlying principles regarding the inner workings of ViTs, but empirical evidence for some of those principles should be strengthend by additional analyses (at the cost of handling fewer aspects in the paper) to go beyond the main message and answer "how are Vision Transformers solving these tasks?" (L.4) I will provide more details on the individual aspects below. In any case, I think the paper would profit from discussing how the trade-off between analysis depth and broadness has been chosen to answer the research questions at hand.

- ViT and CNNs are very different architectures, so it is very plausible that their internal representation structures differ. To me it is not clear to which degree a ViT can actually mimic a CNN, and the paper does not discuss this point. This could be adressed by, e.g., a theoretical analysis or training a ViT to behave as similarly to a CNN as possible (e.g. regarding the similarity structure of the layers or the "receptive field sizes"). Showing first, that a ViT could behave very similar to a CNN in principle, and afterwards presenting the respective result showing that the ViT learns a very different strategy instead, would make the points much stronger.

- Section 4: ViTs are shown to have highly similar representations throughout the model as measured by CKA. However in Section 8 it is found that the accuracy of linear classifiers rises when trained on the representation of later layers in the model. So both metrics seem to measure something different. It should be discussed in the paper, how those measures differ and how the seemingly contradictory results can be explained.

- Section 5: It is concluded that using local information early is imoprtant for a strong performance (L.133). In my opinion, this should be analyzed in more depth. It could still be possible that a smaller range of attention is a by-product of the larger training set and not required for the performance. An additional experiment could be to train a ViT only on ImageNet while regularizing the self-attention modules to show local attention (and vice versa) and observe effects on the performance.

- Section 6: Removing a skip connection is shown to have a very strong effect on the similarity structure. The decrease in the ovverall network performance (4%) is comparably mild. Similar as before, I think this deserves more discussion.

- Section 7: The plots in Figure 9 visualizing the spatial localization for the ResNet show that it's "tokens" are much less spatially discriminative. However, models based on ResNets have been shown to work well for tasks requiring localized information. More details on this aspect would support the understanding of these observations. E.g., comparing to a ResNet backbone after being finetuned, does this "correct" the bad spatial localization? Do ViT models transfer to tasks requiring localization more easily?

- The discussion of the MLP-Mixer is announced in the abstract, but not contained in the main paper and in my view not necessary to support the main message of the paper


### Clarity
- Overall, the experiments are described well and contain all the information necessary for reproducing the results, when given the trained models.

- One exception is the analysis described in L134ff and Figure 5: How are the subsets chosen (i.e. how many heads)? The text only mentions the first encoder block, but the Figure also includes block2unit{1,2}. What is the "Mean Distance" on the x-axis? Does this correspond to the different subsets?

- The broad range of analyses naturally makes this paper more complex. When skimming over the paper to get a first impression, it is therefore not easy to distill the main points. One idea to make this slightly easier could be to highlight the main research question and general approach more, compared to summarizing the individual results (e.g. in the abstract and the bullet list of contributions). E.g., something along the lines: 1. We want to study whether the representational structure is different in CNNs and ViTs. 2. We approach this from different angles, by comparing many aspects of the representations of CNNs of ViTs. 3. Throughout the analyses, we find clear differences between CNNs and ViTs. 4. Furthermore, some of the analyses hint at principles underlying the inner workgings of ViTs.

### Significance
- Object recognition is a core task for machine learning and computer vision. While dominated by CNNs during the last years, the ViTs have been proposed as a promising alternative. Works aimed at better understanding the similarities and differences of both approaches, are therefore highly interesting for researchers in the field.

 - Limitations are briefly discussed in L235-238. However I think the limitations of CKA should be addressed in greater detail. As described above, results according to the CKA can be very different compared to those obtained by linear probes or final model performance. So CKA is quantifying only some aspects of the representational similarity. In my opinion, this limitation should be discussed and argued why the aspects quantified by CKA are important for understanding the models.

- Societal impacts are not discussed in the paper, the authors answered the respective question in the checklist with "N/A". However I think there are societal impacts that should be discussed. For example, better understanding the inner workings of DNNs could help to build trust in those models in the long run.


The paper presents a comparison study between internal representations of recently Vision Transformers and ResNet networks for image classification, using various established tools: Centered kernel alignment, attention distance analysis, effective receptive fields, representation propagation analysis, spatial localization analysis and linear probes. The also train some new models for additional analysis. The findings show significant difference between the models.  Quality: the most intriguing findings to my mind are:
- the observation that global average pooling reduces localization performance compared to CLS token. Localization performance of recently proposed Transformer-based detector might not correlate with the proposed localization study compared to Faster R-CNN-based detectors, since there is no requirement from features to correlate with positions in an input image. Would be interesting to confirm this by training object detectors on top of CLS token and GAP backbones.
- the observation that ViT needs more data to learn "local filters" compared to CNN. This would indeed explain subpar performance of ViT in small data regime.
- the observation that class label information emerges much earlier in ViT than in ResNet (linear probing). 

Clarity: the paper is very well written and is easy to follow and understand.

Significance: the study is very timely. The fact that ViT which was designed for a very different task is able to match long-standing ResNet in image classification performance is intriguing, and demands such studies. The study might inspire new architectures for both CNNs and ViTs and their combinations, as well as their downstream applications. The authors do not discuss potential negative societal impact of their work.

The paper visualizes and analyzes the representation structure of ViT models and CNN. Results reveal intriguing findings, such as 1) ViT models yield more uniform representations, whereas CNNs yield stage-wise representations; 2) ViT models incorporate more global information in lower layers than CNNs; 3) ViT models, like CNNs, aggregate local information in lower layers; 4) Skip connections in ViT are essential.  The findings of the paper are interesting and valuable and should be shared with the broad research community. I do, however, have a few concerns or suggestions regarding the setups of a few experiments in the paper, as follows.

-	Figure 1 shows that ViT’s representation is more uniformly distributed compared to CNN’s representation by computing CKA on features. In L93 the authors wrote that these features were taken from normalization layers as well. ViT models, in contrast to CNNs, use layer normalization, instead of batch normalization. The layer norm of ViT applies normalization on \emph{individual} tokens (each token in an HxW feature map is treated independently), whereas batch norm applies norm on HxW feature maps. The individual token normalization in ViT may have resulted in this uniformly distributed heat map in Figure 1. I encourage the authors to discuss, or provide evident about, the critical detail and its potential impact to the current observations.
-	In the same figure the authors visualized the representation of ResNet. ResNet is designed in stages, a conv stem plus Res2, 3, 4 and 5. It seems that the heatmap shows such stage-wise distribution, i.e., intra-stage representations are more similar than inter-stage ones. Is this after all surprising?
-	In Figure 3 the authors plotted attention distribution for the first two and the last two blocks in ViTs. What about intermediate blocks? Any interesting behavior?
-	In Figure 4 the authors argued that “with less training data, lower attention layers do not learn to attend locally". However, ViT-L/16 and ViT-H/14 are very big models, plus ViT models are notorious data thirsty. Does this observation still hold for ViT-B/16?
-	Figure 5 plotted the first encoder block of ViTs. This to me more of a cherry pick if only the first encoder block is visualized. Quantitative results are highly encouraged.
-	In Figure 6 the authors visualized ViT-B/32 model versus a ResNet50. ViT-B/32 takes coarse input sequence. Have the authors tried the ViT-S/16 (in DeiT paper) model?
-	L168 the authors wrote it was “[striking that]” CLS token first relied on skip connection then main branch, whereas the reverse applies for spatial tokens. Why is this striking? CLS token would be just noise in early layers, and only when the representation gets better in deep layers CLS tokens would gather class information; spatial tokens are formed in early layers, thus in deep layers they are changed minimally.
-	It is interesting that linear probing of intermediate ViT blocks yields much better accuracy than CNNs. However, since the model structure of ViT is uniform (simply stacking the same blocks for 12 or 24 times), whereas CNNs generally have stages, it is likely that the representation of ViT, because of the uniform design, is more uniform. Is this true or somewhat true?
-	The authors sometimes use ViT-L or ViT-H, and sometimes ViT-B. What’s the general principle behind this? 

Some minor stuff
-	The authors proclaimed, at the beginning of the paper, that “[the success of CNNs] is largely due to the powerful inductive bias of spatial equivariance encoded by convolutional layers …” First, do the authors really want to attribute all the huge success of CNNs to inductive bias? This seems to be a way too strong claim. Second, do convolution layers encode “equivariant” representations? Hinton seems to disagree with it, which is precisely the reason that he has been working on the capsule networks.

Overall, I find many of the observations presented in the paper very interesting and valuable. On the other hand, I hope that the authors could adequately address my concerns and questions as stated above, and based on the authors’ feedback the final rating may be downgraded or upgraded.
 Yes

In this work, the authors explore how representations learned with vision transformers (ViT) compare with those of convolutional neural networks (resnet). Making use of centered kernel alignment (CKA), they compare the representations learned at different layers of the same mode, between models, and at different spatial positions. They find that ViT tends to learn similar representations  across all layers while resnets tend to show a clear distinction between lower-level and higher-level representations. They also provide experiments showing that residual connections play a crucial role in transformers, i.e. removing a residual connection causes a big change between preceding and following representations. Another interesting phenomenon in ViT is that residual connections tend to preserve information of the classification token during the first half of the model while it tends to change during the second half of the model. In addition, they compare how ViT and ResNets treat spatial information. They find that both process local information in the first layers but ViT uses global information earlier than ResNets. In fact, they show that while local processing is "hardcoded" in convolutions, ViT requires larger training sets to learn such inductive bias. Finally, they show that MLP Mixer is closer to ViT than to ResNet.  # Overall Review
This work presents an interesting study that sheds some light on the differences between ViT and ResNets. I found the different experiments and conclusions very insightful and I think they are valuable to the research community. I missed some discussion on hybrid models such as [A, B, C] (which I encourage the authors to add, not necessarily citing these three papers), but overall the strengths clearly outweight the weaknesses and thus I recommend this work for acceptance.

[A] *Srinivas, Aravind, et al. "Bottleneck transformers for visual recognition." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021.*

[B] *d'Ascoli, Stéphane, et al. "Convit: Improving vision transformers with soft convolutional inductive biases." arXiv preprint arXiv:2103.10697 (2021).*

[C] *Wu, Haiping, et al. "Cvt: Introducing convolutions to vision transformers." arXiv preprint arXiv:2103.15808 (2021).*

## Strengths
* This work is interesting and it provides valuable insights
* The text is clear and easy to read
* The experiments are technically sound

## Weaknesses
* Most comparisons are based on CKA but the authors already acknowledge it in the Limitations section.
* The fact that the first layers of ViT require large datasets to learn the concept of spatial locality indicates that substituting the first layers of ViT for convolutions could greatly reduce the amount of data required to train vision transformers. It would be interesting if you could include some discussion or even an experiment to explore this.
* You show how removing a residual connection affects the ViT. Is the effect similar for a ResNet?

# Detailed comments
## Originality
* The experiments introduced in this work are original and the results are insightful.

## Quality
* Besides a couple of questions I asked in "Weaknesses", the overall quality is good.

## Clarity
* The text is well-written and easy to follow.

## Significance
* Given the current interest of the research community on vision transformers, this work is highly valuable in order to understand the behavior of these models compared to convolutional neural networks. 

## Reproducibility
The authors do not include the code and ViT is trained on JFT, which is a private dataset (not the fault of this work, but nonetheless anything based on JFT is very difficult to reproduce).

## Other comments
You may find [D] interesting (in case you are not the authors of it). Since it is very recent, you do not need to cite it:

[D] *Tuli, Shikhar, et al. "Are Convolutional Neural Networks or Transformers more like human vision?." arXiv preprint arXiv:2105.07197 (2021).*
 The authors discuss limitations but not societal impact. A possible societal impact of better understanding image classification models could be to better understand their failures and limitations in real-life applications.

Meta-review: A good paper on a timely topic. All reviewers recommend acceptance. Could be a spotlight presentation.

Decision: accept