Adversarial Image Detection for Vision Transformers via Attention Map
Most deep neural networks are vulnerable to adversarial attacks, making it crucial to develop effective defenses against them. Adversarial examples are created by applying slight perturbations either to the entire image or specific regions, depending on attack methods. By contrast, benign examples typically lead models to focus attention on contiguous regions of the image during classification. Therefore, adversarial examples can be detected effectively by leveraging attention values. First, we conduct simple experiment to investigate how the model’s attention responds to adversarial perturbations. Second, we derive features by calculating the changes in attention values across ViT layers for adversarial and benign examples. These attention-derived features are then fed into the detection model, ResNet-50, to learn the differences in the activation locations between both examples. Third, we demonstrate the effectiveness of our approach by thorough experiments on various attack methods, datasets, and target models. The experiments prove the effectiveness of our approach, achieving superior performance compared to baseline methods on the ImageNet dataset across ViT-B and ViT-L. Our findings underscore the potential of utilizing attention-derived features as powerful indicators for enhancing the resilience of ViT models against adversarial perturbations.
Authors
- S. Park (ORCID: https://orcid.org/0009-0003-9684-6149)
- Daeseon Choi (ORCID: https://orcid.org/0000-0002-1438-0265)
- Hyunsik Na (ORCID: https://orcid.org/0000-0002-7123-4467)
Institutions
- Soongsil University (KR)
Publication Details
- Published
- 2025-08-11
- DOI
- https://doi.org/10.1109/avss65446.2025.11149702
- Primary Topic
- Adversarial Robustness in Machine Learning
- Type
- article
- Field-Weighted Citation Impact
- 0.00