Reviving Shift Equivariance in Vision Transformers
Not on the map. Why?
Abstract (arXiv)
Shift equivariance is a fundamental principle that governs how we perceive the world - our recognition of an object remains invariant with respect to shifts. Transformers have gained immense popularity due to their effectiveness in both language and vision tasks. While the self-attention operator in vision transformers (ViT) is permutation-equivariant and thus shift-equivariant, patch embedding, positional encoding, and subsampled attention in ViT variants can disrupt this property, resulting in inconsistent predictions even under small shift perturbations. Although there is a growing trend in incorporating the inductive bias of convolutional neural networks (CNNs) into vision transformers, it does not fully address the issue. We propose an adaptive polyphase anchoring algorithm that can be seamlessly integrated into vision transformer models to ensure shift-equivariance in patch embedding and subsampled attention modules, such as window attention and global subsampled attention. Furthermore, we utilize depth-wise convolution to encode positional information. Our algorithms enable ViT, and its variants such as Twins to achieve 100% consistency with respect to input shift, demonstrate robustness to cropping, flipping, and affine transformations, and maintain consistent predictions even when the original models lose 20 percentage points on average when shifted by just a few pixels with Twins' accuracy dropping from 80.57% to 62.40%.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 14 of its 16 references that are in the map. First posted on arXiv 13 Jun 2023.
Builds on
14 of 16 references.
References · 14
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
- 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,962
- 2021Swin Transformer V2: Scaling Up Capacity and Resolutioncited by 1,228
- 2021CoAtNet: Marrying Convolution and Attention for All Data Sizescited by 569
- 2021Twins: Revisiting the Design of Spatial Attention in Vision Transformerscited by 565
- 2021CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windowscited by 527
- 2022MaxViT: Multi-Axis Vision Transformercited by 476
- 2021Conditional Positional Encodings for Vision Transformerscited by 406
- 2019Making Convolutional Networks Shift-Invariant Againcited by 391
- 2021Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encodingcited by 207
- 2018Why do deep convolutional networks generalize so poorly to small image transformations?cited by 198
- 2022DaViT: Dual Attention Vision Transformerscited by 175
2 more
- 2022The Lie Derivative for Measuring Learned Equivariancecited by 54
- 2020Truly shift-invariant convolutional neural networkscited by 53
Built on by
Citing papers per year: 2023: 1; 2024: 2; 2025: 3; 2026: 3.
9 papers.
- 2023RoboLLM: Robotic Vision Tasks Grounded on Multimodal Large Language Modelscited by 12
- 2024Improving Shift Invariance in Convolutional Neural Networks with Translation Invariant Polyphase Samplingcited by 6
- 2026PRUE: A Practical Recipe for Field Boundary Segmentation at Scalecited by 5
- 2026Vanilla Group Equivariant Vision Transformer: Simple and Effectivecited by 3
- 2025Alias-Free ViT: Fractional Shift Invariance via Linear Attentioncited by 2
- 2024Adapting Pretrained ViTs with Convolution Injector for Visuo-Motor Controlcited by 0
- 2025Learning to Adapt to Position Bias in Vision Transformer Classifierscited by 0
- 2025Towards Foundation Models for Cryo-ET Subtomogram Analysiscited by 0
- 2026Semantic Richness or Geometric Reasoning? The Fragility of VLM's Visual Invariancecited by 0
- 2026Semantic Richness or Geometric Reasoning? The Fragility of VLM's Visual Invariance2 Apr 2026
- 2026PRUE: A Practical Recipe for Field Boundary Segmentation at Scale28 Mar 2026
- 2026Vanilla Group Equivariant Vision Transformer: Simple and Effective8 Feb 2026
- 2025Alias-Free ViT: Fractional Shift Invariance via Linear Attention26 Oct 2025
- 2025Towards Foundation Models for Cryo-ET Subtomogram Analysis29 Sep 2025
- 2025Learning to Adapt to Position Bias in Vision Transformer Classifiers19 May 2025
- 2024Adapting Pretrained ViTs with Convolution Injector for Visuo-Motor Control10 Jun 2024
- 2024Improving Shift Invariance in Convolutional Neural Networks with Translation Invariant Polyphase Sampling11 Apr 2024
- 2023RoboLLM: Robotic Vision Tasks Grounded on Multimodal Large Language Models16 Oct 2023