首页 > AI前沿 > Explaining Length Extrapolation Across Attention Architectures

Explaining Length Extrapolation Across Attention Architectures

arXiv自然语言 2026-11-30 15:50 6 阅读 查看原文

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.