Lune

ICLR2026Top-tier venue

Frayed RoPE and Long Inputs: A Geometric Perspective

Davis Wertheimer, Aozhong Zhang, Derrick Liu, Penghang Yin, Naigang Wang

Abstract

Rotary Positional Embedding (RoPE) is a widely adopted technique for encoding position in language models, which, while effective, causes performance breakdown when input length exceeds training length. Prior analyses assert (rightly) that long inputs cause channels to rotate “out of distribution,” but it is not clear how extra rotation relates to or causes pathological behavior. Through empirical and theoretical analysis we advance a unified geometric understanding of attention behavior with RoPE. We find that attention induces tight clustering of separated key and query latent point clouds, allowing for creation of sink tokens: placeholders that allow attention heads to avoid token mixing when not required. RoPE applied to longer inputs damages this key/query cluster separation, producing pathological behavior by inhibiting sink token functionality. From this geometric perspective, we propose RoPE-ID (In Distribution), a straightforward modification that allows attention layers to generalize to longer inputs out of the box: apply RoPE with high frequency to a subset of channels. We demonstrate the effectiveness of RoPE-ID for extended inputs using 1B and 3B parameter Transformers on the LongBench and RULER information retrieval benchmarks.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Streaming Language Models with Attention Sinks cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Efficient Streaming Language Models with Attention Sinks cites YaRN: Efficient Context Window Extension of Large Language Models
  • Scaling Laws of RoPE-based Extrapolation cites Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
  • Scaling Laws of RoPE-based Extrapolation cites YaRN: Efficient Context Window Extension of Large Language Models
  • LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens cites Efficient Streaming Language Models with Attention Sinks
  • LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens cites Scaling Laws of RoPE-based Extrapolation
  • LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens cites YaRN: Efficient Context Window Extension of Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on12

  1. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations
  2. Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 citations
  3. YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 citations
  4. LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu et al.ICML 2024 · 316 citations
  5. Scaling Laws of RoPE-based ExtrapolationXiaoran Liu, Hang Yan, Chenxin An, Xipeng Qiu et al.ICLR 2024 · 130 citations

Related papers

  1. LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without TrainingSikui Zhang, Guangze Gao, Ziyun Gan, Chunfeng Yuan et al.ACL Findings 2026
  2. The Rotary Position Embedding May Cause Dimension Inefficiency in Attention Heads for Long-Distance RetrievalTing-Rui Chiang, Dani YogatamaACL Findings 2025 · 1 citation
  3. HoPE: A Novel Positional Encoding Without Long-Term Decay for Enhanced Context Awareness and ExtrapolationYuhan Chen, Ang Lv, Jian Luan, Bin Wang et al.ACL 2025
  4. On the token distance modeling ability of higher RoPE attention dimensionXiangyu Hong, Che Jiang, Biqing Qi, Fandong Meng et al.EMNLP Findings 2024 · 2 citations
  5. LoL: Longer than Longer, Scaling Video Generation to HourJustin Cui, Jie Wu, Ming Li, Tao Yang et al.CVPR 2026 · 30 citations
Dusk over the sea between two cliffs drawn in fine vertical lines