Explore the research collection
1 entry · Follow this search
- Paper
Latent Sparse Attention: Towards Subquadratic Ultra-Long Context Attention
Sparse attention whose indexer is subquadratic. The bottleneck the paper targets: at ultra-long context (above 1M tokens) full attention is prohibitive, and existing sparse-attention indexers - a dedicated module that selects a subset of keys per query - either still cost quadratically in context length or lose accuracy at that scale. Latent Sparse Attention (LSA) instead hierarchically clusters the keys in a learned latent space, and each query scores the hierarchy of clusters rather than every key, so selection cost grows subquadratically while prefill, decode, and training all get faster at long context. Two variants: Distilled-LSA (D-LSA), which retrofits a pretrained model via distillation, and Native-LSA (N-LSA), trained from scratch on the next-token loss alone. Headline results: on GLM-5.3-FLASH (Qwen-3.8-27B) at 10M tokens, D-LSA speeds up one attention layer by 22.7x in prefill and 4.6x in decode relative to that model's original sparse attention (72.4x and 42.5x relative to full attention), at similar accuracy across a variety of tasks; N-LSA matches full-attention accuracy with a 1.6x per-layer training speedup at 128k tokens. Caveats: the speedups are per attention layer, not end-to-end model throughput, and the abstract-level evidence is a single retrofit model at 10M plus native training at 128k - the regime where LSA wins (million-token contexts for long-horizon agentic work) is far beyond typical training contexts. In the catalog's attention-cost thread this is the learned-indexing alternative to fixed-structure sparsity: where a sliding-window hybrid (e.g. a 3:1 SWA:full mix) hard-codes which keys are reachable, LSA learns a key geometry and lets each query route through it - complementary to, not a replacement for, windowed attention at moderate context lengths.