Cited by 213Adversarial Robustness in Machine LearningDomain Adaptation and Few-Shot LearningAdvanced Neural Network Applications

Vision Transformers Are Robust Learners

Open access
Paul, Sayak, Chen, Pin-Yu·2022·Proceedings of the AAAI Conference on Artificial Intelligence

Abstract

Transformers, composed of multiple self-attention layers, hold strong promises toward a generic learning primitive applicable to different data modalities, including the recent breakthroughs in computer vision achieving state-of-the-art (SOTA) standard accuracy. What remains largely unexplored is their robustness evaluation and attribution. In this work, we study the robustness of the Vision Transformer (ViT) (Dosovitskiy et al. 2021) against common corruptions and perturbations, distribution shifts, and natural adversarial examples. We use six different diverse ImageNet datasets concerning robust classification to conduct a comprehensive performance comparison of ViT(Dosovitskiy et al. 2021) models and SOTA convolutional neural networks (CNNs), Big-Transfer (Kolesnikov et al. 2020). Through a series of six systematically designed experiments, we then present analyses that provide both quantitative andqualitative indications to explain why ViTs are indeed more robust learners. For example, with fewer parameters and similar dataset and pre-training combinations, ViT gives a top-1accuracy of 28.10% on ImageNet-A which is 4.3x higher than a comparable variant of BiT. Our analyses on image masking, Fourier spectrum sensitivity, and spread on discrete cosine energy spectrum reveal intriguing properties of ViT attributing to improved robustness. Code for reproducing our experiments is available at https://git.io/J3VO0.

AI snapshot

Written from the paper’s full text.

TL;DR

This paper benchmarks Vision Transformers (ViTs) against Big Transfer (BiT) CNNs and ResNet50V2 across six ImageNet robustness datasets, finding ViTs generally more robust. It then uses six experiments to attribute that robustness to attention, large-scale pre-training, and properties such as lower Fourier sensitivity and smoother loss landscapes.

Key findings

  • ViTs outperformed comparable BiT models on most robustness benchmarks. On ImageNet-A, ViT reached 28.10% top-1 accuracy, reported as 4.3× higher than a comparable BiT variant. On ImageNet-C, ViT L-16 had mCE 45.45 versus BiT m-r101x3 at 76.7 and DeepAugment+AugMix at 58.27, though Noisy Student Training was lower at 28.3.
  • ViT achieved comparable ImageNet-1k accuracy with fewer parameters: ViT B-16 used 86.86M parameters and reached 83.97% top-1, while BiT m-r101x3 used 387.93M parameters and reached 84.7%.
  • Under random Cutout masking, ViT L-16 beat BiT m-r101x3 at every tested level: 83 vs. 79 at 0%, 82.3 vs. 76 at 5%, 81.4 vs. 75 at 10%, 77.9 vs. 72.4 at 20%, and 60.4 vs. 52 at 50%.
  • Analyses showed ViT had lower Fourier error percentiles (at P=95, 15.1 vs. BiT’s 24.9 and ResNet-50’s 63.6), wider spread of adversarial perturbations in the DCT energy spectrum, and a smoother PGD loss landscape. Larger pre-training helped ViT B/16: ImageNet-21k versus ImageNet-1k gave ImageNet-A 21.75 vs. 8.63, ImageNet-R 41.82 vs. 28.21, and ImageNet-O AUPR 54.61 vs. 26.25.

Methods

  • The study compared publicly available ViT, BiT, and ResNet50V2 models on six ImageNet-derived robustness datasets: ImageNet-C, ImageNet-P, ImageNet-R, ImageNet-A, ImageNet-O, and ImageNet-9. Most models were pre-trained on ImageNet-21k and fine-tuned on ImageNet-1k.
  • Six experiments examined attention-fused architectures, pre-training data regime, random Cutout masking on 1,000 ImageNet-1k validation images at 5/10/20/50%, Fourier basis perturbations on 1,000 images, DeepFool adversarial perturbations on 1,000 images with DCT energy-spectrum analysis, and PGD loss landscapes on 100 correctly classified images with an ℓ∞ budget of 0.002.
  • The paper combines quantitative benchmark comparisons with qualitative visualizations and attribution analyses.

