ViTGuard: Attention-aware Detection against Adversarial Examples for Vision Transformer
Not on the map. Why?
Abstract (arXiv)
The use of transformers for vision tasks has challenged the traditional dominant role of convolutional neural networks (CNN) in computer vision (CV). For image classification tasks, Vision Transformer (ViT) effectively establishes spatial relationships between patches within images, directing attention to important areas for accurate predictions. However, similar to CNNs, ViTs are vulnerable to adversarial attacks, which mislead the image classifier into making incorrect decisions on images with carefully designed perturbations. Moreover, adversarial patch attacks, which introduce arbitrary perturbations within a small area, pose a more serious threat to ViTs. Even worse, traditional detection methods, originally designed for CNN models, are impractical or suffer significant performance degradation when applied to ViTs, and they generally overlook patch attacks. In this paper, we propose ViTGuard as a general detection method for defending ViT models against adversarial attacks, including typical attacks where perturbations spread over the entire input and patch attacks. ViTGuard uses a Masked Autoencoder (MAE) model to recover randomly masked patches from the unmasked regions, providing a flexible image reconstruction strategy. Then, threshold-based detectors leverage distinctive ViT features, including attention maps and classification (CLS) token representations, to distinguish between normal and adversarial samples. The MAE model does not involve any adversarial samples during training, ensuring the effectiveness of our detectors against unseen attacks. ViTGuard is compared with seven existing detection methods under nine attacks across three datasets. The evaluation results show the superiority of ViTGuard over existing detectors. Finally, considering the potential detection evasion, we further demonstrate ViTGuard's robustness against adaptive attacks for evasion.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 74 of its 95 references that are in the map. First posted on arXiv 20 Sep 2024.
Builds on
74 of 95 references.
References · 74
- 2017Attention Is All You Needcited by 59,932
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2023GPT-4 Technical Reportcited by 18,132
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,339
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,893
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,960
38 more
- 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,510
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
- 2015DeepFool: a simple and accurate method to fool deep neural networkscited by 1,315
- 2023PaLM 2 Technical Reportcited by 1,154
- 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,096
- 2016Practical Black-Box Attacks against Machine Learningcited by 893
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
- 2015The Limitations of Deep Learning in Adversarial Settingscited by 784
- 2020Quantifying Attention Flow in Transformerscited by 759
- 2021Going deeper with Image Transformerscited by 759
- 2019Square Attack: a query-efficient black-box adversarial attack via random searchcited by 682
- 2015Distillation as a Defense to Adversarial Perturbations against Deep Neural Networkscited by 675
- 2017ZOO: Zeroth Order Optimization based Black-box Attacks to Deep Neural Networks without Training Substitute Modelscited by 656
- 2020Transformer Interpretability Beyond Attention Visualizationcited by 620
- 2018Improving Transferability of Adversarial Examples with Input Diversitycited by 591
- 2016Delving into Transferable Adversarial Examples and Black-box Attackscited by 530
- 2017Adversarial Patchcited by 514
- 2017Feature Squeezing: Detecting Adversarial Examples in Deep Neural Networkscited by 484
- 2022Diffusion Models for Adversarial Purificationcited by 469
- 2017Decision-Based Adversarial Attacks: Reliable Attacks Against Black-Box Machine Learning Modelscited by 459
- 2021Intriguing Properties of Vision Transformerscited by 446
- 2019Evading Defenses to Transferable Adversarial Examples by Translation-Invariant Attackscited by 440
- 2019Is Attention Interpretable?cited by 387
- 2017Mitigating Adversarial Effects Through Randomizationcited by 382
- 2018Defense-GAN: Protecting Classifiers Against Adversarial Attacks Using Generative Modelscited by 362
- 2019Nesterov Accelerated Gradient and Scale Invariance for Adversarial Attackscited by 352
- 2017Defense against Adversarial Attacks Using High-Level Representation Guided Denoisercited by 329
- 2018Characterizing Adversarial Subspaces Using Local Intrinsic Dimensionalitycited by 280
- 2017MagNet: a Two-Pronged Defense against Adversarial Examplescited by 268
- 2019Cross-Modal Self-Attention Network for Referring Image Segmentationcited by 263
- 2021Understanding Robustness of Transformers for Image Classificationcited by 250
- 2017Detecting Adversarial Samples from Artifactscited by 244
- 2021Vision Transformers are Robust Learnerscited by 208
- 2021Are Transformers More Robust Than CNNs?cited by 187
- 2021On the Robustness of Vision Transformers to Adversarial Examplescited by 167
- 2020Skip Connections Matter: On the Transferability of Adversarial Examples Generated with ResNetscited by 165
- 2017Towards Robust Neural Networks via Random Self-ensemblecited by 158
- 2022Understanding The Robustness in Vision Transformerscited by 144
50 most cited of 74 All 74 (JSON)
Built on by
Citing papers per year: 2025: 2.
2 papers.