Frayed RoPE and Long Inputs: A Geometric Perspective

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Wertheimer, Davis, Zhang, Aozhong, Liu, Derrick, Yin, Penghang, Wang, Naigang
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866914408235532288
author Wertheimer, Davis
Zhang, Aozhong
Liu, Derrick
Yin, Penghang
Wang, Naigang
author_facet Wertheimer, Davis
Zhang, Aozhong
Liu, Derrick
Yin, Penghang
Wang, Naigang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_18017
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Frayed RoPE and Long Inputs: A Geometric Perspective
Wertheimer, Davis
Zhang, Aozhong
Liu, Derrick
Yin, Penghang
Wang, Naigang
Machine Learning
Computation and Language
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.
title Frayed RoPE and Long Inputs: A Geometric Perspective
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2603.18017