Content-Based Addressing for Long Context
Abstract
Rotary position embedding (RoPE) uses each token's integer position to determine the rotation applied inside attention. This works well for local token order, but increasing context length creates a positional train-test mismatch: RoPE produces relative rotations at offsets not seen during training. Methods that rescale, interpolate, randomize, or bias positions specify how attention handles those offsets, but still derive positional information from a growing token counter. We instead divide a token stream into units, retain ordinary RoPE positions within each unit, and assign every completed unit an address computed from its content. Adding units then applies the same learned map to new content rather than extending a positional range or an identifier table. We prove that this construction preserves local RoPE exactly, leaves the attention comparison between two fixed tokens unchanged when other units are inserted or reordered, and does not create new relative rotations merely because more units are added. In a character-level Tiny Shakespeare diagnostic, all-token validation perplexity remains approximately constant from contexts of 256 to 4096 characters. A second diagnostic shows that content-based addressing can retrieve and use information from multiple serialized facts. These are controlled shallow experiments, not scale benchmarks, but they support a direct prescription: use position to address locally and content to address across units.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
Related papers
Refusal Is Not Scored: A Coverage Limit in Content-Based Bias Evaluation
Shared title terminologycs.CLAfifah Kashif, Malak Sadek, Jin Huang et al.
CEDAR: Error-Bounded Residual Routing for Efficient Long-Context Attention
Shared title terminologycs.CLSiyu Li, Dong Wang, Jie Zhou et al.
Which Part of the Context Layer Does the Work? Separating Semantic Content from Retrieval Scaffolding in Text-to-SQL Agents
Shared title terminologycs.CLQing Ye
PARSER: Read in Parallel, Reason in Depth for Long-Context LLM Agents
Shared title terminologycs.CLKun Li, Zexuan Qiu, Tianhua Zhang et al.
NORMCRAFT: Cultural Norm Generation for Context-Aware Language Model Alignment
Shared title terminologycs.CLTangyuan Zhang, Zhuang Li, Fatemeh Shiri et al.
CoT-Proxy: Cross-Format Transfer for Distilling Long-Horizon Policies
Shared title terminologycs.CLDawid J. Kopiczko, Tijmen Blankevoort, Yuki M. Asano