Huang Zhichao, Fan Yanbo, Liu Chen, Zhang Weizhong, Zhang Yong, Salzmann Mathieu, Susstrunk Sabine, Wang Jue
IEEE Trans Image Process. 2023;32:6102-6114. doi: 10.1109/TIP.2023.3326398. Epub 2023 Nov 20.
While adversarial training and its variants have shown to be the most effective algorithms to defend against adversarial attacks, their extremely slow training process makes it hard to scale to large datasets like ImageNet. The key idea of recent works to accelerate adversarial training is to substitute multi-step attacks (e.g., PGD) with single-step attacks (e.g., FGSM). However, these single-step methods suffer from catastrophic overfitting, where the accuracy against PGD attack suddenly drops to nearly 0% during training, and the network totally loses its robustness. In this work, we study the phenomenon from the perspective of training instances. We show that catastrophic overfitting is instance-dependent, and fitting instances with larger input gradient norm is more likely to cause catastrophic overfitting. Based on our findings, we propose a simple but effective method, Adversarial Training with Adaptive Step size (ATAS). ATAS learns an instance-wise adaptive step size that is inversely proportional to its gradient norm. Our theoretical analysis shows that ATAS converges faster than the commonly adopted non-adaptive counterparts. Empirically, ATAS consistently mitigates catastrophic overfitting and achieves higher robust accuracy on CIFAR10, CIFAR100, and ImageNet when evaluated on various adversarial budgets. Our code is released at https://github.com/HuangZhiChao95/ATAS.
虽然对抗训练及其变体已被证明是抵御对抗攻击最有效的算法,但其极其缓慢的训练过程使得难以扩展到像ImageNet这样的大型数据集。近期加速对抗训练的工作的关键思想是用单步攻击(如FGSM)替代多步攻击(如PGD)。然而,这些单步方法存在灾难性过拟合问题,即在训练期间针对PGD攻击的准确率会突然降至近0%,并且网络完全失去其鲁棒性。在这项工作中,我们从训练实例的角度研究这一现象。我们表明灾难性过拟合是依赖于实例的,并且拟合具有较大输入梯度范数的实例更有可能导致灾难性过拟合。基于我们的发现,我们提出了一种简单但有效的方法,即自适应步长对抗训练(ATAS)。ATAS学习一个与梯度范数成反比的实例级自适应步长。我们的理论分析表明,ATAS比常用的非自适应方法收敛得更快。从经验上看,在各种对抗预算下进行评估时,ATAS始终能减轻灾难性过拟合,并在CIFAR10、CIFAR100和ImageNet上实现更高的鲁棒准确率。我们的代码发布在https://github.com/HuangZhiChao95/ATAS 。