mlsanityData to 7 Oct 2026

Weierstrass Positional Encoding for Vision Transformers

arXiv 2605.23719 ↗First posted 20 May 2026cs.CV cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Vision Transformers have achieved remarkable success in computer vision, but their common use of learnable one-dimensional positional encodings weakens the inherent two-dimensional spatial structure of images after patch flattening. Existing positional encodings often lack geometric constraints and do not preserve a monotonic relationship between Euclidean spatial distances and sequential index distances, limiting ViTs' ability to exploit spatial proximity priors. Motivated by the usefulness of periodicity in positional encoding, we propose Weierstrass elliptic Positional Encoding (WePE), a mathematically grounded method for encoding two-dimensional coordinates in the complex domain. WePE maps normalized 2D patch coordinates onto the complex plane and constructs compact four-dimensional positional features using the Weierstrass elliptic function and its derivative. The double periodicity provides a principled representation of 2D positions, and its intrinsic lattice structure naturally matches the regular geometry of image patch grids. Its nonlinear geometric properties help model spatial distance relationships more faithfully, while the algebraic addition formula enables relative positional information between arbitrary patch pairs to be derived directly from their absolute encodings. WePE is plug-and-play and resolution-agnostic, allowing seamless integration into existing ViTs. Extensive experiments show that WePE brings consistent performance gains in most settings. With precomputed lookup tables, these improvements introduce no noticeable computational or memory overhead. Additional analyses and ablation studies further validate the effectiveness of the proposed method.

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

Builds on

25 of 37 references.

References · 25

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  5. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  6. 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,339
  7. 2016Layer Normalizationcited by 5,579
  8. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  9. 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
  10. 2023Qwen Technical Reportcited by 3,273
  11. 2013Visualizing and Understanding Convolutional Networkscited by 2,278
  12. 2018Self-Attention with Relative Position Representationscited by 1,112
13 more
  1. 2018Image Transformercited by 770
  2. 2022Exploring Plain Vision Transformer Backbones for Object Detectioncited by 723
  3. 2021ImageNet-21K Pretraining for the Massescited by 607
  4. 2021How to train your ViT? Data, Augmentation, and Regularization in Vision Transformerscited by 562
  5. 2019A Large-scale Study of Representation Learning with the Visual Task Adaptation Benchmarkcited by 419
  6. 2021Rethinking Spatial Dimensions of Vision Transformerscited by 361
  7. 2019On the Relationship between Self-Attention and Convolutional Layerscited by 299
  8. 2024Rotary Position Embedding for Vision Transformercited by 226
  9. 2021Rethinking and Improving Relative Position Encoding for Vision Transformercited by 206
  10. 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalizationcited by 37
  11. 2022Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small Datasetscited by 28
  12. 2024VisionLLaMA: A Unified LLaMA Backbone for Vision Taskscited by 28
  13. 2024LieRE: Lie Rotational Positional Encodingscited by 16

Built on by

Not cited yet.