On Improving Adversarial Transferability of Vision Transformers
Muzammal Naseer, Kanchana Ranasinghe, Salman Khan, Fahad Shahbaz Khan, Fatih Porikli
Abstract
Vision transformers (ViTs) process input images as sequences of patches via selfattention; a radically different architecture than convolutional neural networks (CNNs). This makes it interesting to study the adversarial feature space of ViT models and their transferability. In particular, we observe that adversarial patterns found via conventional adversarial attacks show very low black-box transferability even for large ViT models. We show that this phenomenon is only due to the sub-optimal attack procedures that do not leverage the true representation potential of ViTs. A deep ViT is composed of multiple blocks, with a consistent architecture comprising of self-attention and feed-forward layers, where each block is capable of independently producing a class token. Formulating an attack using only the last class token (conventional approach) does not directly leverage the discriminative information stored in the earlier tokens, leading to poor adversarial transferability of ViTs. Using the compositional nature of ViT models, we enhance transferability of existing attacks by introducing two novel strategies specific to the architecture of ViT models. (i) Self-Ensemble: We propose a method to find multiple discriminative pathways by dissecting a single ViT model into an ensemble of networks. This allows explicitly utilizing class-specific information at each ViT block. (ii) Token Refinement: We then propose to refine the tokens to further enhance the discriminative capacity at each block of ViT. Our token refinement systematically combines the class tokens with structural information preserved within the patch tokens. An adversarial attack when applied to such refined tokens within the ensemble of classifiers found in a single vision transformer has significantly higher transferability and thereby brings out the true generalization potential of the ViT's adversarial space. Code: https://t.ly/hBbW .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
30 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Natural Color Fool: Towards Boosting Black-box Unrestricted Attacks cites Towards Evaluating the Robustness of Neural Networks
- Natural Color Fool: Towards Boosting Black-box Unrestricted Attacks cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Natural Color Fool: Towards Boosting Black-box Unrestricted Attacks cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Natural Color Fool: Towards Boosting Black-box Unrestricted Attacks cites Training data-efficient image transformers & distillation through attention
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
- Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations? cites Towards Evaluating the Robustness of Neural Networks
- Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations? cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations? cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations? cites Towards Transferable Adversarial Attacks on Vision Transformers
- Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations? cites Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Training data-efficient image transformers & distillation through attention
- Towards Transferable Adversarial Attacks on Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Transferable Adversarial Attack for Both Vision Transformers and Convolutional Networks via Momentum Integrated Gradients cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Transferable Adversarial Attack for Both Vision Transformers and Convolutional Networks via Momentum Integrated Gradients cites Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations?
- Transferable Adversarial Attack for Both Vision Transformers and Convolutional Networks via Momentum Integrated Gradients cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- Transferable Adversarial Attack for Both Vision Transformers and Convolutional Networks via Momentum Integrated Gradients cites Towards Transferable Adversarial Attacks on Vision Transformers
- Transferable Adversarial Attack for Both Vision Transformers and Convolutional Networks via Momentum Integrated Gradients cites Training data-efficient image transformers & distillation through attention
Cited by top-tier papers30
- Towards Transferable Adversarial Attacks on Vision TransformersZhipeng Wei, Jingjing Chen, Micah Goldblum, Zuxuan Wu et al.AAAI 2022 · 156 citations
- On Generating Transferable Targeted PerturbationsMuzammal Naseer, Salman H. Khan, Munawar Hayat, Fahad Shahbaz Khan et al.ICCV 2021 · 93 citations
- Natural Color Fool: Towards Boosting Black-box Unrestricted AttacksShengming Yuan, Qilong Zhang, Lianli Gao, Yaya Cheng et al.NeurIPS 2022 · 86 citations
- Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations?Yonggan Fu, Shunyao Zhang, Shang Wu, Cheng Wan et al.ICLR 2022 · 86 citations
- Transferable Adversarial Attack for Both Vision Transformers and Convolutional Networks via Momentum Integrated GradientsWenshuo Ma, Yidong Li, Xiaofeng Jia, Wei XuICCV 2023 · 62 citations
Builds on25
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Towards Evaluating the Robustness of Neural NetworksNicholas Carlini, David A. WagnerS&P 2017 · 9,786 citations
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
Related papers
- Boosting the Transferability of Adversarial Attack on Vision Transformer with Adaptive Token TuningDi Ming, Peng Ren, Yunlong Wang, Xin FengNeurIPS 2024 · 24 citations
- Generating Transferable Adversarial Examples against Vision TransformersYuxuan Wang, Jiakai Wang, Zixin Yin, Ruihao Gong et al.ACM MM 2022 · 25 citations
- ViT-EnsembleAttack: Augmenting Ensemble Models for Stronger Adversarial Transferability in Vision TransformersHanwen Cao, Haobo Lu, Xiaosen Wang, Kun HeICCV 2025 · 5 citations
- Attacking Transformers with Feature Diversity Adversarial PerturbationChenxing Gao, Hang Zhou, Junqing Yu, Yuteng Ye et al.AAAI 2024 · 9 citations
- Transferable Adversarial Attacks on Vision Transformers with Token Gradient RegularizationJianping Zhang, Yizhan Huang, Weibin Wu, Michael R. LyuCVPR 2023
