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].”
Background
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
Vision Transformers Are Robust Learners
Paul, S., & Chen, P.-Y. (2022) · Proceedings of the AAAI Conference on Artificial Intelligence · doi:10.1609/aaai.v36i2.20103 · Cited by 244
“[12] studied adversarial robustness of ViTs through various white-box, black-box and transfer attacks and found that model ensembling can achieve unprecedented robustness without sacrificing clean accuracy against a black-box adversary.”
BackgroundRethinking Architecture Design for Tackling Data Heterogeneity in Federated Learning
Qu, L., Zhou, Y., Liang, P. P., Xia, Y., Wang, F., Adeli, E., Fei-Fei, L., & Rubin, D. (2022) · 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52688.2022.00982 · Cited by 200
“Among several particularly relevant findings are that ViTs are highly robust to severe occlusions, perturbations, domain shifts [3, 48], as well as synthetic and natural adversarial examples [44,51].”
BackgroundSelva, J., Johansen, A. S., Escalera, S., Nasrollahi, K., Moeslund, T. B., & Clapés, A. (2023) · IEEE Transactions on Pattern Analysis and Machine Intelligence · doi:10.1109/tpami.2023.3243465 · Cited by 169
“It has been shown that vision Transformers are robust to various perturbations [192], [193], suggesting they may be better able to form abstract semantic representations [194], probably due to their ability to leverage non-local contexts [195].”
BackgroundExploring the Limits of Out-of-Distribution Detection
Fort, S., Ren, J., & Lakshminarayanan, B. (2021) · arXiv · doi:10.48550/arxiv.2106.03004 · Cited by 142
Taxonomy of Machine Learning Safety: A Survey and Primer
Mohseni, S., Wang, H., Xiao, C., Yu, Z., Wang, Z., & Yadawa, J. (2023) · ACM Computing Surveys · doi:10.1145/3551385 · Cited by 53
“With the recent success of Visual Transformers (ViTs), some works [18, 155] benchmarked model robustness of ViTs and observed it to have better general robustness than traditional CNNs.”
BackgroundTrade-off between Robustness and Accuracy of Vision Transformers
Li, Y., & Xu, C. (2023) · 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr52729.2023.00730 · Cited by 23
“Although empirical analyses have demonstrated that ViTs demonstrates robustness against various kinds of perturbations [1, 33, 37], there are only a limited number of works [9, 19, 34, 60] focus on improving the robustness.”
BackgroundMitigating Adversarial Attacks in Federated Learning with Trusted Execution Environments
Queyrut, S., Schiavoni, V., & Felber, P. (2023) · 2023 IEEE 43rd International Conference on Distributed Computing Systems (ICDCS) · doi:10.1109/icdcs57875.2023.00069 · Cited by 18
“We chose an ensemble because, generally, when dealing with the image classification task, adversarial examples do not transfer well between attention based and CNN based models [44].”
BackgroundMethodInfluential
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.