mlsanityData to 7 Oct 2026

Positional Encodings Anchor Spatial Structure in Vision Transformers: A Geometric Perspective on Robustness

arXiv 2606.00124 ↗First posted 28 May 2026cs.CV cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

Positional embeddings (PEs) in Vision Transformers (ViTs) are known to impact performance and robustness, but their role in shaping internal spatial representations is not well understood. In this work, we study how different forms of PEs influence the representational geometry of ViTs and how these changes relate to robustness under content-disrupting distribution shifts. We introduce a metric, the Spatial Similarity Distance Correlation (SSDC), to quantify spatial structure in token representations. Using this metric, we show that ViTs trained without PEs still develop non-trivial spatial structure, but this structure is driven by visual content and collapses under token permutation. In contrast, we find that all PEs considered (learned absolute, sinusoidal, and rotary) are associated with a consistent shift toward an index-anchored spatial organization. Representations in these models remain stable under perturbations that disrupt content, and exhibit substantially improved robustness to such distributional shifts. We further show that while different PEs produce distinct depth-wise trajectories of spatial structure, their robustness properties are largely similar (with secondary variation across encoding schemes), suggesting that robustness appears to depend on the presence of a stable positional reference frame more than it depends on the specific encoding mechanism. These results offer a geometric account of how positional encodings shape internal representations, with implications for the principled design of future encoding schemes.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 14 of its 16 references that are in the map. First posted on arXiv 28 May 2026.

Builds on

14 of 16 references.

References · 14

  1. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  2. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  3. 2018ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustnesscited by 1,430
  4. 2021Do Vision Transformers See Like Convolutional Neural Networks?cited by 671
  5. 2021ConViT: Improving Vision Transformers with Soft Convolutional Inductive Biasescited by 484
  6. 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
  7. 2021Conditional Positional Encodings for Vision Transformerscited by 402
  8. 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
  9. 2021Understanding Robustness of Transformers for Image Classificationcited by 250
  10. 2024Rotary Position Embedding for Vision Transformercited by 226
  11. 2021Vision Transformers are Robust Learnerscited by 208
  12. 2020How Much Position Information Do Convolutional Neural Networks Encode?cited by 171
2 more
  1. 2021Towards Robust Vision Transformercited by 137
  2. 2021Incorporating Residual and Normalization Layers into Analysis of Masked Language Modelscited by 50

Built on by

Not cited yet.