atlas

Research map / Architectures and efficiency / Attention and transformers

The Role of Sparsity for Length Generalization in LLMs

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: Attention head mechanisms

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes a theoretical framework showing length generalization in next-token prediction holds when each token depends on a small fixed number of previous tokens (sparsity), and introduces Predictive Position Coupling to extend position coupling to input-dependent position IDs.

Problem

Length generalization of decoder-only transformers beyond training context length lacks a principled explanation; it is unclear which structural properties of data enable it.

Approach

Models next-token prediction with k-sparse planted correlations and sparse functional attention; proves length generalization when sparsity is fixed and hypothesis class is local, shows position coupling removes the locality requirement, and proposes Predictive Position Coupling where the transformer predicts its own coupled position IDs.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Keep test sparsity at or below the training sparsityGPT-NeoX with RoPE and PoSE on sparse parity · Sparse parity, lengths up to 500accuracyHelped
Increase test sparsity beyond the training sparsityGPT-NeoX with RoPE and PoSE on sparse parity · Sparse parity, lengths up to 500accuracyHurt
Increase sparsity while holding training sparsity fixedGPT-NeoX with RoPE and PoSE on sparse parity · Sparse parityaccuracyHurt
Use shorter scratchpad jumpsPredictive Position Coupling on parity with scratchpad · Parity with scratchpadaccuracyHelped
Predict input-dependent coupled position IDsGPT-NeoX on variable assignment with scratchpad · Variable assignmentexact sequence accuracyHelped
Remove position coupling (ablation)GPT-NeoX on variable assignment with scratchpad · Variable assignmentexact sequence accuracyHurt
Remove the scratchpad (ablation)GPT-NeoX on variable assignment · Variable assignmentexact sequence accuracyHurt
Use RoPE with PoSE instead of Predictive Position Coupling (ablation)GPT-NeoX on variable assignment · Variable assignmentexact sequence accuracyHurt
Use 5 influential tokens from the first 64 positions instead of all tokens in those positionsShort-context transformer with PoSE · C4, context length 128cross-entropy loss differenceNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: C4 synthetic sparse parity synthetic scratchpad parity variable assignment synthetic task

Benchmarks: C4 perplexity synthetic sparse parity synthetic parity with scratchpad variable assignment with scratchpad

Metrics: accuracy cross-entropy loss perplexity

Baselines: RoPE with PoSE position coupling without prediction ignore-distant-tokens baseline

Builds on: position coupling PoSE RoPE Abacus embeddings

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy