mlsanityData to 14 Oct 2026

A 2D Semantic-Aware Position Encoding for Vision Transformers

arXiv 2505.09466 ↗First posted 14 May 2025cs.CV cs.AIcited by 3

Not on the map. Why?

Abstract (arXiv)

Vision transformers have demonstrated significant advantages in computer vision tasks due to their ability to capture long-range dependencies and contextual relationships through self-attention. However, existing position encoding techniques, which are largely borrowed from natural language processing, fail to effectively capture semantic-aware positional relationships between image patches. Traditional approaches like absolute position encoding and relative position encoding primarily focus on 1D linear position relationship, often neglecting the semantic similarity between distant yet contextually related patches. These limitations hinder model generalization, translation equivariance, and the ability to effectively handle repetitive or structured patterns in images. In this paper, we propose 2-Dimensional Semantic-Aware Position Encoding (SaPE2), a novel position encoding method with semantic awareness that dynamically adapts position representations by leveraging local content instead of fixed linear position relationship or spatial coordinates. Our method enhances the model's ability to generalize across varying image resolutions and scales, improves translation equivariance, and better aggregates features for visually similar but spatially distant patches. By integrating SaPE2 into vision transformers, we bridge the gap between position encoding and perceptual similarity, thereby improving performance on computer vision tasks.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 27 of its 27 references that are in the map. First posted on arXiv 14 May 2025.

Builds on

27 of 27 references.

References · 27

  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. 2020End-to-End Object Detection with Transformerscited by 7,414
  6. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  7. 2020Training data-efficient image transformers & distillation through attentioncited by 4,586
  8. 2020Deformable DETR: Deformable Transformers for End-to-End Object Detectioncited by 3,422
  9. 2021SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformerscited by 2,940
  10. 2021Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutionscited by 1,962
  11. 2020Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformerscited by 1,369
  12. 2018Self-Attention with Relative Position Representationscited by 1,120
15 more
  1. 2021Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNetcited by 1,101
  2. 2021CvT: Introducing Convolutions to Vision Transformerscited by 947
  3. 2021Segmenter: Transformer for Semantic Segmentationcited by 855
  4. 2022Exploring Plain Vision Transformer Backbones for Object Detectioncited by 724
  5. 2022Vision Transformer Adapter for Dense Predictionscited by 565
  6. 2017Convolutional Sequence to Sequence Learningcited by 552
  7. 2015An Introduction to Convolutional Neural Networkscited by 514
  8. 2020A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospectscited by 397
  9. 2021Rethinking Spatial Dimensions of Vision Transformerscited by 361
  10. 2021Incorporating Convolution Designs into Visual Transformerscited by 248
  11. 2024Rotary Position Embedding for Vision Transformercited by 236
  12. 2021Rethinking and Improving Relative Position Encoding for Vision Transformercited by 207
  13. 2021Fast Convergence of DETR with Spatially Modulated Co-Attentioncited by 176
  14. 2020End-to-End Object Detection with Adaptive Clustering Transformercited by 109
  15. 2024Contextual Position Encoding: Learning to Count What's Importantcited by 54

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.