揭示视觉Transformer的脆弱性根源并提出有效防御方法
Mechanistic Understandings of Representation Vulnerabilities and Engineering Robust Vision Transformers
- 分析输入微小变化如何在深层网络中放大为显著表征差异
- 提出NeuroShield-ViT,通过早期层中和脆弱神经元提升鲁棒性
- 无需微调即达77.8%准确率,对强迭代攻击有出色零样本泛化能力
尽管基于Transformer的模型在自然语言处理和视觉任务中占据主导地位,但其将输入空间映射到标签空间的语义机制仍不清晰。本文研究视觉Transformer(ViT)已知的表征脆弱性来源:感知相同的图像可能产生截然不同的表征,语义无关的图像却可能拥有相同表征。分析表明,输入的不可察觉变化可导致后期层中表征发生显著改变,暗示了ViT性能的潜在不稳定性。全面研究表明,对抗效应在早期层虽细微,但会随网络传播并被放大,尤其在中后期层最为明显。这一发现促使我们开发NeuroShield-ViT,一种新型防御机制,通过在早期层策略性中和脆弱神经元,阻止对抗效应的级联传播。我们在多种攻击下验证了该方法的有效性,尤其在强迭代攻击中表现优异,并展示了其出色的零样本泛化能力。无需微调,本方法在对抗样本上达到77.8%的竞争力准确率,优于传统鲁棒性方法。结果不仅揭示了对抗效应在ViT层间的传播机制,也为提升视觉Transformer的抗攻击能力提供了新路径。
原文摘要 · Abstract (English)
While transformer-based models dominate NLP and vision applications, their underlying mechanisms to map the input space to the label space semantically are not well understood. In this paper, we study the sources of known representation vulnerabilities of vision transformers (ViT), where perceptually identical images can have very different representations and semantically unrelated images can have the same representation. Our analysis indicates that imperceptible changes to the input can result in significant representation changes, particularly in later layers, suggesting potential instabilities in the performance of ViTs. Our comprehensive study reveals that adversarial effects, while subtle in early layers, propagate and amplify through the network, becoming most pronounced in middle to late layers. This insight motivates the development of NeuroShield-ViT, a novel defense mechanism that strategically neutralizes vulnerable neurons in earlier layers to prevent the cascade of adversarial effects. We demonstrate NeuroShield-ViT's effectiveness across various attacks, particularly excelling against strong iterative attacks, and showcase its remarkable zero-shot generalization capabilities. Without fine-tuning, our method achieves a competitive accuracy of 77.8% on adversarial examples, surpassing conventional robustness methods. Our results shed new light on how adversarial effects propagate through ViT layers, while providing a promising approach to enhance the robustness of vision transformers against adversarial attacks. Additionally, they provide a promising approach to enhance the robustness of vision transformers against adversarial attacks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。