Linearized Relative Positional Encoding
Not on the map. Why?
Abstract (arXiv)
Relative positional encoding is widely used in vanilla and linear transformers to represent positional information. However, existing encoding methods of a vanilla transformer are not always directly applicable to a linear transformer, because the latter requires a decomposition of the query and key representations into separate kernel functions. Nevertheless, principles for designing encoding methods suitable for linear transformers remain understudied. In this work, we put together a variety of existing linear relative positional encoding approaches under a canonical form and further propose a family of linear relative positional encoding algorithms via unitary transformation. Our formulation leads to a principled framework that can be used to develop new relative positional encoding methods that preserve linear space-time complexity. Equipped with different models, the proposed linearized relative positional encoding (LRPE) family derives effective encoding for various applications. Experiments show that compared with existing methods, LRPE achieves state-of-the-art performance in language modeling, text classification, and image classification. Meanwhile, it emphasizes a general paradigm for designing broadly more relative positional encoding methods that are applicable to linear transformers. The code is available at https://github.com/OpenNLPLab/Lrpe.
Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Builds on 38 of its 46 references that are in the map. First posted on arXiv 18 Jul 2023.
Builds on
38 of 46 references.
References · 38
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2020Training data-efficient image transformers & distillation through attentioncited by 4,560
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
26 more
- 2020Conformer: Convolution-augmented Transformer for Speech Recognitioncited by 1,838
- 2021ViViT: A Video Vision Transformercited by 1,610
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,041
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2021Random Feature Attentioncited by 350
- 2020Transformer Transducer: A Streamable Speech Recognition Model with Transformer Encoders and RNN-T Losscited by 232
- 2022cosFormer: Rethinking Softmax in Attentioncited by 212
- 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
- 2022Transformer Quality in Linear Timecited by 189
- 2020Fast Transformers with Clustered Attentioncited by 123
- 2022Should You Mask 15% in Masked Language Modeling?cited by 117
- 2022The Devil in Linear Transformercited by 98
- 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 84
- 2020Improve Transformer Models with Better Relative Position Embeddingscited by 73
- 2021CAPE: Encoding Relative Positions with Continuous Augmented Positional Embeddingscited by 47
- 2023Toeplitz Neural Network for Sequence Modelingcited by 43
- 2021Relative Positional Encoding for Transformers with Linear Complexitycited by 36
- 2022Vicinity Vision Transformercited by 22
- 2022Neural Architecture Search on Efficient Transformers and Beyondcited by 17
- 2021PermuteFormer: Efficient Relative Position Encoding for Long Sequencescited by 14
- 2022Locality Matters: A Locality-Biased Linear Attention for Automatic Speech Recognitioncited by 6
- 2022Linear Video Transformer with Feature Fixationcited by 6
- 2021Translational Equivariance in Kernelizable Attentioncited by 5
Built on by
Citing papers per year: 2023: 4; 2024: 7; 2025: 5; 2026: 1.
17 papers.
Sort:
By area:
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
- 2023Hierarchically Gated Recurrent Neural Network for Sequence Modelingcited by 100
- 2024Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Modelscited by 57
- 2023TransNormerLLM: A Faster and Better Large Language Model with Improved TransNormercited by 34
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 32
- 2024Various Lengths, Constant Speed: Efficient Language Modeling with Lightning Attentioncited by 31
- 2024You Only Scan Once: Efficient Multi-dimension Sequential Modeling with LightNetcited by 9
- 2023Exploring Transformer Extrapolationcited by 8
- 2024Linear Attention Sequence Parallelismcited by 8
- 2024Unlocking the Secrets of Linear Complexity Sequence Model from A Unified Perspectivecited by 6
- 2025Group Representational Position Encodingcited by 5
5 more
- 2024Test-time Cost-and-Quality Controllable Arbitrary-Scale Super-Resolution with Variable Fourier Componentscited by 1
- 2025Elucidating the Design Space of Decay in Linear Attentioncited by 1
- 2026RoLA: Rotary-Positioned Low-Rank Linear Attention for Efficient Diffusion Transformerscited by 1
- 2025Of All StrIPEs: Investigating Structure-informed Positional Encoding for Efficient Music Generationcited by 0
- 2025Efficient Cost-and-Quality Controllable Arbitrary-scale Super-resolution with Fourier Constraintscited by 0
- 2026RoLA: Rotary-Positioned Low-Rank Linear Attention for Efficient Diffusion Transformers6 Sep 2026
- 2025Group Representational Position Encoding8 Dec 2025
- 2025Efficient Cost-and-Quality Controllable Arbitrary-scale Super-resolution with Fourier Constraints28 Oct 2025
- 2025Elucidating the Design Space of Decay in Linear Attention5 Sep 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025
- 2025Of All StrIPEs: Investigating Structure-informed Positional Encoding for Efficient Music Generation7 Apr 2025
- 2024Test-time Cost-and-Quality Controllable Arbitrary-Scale Super-Resolution with Variable Fourier Components7 Dec 2024
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Length10 Jun 2024
- 2024You Only Scan Once: Efficient Multi-dimension Sequential Modeling with LightNet31 May 2024
- 2024Unlocking the Secrets of Linear Complexity Sequence Model from A Unified Perspective27 May 2024
- 2024Various Lengths, Constant Speed: Efficient Language Modeling with Lightning Attention27 May 2024
- 2024Linear Attention Sequence Parallelism3 Apr 2024
5 more
- 2024Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Models9 Jan 2024
- 2023Hierarchically Gated Recurrent Neural Network for Sequence Modeling8 Nov 2023
- 2023TransNormerLLM: A Faster and Better Large Language Model with Improved TransNormer27 Jul 2023
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Models20 Jul 2023
- 2023Exploring Transformer Extrapolation19 Jul 2023
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
- 2023Hierarchically Gated Recurrent Neural Network for Sequence Modelingcited by 100
- 2024Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Modelscited by 57
- 2023TransNormerLLM: A Faster and Better Large Language Model with Improved TransNormercited by 34
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 32
- 2024Various Lengths, Constant Speed: Efficient Language Modeling with Lightning Attentioncited by 31
- 2024You Only Scan Once: Efficient Multi-dimension Sequential Modeling with LightNetcited by 9
- 2023Exploring Transformer Extrapolationcited by 8
- 2024Linear Attention Sequence Parallelismcited by 8
- 2024Unlocking the Secrets of Linear Complexity Sequence Model from A Unified Perspectivecited by 6
- 2025Group Representational Position Encodingcited by 5
12 most cited of 16 All 16 (JSON)
- 2025Group Representational Position Encoding8 Dec 2025
- 2025Efficient Cost-and-Quality Controllable Arbitrary-scale Super-resolution with Fourier Constraints28 Oct 2025
- 2025Elucidating the Design Space of Decay in Linear Attention5 Sep 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025
- 2025Of All StrIPEs: Investigating Structure-informed Positional Encoding for Efficient Music Generation7 Apr 2025
- 2024Test-time Cost-and-Quality Controllable Arbitrary-Scale Super-Resolution with Variable Fourier Components7 Dec 2024
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Length10 Jun 2024
- 2024You Only Scan Once: Efficient Multi-dimension Sequential Modeling with LightNet31 May 2024
- 2024Unlocking the Secrets of Linear Complexity Sequence Model from A Unified Perspective27 May 2024
- 2024Various Lengths, Constant Speed: Efficient Language Modeling with Lightning Attention27 May 2024
- 2024Linear Attention Sequence Parallelism3 Apr 2024
- 2024Lightning Attention-2: A Free Lunch for Handling Unlimited Sequence Lengths in Large Language Models9 Jan 2024
12 newest of 16 All 16 (JSON)