仅用自然图像梯度正则化,就能让模型更抗干扰。
Characterizing Model Robustness via Natural Input Gradients

- 在自然输入上惩罚输入梯度范数,提升模型鲁棒性。
- ImageNet-1k上达到SOTA对抗训练90%性能,计算量仅60%。
- 让梯度聚焦图像边缘即可增强鲁棒性,无需显式约束范数。
对抗鲁棒模型在每个数据样本附近具有局部平滑性,使微小扰动不会显著改变输出。现代系统通常通过对抗训练实现这种平滑性,显式要求模型在扰动样本上表现良好。本文表明,仅在自然样本上对输入梯度进行正则化,同样可取得惊人效果。分析发现,梯度范数正则化的有效性关键取决于激活函数的平滑性;在采用平滑激活(如ViT中使用的)而非分段线性激活(如ReLU)的现代视觉变压器中,该方法实际极为有效,与以往认知相反。在ImageNet-1k上,梯度范数训练达到52%准确率,为当前最优PGD-3对抗训练(56%)的90%,且计算成本仅为后者的60%,无需复杂对抗优化。分析还揭示了模型鲁棒性与自然输入梯度性质(如样本和通道统计的非对称性)之间的关联。令人意外的是,仅通过引导梯度集中在图像边缘,即可显著提升模型鲁棒性,无需显式控制梯度范数。
原文摘要 · Abstract (English)
Adversarially robust models are locally smooth around each data sample so that small perturbations cannot drastically change model outputs. In modern systems, such smoothness is usually obtained via Adversarial Training, which explicitly enforces models to perform well on perturbed examples. In this work, we show the surprising effectiveness of instead regularizing the gradient with respect to model inputs on natural examples only. Penalizing input Gradient Norm is commonly believed to be a much inferior approach. Our analyses identify that the performance of Gradient Norm regularization critically depends on the smoothness of activation functions, and are in fact extremely effective on modern vision transformers that adopt smooth activations over piecewise linear ones (eg, ReLU), contrary to prior belief. On ImageNet-1k, Gradient Norm training achieves > 90% the performance of state-of-the-art PGD-3 Adversarial Training} (52% vs.~56%), while using only 60% computation cost of the state-of-the-art without complex adversarial optimization. Our analyses also highlight the relationship between model robustness and properties of natural input gradients, such as asymmetric sample and channel statistics. Surprisingly, we find model robustness can be significantly improved by simply regularizing its gradients to concentrate on image edges without explicit conditioning on the gradient norm.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。