When adversarial training meets Vision Transformers: a recipe from training to architectureWhen Adversarial Training Meets Vision Transformers: Recipes from Training to Architecture
Researchers systematically evaluate adversarial training schemes for Vision Transformers (ViT), and the authors state that this is the first comprehensive study on this topic. The paper points out that under common threat models, naturally trained ViTs are not more adversarially robust than CNNs and still require adversarial training to resist adversarial attacks; after evaluating various training techniques on multiple benchmark datasets, the authors find that pretraining and the SGD optimizer are necessary conditions for ViT adversarial training. From an architectural perspective, randomly masking the gradients of some attention blocks during adversarial training, or masking perturbations on some image patches, can significantly improve the adversarial robustness of ViT, and the authors believe this may open a follow-up research direction exploring internal architectural information of newly designed models such as ViT. The code is open-sourced at https://github.com/mo666666/When-Adversarial-Training-Meets-Vision-Transformers。