arXiv:2503.15404cs.CVcs.CR2025-03CVPR被引 19

通过前向传播优化提升ViT对抗样本迁移能力

Improving Adversarial Transferability on Vision Transformers via Forward Propagation Refinement

  • 提出前向传播精炼,优化注意力图和令牌嵌入
  • 在多种模型间迁移时,平均提升7.0%攻击成功率
  • 适合研究对抗鲁棒性或防御机制的开发者

视觉变换器(ViTs)已广泛应用于计算机视觉及视觉语言任务。为了解其在实际场景中的鲁棒性,针对ViTs的可迁移对抗样本受到广泛关注。现有方法通常通过反向传播优化代理模型,但局限于该阶段。本文提出前向传播精炼(FPR),重点优化ViTs的两个关键模块:注意力图与令牌嵌入。对于注意力图,提出注意力图多样性(AMD),通过多样化特定注意力图并隐式引入梯度消失效应;对于令牌嵌入,提出动量令牌嵌入(MTE),利用历史嵌入累积稳定注意力与MLP块的前向更新。大量实验表明,所提FPR在从ViT到各类CNN和ViT的迁移攻击中,平均优于当前最佳(反向)代理精炼方法7.0%。同时验证了其对主流防御策略的优势及与其他迁移方法的兼容性。代码与附录见https://github.com/RYC-98/FPR。

原文摘要 · Abstract (English)

Vision Transformers (ViTs) have been widely applied in various computer vision and vision-language tasks. To gain insights into their robustness in practical scenarios, transferable adversarial examples on ViTs have been extensively studied. A typical approach to improving adversarial transferability is by refining the surrogate model. However, existing work on ViTs has restricted their surrogate refinement to backward propagation. In this work, we instead focus on Forward Propagation Refinement (FPR) and specifically refine two key modules of ViTs: attention maps and token embeddings. For attention maps, we propose Attention Map Diversification (AMD), which diversifies certain attention maps and also implicitly imposes beneficial gradient vanishing during backward propagation. For token embeddings, we propose Momentum Token Embedding (MTE), which accumulates historical token embeddings to stabilize the forward updates in both the Attention and MLP blocks. We conduct extensive experiments with adversarial examples transferred from ViTs to various CNNs and ViTs, demonstrating that our FPR outperforms the current best (backward) surrogate refinement by up to 7.0\% on average. We also validate its superiority against popular defenses and its compatibility with other transfer methods. Codes and appendix are available at https://github.com/RYC-98/FPR.

对抗攻击视觉变换器前向传播迁移性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。