arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.13828cs.CVcs.CR
收藏

ViTGuard:针对Vision Transformer对抗样本的注意力感知检测

ViTGuard: Attention-aware Detection against Adversarial Examples for Vision Transformer

Virginia Tech(弗吉尼亚理工大学);Kryptowire Labs(克里普托wire实验室)

Shihua Sun, Kenechukwu Nwodo, Shridatt Sugrim, Angelos Stavrou, Haining Wang

AI总结:

提出ViTGuard防御方法,利用MAE模型重建图像并结合注意力图与CLS token特征,有效检测针对Vision Transformer的典型对抗攻击和patch攻击。

摘要:

将transformer用于视觉任务挑战了卷积神经网络(CNN)在计算机视觉(CV)中的传统主导地位。对于图像分类任务,Vision Transformer(ViT)有效地建立了图像内各个patch之间的空间关系,将注意力引导至重要区域以进行准确预测。然而,与CNN类似,ViT也容易受到对抗攻击,这些攻击通过精心设计的扰动误导图像分类器对图像做出错误决策。此外,对抗patch攻击在一个小区域内引入任意扰动,对ViT构成了更严重的威胁。更糟糕的是,最初为CNN模型设计的传统检测方法在应用于ViT时不切实际或性能显著下降,且它们通常忽略patch攻击。在本文中,我们提出ViTGuard作为一种通用检测方法,用于防御ViT模型免受对抗攻击,包括扰动遍布整个输入的典型攻击和patch攻击。ViTGuard使用Masked Autoencoder(MAE)模型从未被掩码的区域恢复随机掩码的patch,提供了一种灵活的图像重建策略。然后,基于阈值的检测器利用独特的ViT特征,包括注意力图和分类(CLS)token表示,来区分正常样本和对抗样本。MAE模型在训练期间不涉及任何对抗样本,确保了我们的检测器对未见攻击的有效性。ViTGuard在三个数据集上的九种攻击下与七种现有检测方法进行了比较。评估结果表明ViTGuard优于现有检测器。最后,考虑到潜在的检测规避,我们进一步展示了ViTGuard对抗用于规避的自适应攻击的鲁棒性。

英文摘要:

The use of transformers for vision tasks has challenged the traditional dominant role of convolutional neural networks (CNN) in computer vision (CV). For image classification tasks, Vision Transformer (ViT) effectively establishes spatial relationships between patches within images, directing attention to important areas for accurate predictions. However, similar to CNNs, ViTs are vulnerable to adversarial attacks, which mislead the image classifier into making incorrect decisions on images with carefully designed perturbations. Moreover, adversarial patch attacks, which introduce arbitrary perturbations within a small area, pose a more serious threat to ViTs. Even worse, traditional detection methods, originally designed for CNN models, are impractical or suffer significant performance degradation when applied to ViTs, and they generally overlook patch attacks. In this paper, we propose ViTGuard as a general detection method for defending ViT models against adversarial attacks, including typical attacks where perturbations spread over the entire input and patch attacks. ViTGuard uses a Masked Autoencoder (MAE) model to recover randomly masked patches from the unmasked regions, providing a flexible image reconstruction strategy. Then, threshold-based detectors leverage distinctive ViT features, including attention maps and classification (CLS) token representations, to distinguish between normal and adversarial samples. The MAE model does not involve any adversarial samples during training, ensuring the effectiveness of our detectors against unseen attacks. ViTGuard is compared with seven existing detection methods under nine attacks across three datasets. The evaluation results show the superiority of ViTGuard over existing detectors. Finally, considering the potential detection evasion, we further demonstrate ViTGuard's robustness against adaptive attacks for evasion.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