Are Transformers More Robust Than CNNs?
Not on the map. Why?
Abstract (arXiv)
Transformer emerges as a powerful tool for visual recognition. In addition to demonstrating competitive performance on a broad range of visual benchmarks, recent works also argue that Transformers are much more robust than Convolutions Neural Networks (CNNs). Nonetheless, surprisingly, we find these conclusions are drawn from unfair experimental settings, where Transformers and CNNs are compared at different scales and are applied with distinct training frameworks. In this paper, we aim to provide the first fair & in-depth comparisons between Transformers and CNNs, focusing on robustness evaluations. With our unified training setup, we first challenge the previous belief that Transformers outshine CNNs when measuring adversarial robustness. More surprisingly, we find CNNs can easily be as robust as Transformers on defending against adversarial attacks, if they properly adopt Transformers' training recipes. While regarding generalization on out-of-distribution samples, we show pre-training on (external) large-scale datasets is not a fundamental request for enabling Transformers to achieve better performance than CNNs. Moreover, our ablations suggest such stronger generalization is largely benefited by the Transformer's self-attention-like architectures per se, rather than by other training setups. We hope this work can help the community better understand and benchmark the robustness of Transformers and CNNs. The code and models are publicly available at https://github.com/ytongbai/ViTs-vs-CNNs.
Key facts. Cited by 187 papers in the map (data through 7 Oct 2026). Builds on 54 of its 61 references that are in the map. First posted on arXiv 10 Nov 2021.
Builds on
54 of 61 references.
References · 54
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2014Microsoft COCO: Common Objects in Contextcited by 17,498
- 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,267
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2016Densely Connected Convolutional Networkscited by 6,691
38 more
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2017mixup: Beyond Empirical Risk Minimizationcited by 5,155
- 2013Intriguing properties of neural networkscited by 5,114
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2014Going Deeper with Convolutionscited by 4,231
- 2016Gaussian Error Linear Units (GELUs)cited by 3,431
- 2021SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformerscited by 2,923
- 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,875
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,479
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
- 2021MLP-Mixer: An all-MLP Architecture for Visioncited by 1,441
- 2018ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustnesscited by 1,430
- 2019Natural Adversarial Examplescited by 1,401
- 2019Self-training with Noisy Student improves ImageNet classificationcited by 1,304
- 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
- 2021Scaling Vision Transformerscited by 993
- 2020Designing Network Design Spacescited by 954
- 2017Revisiting Unreasonable Effectiveness of Data in Deep Learning Eracited by 916
- 2021Going deeper with Image Transformerscited by 759
- 2020Fast is better than free: Revisiting adversarial trainingcited by 723
- 2019Square Attack: a query-efficient black-box adversarial attack via random searchcited by 682
- 2019Adversarial Training for Free!cited by 638
- 2019Stand-Alone Self-Attention in Vision Modelscited by 542
- 2021Intriguing Properties of Vision Transformerscited by 446
- 2021Pay Attention to MLPscited by 367
- 2019Attention Augmented Convolutional Networkscited by 363
- 2019Minimally distorted Adversarial Examples with a Fast Adaptive Boundary Attackcited by 333
- 2020Exploring Self-attention for Image Recognitioncited by 313
- 2021When Vision Transformers Outperform ResNets without Pre-training or Strong Data Augmentationscited by 259
- 2021Understanding Robustness of Transformers for Image Classificationcited by 250
- 2020Understanding the Difficulty of Training Transformerscited by 210
- 2021Vision Transformers are Robust Learnerscited by 208
- 2021Revisiting ResNets: Improved Training and Scaling Strategiescited by 158
- 2021Long-Short Transformer: Efficient Transformers for Language and Visioncited by 102
- 2018Benchmarking Neural Network Robustness to Common Corruptions and Surface Variationscited by 99
50 most cited of 54 All 54 (JSON)
Built on by
Citing papers per year: 2021: 4; 2022: 54; 2023: 60; 2024: 38; 2025: 17; 2026: 14.
187 papers.
Sort:
By area:
- 2022Diffusion Models for Adversarial Purificationcited by 469
- 2022Dawn of the transformer era in speech emotion recognition: closing the valence gapcited by 155
- 2022Understanding The Robustness in Vision Transformerscited by 144
- 2022Diffusion Visual Counterfactual Explanationscited by 96
- 2022Guided Diffusion Model for Adversarial Purificationcited by 90
- 2022InvPT: Inverted Pyramid Multi-task Transformer for Dense Scene Understandingcited by 89
- 2023A Comprehensive Study on Robustness of Image Classification Models: Benchmarking and Rethinkingcited by 85
- 2021TransMix: Attend to Mix for Vision Transformerscited by 79
- 2023Revisiting Adversarial Training for ImageNet: Architectures, Training and Generalization across Threat Modelscited by 79
- 2022Benchmarking Robustness of 3D Point Cloud Recognition Against Common Corruptionscited by 78
- 2022Delving into Masked Autoencoders for Multi-Label Thorax Disease Classificationcited by 65
- 2023How Deep Learning Sees the World: A Survey on Adversarial Attacks & Defensescited by 65
38 more
- 2022A Broad Study of Pre-training for Domain Generalization and Adaptationcited by 64
- 2022A Light Recipe to Train Robust Vision Transformerscited by 64
- 2022When Adversarial Training Meets Vision Transformers: Recipes from Training to Architecturecited by 64
- 2023Swallowing the Bitter Pill: Simplified Scalable Conformer Generationcited by 55
- 2022Assaying Out-Of-Distribution Generalization in Transfer Learningcited by 53
- 2022ViewFool: Evaluating the Robustness of Visual Recognition to Adversarial Viewpointscited by 48
- 2022MulT: An End-to-End Multitask Learning Transformercited by 47
- 2021OOD-CV: A Benchmark for Robustness to Out-of-Distribution Shifts of Individual Nuisances in Natural Imagescited by 46
- 2023Robust Principles: Architectural Design Principles for Adversarially Robust CNNscited by 46
- 2021Are Vision Transformers Robust to Patch Perturbations?cited by 39
- 2022Can CNNs Be More Robust Than Transformers?cited by 38
- 2023Understanding the Robustness of 3D Object Detection with Bird's-Eye-View Representations in Autonomous Drivingcited by 37
- 2022Are Vision Transformers Robust to Spurious Correlations?cited by 36
- 2022MTTrans: Cross-Domain Object Detection with Mean-Teacher Transformercited by 35
- 2022An Impartial Take to the CNN vs Transformer Robustness Contestcited by 34
- 2023COCO-O: A Benchmark for Object Detectors under Natural Distribution Shiftscited by 34
- 2024Revisiting Adversarial Training at Scalecited by 33
- 2023Making Substitute Models More Bayesian Can Enhance Transferability of Adversarial Examplescited by 32
- 2024Touchstone Benchmark: Are We on the Right Way for Evaluating AI Algorithms for Medical Segmentation?cited by 31
- 2023ImageNet-E: Benchmarking Neural Network Robustness via Attribute Editingcited by 30
- 2022Towards Efficient Adversarial Training on Vision Transformerscited by 29
- 2023Survey on Unsupervised Domain Adaptation for Semantic Segmentation for Visual Perception in Automated Drivingcited by 29
- 2023Improving Adversarial Transferability via Intermediate-level Perturbation Decaycited by 29
- 2022Revisiting Residual Networks for Adversarial Robustness: An Architectural Perspectivecited by 28
- 2022Benchmarking the Robustness of Deep Neural Networks to Common Corruptions in Digital Pathologycited by 26
- 2022Proximal Splitting Adversarial Attacks for Semantic Segmentationcited by 23
- 2022Exploring the Relationship between Architecture and Adversarially Robust Generalizationcited by 23
- 2023InvPT++: Inverted Pyramid Multi-Task Transformer for Visual Scene Understandingcited by 22
- 2023WBCAtt: A White Blood Cell Dataset Annotated with Detailed Morphological Attributescited by 22
- 2023Robustifying Token Attention for Vision Transformerscited by 19
- 2023ConvNet vs Transformer, Supervised vs CLIP: Beyond ImageNet Accuracycited by 19
- 2023TWINS: A Fine-Tuning Framework for Improved Transferability of Adversarial Robustness and Generalizationcited by 18
- 2023Distilling Efficient Vision Transformers from CNNs for Semantic Segmentationcited by 18
- 2024Structure-based drug design by denoising voxel gridscited by 18
- 2022Evaluating Out-of-Distribution Performance on Document Image Classifierscited by 16
- 2023Reliability in Semantic Segmentation: Are We on the Right Track?cited by 16
- 2024LookupViT: Compressing visual information to a limited number of tokenscited by 16
- 2023On the Adversarial Robustness of Camera-based 3D Object Detectioncited by 15
50 most cited of 187 All 187 (JSON)
- 2026Domain generalization and synthetic data in object detection: the enabler, the probe, and the gap2 Sep 2026
- 2026Margin-Drop Coordinates for Cross-Budget Robustness Evaluation20 Aug 2026
- 2026Revisiting Shape and Texture Reliance with Category-Separability-Calibrated Suppression13 Jul 2026
- 2026Semi-Supervised Vision-Language-Action Model19 Jun 2026
- 2026Enhancing Computer Vision Model Generalization in Warehouse Facilities: A Case Study on Anomaly Detection in Vertical Material Handling Systems29 May 2026
- 2026WBCAtt+: Fine-Grained Pixel-Level Morphological Annotations for White Blood Cell Images19 May 2026
- 2026StableVLA: Towards Robust Vision-Language-Action Models without Extra Data18 May 2026
- 2026Anatomy of a failure: When, how, and why deep vision fails in scientific domains5 May 2026
- 2026Multispectral Blind Image Super-Resolution for Standing Dead Tree Segmentation4 May 2026
- 2026Robustness of Vision Foundation Models to Common Perturbations16 Apr 2026
- 2026In Transformer We Trust? A Perspective on Transformer Architecture Failure Modes15 Feb 2026
- 2026Do Neural Networks Lose Plasticity in a Gradually Changing World?9 Feb 2026
38 more
- 2026PartImageNet++ Dataset: Enhancing Visual Models with High-Quality Part Annotations4 Jan 2026
- 2026NADD: Amplifying Noise for Effective Diffusion-based Adversarial Purification3 Jan 2026
- 2025Hands-on Evaluation of Visual Transformers for Object Recognition and Detection10 Dec 2025
- 2025Defense That Attacks: How Robust Models Become Better Attackers2 Dec 2025
- 2025Understanding Sensitivity of Differential Attention through the Lens of Adversarial Robustness1 Oct 2025
- 2025Unlocking Noise-Resistant Vision: Key Architectural Secrets for Robust Models25 Sep 2025
- 2025A Guide to Robust Generalization: The Impact of Architecture, Pre-training, and Optimization Strategy12 Aug 2025
- 2025Attacking Attention of Foundation Models Disrupts Downstream Tasks3 Jun 2025
- 2025In Context Learning with Vision Transformers: Case Study27 May 2025
- 2025Adversarially Pretrained Transformers May Be Universally Robust In-Context Learners20 May 2025
- 2025Sequence-Only Prediction of Binding Affinity Changes: A Robust and Interpretable Model for Antibody Engineering14 May 2025
- 2025Seeking Flat Minima over Diverse Surrogates for Improved Adversarial Transferability: A Theoretical Framework and Algorithmic Instantiation23 Apr 2025
- 2025ADA-Net: Attention-Guided Domain Adaptation Network with Contrastive Learning for Standing Dead Tree Segmentation Using Aerial Imagery5 Apr 2025
- 2025Diffusion models applied to skin and oral cancer classification28 Mar 2025
- 2025Beyond Accuracy: What Matters in Designing Well-Behaved Image Classification Models?21 Mar 2025
- 2025EasyRobust: A Comprehensive and Easy-to-use Toolkit for Robust and Generalized Vision21 Mar 2025
- 2025Adversarial Robustness of Discriminative Self-Supervised Learning in Vision8 Mar 2025
- 2025Model-Free Adversarial Purification via Coarse-To-Fine Tensor Network Representation25 Feb 2025
- 2025SAFER: Sharpness Aware layer-selective Finetuning for Enhanced Robustness in vision transformers2 Jan 2025
- 2024Preserving Angles Improves Feature Distillation22 Nov 2024
- 2024GenBFA: An Evolutionary Optimization Approach to Bit-Flip Attacks on LLMs21 Nov 2024
- 2024Touchstone Benchmark: Are We on the Right Way for Evaluating AI Algorithms for Medical Segmentation?6 Nov 2024
- 2024Relaxed Equivariance via Multitask Learning23 Oct 2024
- 2024Is Smoothness the Key to Robustness? A Comparison of Attention and Convolution Models Using a Novel Metric23 Oct 2024
- 2024Adversarial Training: A Survey19 Oct 2024
- 2024Impact of Regularization on Calibration and Robustness: from the Representation Space Perspective5 Oct 2024
- 2024SATA: Spatial Autocorrelation Token Analysis for Enhancing the Robustness of Vision Transformers30 Sep 2024
- 2024UDA-Bench: Revisiting Common Assumptions in Unsupervised Domain Adaptation Using a Standardized Framework23 Sep 2024
- 2024ViTGuard: Attention-aware Detection against Adversarial Examples for Vision Transformer20 Sep 2024
- 2024Boosting Federated Domain Generalization: Understanding the Role of Advanced Pre-Trained Architectures20 Sep 2024
- 2024Equivariant Machine Learning Decoder for 3D Toric Codes6 Sep 2024
- 2024A Survey and Evaluation of Adversarial Attacks for Object Detection4 Aug 2024
- 2024Exploring the Adversarial Robustness of CLIP for AI-generated Image Detection28 Jul 2024
- 2024Are We Ready for Out-of-Distribution Detection in Digital Pathology?18 Jul 2024
- 2024LookupViT: Compressing visual information to a limited number of tokens17 Jul 2024
- 2024PartImageNet++ Dataset: Scaling up Part-based Models for Robust Recognition15 Jul 2024
- 2024Query-Efficient Hard-Label Black-Box Attack against Vision Transformers29 Jun 2024
- 2024EvolvED: Evolutionary Embeddings to Understand the Generation Process of Diffusion Models25 Jun 2024
50 newest of 187 All 187 (JSON)
- 2022Diffusion Models for Adversarial Purificationcited by 469
- 2022Guided Diffusion Model for Adversarial Purificationcited by 90
- 2023Swallowing the Bitter Pill: Simplified Scalable Conformer Generationcited by 55
- 2024Structure-based drug design by denoising voxel gridscited by 18
- 2024Watch the Watcher! Backdoor Attacks on Security-Enhancing Diffusion Modelscited by 4
- 2024EvolvED: Evolutionary Embeddings to Understand the Generation Process of Diffusion Modelscited by 3
- 2025Diffusion models applied to skin and oral cancer classificationcited by 3
- 2024GeoPos: A Minimal Positional Encoding for Enhanced Fine-Grained Details in Image Synthesis Using Convolutional Neural Networkscited by 1
- 2026NADD: Amplifying Noise for Effective Diffusion-based Adversarial Purificationcited by 0
- 2026NADD: Amplifying Noise for Effective Diffusion-based Adversarial Purification3 Jan 2026
- 2025Diffusion models applied to skin and oral cancer classification28 Mar 2025
- 2024EvolvED: Evolutionary Embeddings to Understand the Generation Process of Diffusion Models25 Jun 2024
- 2024Watch the Watcher! Backdoor Attacks on Security-Enhancing Diffusion Models14 Jun 2024
- 2024Structure-based drug design by denoising voxel grids7 May 2024
- 2024GeoPos: A Minimal Positional Encoding for Enhanced Fine-Grained Details in Image Synthesis Using Convolutional Neural Networks3 Jan 2024
- 2023Swallowing the Bitter Pill: Simplified Scalable Conformer Generation27 Nov 2023
- 2022Guided Diffusion Model for Adversarial Purification30 May 2022
- 2022Diffusion Models for Adversarial Purification16 May 2022
- 2026Semi-Supervised Vision-Language-Action Model19 Jun 2026
- 2026StableVLA: Towards Robust Vision-Language-Action Models without Extra Data18 May 2026
- 2022Dawn of the transformer era in speech emotion recognition: closing the valence gapcited by 155
- 2022Understanding The Robustness in Vision Transformerscited by 144
- 2022Diffusion Visual Counterfactual Explanationscited by 96
- 2022InvPT: Inverted Pyramid Multi-task Transformer for Dense Scene Understandingcited by 89
- 2023A Comprehensive Study on Robustness of Image Classification Models: Benchmarking and Rethinkingcited by 85
- 2021TransMix: Attend to Mix for Vision Transformerscited by 79
- 2023Revisiting Adversarial Training for ImageNet: Architectures, Training and Generalization across Threat Modelscited by 79
- 2022Benchmarking Robustness of 3D Point Cloud Recognition Against Common Corruptionscited by 78
- 2022Delving into Masked Autoencoders for Multi-Label Thorax Disease Classificationcited by 65
- 2023How Deep Learning Sees the World: A Survey on Adversarial Attacks & Defensescited by 65
- 2022A Broad Study of Pre-training for Domain Generalization and Adaptationcited by 64
- 2022A Light Recipe to Train Robust Vision Transformerscited by 64
12 most cited of 173 All 173 (JSON)
- 2026Domain generalization and synthetic data in object detection: the enabler, the probe, and the gap2 Sep 2026
- 2026Margin-Drop Coordinates for Cross-Budget Robustness Evaluation20 Aug 2026
- 2026Revisiting Shape and Texture Reliance with Category-Separability-Calibrated Suppression13 Jul 2026
- 2026Enhancing Computer Vision Model Generalization in Warehouse Facilities: A Case Study on Anomaly Detection in Vertical Material Handling Systems29 May 2026
- 2026WBCAtt+: Fine-Grained Pixel-Level Morphological Annotations for White Blood Cell Images19 May 2026
- 2026Anatomy of a failure: When, how, and why deep vision fails in scientific domains5 May 2026
- 2026Multispectral Blind Image Super-Resolution for Standing Dead Tree Segmentation4 May 2026
- 2026Robustness of Vision Foundation Models to Common Perturbations16 Apr 2026
- 2026In Transformer We Trust? A Perspective on Transformer Architecture Failure Modes15 Feb 2026
- 2026Do Neural Networks Lose Plasticity in a Gradually Changing World?9 Feb 2026
- 2026PartImageNet++ Dataset: Enhancing Visual Models with High-Quality Part Annotations4 Jan 2026
- 2025Hands-on Evaluation of Visual Transformers for Object Recognition and Detection10 Dec 2025
12 newest of 173 All 173 (JSON)