[Paper Review] Pyramid Adversarial Training Improves ViT Performance
This paper introduces Pyramid Adversarial Training (PyramidAT), a novel data augmentation method that improves Vision Transformer (ViT) performance by applying multi-scale, structured adversarial perturbations during training. It achieves a 1.82% absolute gain in ImageNet clean accuracy for ViT-B/16 and sets new state-of-the-art results on 7 ImageNet robustness benchmarks without extra data, using matched Dropout and stochastic depth regularization.
Aggressive data augmentation is a key component of the strong generalization capabilities of Vision Transformer (ViT). One such data augmentation technique is adversarial training (AT); however, many prior works have shown that this often results in poor clean accuracy. In this work, we present pyramid adversarial training (PyramidAT), a simple and effective technique to improve ViT's overall performance. We pair it with a "matched" Dropout and stochastic depth regularization, which adopts the same Dropout and stochastic depth configuration for the clean and adversarial samples. Similar to the improvements on CNNs by AdvProp (not directly applicable to ViT), our pyramid adversarial training breaks the trade-off between in-distribution accuracy and out-of-distribution robustness for ViT and related architectures. It leads to 1.82% absolute improvement on ImageNet clean accuracy for the ViT-B model when trained only on ImageNet-1K data, while simultaneously boosting performance on 7 ImageNet robustness metrics, by absolute numbers ranging from 1.76% to 15.68%. We set a new state-of-the-art for ImageNet-C (41.42 mCE), ImageNet-R (53.92%), and ImageNet-Sketch (41.04%) without extra data, using only the ViT-B/16 backbone and our pyramid adversarial training. Our code is publicly available at pyramidat.github.io.
Motivation & Objective
- To address the trade-off between in-distribution generalization and out-of-distribution robustness in Vision Transformers (ViT).
- To improve ViT performance on clean ImageNet and multiple robustness benchmarks without relying on extra data.
- To design a more effective adversarial training method tailored for ViT's architecture and inductive bias.
- To investigate the role of regularization techniques like matched Dropout and stochastic depth in adversarial training for ViT.
- To establish a new state-of-the-art for ViT-B/16 on ImageNet-C, ImageNet-R, and ImageNet-Sketch using only standard pre-training and PyramidAT.
Proposed method
- Proposes Pyramid Adversarial Training (PyramidAT), which generates adversarial perturbations at multiple spatial scales—structured for large edits and flexible for small ones—mimicking data augmentation.
- Uses a multi-scale pyramid attack that applies large, coherent perturbations to image regions while allowing fine-grained, pixel-level edits for robustness.
- Introduces 'matched' Dropout, where the same dropout mask is applied to both clean and adversarial samples in a mini-batch to stabilize training.
- Employs stochastic depth with matched configuration, randomly dropping layers during training to improve generalization and robustness.
- Applies the same optimization hyperparameters (e.g., learning rate, weight decay) across clean and adversarial forward passes to maintain training consistency.
- Trains models using standard ImageNet-1K and, optionally, ImageNet-21K data, without architectural modifications to ViT-B/16.
Experimental results
Research questions
- RQ1Can adversarial training improve both clean accuracy and robustness in Vision Transformers, breaking the typical accuracy-robustness trade-off?
- RQ2How do multi-scale, structured adversarial perturbations compare to standard pixel-wise adversarial attacks in improving ViT generalization?
- RQ3What is the impact of matched Dropout and stochastic depth on adversarial training performance in ViT models?
- RQ4Does PyramidAT generalize across different datasets and model architectures beyond ViT-B/16?
- RQ5Can PyramidAT achieve state-of-the-art performance on out-of-distribution benchmarks without using extra data?
Key findings
- PyramidAT achieves a 1.82% absolute improvement in ImageNet clean accuracy for ViT-B/16 when trained only on ImageNet-1K data.
- The method sets a new state-of-the-art on ImageNet-C with a 41.42 mCE, surpassing previous methods without extra data.
- It achieves 53.92% accuracy on ImageNet-R and 41.04% on ImageNet-Sketch, both new SoTA results for ViT-B/16.
- Robustness gains across 7 ImageNet robustness benchmarks range from 1.76% to 15.68% absolute improvement.
- The use of AdaBelief optimizer improves PixelAT performance by up to 1.72% on ImageNet-R, but the benefit is less pronounced for PyramidAT.
- Ablation studies confirm that matched Dropout and stochastic depth are critical components for performance gains in PyramidAT.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.