mlsanityData to 14 Oct 2026

Robustness of Similarity-based Positional Encoding Under Rotations: Theoretical Analysis and Experimental Validation

arXiv 2606.17961 ↗First posted 16 Jun 2026cs.CV cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Positional encoding is a fundamental component of Transformer architectures, as it injects information about the spatial or sequential arrangement of inputs. Among recent alternatives to standard absolute and sinusoidal encodings, similarity-based positional encoding (simPE) has emerged as a flexible framework for representing positional structure through pairwise relations. simPE was originally designed for medical imaging applications, where geometric robustness is especially relevant: small rotations naturally arise during image acquisition, induced by imaging instruments, patient positioning, or slight acquisition misalignments. Despite its empirical promise, the theoretical behavior of simPE under geometric perturbations has not been fully characterized. In this paper, we study the robustness of simPE with respect to rotations, combining formal theoretical analysis with experimental validation. We first show that simPE is generally not rotation-invariant. We then prove that, under mild Lipschitz assumptions on the elementary components, simPE is stable under rotational perturbations and derive explicit perturbation bounds in Frobenius norm. We validate these findings experimentally on four controlled datasets--a synthetic Arrow dataset, a synthetic Shapes dataset (four geometric shape categories), a synthetic Digits dataset, and a benchmark image classification dataset (FashionMNIST)--in which training and validation images are kept in a fixed canonical orientation while test images are subjected to increasing rotation angles. Across all datasets, simPE consistently outperforms standard learned positional encoding in terms of accuracy, F1 score, precision, and recall under rotation, particularly in the small-to-moderate angle regime, corroborating the theoretical stability guarantees.

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

Builds on

14 of 21 references.

References · 14

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  4. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,139
  5. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  6. 2017Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithmscited by 4,349
  7. 2021TransUNet: Transformers Make Strong Encoders for Medical Image Segmentationcited by 1,558
  8. 2016Group Equivariant Convolutional Networkscited by 1,165
  9. 2018Self-Attention with Relative Position Representationscited by 1,120
  10. 2018Image Transformercited by 772
  11. 2017Convolutional Sequence to Sequence Learningcited by 552
  12. 2019General E(2)-Equivariant Steerable CNNscited by 446
2 more
  1. 2021Rethinking and Improving Relative Position Encoding for Vision Transformercited by 207
  2. 2018Why do deep convolutional networks generalize so poorly to small image transformations?cited by 198

Built on by

Not cited yet.