Skip to main content
QUICK REVIEW

[论文解读] Patch-Fool: Are Vision Transformers Always Robust Against Adversarial Perturbations?

Yonggan Fu, Shunyao Zhang|arXiv (Cornell University)|Mar 16, 2022
Adversarial Robustness in Machine Learning被引用 11
一句话总结

本文提出 Patch-Fool,一种针对视觉变换器(ViTs)自注意力机制的新型对抗性攻击框架,通过在单个图像块级别优化扰动实现。与以往攻击不同,Patch-Fool 利用注意力感知的块选择与损失设计,揭示出在该攻击下 ViTs 的鲁棒性始终弱于卷积神经网络(CNNs),挑战了 ViTs 天然鲁棒性的假设,并凸显扰动密度与强度是决定鲁棒性排序的关键因素。

ABSTRACT

Vision transformers (ViTs) have recently set off a new wave in neural architecture design thanks to their record-breaking performance in various vision tasks. In parallel, to fulfill the goal of deploying ViTs into real-world vision applications, their robustness against potential malicious attacks has gained increasing attention. In particular, recent works show that ViTs are more robust against adversarial attacks as compared with convolutional neural networks (CNNs), and conjecture that this is because ViTs focus more on capturing global interactions among different input/feature patches, leading to their improved robustness to local perturbations imposed by adversarial attacks. In this work, we ask an intriguing question: "Under what kinds of perturbations do ViTs become more vulnerable learners compared to CNNs?" Driven by this question, we first conduct a comprehensive experiment regarding the robustness of both ViTs and CNNs under various existing adversarial attacks to understand the underlying reason favoring their robustness. Based on the drawn insights, we then propose a dedicated attack framework, dubbed Patch-Fool, that fools the self-attention mechanism by attacking its basic component (i.e., a single patch) with a series of attention-aware optimization techniques. Interestingly, our Patch-Fool framework shows for the first time that ViTs are not necessarily more robust than CNNs against adversarial perturbations. In particular, we find that ViTs are more vulnerable learners compared with CNNs against our Patch-Fool attack which is consistent across extensive experiments, and the observations from Sparse/Mild Patch-Fool, two variants of Patch-Fool, indicate an intriguing insight that the perturbation density and strength on each patch seem to be the key factors that influence the robustness ranking between ViTs and CNNs.

研究动机与目标

  • 为探究视觉变换器(ViTs)是否真正对所有对抗性扰动具有鲁棒性,挑战当前认为其全局注意力机制可确保优越鲁棒性的普遍观点。
  • 识别出使 ViTs 比卷积神经网络(CNNs)更易受攻击的具体扰动类型,特别是通过针对 ViTs 的基本构建单元——单个图像块实现。
  • 开发一种新型攻击框架,通过在图像块级别进行优化,系统性地利用其自注意力机制破坏 ViTs。
  • 分析扰动密度与强度如何影响 ViTs 与 CNNs 之间的鲁棒性排序,为未来防御策略与网络架构设计提供洞见。

提出的方法

  • 提出 Patch-Fool 攻击框架,通过在图像块级别优化扰动,针对 ViTs 的基本单元——单个图像块,以干扰其自注意力计算。
  • 引入一种注意力感知的图像块选择策略,基于注意力权重及其对模型输出的贡献,识别出最具影响力的图像块。
  • 设计一种注意力感知的损失函数,通过聚焦于自注意力机制中被高度关注的图像块,最大化模型的预测误差。
  • 在 $L_2$ 与 $L_∞$ 约束下采用迭代优化技术,生成在选定图像块上不可察觉但极具破坏性的扰动。
  • 在多种 ViT 与 CNN 架构(如 DeiT、ResNet-50)上,于标准 ImageNet 基准下评估该攻击在不同扰动设置下的表现。
  • 提出两种变体——Sparse Patch-Fool 与 Mild Patch-Fool,以研究扰动密度与强度对 ViTs 与 CNNs 之间鲁棒性排序的影响。

实验结果

研究问题

  • RQ1在何种类型的扰动下,视觉变换器会比卷积神经网络更易受攻击?
  • RQ2通过利用其自注意力机制,基于图像块的攻击是否能有效绕过 ViTs 的全局特征表示?
  • RQ3扰动密度与强度如何影响 ViTs 与 CNNs 之间的鲁棒性排序?
  • RQ4自注意力机制对全局交互的依赖是否真正赋予其鲁棒性,还是 ViTs 对局部化、高强度的图像块扰动更为敏感?
  • RQ5所提出的 Patch-Fool 攻击是否能在保持不可察觉性的前提下,超越现有对抗性攻击对 ViTs 的欺骗效果?

主要发现

  • 在所有评估设置下,ViTs 在 Patch-Fool 攻击下始终弱于 CNNs,DeiT-S 在 4 个图像块的 $L_∞$ 攻击下,$͑ = 128/255$ 时仅获得 6.25% 的鲁棒准确率。
  • 在 $L_∞$ 约束下,DeiT-S 在低扰动强度($͑ = 8/255$)时比 ResNet-50 更具鲁棒性,但在高强 度($͑ = 128/255$)时则显著更弱,表明鲁棒性排序随强度变化而发生转变。
  • Sparse Patch-Fool(仅扰动少数图像块)仍能实现高攻击成功率,表明 ViTs 即使在低密度攻击下也存在脆弱性。
  • Mild Patch-Fool 实验显示,当扰动强度($͑$)从 $8/255$ 增加到 $128/255$ 时,DeiT-S 在 $L_∞$ 约束下的鲁棒准确率从 67.23% 下降至 6.25%,而 ResNet-50 保持相对稳定。
  • ViTs 与 CNNs 之间的鲁棒性排序并非固定不变,而是关键取决于扰动密度与强度,随着这些因素增加,ViTs 的脆弱性显著上升。
  • 即使经过对抗性训练的 ViTs 与 CNNs 也均被 Patch-Fool 攻击成功欺骗,表明标准对抗性训练无法完全缓解这种基于图像块的脆弱性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。