Paper

Hierarchical Sparse Attention Done Right: Toward Infinite Context Modeling

Instead of selecting chunks with detached summaries, it learns chunk routing from LM loss by fusing per-chunk attention outputs using retrieval scores.

arXiv ↗Jul 3, 2026Code ↗

  • nlp
  • llm
  • sparse attention
  • long-context modeling
  • transformers
Method diagram comparing naive block sparse attention vs proposed HiLS-Attention
Method diagram comparing naive block sparse attention vs proposed HiLS-Attention

What it is

A sparse LLM attention that learns chunk retrieval under LM loss, matching full attention in-domain while extrapolating to ultra-long contexts with faster inference. Unlike prior chunk-wise sparse attention with fixed or weak chunk scoring, HiLS puts retrieval scores into the forward attention so chunk selection is learned end-to-end. It uses hierarchical chunk-then-token attention with learned landmark summaries for native sparse training.

Key results

  • 90.7% RULER EM at 256K after 8K training; full-attn YaRN baseline collapses
  • 9.3x faster prefill and 15.7x faster decode than full attention at 512K
  • After 50B continued training, LongBench >8K overall 33.6 vs 32.9 for full attention

End-to-end learned sparse retrieval can beat full attention on long-context use while also improving efficiency and length extrapolation.

One useful ML email a week.

Worth your time, not all of your time.

We track new ML work across papers, code, and data, then keep only the pieces worth a closer look. Selected, not collected.

Papers.Data.Code

The Weekly ML Signal

Selected, not collected.

One useful ML email a week: the papers, repos and datasets worth your attention.

Worth your time, not all of your time.