Length Extrapolation of Transformers: A Survey from the Perspective of Positional Encoding
Not on the map. Why?
Abstract (arXiv)
Built upon the Transformer, large language models (LLMs) have captured worldwide attention due to their remarkable abilities. Nevertheless, all Transformer-based models including LLMs suffer from a preset length limit and can hardly generalize from short training sequences to longer inference ones, namely, they cannot perform length extrapolation to handle long sequences, which severely hinders their application in scenarios demanding long input sequences such as legal or scientific documents. Thus, numerous methods have emerged to enhance the length extrapolation of Transformers. Despite the great research efforts, a systematic survey is still lacking. To fill this gap, we delve into these advances in a unified notation from the perspective of positional encoding (PE), as it has been considered the primary factor on length extrapolation. Specifically, we begin with extrapolatable PEs that have dominated this research field. Then, we dive into extrapolation methods based on them, covering position interpolation and randomized position methods. Finally, several challenges and future directions in this area are highlighted. Through this survey, we aim to enable the reader to gain a deep understanding of existing methods and provide stimuli for future research.
Key facts. Cited by 32 papers in the map (data through 7 Oct 2026). Builds on 52 of its 94 references that are in the map. First posted on arXiv 28 Dec 2023.
Builds on
52 of 94 references.
References · 52
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2016Layer Normalizationcited by 5,579
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023Generative Agents: Interactive Simulacra of Human Behaviorcited by 3,500
38 more
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2018Neural Tangent Kernel: Convergence and Generalization in Neural Networkscited by 2,597
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2023Video-LLaVA: Learning United Visual Representation by Alignment Before Projectioncited by 1,385
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2018Self-Attention with Relative Position Representationscited by 1,112
- 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,100
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 814
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 319
- 2023Effective Long-Context Scaling of Foundation Modelscited by 301
- 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 243
- 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 232
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 211
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
- 2020Rethinking Positional Encoding in Language Pre-trainingcited by 197
- 2023ZeroSCROLLS: A Zero-Shot Benchmark for Long Text Understandingcited by 175
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 148
- 2023Scaling Laws of RoPE-based Extrapolationcited by 124
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
- 2021Position Information in Transformers: An Overviewcited by 103
- 2023Testing the General Deductive Reasoning Capacity of Large Language Models Using OOD Examplescited by 84
- 2020Improve Transformer Models with Better Relative Position Embeddingscited by 73
- 2021A Practical Survey on Faster and Lighter Transformerscited by 73
- 2023Generalization on the Unseen, Logic Reasoning and Degree Curriculumcited by 73
- 2020Learning to Encode Position for Transformer with Continuous Dynamical Modelcited by 61
- 2019Encoding word order in complex embeddingscited by 53
- 2021CAPE: Encoding Relative Positions with Continuous Augmented Positional Embeddingscited by 47
- 2022Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysiscited by 39
- 2021SHAPE: Shifted Absolute Position Embedding for Transformerscited by 37
- 2019Location Attention for Extrapolation to Longer Sequencescited by 33
- 2023Giraffe: Adventures in Expanding Context Lengths in LLMscited by 32
- 2021The Case for Translation-Invariant Self-Attention in Transformer-Based Language Modelscited by 23
- 2023Latent Positional Information is in the Self-Attention Variance of Transformer Language Models Without Positional Embeddingscited by 23
50 most cited of 52 All 52 (JSON)
Built on by
Citing papers per year: 2024: 8; 2025: 12; 2026: 12.
32 papers.
Sort:
By area:
- 2025In Prospect and Retrospect: Reflective Memory Management for Long-term Personalized Dialogue Agentscited by 102
- 2024TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selectioncited by 38
- 2025Understanding and Improving Length Generalization in Recurrent Modelscited by 19
- 2025Positional Encoding in Transformer-Based Time Series Models: A Surveycited by 13
- 2025Enhancing Latent Computation in Transformers with Latent Tokenscited by 13
- 2024Investigating Length Issues in Document-level Machine Translationcited by 10
- 2024Stuffed Mamba: Oversized States Lead to the Inability to Forgetcited by 7
- 2025Multiscale Byte Language Models -- A Hierarchical Architecture for Causal Million-Length Sequence Modelingcited by 7
- 2025Stronger Enforcement of Instruction Hierarchy via Augmented Intermediate Representationscited by 7
- 2024Positional encoding is not the same as context: A study on positional encoding for sequential recommendationcited by 4
- 2025ReGLA: Refining Gated Linear Attentioncited by 4
- 2024MESA: Effective Matching Redundancy Reduction by Semantic Area Segmentationcited by 3
20 more
- 2025Weak-to-Strong GraphRAG: Aligning Weak Retrievers with Large Language Models for Graph-based Retrieval Augmented Generationcited by 3
- 2025ILRe: Intermediate Layer Retrieval for Context Compression in Causal Language Modelscited by 3
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networkscited by 3
- 2025Collaborative Representation Learning for Alignment of Tactile, Language, and Vision Modalitiescited by 2
- 2026REAL: A Reasoning-Enhanced Graph Framework for Long-Term Memory Management of LLMscited by 2
- 2026nD-RoPE: A Generalized RoPE for n-Dimensional Position Embeddingcited by 2
- 2024MLissard: Multilingual Long and Simple Sequential Reasoning Benchmarkscited by 1
- 2025LayerNorm Induces Recency Bias in Transformer Decoderscited by 1
- 2026Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weightscited by 1
- 2026Attention's Gravitational Field:A Power-Law Interpretation of Positional Correlationcited by 1
- 2026Compressing History into Memory: Distilling Transformers into Recurrent Transformerscited by 1
- 2024GridPE: A Grid Cell-Inspired Unified Position Embedding for Arbitrary-Dimensional Spacescited by 0
- 2024Rethinking Associative Memory Mechanism in Induction Headcited by 0
- 2025Position as Probability: Self-Supervised Transformers that Think Past Their Training for Length Extrapolationcited by 0
- 2026Towards Infinite Length Extrapolation: A Unified Approachcited by 0
- 2026Circuit-Inspired High-Order Neural Networks with Unified Neural Dynamics Modeling for PDE Solving and Visual Perceptioncited by 0
- 2026On the Mirage of Long-Range Dependency, with an Application to Integer Multiplicationcited by 0
- 2026A Measure-Theoretic Analysis of Reasoning: Structural Generalization and Approximation Limitscited by 0
- 2026Out-of-Length Scene Text Recognition: A Two-Axis Diagnosis and a Training-Free Fixcited by 0
- 2026When Attention Goes Blind: Numerical Failure in ALiBi Positional Encodingscited by 0
- 2026When Attention Goes Blind: Numerical Failure in ALiBi Positional Encodings4 Aug 2026
- 2026Out-of-Length Scene Text Recognition: A Two-Axis Diagnosis and a Training-Free Fix25 Jul 2026
- 2026Compressing History into Memory: Distilling Transformers into Recurrent Transformers19 Jun 2026
- 2026nD-RoPE: A Generalized RoPE for n-Dimensional Position Embedding10 Jun 2026
- 2026REAL: A Reasoning-Enhanced Graph Framework for Long-Term Memory Management of LLMs9 Jun 2026
- 2026A Measure-Theoretic Analysis of Reasoning: Structural Generalization and Approximation Limits19 May 2026
- 2026On the Mirage of Long-Range Dependency, with an Application to Integer Multiplication30 Mar 2026
- 2026Circuit-Inspired High-Order Neural Networks with Unified Neural Dynamics Modeling for PDE Solving and Visual Perception25 Mar 2026
- 2026Attention's Gravitational Field:A Power-Law Interpretation of Positional Correlation6 Feb 2026
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networks2 Feb 2026
- 2026Mixture-of-Top-k Attention: Efficient Attention via Scalable Fast Weights1 Feb 2026
- 2026Towards Infinite Length Extrapolation: A Unified Approach3 Jan 2026
20 more
- 2025Collaborative Representation Learning for Alignment of Tactile, Language, and Vision Modalities14 Nov 2025
- 2025LayerNorm Induces Recency Bias in Transformer Decoders25 Sep 2025
- 2025ILRe: Intermediate Layer Retrieval for Context Compression in Causal Language Models25 Aug 2025
- 2025Understanding and Improving Length Generalization in Recurrent Models3 Jul 2025
- 2025Weak-to-Strong GraphRAG: Aligning Weak Retrievers with Large Language Models for Graph-based Retrieval Augmented Generation26 Jun 2025
- 2025Position as Probability: Self-Supervised Transformers that Think Past Their Training for Length Extrapolation1 Jun 2025
- 2025Stronger Enforcement of Instruction Hierarchy via Augmented Intermediate Representations25 May 2025
- 2025Enhancing Latent Computation in Transformers with Latent Tokens19 May 2025
- 2025In Prospect and Retrospect: Reflective Memory Management for Long-term Personalized Dialogue Agents11 Mar 2025
- 2025Multiscale Byte Language Models -- A Hierarchical Architecture for Causal Million-Length Sequence Modeling20 Feb 2025
- 2025Positional Encoding in Transformer-Based Time Series Models: A Survey17 Feb 2025
- 2025ReGLA: Refining Gated Linear Attention3 Feb 2025
- 2024Investigating Length Issues in Document-level Machine Translation23 Dec 2024
- 2024Rethinking Associative Memory Mechanism in Induction Head16 Dec 2024
- 2024TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selection5 Nov 2024
- 2024Stuffed Mamba: Oversized States Lead to the Inability to Forget9 Oct 2024
- 2024MLissard: Multilingual Long and Simple Sequential Reasoning Benchmarks8 Oct 2024
- 2024MESA: Effective Matching Redundancy Reduction by Semantic Area Segmentation1 Aug 2024
- 2024GridPE: A Grid Cell-Inspired Unified Position Embedding for Arbitrary-Dimensional Spaces11 Jun 2024
- 2024Positional encoding is not the same as context: A study on positional encoding for sequential recommendation16 May 2024
- 2026REAL: A Reasoning-Enhanced Graph Framework for Long-Term Memory Management of LLMscited by 2
- 2024MLissard: Multilingual Long and Simple Sequential Reasoning Benchmarkscited by 1
- 2024Rethinking Associative Memory Mechanism in Induction Headcited by 0
- 2026A Measure-Theoretic Analysis of Reasoning: Structural Generalization and Approximation Limitscited by 0
- 2026REAL: A Reasoning-Enhanced Graph Framework for Long-Term Memory Management of LLMs9 Jun 2026
- 2026A Measure-Theoretic Analysis of Reasoning: Structural Generalization and Approximation Limits19 May 2026
- 2024Rethinking Associative Memory Mechanism in Induction Head16 Dec 2024
- 2024MLissard: Multilingual Long and Simple Sequential Reasoning Benchmarks8 Oct 2024
- 2025Understanding and Improving Length Generalization in Recurrent Modelscited by 19
- 2025Positional Encoding in Transformer-Based Time Series Models: A Surveycited by 13
- 2025Enhancing Latent Computation in Transformers with Latent Tokenscited by 13
- 2024Investigating Length Issues in Document-level Machine Translationcited by 10
- 2025Multiscale Byte Language Models -- A Hierarchical Architecture for Causal Million-Length Sequence Modelingcited by 7
- 2024Positional encoding is not the same as context: A study on positional encoding for sequential recommendationcited by 4
- 2025ReGLA: Refining Gated Linear Attentioncited by 4
- 2024MESA: Effective Matching Redundancy Reduction by Semantic Area Segmentationcited by 3
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networkscited by 3
- 2025Collaborative Representation Learning for Alignment of Tactile, Language, and Vision Modalitiescited by 2
- 2026nD-RoPE: A Generalized RoPE for n-Dimensional Position Embeddingcited by 2
- 2025LayerNorm Induces Recency Bias in Transformer Decoderscited by 1
12 most cited of 21 All 21 (JSON)
- 2026When Attention Goes Blind: Numerical Failure in ALiBi Positional Encodings4 Aug 2026
- 2026Out-of-Length Scene Text Recognition: A Two-Axis Diagnosis and a Training-Free Fix25 Jul 2026
- 2026Compressing History into Memory: Distilling Transformers into Recurrent Transformers19 Jun 2026
- 2026nD-RoPE: A Generalized RoPE for n-Dimensional Position Embedding10 Jun 2026
- 2026On the Mirage of Long-Range Dependency, with an Application to Integer Multiplication30 Mar 2026
- 2026Circuit-Inspired High-Order Neural Networks with Unified Neural Dynamics Modeling for PDE Solving and Visual Perception25 Mar 2026
- 2026Attention's Gravitational Field:A Power-Law Interpretation of Positional Correlation6 Feb 2026
- 2026On the Spatiotemporal Dynamics of Generalization in Neural Networks2 Feb 2026
- 2026Towards Infinite Length Extrapolation: A Unified Approach3 Jan 2026
- 2025Collaborative Representation Learning for Alignment of Tactile, Language, and Vision Modalities14 Nov 2025
- 2025LayerNorm Induces Recency Bias in Transformer Decoders25 Sep 2025
- 2025Understanding and Improving Length Generalization in Recurrent Models3 Jul 2025
12 newest of 21 All 21 (JSON)