Explaining Length Extrapolation Across Attention Architectures
Abstract
Long-context modeling supports document understanding and long-horizon interaction. Selective access to the key-value cache offers one way to process very long contexts, with recent methods enabling retrieval far beyond the training window. However, poor length generalization in attention limits the context length over which models can reliably retrieve information. Although prior work has improved extrapolation through positional encoding, attention scaling, and sparse retrieval, some methods remain limited in range. What enables some attention architectures to retrieve evidence reliably far beyond the training window remains unclear. Through controlled comparisons of positional encodings and attention architectures, we jointly analyze positional generalization, attention entropy stability, and evidence retrieval accuracy to explain the observed extrapolation gaps. First, our probes suggest that a model without explicit positional encoding can still overfit to absolute-position patterns learned within the training window. Second, we find that architectures using the same positional encoding can maintain similarly stable attention entropy yet differ sharply in how highly they rank the required evidence. Third, our comparisons within a single architecture show that changing the positional encoding affects both entropy drift and evidence ranking at longer lengths. These findings explain how positional generalization, attention stability, and evidence selection jointly support reliable retrieval far beyond the training window.
Create a lesson
Related papers
Distilling Language Knowledge Across Generative Processes
Shared title terminologycs.CLYangtian Zhang, Yizhe Zhang, Hanqing Zeng et al.
DLA: Decomposed Latent Attention for Looped Language Models
Shared title terminologycs.CLZhenhe Wu, Weihua He, Xinlai Kang et al.
Explainable Oracle Bone Script Recognition via Multimodal Pictographic Reasoning
Shared title terminologycs.CLYin Wu, Zhengxuan Zhang, Jiayu Chen et al.
Silent Blending in Cross-Paradigm Health Agents: Paradigm-Aware Retrieval for Disclosing Disagreement Across Allopathic, Ayurvedic and Fitness Knowledge
Shared title terminologycs.CLHarshul Jain, Parv Khatri, Tanya Sah et al.
Language diversity displays divergent patterns across the global digital divide
Shared title terminologycs.CLHannes Essfors, Katharina Zeh, Juliane Benson et al.
Native Compressed Attention: Trainable Attention with Non-Uniform KV Compression
Shared title terminologycs.CLYaosheng Fu