The paper analyzes how choice of positional encoding (PE) in language models affects the mechanisms used for in-context retrieval. Across 22 open-weight models from eight families, standard RoPE models rely on positional retrieval (location of tokens), while PE hybrids like SWA NoPE (sliding-window attention with NoPE in global layers) shift to semantic retrieval (content-based). Controlled pre-training ablations show that confining positional encoding to local layers degrades representations of positional information, driving this shift. This mechanism change explains a key trade-off: SWA NoPE improves retrieval on multiple-target tasks and question answering but degrades when distinguishing between semantically similar keys. The result shows that long-context gains of hybrids reflect a shift in retrieval strategy, not uniform improvement.
Positional encoding choice shifts retrieval from positional to semantic mechanisms
Hybrid architectures like SWA NoPE rely more on semantic retrieval than standard RoPE, altering long-context performance.
Academic
Eric Enouen · Sainyam Galhotra
Cornell University
Research Digest··2 min read
Thread:Hidden-State Steering
In one line
Hybrid positional encodings shift language models from positional to semantic in-context retrieval, trading off performance.
Before you read this
Two ideas this paper builds onmechanistic interpretabilityThe study of how neural networks compute through internal circuits, features, and causal interventions, rather than just input-output behavior.144 papers →hybrid attentionCombining different attention types (e.g., linear and full) or positional/semantic strategies in one model to balance efficiency, accuracy, and memory.22 papers →
Read it as
The authors studied how positional encoding (PE) choice shapes the internal mechanisms language models use for in-context retrieval across 22 open-weight models from eight families.
The authors analyzed 22 open-weight models spanning eight families using to classify retrieval mechanisms (positional, lexical, and reflexive).
How it works
before and afterThe Daily Edition
The front page in your inbox each weekday morning: the lead, the picks, and why each one earned its place.