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

一种训练健壮视觉Transformer的简便方法

A Light Recipe to Train Robust Vision Transformers

ETH Zurich(苏黎世联邦理工学院);Princeton University(普林斯顿大学)

Edoardo Debenedetti, Vikash Sehwag, Prateek Mittal

摘要:

在本文中,我们问视觉Transformer(ViTs)是否可以作为一个底层架构,以提高机器学习模型对逃避攻击的对抗鲁棒性。虽然早期的工作集中在改进卷积神经网络,但我们表明,ViTs也非常适合对抗训练,以实现有竞争力的性能。我们使用自定义对抗训练配方来实现这一目标,该配方是通过对ImageNet数据集的一个子集进行严格的消融研究发现的。ViTs的规范训练配方建议使用强数据增强,部分原因是为了补偿与卷积相比,注意力模块缺乏视觉诱导偏差。我们发现,当用于对抗训练时,这种方法达到了次优性能。相比之下,我们发现,省略所有重数据增强,并添加一些额外的技巧包($\varepsilon$ -预热和更大的权重衰减),显着提高鲁棒的ViT的性能。我们证明了我们的配方可以推广到完整ImageNet-1 k上的不同类别的ViT架构和大规模模型。此外,通过调查我们模型鲁棒性的原因,我们发现,使用我们的配方时,在训练过程中更容易产生强大的攻击,这导致在测试时具有更好的鲁棒性。最后,我们进一步研究了对抗性训练的一个结果,提出了一种量化对抗性扰动的语义性质的方法,并强调了它与模型鲁棒性的相关性。总的来说,我们建议社区应该避免将ViTs中的规范训练食谱转化为强大的训练,并重新考虑对抗训练背景下的常见训练选择。

英文摘要:

In this paper, we ask whether Vision Transformers (ViTs) can serve as an underlying architecture for improving the adversarial robustness of machine learning models against evasion attacks. While earlier works have focused on improving Convolutional Neural Networks, we show that also ViTs are highly suitable for adversarial training to achieve competitive performance. We achieve this objective using a custom adversarial training recipe, discovered using rigorous ablation studies on a subset of the ImageNet dataset. The canonical training recipe for ViTs recommends strong data augmentation, in part to compensate for the lack of vision inductive bias of attention modules, when compared to convolutions. We show that this recipe achieves suboptimal performance when used for adversarial training. In contrast, we find that omitting all heavy data augmentation, and adding some additional bag-of-tricks ($\varepsilon$-warmup and larger weight decay), significantly boosts the performance of robust ViTs. We show that our recipe generalizes to different classes of ViT architectures and large-scale models on full ImageNet-1k. Additionally, investigating the reasons for the robustness of our models, we show that it is easier to generate strong attacks during training when using our recipe and that this leads to better robustness at test time. Finally, we further study one consequence of adversarial training by proposing a way to quantify the semantic nature of adversarial perturbations and highlight its correlation with the robustness of the model. Overall, we recommend that the community should avoid translating the canonical training recipes in ViTs to robust training and rethink common training choices in the context of adversarial training.

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

↑