Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Towards Transferable Adversarial Attacks on Vision Transformers

About

Vision transformers (ViTs) have demonstrated impressive performance on a series of computer vision tasks, yet they still suffer from adversarial examples. % crafted in a similar fashion as CNNs. In this paper, we posit that adversarial attacks on transformers should be specially tailored for their architecture, jointly considering both patches and self-attention, in order to achieve high transferability. More specifically, we introduce a dual attack framework, which contains a Pay No Attention (PNA) attack and a PatchOut attack, to improve the transferability of adversarial samples across different ViTs. We show that skipping the gradients of attention during backpropagation can generate adversarial examples with high transferability. In addition, adversarial perturbations generated by optimizing randomly sampled subsets of patches at each iteration achieve higher attack success rates than attacks using all patches. We evaluate the transferability of attacks on state-of-the-art ViTs, CNNs and robustly trained CNNs. The results of these experiments demonstrate that the proposed dual attack can greatly boost transferability between ViTs and from ViTs to CNNs. In addition, the proposed method can easily be combined with existing transfer methods to boost performance. Code is available at https://github.com/zhipeng-wei/PNA-PatchOut.

Zhipeng Wei, Jingjing Chen, Micah Goldblum, Zuxuan Wu, Tom Goldstein, Yu-Gang Jiang• 2021

Related benchmarks

TaskDatasetResultRank
Adversarial AttackImageNet (val)
ASR (General)100
222
Untargeted Adversarial AttackImageNet (test)
ASR (Inc-v3)59.3
26
Adversarial AttackImageNet (val)
ViT-B Score0.991
20
Adversarial Transfer AttackCNNs Target Models (test)
Attack Success Rate (Avg)61.8
20
Adversarial Transfer AttackAdversarially trained CNNs Target Models (test)
Avg Attack Success Rate39.3
20
Adversarial Transfer AttackViTs Target Models (test)
Avg Attack Success Rate0.816
20
Adversarial Attackllava
CLIP Similarity (RN-50)0.2427
9
Adversarial AttackGPT-4o
CLIP Similarity (RN-50)0.259
9
Adversarial AttackQwen VL 2.5
CLIP Similarity (RN-50)0.2554
9
Adversarial AttackGemini 2.0
CLIP Similarity (RN-50)0.2612
9
Showing 10 of 16 rows

Other info

Follow for update