Understanding the RoPE Extensions of Long-Context LLMs: An Attention Perspective
Not on the map. Why?
Abstract (arXiv)
Enabling LLMs to handle lengthy context is currently a research hotspot. Most LLMs are built upon rotary position embedding (RoPE), a popular position encoding method. Therefore, a prominent path is to extrapolate the RoPE trained on comparably short texts to far longer texts. A heavy bunch of efforts have been dedicated to boosting the extrapolation via extending the formulations of the RoPE, however, few of them have attempted to showcase their inner workings comprehensively. In this paper, we are driven to offer a straightforward yet in-depth understanding of RoPE extensions from an attention perspective and on two benchmarking tasks. A broad array of experiments reveals several valuable findings: 1) Maintaining attention patterns to those at the pretrained length improves extrapolation; 2) Large attention uncertainty leads to retrieval errors; 3) Using longer continual pretraining lengths for RoPE extensions could reduce attention uncertainty and significantly enhance extrapolation.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 17 of its 30 references that are in the map. First posted on arXiv 19 Jun 2024.
Builds on
17 of 30 references.
References · 17
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023Qwen Technical Reportcited by 3,273
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2024DeepSeek LLM: Scaling Open-Source Language Models with Longtermismcited by 621
- 2024Large Language Models: A Surveycited by 506
- 2020How Can We Know When Language Models Know? On the Calibration of Language Models for Question Answeringcited by 439
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2023Scaling Laws of RoPE-based Extrapolationcited by 124
5 more
- 2023Evaluating Open-Domain Question Answering in the Era of Large Language Modelscited by 110
- 2024Base of RoPE Bounds Context Lengthcited by 49
- 2024Can Perplexity Reflect Large Language Model's Ability in Long Text Understanding?cited by 45
- 2023Towards the Law of Capacity Gap in Distilling Language Modelscited by 41
- 2024Extending LLMs' Context Window with 100 Samplescited by 20
Built on by
Citing papers per year: 2024: 4; 2025: 4; 2026: 5.
13 papers.
Sort:
By area:
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2024Dynamic Planning for LLM-based Graphical User Interface Automationcited by 19
- 2026Train Short, Inference Long: Training-free Horizon Extension for Autoregressive Video Generationcited by 9
- 2025The Power of Personality: A Human Simulation Perspective to Investigate Large Language Model Agentscited by 8
- 2024ZigZagkv: Dynamic KV Cache Compression for Long-context Modeling based on Layer Uncertaintycited by 7
- 2026Rotary Positional Embeddings as Phase Modulation: Theoretical Bounds on the RoPE Base for Long-Context Transformerscited by 6
- 2026RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provablycited by 6
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attentioncited by 2
- 2024TF-Attack: Transferable and Fast Adversarial Attacks on Large Language Modelscited by 1
- 2025On Pretraining for Project-Level Code Completioncited by 1
- 2025NeedleChain: Measuring Intact Context Comprehension Capability of Large Language Modelscited by 0
- 2026Towards Infinite Length Extrapolation: A Unified Approachcited by 0
- 2026RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provably15 May 2026
- 2026ExtraVAR: Stage-Aware RoPE Remapping for Resolution Extrapolation in Visual Autoregressive Models11 May 2026
- 2026Train Short, Inference Long: Training-free Horizon Extension for Autoregressive Video Generation15 Feb 2026
- 2026Rotary Positional Embeddings as Phase Modulation: Theoretical Bounds on the RoPE Base for Long-Context Transformers11 Feb 2026
- 2026Towards Infinite Length Extrapolation: A Unified Approach3 Jan 2026
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attention22 Oct 2025
- 2025On Pretraining for Project-Level Code Completion15 Oct 2025
- 2025NeedleChain: Measuring Intact Context Comprehension Capability of Large Language Models30 Jul 2025
- 2025The Power of Personality: A Human Simulation Perspective to Investigate Large Language Model Agents28 Feb 2025
- 2024ZigZagkv: Dynamic KV Cache Compression for Long-context Modeling based on Layer Uncertainty12 Dec 2024
- 2024Why Does the Effective Context Length of LLMs Fall Short?24 Oct 2024
- 2024Dynamic Planning for LLM-based Graphical User Interface Automation1 Oct 2024
1 more
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 60
- 2024Dynamic Planning for LLM-based Graphical User Interface Automationcited by 19
- 2026Rotary Positional Embeddings as Phase Modulation: Theoretical Bounds on the RoPE Base for Long-Context Transformerscited by 6
- 2026RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provablycited by 6
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attentioncited by 2
- 2024TF-Attack: Transferable and Fast Adversarial Attacks on Large Language Modelscited by 1
- 2025On Pretraining for Project-Level Code Completioncited by 1
- 2025NeedleChain: Measuring Intact Context Comprehension Capability of Large Language Modelscited by 0
- 2026Towards Infinite Length Extrapolation: A Unified Approachcited by 0
- 2026ExtraVAR: Stage-Aware RoPE Remapping for Resolution Extrapolation in Visual Autoregressive Modelscited by 0
- 2026RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provably15 May 2026
- 2026ExtraVAR: Stage-Aware RoPE Remapping for Resolution Extrapolation in Visual Autoregressive Models11 May 2026
- 2026Rotary Positional Embeddings as Phase Modulation: Theoretical Bounds on the RoPE Base for Long-Context Transformers11 Feb 2026
- 2026Towards Infinite Length Extrapolation: A Unified Approach3 Jan 2026
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attention22 Oct 2025
- 2025On Pretraining for Project-Level Code Completion15 Oct 2025
- 2025NeedleChain: Measuring Intact Context Comprehension Capability of Large Language Models30 Jul 2025
- 2024Why Does the Effective Context Length of LLMs Fall Short?24 Oct 2024
- 2024Dynamic Planning for LLM-based Graphical User Interface Automation1 Oct 2024
- 2024TF-Attack: Transferable and Fast Adversarial Attacks on Large Language Models26 Aug 2024