mlsanityData to 13 Oct 2026

SP-ViT: Learning 2D Spatial Priors for Vision Transformers

arXiv 2206.07662 ↗First posted 15 Jun 2022cs.CVcited by 12

Not on the map. Why?

Abstract (arXiv)

Recently, transformers have shown great potential in image classification and established state-of-the-art results on the ImageNet benchmark. However, compared to CNNs, transformers converge slowly and are prone to overfitting in low-data regimes due to the lack of spatial inductive biases. Such spatial inductive biases can be especially beneficial since the 2D structure of an input image is not well preserved in transformers. In this work, we present Spatial Prior-enhanced Self-Attention (SP-SA), a novel variant of vanilla Self-Attention (SA) tailored for vision transformers. Spatial Priors (SPs) are our proposed family of inductive biases that highlight certain groups of spatial relations. Unlike convolutional inductive biases, which are forced to focus exclusively on hard-coded local regions, our proposed SPs are learned by the model itself and take a variety of spatial relations into account. Specifically, the attention score is calculated with emphasis on certain kinds of spatial relations at each head, and such learned spatial foci can be complementary to each other. Based on SP-SA we propose the SP-ViT family, which consistently outperforms other ViT models with similar GFlops or parameters. Our largest model SP-ViT-L achieves a record-breaking 86.3% Top-1 accuracy with a reduction in the number of parameters by almost 50% compared to previous state-of-the-art model (150M for SP-ViT-L vs 271M for CaiT-M-36) among all ImageNet-1K models trained on 224x224 and fine-tuned on 384x384 resolution w/o extra data.

Key facts. Cited by 12 papers in the map (data through 13 Oct 2026). Builds on 30 of its 32 references that are in the map. First posted on arXiv 15 Jun 2022.

Builds on

30 of 32 references.

References · 30

  1. 2017Attention Is All You Needcited by 60,106
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,304
  3. 2020Language Models are Few-Shot Learnerscited by 32,320
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,043
  5. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,223
  6. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,322
  7. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,111
  8. 2019EfficientNet: Rethinking Model Scaling for Convolutional Neural Networkscited by 6,426
  9. 2020Training data-efficient image transformers & distillation through attentioncited by 4,574
  10. 2022A ConvNet for the 2020scited by 3,563
  11. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,810
  12. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,171
18 more
  1. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,961
  2. 2018Self-Attention with Relative Position Representationscited by 1,116
  3. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,101
  4. 2021CvT: Introducing Convolutions to Vision Transformerscited by 946
  5. 2021CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classificationcited by 806
  6. 2021Going deeper with Image Transformerscited by 762
  7. 2021Transformer in Transformercited by 633
  8. 2020Transformer Interpretability Beyond Attention Visualizationcited by 623
  9. 2021CoAtNet: Marrying Convolution and Attention for All Data Sizescited by 569
  10. 2019Stand-Alone Self-Attention in Vision Modelscited by 542
  11. 2021CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windowscited by 527
  12. 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
  13. 2021LeViT: a Vision Transformer in ConvNet's Clothing for Faster Inferencecited by 475
  14. 2021Conditional Positional Encodings for Vision Transformerscited by 406
  15. 2021DeepViT: Towards Deeper Vision Transformercited by 288
  16. 2021Incorporating Convolution Designs into Visual Transformerscited by 248
  17. 2021Rethinking and Improving Relative Position Encoding for Vision Transformercited by 207
  18. 2021All Tokens Matter: Token Labeling for Training Better Vision Transformerscited by 144

Built on by

Cited by year

Citing papers per year: 2022: 2; 2023: 3; 2024: 4; 2025: 3.

12 papers.