[论文解读] Towards Transferable Adversarial Attacks on Vision Transformers
本文提出一种双阶段攻击框架——Pay No Attention (PNA) 与 PatchOut,专为视觉Transformer模型设计,以提升对抗样本的迁移能力。通过绕过注意力机制中的梯度反向传播,并在每次迭代中仅优化部分图像块,该方法实现了最先进的迁移性能,在结合现有技术时,使视觉Transformer模型的攻击成功率提升至59.15%,在鲁棒微调的CNN模型上达到36.23%。
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.
研究动机与目标
- 为解决由于架构差异导致对抗攻击在视觉Transformer上迁移能力有限的问题。
- 探究视觉Transformer中的注意力机制与图像块级特征如何影响对抗迁移能力。
- 开发一种双阶段攻击框架,联合针对自注意力机制与图像块表征,以提升在不同模型间的泛化能力。
- 验证架构感知型攻击在视觉Transformer与CNN(包括鲁棒微调模型)上均优于标准方法。
提出的方法
- 提出Pay No Attention (PNA)攻击,通过在优化过程中将注意力权重视为常数,绕过自注意力机制中的梯度反向传播。
- 采用PatchOut攻击,每次迭代中随机采样部分图像块进行更新,模拟Dropout机制以减少过拟合。
- 将PNA与PatchOut结合$L_2$正则化项,以促使扰动远离原始图像,同时保持高攻击成功率。
- 使用白盒视觉Transformer作为替代模型,生成可有效迁移至黑盒视觉Transformer、标准CNN及鲁棒微调CNN的对抗样本。
- 应用BIM攻击并修改梯度传播路径,在$L_{\text{\infty}}$-范数约束下生成对抗样本。
- 调整超参数$T$(每次迭代的图像块数量)与$\lambda$(损失与正则化之间的平衡系数),以优化迁移能力。
实验结果
研究问题
- RQ1通过注意力机制绕过梯度反向传播对视觉Transformer中对抗迁移能力有何影响?
- RQ2与全图优化相比,随机采样部分图像块进行优化是否能提升迁移能力?
- RQ3PNA与PatchOut的联合效应在包括鲁棒微调CNN在内的多种模型架构中如何影响迁移能力?
- RQ4超参数$T$与$\lambda$如何影响双阶段攻击框架的性能?
- RQ5该方法在多大程度上可与现有迁移攻击技术结合,以进一步提升性能?
主要发现
- 绕过注意力机制中的梯度反向传播(即PNA)使ViT-B/16模型的黑盒攻击成功率从29.92%提升至42.47%,表明注意力梯度会损害迁移能力。
- 每次迭代使用130个随机采样的图像块进行PatchOut优化可达到最优性能,优于全图优化及更小的图像块子集。
- PNA、PatchOut与$L_2$正则化联合使用,使视觉Transformer模型的攻击成功率提升至59.15%,在鲁棒微调CNN上达到36.23%,显著优于基线方法。
- 消融实验表明所有组件均具有互补作用,其中PNA对迁移能力的提升最大。
- 该方法在架构差异较大的模型间泛化能力出色,展现出从视觉Transformer到标准CNN及鲁棒微调CNN的强迁移能力。
- 该方法可无缝集成至现有迁移攻击技术中,持续提升其性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。