Are Vision Transformers Robust to Spurious Correlations?
This work addresses the problem of spurious correlations in deep learning for researchers and practitioners, providing insights into ViT robustness, though it is incremental as it builds on existing studies of spurious correlations.
The paper investigates the robustness of vision transformers (ViTs) to spurious correlations compared to CNNs on three benchmark datasets, finding that ViTs pre-trained on large datasets are more robust due to better generalization in cases where spurious correlations do not hold.
Deep neural networks may be susceptible to learning spurious correlations that hold on average but not in atypical test samples. As with the recent emergence of vision transformer (ViT) models, it remains underexplored how spurious correlations are manifested in such architectures. In this paper, we systematically investigate the robustness of vision transformers to spurious correlations on three challenging benchmark datasets and compare their performance with popular CNNs. Our study reveals that when pre-trained on a sufficiently large dataset, ViT models are more robust to spurious correlations than CNNs. Key to their success is the ability to generalize better from the examples where spurious correlations do not hold. Further, we perform extensive ablations and experiments to understand the role of the self-attention mechanism in providing robustness under spuriously correlated environments. We hope that our work will inspire future research on further understanding the robustness of ViT models.