Sparse Attention
A technical approach for improving the Transformer attention mechanism by retaining only high-value attention connections rather than computing full pairwise token interactions, thereby reducing computational complexity from O(n²). Common implementations include sliding-window attention and hybrid global-plus-local attention, and the technique serves as a core method for enabling ultra-long context processing.
Core Facts
Solutions for streaming processing include causal attention masking, chunked attention, and look-ahead buffering
Informer reduces the self-attention computation complexity from O(n²) to O(n log n) through ProbSparse sparse attention.
Qwen3.5 uses a hybrid attention architecture that mixes Gated Delta Net (a linear attention variant) with Gated Attention (standard attention).
Timeline (last 90 days)
GLM-5.4 uses a hybrid KV Cache, sharing the sparse KV of the first round across rounds while placing newly generated KV from the second round into a sliding window, to control memory costs under million-token contexts.
GLM-5.4 places one indexer in each of the first two Prelude layers, and subsequent layers reuse the already-selected TopK indices.
The idea of sparse attention is to let each token attend to only some positions, reducing complexity to near O(n).
Almost all sparse attention methods focus on the token dimension—skipping interactions between certain tokens; HiSA instead chooses the hidden dimension, a less-explored direction.
Applying sparse attention directly to block diffusion language models does not fully solve the problem, for reasons including: different queries may select different pages, causing the block-level collective read set to balloon; repeatedly building the support set adds overhead; and permanent eviction may discard information needed later.
Under extreme sparsity, the overhead of reading indices and indirect addressing may exceed the cost of directly computing dense attention, turning the sparsity benefit negative.
Developers should not directly move sparse attention implementations from papers into production environments; they need to validate the actual throughput of the sparsity pattern on their own hardware and target workloads, with particular attention to latency performance in the decode phase.
If the sparsity pattern cannot reduce the amount of KV data actually read, the speedup in the decode phase will be very limited.
The optimal sparsity degree of the same sparsity scheme differs across GPU generations, which is why general-purpose sparsity libraries struggle to achieve consistent speedups across platforms.
In tensor parallel mode, attention heads are partitioned across different GPUs, and each card holds only the low-rank factors of some attention partitions; if each partition fits its low-rank representation independently, the compression gains are partially offset by cross-card communication.
19 more timeline events
All Facts (20)
Solutions for streaming processing include causal attention masking, chunked attention, and look-ahead buffering
75%VerifiedInformer reduces the self-attention computation complexity from O(n²) to O(n log n) through ProbSparse sparse attention.
70%VerifiedQwen3.5 uses a hybrid attention architecture that mixes Gated Delta Net (a linear attention variant) with Gated Attention (standard attention).
65%Unverified推测解码、模型蒸馏、KV Cache优化等推理优化技术的持续进步正在使单位推理成本快速下降
85%UnverifiedGLM-5.4 uses a hybrid KV Cache, sharing the sparse KV of the first round across rounds while placing newly generated KV from the second round into a sliding window, to control memory costs under million-token contexts.
60%UnverifiedAdopting sparse attention can compress the KV cache to approximately 1/4, supporting approximately 4 times the context length of full attention under the same memory budget.
60%UnverifiedAn overly long context dilutes the model's attention to the current task, and trimming the context often leads to more focused and accurate AI output.
60%UnverifiedIndustry solutions for improving long-context attention decay include sparse attention, sliding window attention, and RoPE positional encoding extrapolation, but currently no solution can completely eliminate this fundamental limitation.
60%UnverifiedSliding window attention (such as the approach adopted by Mistral) reduces complexity from O(n²) to O(n·w) by limiting each token to attending only to history within a fixed window.
60%UnverifiedGLM-5.4 places one indexer in each of the first two Prelude layers, and subsequent layers reuse the already-selected TopK indices.
50%UnverifiedThe idea of sparse attention is to let each token attend to only some positions, reducing complexity to near O(n).
50%UnverifiedAlmost all sparse attention methods focus on the token dimension—skipping interactions between certain tokens; HiSA instead chooses the hidden dimension, a less-explored direction.
50%UnverifiedApplying sparse attention directly to block diffusion language models does not fully solve the problem, for reasons including: different queries may select different pages, causing the block-level collective read set to balloon; repeatedly building the support set adds overhead; and permanent eviction may discard information needed later.
50%UnverifiedUnder extreme sparsity, the overhead of reading indices and indirect addressing may exceed the cost of directly computing dense attention, turning the sparsity benefit negative.
50%UnverifiedDevelopers should not directly move sparse attention implementations from papers into production environments; they need to validate the actual throughput of the sparsity pattern on their own hardware and target workloads, with particular attention to latency performance in the decode phase.
50%UnverifiedIf the sparsity pattern cannot reduce the amount of KV data actually read, the speedup in the decode phase will be very limited.
50%UnverifiedThe optimal sparsity degree of the same sparsity scheme differs across GPU generations, which is why general-purpose sparsity libraries struggle to achieve consistent speedups across platforms.
50%UnverifiedIn tensor parallel mode, attention heads are partitioned across different GPUs, and each card holds only the low-rank factors of some attention partitions; if each partition fits its low-rank representation independently, the compression gains are partially offset by cross-card communication.
50%UnverifiedMost existing sparse attention methods require retraining or fine-tuning the model for the sparsity pattern, resulting in high migration costs.
50%UnverifiedSparse attention usually involves a trade-off between quality and speed, and skipping some attention connections may cause loss of detail or weakened long-range dependencies.
50%