On the Robustness of Vision Transformers to Adversarial Examples
Open accessThe DOI matches its Crossref record; 39 of the 39 references it cites were found in a registry or an index.
Abstract
Recent advances in attention-based networks have shown that Vision Transformers can achieve state-of-the-art or near state-of-the-art results on many image classification tasks. This puts transformers in the unique position of being a promising alternative to traditional convolutional neural networks (CNNs). While CNNs have been carefully studied with respect to adversarial attacks, the same cannot be said of Vision Transformers. In this paper, we study the robustness of Vision Transformers to adversarial examples. Our analyses of transformer security is divided into three parts. First, we test the transformer under standard white-box and black-box attacks. Second, we study the transfer-ability of adversarial examples between CNNs and trans-formers. We show that adversarial examples do not readily transfer between CNNs and transformers. Based on this finding, we analyze the security of a simple ensemble defense of CNNs and transformers. By creating a new attack, the self-attention blended gradient attack, we show that such an ensemble is not secure under a white-box adversary. However, under a black-box adversary, we show that an ensemble can achieve unprecedented robustness without sacrificing clean accuracy. Our analysis for this work is done using six types of white-box attacks and two types of black-box attacks. Our study encompasses multiple Vision Transformers, Big Transfer Models and CNN architectures trained on CIFAR-10, CIFAR-100 and ImageNet.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404
Exploiting Generative AI to Scale up Intelligent Tutoring Systems
Jakubův, J., Chvalovský, K., Goertzel, Z., Kaliszyk, C., Olšák, M., Piotrowski, B., Schulz, S., Suda, M., & Urban, J. (2023) · DROPS (Schloss Dagstuhl – Leibniz Center for Informatics) · doi:10.4230/lipics.itp.2023.19 · Cited by 76,658
An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., et al. (2020) · arXiv · doi:10.48550/arxiv.2010.11929 · Cited by 47,472
End-to-End Object Detection with Transformers
Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., & Zagoruyko, S. (2020) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-58452-8_13 · Cited by 18,285
End-to-End Object Detection with Transformers
Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., & Zagoruyko, S. (2020) · arXiv · doi:10.48550/arxiv.2005.12872 · Cited by 18,253
Backpropagation Applied to Handwritten Zip Code Recognition
LeCun, Y., Boser, B., Denker, J. S., Henderson, D., Howard, R. E., Hubbard, W., & Jackel, L. D. (1989) · Neural Computation · doi:10.1162/neco.1989.1.4.541 · Cited by 11,891 · cited 1×
“For vision tasks, convolutional neural networks (CNNs) [20] are the de facto architecture [37, 19].”
BackgroundIdentity mappings in deep residual networks
He, K., Zhang, X., Ren, S., & Sun, J. (2016) · Lecture Notes in Computer Science · doi:10.1007/978-3-319-46493-0_38 · Cited by 10,741
Identity Mappings in Deep Residual Networks
He, K., Zhang, X., Ren, S., & Sun, J. (2016) · arXiv · doi:10.48550/arxiv.1603.05027 · Cited by 10,665 · cited 1×
“We do the same for conventional ResNets (ResNet-56 and ResNet-164 [16]).”
BackgroundExplaining and Harnessing Adversarial Examples
Goodfellow, I. J., Shlens, J., & Szegedy, C. (2014) · arXiv · doi:10.48550/arxiv.1412.6572 · Cited by 10,381 · cited 2×
“The Fast Gradient Sign Method (FGSM) [13] creates adversarial examples through the addition of non-random noise in the direction of the gradients of the loss function: where L is the loss function of the classifier C .”
MethodTowards Evaluating the Robustness of Neural Networks
Carlini, N., & Wagner, D. (2017) · 2017 IEEE Symposium on Security and Privacy (SP) · doi:10.1109/sp.2017.49 · Cited by 8,859 · cited 2×
“Overall, CNNs have an expansive body of literature related to adversarial attacks [6, 11, 10] and defenses [23, 5, 34].”
BackgroundIntriguing properties of neural networks
Szegedy, C., Zaremba, W., Sutskever, I., Bruna, J., Erhan, D., Goodfellow, I., & Fergus, R. (2013) · arXiv · doi:10.48550/arxiv.1312.6199 · Cited by 8,143 · cited 3×
“In the literature, the transferability of adversarial examples was first observed in [33].”
BackgroundTowards Deep Learning Models Resistant to Adversarial Attacks
Madry, A., Makelov, A., Schmidt, L., Tsipras, D., & Vladu, A. (2017) · arXiv · doi:10.48550/arxiv.1706.06083 · Cited by 6,602
On Assessing ML Model Robustness: A Methodological Framework (Academic Track)
Awadid, A., & Robert, B. (2025) · OASIcs : OpenAccess Series in Informatics · doi:10.4230/oasics.saia.2024.1 · Cited by 4,702
Practical Black-Box Attacks against Machine Learning
Papernot, N., McDaniel, P., Goodfellow, I., Jha, S., Celik, Z. B., & Swami, A. (2017) · Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security · doi:10.1145/3052973.3053009 · Cited by 3,495 · cited 5×
“To demonstrate this, we consider a black-box attacker that can leverage transfer style [29] and query-based attacks [8].”
BackgroundMethodInfluentialBoosting Adversarial Attacks with Momentum
Dong, Y., Liao, F., Pang, T., Su, H., Zhu, J., Hu, X., & Li, J. (2018) · 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition · doi:10.1109/cvpr.2018.00957 · Cited by 2,956 · cited 4×
“literature related to adversarial attacks [6, 11, 10] and defenses [23, 5, 34].”
BackgroundMethodInfluentialSelf-Training With Noisy Student Improves ImageNet Classification
Xie, Q., Luong, M.-T., Hovy, E., & Le, Q. V. (2020) · 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr42600.2020.01070 · Cited by 2,393
Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples
Athalye, A., Carlini, N., & Wagner, D. (2018) · arXiv · doi:10.48550/arxiv.1802.00420 · Cited by 2,172 · cited 8×
“There are attacks designed to overcome gradient masking, such as the Backward Pass Differentiable Approximation (BPDA) [2].”
BackgroundInfluentialTransferability in Machine Learning: from Phenomena to Black-Box Attacks using Adversarial Samples
Papernot, N., McDaniel, P., & Goodfellow, I. (2016) · arXiv · doi:10.48550/arxiv.1605.07277 · Cited by 1,326
Delving into Transferable Adversarial Examples and Black-box Attacks
Liu, Y., Chen, X., Liu, C., & Song, D. (2016) · arXiv · doi:10.48550/arxiv.1611.02770 · Cited by 1,310
Big Transfer (BiT): General Visual Representation Learning
Kolesnikov, A., Beyer, L., Zhai, X., Puigcerver, J., Yung, J., Gelly, S., & Houlsby, N. (2019) · arXiv · doi:10.48550/arxiv.1912.11370 · Cited by 1,039
Big Transfer (BiT): General Visual Representation Learning
Kolesnikov, A., Beyer, L., Zhai, X., Puigcerver, J., Yung, J., Gelly, S., & Houlsby, N. (2020) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-58558-7_29 · Cited by 1,039 · cited 4×
“In [19], they also propose training on a large dataset (ImageNet-21K or JFT) and fine tuning on a smaller dataset.”
BackgroundMethodInfluentialDecision-based adversarial attacks: Reliable attacks against black-box machine learning models
Brendel, W., Rauber, J., & Bethge, M. (2017) · arXiv · doi:10.48550/arxiv.1712.04248 · Cited by 1,018 · cited 2×
“Adversarial Model: In this section we consider two of the main types of black-box adversaries, query-based [3] and transfer-based adversaries [29].”
BackgroundQuantifying Attention Flow in Transformers
Abnar, S., & Zuidema, W. (2020) · Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2020.acl-main.385 · Cited by 995
Axial-DeepLab: Stand-Alone Axial-Attention for Panoptic Segmentation
Wang, H., Zhu, Y., Green, B., Adam, H., Yuille, A., & Chen, L.-C. (2020) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-58548-8_7 · Cited by 809
On Evaluating Adversarial Robustness
Carlini, N., Athalye, A., Papernot, N., Brendel, W., Rauber, J., Tsipras, D., Goodfellow, I., Mądry, A., & Kurakin, A. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1902.06705 · Cited by 524 · cited 2×
“Under a white-box adversary [5], the attacker has access to the CNN’s parameters (architecture and trained weights).”
BackgroundOn Adaptive Attacks to Adversarial Example Defenses
Tramer, F., Carlini, N., Brendel, W., & Madry, A. (2020) · arXiv · doi:10.48550/arxiv.2002.08347 · Cited by 486 · cited 1×
“Overall, CNNs have an expansive body of literature related to adversarial attacks [6, 11, 10] and defenses [23, 5, 34].”
Background(2021) · International Conference on Learning Representations · Cited by 449
Attacks Which Do Not Kill Training Make Adversarial Learning StrongerPreprint
Zhang, J., Xu, X., Han, B., Niu, G., Cui, L., Sugiyama, M., & Kankanhalli, M. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2002.11242 · Cited by 449
On the Relationship between Self-Attention and Convolutional Layers
Cordonnier, J.-B., Loukas, A., & Jaggi, M. (2019) · arXiv · doi:10.48550/arxiv.1911.03584 · Cited by 354
Pretrained Transformers Improve Out-of-Distribution Robustness
Hendrycks, D., Liu, X., Wallace, E., Dziedzic, A., Krishnan, R., & Song, D. (2020) · Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2020.acl-main.244 · Cited by 298
RayS: A Ray Searching Method for Hard-label Adversarial Attack
Chen, J., & Gu, Q. (2020) · ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD) · doi:10.1145/3394486.3403225 · Cited by 205 · cited 3×
“To demonstrate this, we consider a black-box attacker that can leverage transfer style [29] and query-based attacks [8].”
MethodImproving Adversarial Robustness via Promoting Ensemble Diversity
Pang, T., Xu, K., Du, C., Chen, N., & Zhu, J. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1901.08846 · Cited by 195 · cited 1×
“Here we consider three ways commonly found in the literature, majority voting [27], absolute consensus [26] and random selection [32].”
MethodSelf-Attention Attribution: Interpreting Information Interactions Inside Transformer
Hao, Y., Dong, L., Wei, F., & Xu, K. (2021) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v35i14.17533 · Cited by 189
On the Robustness of Self-Attentive Models
Hsieh, Y.-L., Cheng, M., Juan, D.-C., Wei, W., Hsu, W.-L., & Hsieh, C.-J. (2019) · Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/p19-1147 · Cited by 96 · cited 3×
“The transformer has been well studied from an adversarial perspective for NLP applications e.g., [18, 31, 17, 15].”
BackgroundRobustness Verification for TransformersPreprint
Shi, Z., Zhang, H., Chang, K.-W., Huang, M., & Hsieh, C. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2002.06622 · Cited by 82 · cited 2×
“[31] Zhouxing Shi, Huan Zhang, Kai-Wei Chang, Minlie Huang, and Cho-Jui Hsieh.”
BackgroundBeware the Black-Box: On the Robustness of Recent Defenses to Adversarial Examples
Mahmood, K., Gurevin, D., van Dijk, M., & Nguyen, P. H. (2021) · Entropy · doi:10.3390/e23101359 · Cited by 30 · cited 2×
“It has been shown that MIM, PGD and FGSM are good candidates for creating highly transferable examples [25].”
BackgroundSelf-citationMULDEF: Multi-model-based Defense Against Adversarial Examples for Neural NetworksPreprint
Srisakaokul, S., Zhang, Y., Zhong, Z., Yang, W. P., Xie, T., & Li, B. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1809.00065 · Cited by 24
BUZz: BUffer Zones for defending adversarial examples in image classificationPreprint
Mahmood, K., Nguyen, P. H., Nguyen, L. M., Nguyen, T., & van Dijk, M. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1910.02785 · Cited by 11
Self-citationReliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
Croce, F., & Hein, M. (2020) · arXiv · doi:10.48550/arxiv.2003.01690 · cited 4×
“Overall, CNNs have an expansive body of literature related to adversarial attacks [6, 11, 10] and defenses [23, 5, 34].”
BackgroundMethodInfluential
Research works printed but not linked: 5
- goodfellow, 2015, Explaining and harnessing adversarial examples, Inter-national Conference on Learning Representations
- papernot, 2016, Transferability in machine learning:from phenomena to black-box attacks using adversarial samples, arXiv preprint arXiv 1605 07761
- carlini, 2016, Towards Evaluating the Robustness of Neural Networks, CoRR
- liu, 2016, Delving into transferable adversarial examples and black-box attacks, arXiv preprint arXiv 1611 02770
- madry, 2018, Towards deep learning models resistant to adversarial attacks, International Conference on Learning Representations
Cited by
Han (2023) · doi:10.1109/tpami.2022.3152247 · Cited by 4,682
“Although the robustness has been investigated in [238], [239], [240], it is still an open problem waiting to be solved.”
BackgroundTransformers in medical imaging: A survey
Shamshad, F., Khan, S., Zamir, S. W., Khan, M. H., Hayat, M., Khan, F. S., & Fu, H. (2023) · Medical Image Analysis · doi:10.1016/j.media.2023.102802 · Cited by 1,296
MedViT: A robust vision transformer for generalized medical image classification
Manzari, O. N., Ahmadabadi, H., Kashiani, H., Shokouhi, S. B., & Ayatollahi, A. (2023) · Computers in Biology and Medicine · doi:10.1016/j.compbiomed.2023.106791 · Cited by 526
Towards Robust Vision Transformer
Mao, X., Qi, G., Chen, Y., Li, X., Duan, R., Ye, S., He, Y., & Xue, H. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.01173 · Cited by 224
“They find that ViTs are more adversarially robust than CNNs [34] and the transferability of adversarial examples between CNNs and ViTs is remarkably low [27].”
BackgroundTowards Robust Vision Transformer
Mao, X., Qi, G., Chen, Y., Li, X., Duan, R., Ye, S., He, Y., & Xue, H. (2021) · arXiv · doi:10.48550/arxiv.2105.07926 · Cited by 224
Metadata
- Authors
- Mahmood, K., Mahmood, R., & van Dijk, M.
- Venue
- 2021 IEEE/CVF International Conference on Computer Vision (ICCV)
- Publisher
- IEEE
- Published
- 2021-10
- Pages
- 7818-7827
- OpenAlex
- W3143373604
- Cited by
- 205
- References
- 39
- FWCI
- 17.28
- Type
- conference paper
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.