Understanding Robustness of Transformers for Image Classification

Abstract

Deep Convolutional Neural Networks (CNNs) have long been the architecture of choice for computer vision tasks. Recently, Transformer-based architectures like Vision Transformer (ViT) have matched or even surpassed ResNets for image classification. However, details of the Transformer architecture such as the use of non-overlapping patches lead one to wonder whether these networks are as robust. In this paper, we perform an extensive study of a variety of different measures of robustness of ViT models and compare the findings to ResNet baselines. We investigate robustness to input perturbations as well as robustness to model perturbations. We find that when pre-trained with a sufficient amount of data, ViT models are at least as robust as the ResNet counterparts on a broad range of perturbations. We also find that Transformers are robust to the removal of almost any single layer, and that while activations from later layers are highly correlated with each other, they nevertheless play an important role in classification.

Cite

Text

Bhojanapalli et al. "Understanding Robustness of Transformers for Image Classification." International Conference on Computer Vision, 2021. doi:10.1109/ICCV48922.2021.01007

Markdown

[Bhojanapalli et al. "Understanding Robustness of Transformers for Image Classification." International Conference on Computer Vision, 2021.](https://mlanthology.org/iccv/2021/bhojanapalli2021iccv-understanding/) doi:10.1109/ICCV48922.2021.01007

BibTeX

@inproceedings{bhojanapalli2021iccv-understanding,
  title     = {{Understanding Robustness of Transformers for Image Classification}},
  author    = {Bhojanapalli, Srinadh and Chakrabarti, Ayan and Glasner, Daniel and Li, Daliang and Unterthiner, Thomas and Veit, Andreas},
  booktitle = {International Conference on Computer Vision},
  year      = {2021},
  pages     = {10231-10241},
  doi       = {10.1109/ICCV48922.2021.01007},
  url       = {https://mlanthology.org/iccv/2021/bhojanapalli2021iccv-understanding/}
}