论文标题
通过对抗培训重新访问适配器
Revisiting adapters with adversarial training
论文作者
论文摘要
尽管对抗性训练通常被用作防御机制,但最近的作品表明它也可以充当正规机。通过在清洁和对抗输入上共同培训神经网络,可以提高清洁,非对抗输入的分类精度。我们证明,与以前的发现相反,在清洁和对抗输入上进行共同培训时,不必分开批处理统计,并且对于每种类型的输入而言,使用很少有域特异性参数的适配器就足够了。我们确定使用视觉变压器(VIT)作为适配器的分类令牌足以匹配双标准化层的分类性能,同时使用明显较小的其他参数。首先,我们提高了未经对抗训练的VIT-B16模型的前1位准确性,对Imagenet的 +1.12%(达到83.76%的TOP-1精度)。其次,更重要的是,我们表明使用适配器的培训可以通过干净和对抗代币的线性组合来实现模型汤。这些模型汤,我们称之为对抗性模型汤,使我们可以在清洁和稳健的精度之间进行权衡,而无需牺牲效率。最后,我们证明我们可以在分布变化时轻松地调整所得模型。我们的VIT-B16在图像类化变体上获得了TOP-1精确度,该变体平均比使用蒙版自动编码器获得的Image-B16更好 +4.00%。
While adversarial training is generally used as a defense mechanism, recent works show that it can also act as a regularizer. By co-training a neural network on clean and adversarial inputs, it is possible to improve classification accuracy on the clean, non-adversarial inputs. We demonstrate that, contrary to previous findings, it is not necessary to separate batch statistics when co-training on clean and adversarial inputs, and that it is sufficient to use adapters with few domain-specific parameters for each type of input. We establish that using the classification token of a Vision Transformer (ViT) as an adapter is enough to match the classification performance of dual normalization layers, while using significantly less additional parameters. First, we improve upon the top-1 accuracy of a non-adversarially trained ViT-B16 model by +1.12% on ImageNet (reaching 83.76% top-1 accuracy). Second, and more importantly, we show that training with adapters enables model soups through linear combinations of the clean and adversarial tokens. These model soups, which we call adversarial model soups, allow us to trade-off between clean and robust accuracy without sacrificing efficiency. Finally, we show that we can easily adapt the resulting models in the face of distribution shifts. Our ViT-B16 obtains top-1 accuracies on ImageNet variants that are on average +4.00% better than those obtained with Masked Autoencoders.