cs.LGFeb 24, 2026

Frayed RoPE and Long Inputs: A Geometric Perspective

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

Organizations: IBM Research · University at Albany, SUNY

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.

Figures & tables

Appendix figures & tables39 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provably

    May 15, 2026Yufeng Du, Phillip Harris, Minyang Tian +5Rotary Positional EmbeddingsSelf-Attention

  2. Remember to Forget: Gated Adaptive Positional Encoding

    May 11, 2026Riccardo Ali, Alessio Borgi, Mario Severino +2Rotary Positional EmbeddingsSelf-Attention

  3. WavePrune: One period is often enough for RoPE

    Oct 3, 2026Guancheng Du, Luotian Huang, Shaowen Wang +2Rotary Positional EmbeddingsPositional Encoding