Theoretical Analysis of Positional Encodings in Transformer Models: Impact on Expressiveness and Generalization
Not on the map. Why?
Abstract (arXiv)
Positional encodings are a core part of transformer-based models, enabling processing of sequential data without recurrence. This paper presents a theoretical framework to analyze how various positional encoding methods, including sinusoidal, learned, relative, and bias-based methods like Attention with Linear Biases (ALiBi), impact a transformer's expressiveness, generalization ability, and extrapolation to longer sequences. Expressiveness is defined via function approximation, generalization bounds are established using Rademacher complexity, and new encoding methods based on orthogonal functions, such as wavelets and Legendre polynomials, are proposed. The extrapolation capacity of existing and proposed encodings is analyzed, extending ALiBi's biasing approach to a unified theoretical context. Experimental evaluation on synthetic sequence-to-sequence tasks shows that orthogonal transform-based encodings outperform traditional sinusoidal encodings in generalization and extrapolation. This work addresses a critical gap in transformer theory, providing insights for design choices in natural language processing, computer vision, and other transformer applications.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 15 of its 24 references that are in the map. First posted on arXiv 5 Jun 2025.
Builds on
15 of 24 references.
References · 15
- 2017Attention Is All You Needcited by 60,361
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2020Fourier Features Let Networks Learn High Frequency Functions in Low Dimensional Domainscited by 2,200
- 2018Self-Attention with Relative Position Representationscited by 1,120
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
- 2018Efficient Attention: Attention with Linear Complexitiescited by 368
- 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
- 2021AutoFormer: Searching Transformers for Visual Recognitioncited by 188
- 2019Transformers without Tears: Improving the Normalization of Self-Attentioncited by 153
3 more
Built on by
Citing papers per year: 2025: 1.
1 paper.