Limitations

  • The paper states that it does not investigate how regularization relates to robustness, that computational constraints led to smaller BiT and ViT variants in some experiments, and that ViT was worse than ResNet-50 on detecting vulnerable foregrounds (20.02 vs. 22.3 challenge accuracy) and not consistently better for contrast corruption.
  • Evident from the text: the comparison is limited to selected public ViT, BiT, and ResNet models and six ImageNet-derived benchmarks; some baseline numbers are taken from prior reported results; and the robustness evaluation focuses on corruptions, perturbations, distribution shifts, and natural adversarial examples rather than a full adversarial defense evaluation.

Model-written summary. Check it against the paper before relying on it.

Integrity signals

Registry

Crossref · 10.1609/aaai.v36i2.20103

Cites

79 of 79 references verified0 citation errors · 0 not checkable

Statistics

Nothing to recompute.

Claims the paper makes

2 of 6 cited sources checked · 0 supported · 0 flagged · accuracy not yet measured

  • Interpretationcitation

    Using a larger dataset during pre-training may be acting as a regularizer for ViT and BiT's low sensitivity.

    “Using a larger dataset during pre-training may be acting as a regularizer here (Kolesnikov et al. 2020).”
    Quote in the paperSubstantial claim1 of 1 sources checked
    • cites Kolesnikov et al. 2020 source

      Section 2.2 (p. 3) says MixUp was not useful during BiT pre-training, likely because data were abundant. That is consistent with the tentative idea that more pre-training data can reduce the need for regularization, but the paper does not say that dataset size acts as a regularizer or explains low sensitivity in ViT and BiT. (LLM, conf=0.78)

      Experimental — accuracy not yet measured
  • Premisecitation

    ViT needs to be pre-trained on a relatively larger dataset with strong regularization to achieve reasonable downstream performance.

    “As noted in (Dosovitskiy et al. 2021;Steiner et al. 2021), because of the lesser number of inductive biases, ViT needs to be pre-trained on a relatively larger dataset (such as ImageNet-21k (Deng et al. 2009)) with strong regularization for achieving reasonable downstream performance.”
    Quote in the paperSubstantial claim1 of 2 sources checked
    • cites Dosovitskiy et al. 2021

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

    • cites Steiner et al. 2021 source

      Section 4.3 (p. 6) finds that pre-training on the larger ImageNet-21k dataset produces better transfer results than ImageNet-1k. But the claim overstates the need for both a larger dataset and strong regularization: Section 4.1 (p. 5) reports that augmentation and regularization can partly substitute for more data, while Section 4.4 (p. 7) says regularization almost always hurts when using ImageNet-21k. (LLM, conf=0.88)

      Experimental — accuracy not yet measured
  • Findingown data

    Different variants of ViT achieve comparable ImageNet-1k top-1 accuracy to BiT but with fewer parameters.

    “It is clear that different variants of ViT are able to achieve comparable performance to BiT but with lesser parameters.”
    Quote in the paperNot a substantial claim
  • Findingown data

    ViT's treatment to domain adaptation on ImageNet-R is better than that of BiT.

    “Figure 3 shows that ViT's treatment to domain adaptation is better than that of BiT.”
    Quote in the paperSubstantial claim
  • Findingown data

    ViT consistently beats BiT when square portions of input images have been randomly masked out.

    “Table 7 reports that ViT is able to consistently beat BiT when square portions of the input images have been randomly masked out.”
    Quote in the paperSubstantial claim
  • May combine two claims. 4
  • The quote only partly states this claim. 3
  • Classified as probably not a substantial claim. 2
  • May combine two claims.

    Findingown data

    ViT performs consistently better than BiT across different corruptions on ImageNet-C, except for contrast.

    “Overall, we notice that ViT performs consistently better across different corruptions except for contrast.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingown data

    ViT's robustness to common perturbations on ImageNet-P is significantly better than BiT as well as AugMix.

    “We find ViT's robustness to common perturbations is significantly better than BiT as well as AugMix.”
    Quote in the paperSubstantial claim
  • The quote only partly states this claim.

    Findingown data

    ViT demonstrates superior performance in anomaly detection on ImageNet-O than BiT.

    “ViT demonstrates superior performance in anomaly detection than BiT.”
    Quote in the paperSubstantial claim
  • May combine two claims. The quote only partly states this claim.

    Findingown data

    ViT L-16 achieves a top-1 accuracy of 28.10% on ImageNet-A, which is 4.3 times higher than BiT-m r101x3.

    “with fewer parameters and similar dataset and pre-training combinations, ViT gives a top-1 accuracy of 28.10% on ImageNet-A which is 4.3x higher than a comparable variant of BiT.”
    • Also stated in: § Dataset Purpose · plain
      “the top-1 accuracy of ViT L-16 is 4.3x higher than BiT-m r101x3.”
    Quote in the paperSubstantial claim
  • May combine two claims.

    Findingreasoning

    To attack ViT, almost the entire frequency spectrum needs to be affected, while it is less so for BiT and ResNet-50.

    “It suggests that to attack ViT, (almost) the entire frequency spectrum needs to be affected, while it is less so for BiT and ResNet-50.”
    Quote in the paperSubstantial claim
  • Classified as probably not a substantial claim.

    Premisecitation

    Small adversarial perturbations can change the decision boundary of neural networks, especially CNNs.

    “In (Ortiz-Jimenez et al. 2020), it is shown that small adversarial perturbations can change the decision boundary of neural networks (especially CNNs) and that adversarial training (Madry et al. 2018) exploits this sensitivity to induce robustness.”
    Quote in the paperSubstantial claim0 of 1 sources checked
    • cites Ortiz-Jimenez et al. 2020 source
  • Probably not a substantial claim: may not pass S3 (load-bearing).

    Premisecitation

    Adversarial training exploits the sensitivity of neural networks to adversarial perturbations to induce robustness.

    “In (Ortiz-Jimenez et al. 2020), it is shown that small adversarial perturbations can change the decision boundary of neural networks (especially CNNs) and that adversarial training (Madry et al. 2018) exploits this sensitivity to induce robustness.”
    Quote in the paperNot a substantial claim0 of 1 sources checked
    • cites Madry et al. 2018

      Couldn’t be matched to a paper in Crossref, so it can’t be checked.

  • The quote only partly states this claim.

    Interpretationown data

    Attention is one of the attributes for the superior robustness performance ViTs show on three robustness benchmark datasets.

    “We confirm this in Table 8 (last row).”
    Quote in the paperSubstantial claim
    • Rests on an assumption: The attention mechanism helps a model learn better contextual dependencies.
