[KongchangAI]
ConceptSparse Attention / 稀疏注意力机制

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

Timeline (last 90 days)

Dec 4

Qwen4-35B-A3B uses a hybrid of linear attention and sparse attention, which can speed up processing of long inputs and significantly compress KV cache usage.

Unverified50%
Dec 1

Under a near-random input distribution, the sparse-attention model's accuracy in computing the Andreev function is barely better than random guessing, whereas the full-attention model solves it perfectly.

Unverified50%
Dec 1

This theoretical lower bound is based on a specific function and average-case analysis; actual model performance is also affected by multiple factors such as training data, scale, and architectural details.

Unverified50%
Dec 1

The expressiveness gap between sparse attention and full attention in computing the Andreev function is fundamental and cannot be bridged by increasing sparsity.

Unverified50%
Nov 30

Sparse attention typically reuses position encodings designed for dense attention directly, ignoring that sparsification itself changes the context range each query attends to.

Unverified50%
Nov 30

Sparse attention should not merely be viewed as a compromise under computational constraints, but can serve as an opportunity to improve long-context modeling.

Unverified50%
Nov 30

When position rotation depends on the query, the keys for each query require different rotations, breaking the reusability of rotated keys and potentially largely offsetting the efficiency advantages of sparse attention.

Unverified50%
Nov 30

RiRoPE (ReIndexing RoPE) is a sparse attention position encoding method that natively incorporates position reindexing into training, with the rule: for each query, the selected tokens are assigned consecutive position numbers in their original sequence order, and this rule is consistent between training and inference.

Unverified50%
Nov 29

GLM 5.4 uses sparse attention, selecting only the 2,048 most critical positions in the text, and the second loop looks at the same positions; z.ai stated this adds almost no extra overhead and the effect is close to re-selecting.

Unverified60%
Nov 28

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.

Unverified60%

28 more timeline events

All Facts (20)

Verified

Continued advances in inference optimization techniques such as speculative decoding, model distillation, and KV Cache optimization are rapidly reducing the cost per inference.

90%
Verified

Informer reduces the self-attention computation complexity from O(n²) to O(n log n) through ProbSparse sparse attention.

80%
Verified

Solutions for streaming processing include causal attention masking, chunked attention, and look-ahead buffering

75%
Verified

Qwen3.5 uses a hybrid attention architecture that mixes Gated Delta Net (a linear attention variant) with Gated Attention (standard attention).

65%
Unverified

GLM 5.4 uses sparse attention, selecting only the 2,048 most critical positions in the text, and the second loop looks at the same positions; z.ai stated this adds almost no extra overhead and the effect is close to re-selecting.

60%
Unverified

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.

60%
Unverified

Adopting 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%
Unverified

An 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%
Unverified

Industry 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%
Unverified

Sliding 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%
Unverified

Qwen4-35B-A3B uses a hybrid of linear attention and sparse attention, which can speed up processing of long inputs and significantly compress KV cache usage.

50%
Unverified

The expressiveness gap between sparse attention and full attention in computing the Andreev function is fundamental and cannot be bridged by increasing sparsity.

50%
Unverified

This theoretical lower bound is based on a specific function and average-case analysis; actual model performance is also affected by multiple factors such as training data, scale, and architectural details.

50%
Unverified

Under a near-random input distribution, the sparse-attention model's accuracy in computing the Andreev function is barely better than random guessing, whereas the full-attention model solves it perfectly.

50%
Unverified

Sparse attention should not merely be viewed as a compromise under computational constraints, but can serve as an opportunity to improve long-context modeling.

50%
Unverified

When position rotation depends on the query, the keys for each query require different rotations, breaking the reusability of rotated keys and potentially largely offsetting the efficiency advantages of sparse attention.

50%
Unverified

Sparse attention typically reuses position encodings designed for dense attention directly, ignoring that sparsification itself changes the context range each query attends to.

50%
Unverified

RiRoPE (ReIndexing RoPE) is a sparse attention position encoding method that natively incorporates position reindexing into training, with the rule: for each query, the selected tokens are assigned consecutive position numbers in their original sequence order, and this rule is consistent between training and inference.

50%
Unverified

GLM-5.4 places one indexer in each of the first two Prelude layers, and subsequent layers reuse the already-selected TopK indices.

50%
Unverified

GLM-5.4's three engineering changes: gated progressive update (independent per-token gating each round, written back proportionally to the residual stream), hybrid KV cache (the second round reuses the first round's sparse KV, retaining only the sliding-window KV newly generated in the current round), and direct reuse of the first round's sparse attention indices.

50%

Source Articles