[论文解读] Understanding and Improving Robustness of Vision Transformers through Patch-based Negative Augmentation
该论文指出,视觉Transformer(ViTs)依赖于非鲁棒的、基于图像块的特征,这些特征在经历破坏语义的变换后依然存在,但并不代表真实的类别语义。通过引入基于图像块的负向增强——即破坏空间和语义结构的变换——作者对ViTs进行正则化,使其避免使用这些特征,从而在20多个设置下显著提升了分布外鲁棒性,同时不损失分布内准确率。
We investigate the robustness of vision transformers (ViTs) through the lens of their special patch-based architectural structure, i.e., they process an image as a sequence of image patches. We find that ViTs are surprisingly insensitive to patch-based transformations, even when the transformation largely destroys the original semantics and makes the image unrecognizable by humans. This indicates that ViTs heavily use features that survived such transformations but are generally not indicative of the semantic class to humans. Further investigations show that these features are useful but non-robust, as ViTs trained on them can achieve high in-distribution accuracy, but break down under distribution shifts. From this understanding, we ask: can training the model to rely less on these features improve ViT robustness and out-of-distribution performance? We use the images transformed with our patch-based operations as negatively augmented views and offer losses to regularize the training away from using non-robust features. This is a complementary view to existing research that mostly focuses on augmenting inputs with semantic-preserving transformations to enforce models' invariance. We show that patch-based negative augmentation consistently improves robustness of ViTs across a wide set of ImageNet based robustness benchmarks. Furthermore, we find our patch-based negative augmentation are complementary to traditional (positive) data augmentation, and together boost the performance further.
研究动机与目标
- 探究尽管具有全局注意力机制,视觉Transformer(ViTs)为何在分布移位下仍易受攻击。
- 识别并分析ViTs中在破坏语义意义的基于图像块变换下仍持续存在的非鲁棒特征。
- 开发一种训练正则化方法,减少ViT对这些非鲁棒特征的依赖,以提升在分布移位下的泛化能力。
- 证明基于图像块的负向增强与现有正向数据增强和对比学习技术具有互补性。
- 通过有针对性的、破坏语义的变换,提供一种诊断和缓解ViTs鲁棒性失败的新框架。
提出的方法
- 设计并应用基于图像块的变换(如随机图像块旋转、打乱和背景填充),以破坏空间和语义关系,但保留局部图像块统计特性。
- 在训练过程中将变换后的图像作为负向增强视图,促使模型生成与原始输入不同的表示。
- 引入一种对比损失,将原始图像与基于图像块变换的版本分别视为正样本对和负样本对,以正则化模型远离非鲁棒特征。
- 将所提出的负向增强与标准正向数据增强(如mixup、Cutout)以及对比学习中的批量负样本结合,以提升鲁棒性。
- 使用标准监督学习训练ViT,采用新损失目标,确保无需架构修改或增加推理成本。
- 在基于ImageNet的标准基准上评估鲁棒性,包括ImageNet-R、ImageNet-A和ImageNet-V2,在分布移位条件下进行测试。
实验结果
研究问题
- RQ1尽管具有全局注意力机制,为何视觉Transformer在分布移位下仍易受攻击?
- RQ2ViTs在基于图像块的变换下依赖的哪些特定类型特征是非鲁棒的?
- RQ3使用基于图像块的负向增强进行训练,能否减少对非鲁棒特征的依赖并提升分布外泛化能力?
- RQ4基于图像块的负向增强与现有正向数据增强和对比学习方法相比或互补时表现如何?
- RQ5所提出的方法能否在不降低标准基准上分布内准确率的前提下提升鲁棒性?
主要发现
- ViTs在分布内准确率很高,但在使用破坏语义内容的基于图像块变换进行测试时,在鲁棒性基准上表现显著下降。
- ViTs在基于图像块变换后所依赖的特征对分布内性能有帮助,但非鲁棒,因为它们不对应于人类可理解的语义线索。
- 基于图像块的负向增强在基于ImageNet的20多个实验设置的鲁棒性基准上(包括ImageNet-R、ImageNet-A和ImageNet-V2)一致提升了ViT的鲁棒性。
- 即使与标准正向数据增强和对比学习中的批量负样本结合,该方法仍能提升鲁棒性,显示出互补性增益。
- 该方法在保持或略微提升分布内准确率的同时,显著减少了对非鲁棒特征的依赖,该结论通过注意力可视化和特征归因分析得到验证。
- 研究发现,ViTs虽能关注物体,但当预测依赖于非鲁棒的、基于图像块的伪影而非全局语义结构时,仍无法实现良好泛化。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。