8 of 8
  • The paper relies on this without support.

    The attention mechanism helps a model learn better contextual dependencies.

    “Since the attention mechanism helps a model learn better contextual dependencies we hypothesize that this is one of the attributes for the superior performance ViTs show on three robustness benchmark datasets.”
  • The paper relies on this without support.

    ViT can utilize global information.

    “Randomness is desirable here because ViT can utilize global information.”
2 of 2

Cites

Flagged first, then by citations

20 of the 99 references couldn’t be matched to a known paper.

Research works printed but not linked: 3

  1. [20]20. Hendrycks*, D.; Mu*, N.; Cubuk, E. D.; Zoph, B.; Gilmer, J.; and Lakshminarayanan, B. 2020. AugMix: A Simple Method to Improve Robustness and Uncertainty under Data Shift. In International Conference on Learning Representations.
  2. [31]31. Krizhevsky, A.; Sutskever, I.; and Hinton, G. E. 2012. Im- ageNet Classification with Deep Convolutional Neural Net- works. In Advances in Neural Information Processing Sys- tems, volume 25.
  3. [49]49. PMLR.

Cited by

Sorted by citations

Authors
Paul, S., & Chen, P.-Y.
Affiliations
IBM (United States) (US)
Venue
Proceedings of the AAAI Conference on Artificial Intelligence
Published
2022-06-28
Volume
36
Issue
2
Pages
2071-2081
ISSN
  • 2159-5399 (ISSN-L)
  • 2374-3468
OpenAlex
W3161120562
Cited by
213
References
99
Citations by year
2026: 16 · 2025: 25 · 2024: 36 · 2023: 81 · 2022: 34 · 2021: 21
FWCI
28.37
Type
conference paper
Language
en
Open access
Locations
  • Proceedings of the AAAI Conference on Artificial Intelligence (publishedVersion)
  • AAAI Publications (The Association for the Advancement of Artificial Intelligence (AAAI)) (submittedVersion)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
  • Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
Keywords
vision transformer, robustness, self-attention, adversarial examples, image corruptions, distribution shift, image masking, convolutional neural networks

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Claims read by deepseek-v4.1-flash under definition version 3 (extract-v3) on 2026-10-11.

Classified by jev-1.13-20260917 (gold-guideline-v0.2) on 2026-10-11.

Cited sources are checked by gpt-6-sol.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review