Positional Encodings Anchor Spatial Structure in Vision Transformers: A Geometric Perspective on Robustness
- URL: http://arxiv.org/abs/2606.00124v1
- Date: Thu, 28 May 2026 13:17:23 GMT
- Title: Positional Encodings Anchor Spatial Structure in Vision Transformers: A Geometric Perspective on Robustness
- Abstract summary: We study how different forms of positional embedding (PEs) influence the representational geometry of Vision Transformers (ViTs)<n>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.<n>We find that all PEs considered (learned absolute, sinusoidal, and rotary) are associated with a consistent shift toward an index-anchored spatial organization.
- Score: 0.0
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: 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.
Related papers
- Global Divergence, Local Convergence: Representation Geometry in SSMs and Transformers [4.71326501896672]
Recent state-space models (SSMs) such as Mamba achieve language modeling performance comparable to transformers.<n>This raises an important question: how do these structural differences influence the geometry and functional nature of their internal representations?<n>We study this question through a multi-scale analysis of representations in transformers, SSMs, and hybrid architecture.
arXiv Detail & Related papers (2026-09-08T12:57:30Z) - When Geometry Aligns: Dihedral Hidden-State Transformations in UNet, ViT, and DiT Architectures [20.803275645784694]
We study the effects of structured geometric perturbations within Diffusion Transformers (DiTs)<n>We find that consistent transformations improve stability, while inconsistent ones induce predictable, architecture-specific failures.<n> Taken together with supporting ViT and controlled DiT analyses, these results establish geometric consistency as a key principle for stable hidden-state interventions.
arXiv Detail & Related papers (2026-07-03T19:47:07Z) - PathAR: Structure-First Autoregressive Synthesis of Multimodal Pathology Images [51.428093790826814]
We propose pathology Autorgressive modeling (PathAR) to factorize structure and appearance for modality-label-conditioned pathology generation.<n>PathAR stabilizes morphology under heterogeneous modality-specific appearances and enables spatially aligned image-mask pair generation.
arXiv Detail & Related papers (2026-06-01T01:43:48Z) - Hierarchical Consistency Learning for Test-time Adaptation in Camouflage Perception [50.278200968044665]
Camouflaged object detection (COD) aims to localize targets that exhibit minimal perceptual differences from backgrounds through physical attributes.<n>Existing methods, constrained by the static train-then-freeze paradigm, suffer from domain rigidity and dependency annotation.<n>We propose the hierarchical consistency learning framework, which integrates test-time adaptation for dynamic representation recalibration.
arXiv Detail & Related papers (2026-05-25T09:57:46Z) - Tempered Self-Similarity Alignment for Physically Plausible Video Generation [83.40337664171939]
Self-similarity loss transforms into probabilistic correspondence and trains the video generative model to align its correspondence with those of the visual foundation model on dynamically changing regions.<n>Our method demonstrates substantial improvements in physical plausibility across diverse interaction scenarios, validating the effectiveness of transferring relational knowledge for video generation.
arXiv Detail & Related papers (2026-05-24T09:28:05Z) - Beyond Point-Wise Matching: Structural Representation Alignment for Accelerating Diffusion Transformers [93.3976834364707]
We propose sREPA, a structural REPresentation Alignment framework to enforce consistency in the relational geometry of feature maps.<n>By encouraging the model to internalize holistic spatial layouts and structural correlations from pre-trained features, sREPA achieves faster and more stable convergence.
arXiv Detail & Related papers (2026-05-16T12:01:04Z) - Invariance on Manifolds: Understanding Robust Visual Representations for Place Recognition [19.200074425090595]
We propose a Second-Order Geometric Statistics framework that inherently captures geometric stability without training.<n>Our approach introduces a training-free framework built upon fixed, pre-trained backbones, achieving strong zero-shot generalization without parameter updates.
arXiv Detail & Related papers (2026-01-31T18:12:29Z) - Geometrically Constrained and Token-Based Probabilistic Spatial Transformers [5.437226012505534]
We revisit Spatial Transformer Networks (STNs) as a canonicalization tool for transformer-based vision pipelines.<n>We propose a probabilistic, component-wise extension that improves robustness.<n> Experiments on challenging moth classification benchmarks demonstrate that our method consistently improves robustness compared to other STNs.
arXiv Detail & Related papers (2025-09-14T11:30:53Z) - Learning Spatial Decay for Vision Transformers [50.63391799053993]
Vision Transformers (ViTs) have revolutionized computer vision, yet their self-attention mechanism lacks explicit spatial inductive biases.<n>Existing approaches introduce data-independent spatial decay based on fixed distance metrics.<n>We present the first successful adaptation of data-dependent spatial decay to 2D vision transformers.
arXiv Detail & Related papers (2025-08-13T06:18:32Z) - GTA: A Geometry-Aware Attention Mechanism for Multi-View Transformers [63.41460219156508]
We argue that existing positional encoding schemes are suboptimal for 3D vision tasks.
We propose a geometry-aware attention mechanism that encodes the geometric structure of tokens as relative transformation.
We show that our attention, called Geometric Transform Attention (GTA), improves learning efficiency and performance of state-of-the-art transformer-based NVS models.
arXiv Detail & Related papers (2023-10-16T13:16:09Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.