首页 > AI前沿 > Sparse Attention with Entropy-Triggered KV Refresh

Sparse Attention with Entropy-Triggered KV Refresh

arXiv自然语言 2026-11-28 05:07 3 阅读 查看原文

Sparse attention reduces the per-step decoding cost of language models trained with full attention. However, it can lengthen generations and lower accuracy, offsetting the per-step savings with additional tokens. We find that sparse-attention errors are most detrimental at steps where the full-attention next-token entropy is high: applying sparse attention only at these steps degrades accuracy far more than applying it at an equal number of random steps. We further find that at these high-entropy steps, most of the degradation stems from errors accumulated into the key-value (KV) cache during earlier sparse decoding, so even attending to the entire cache at such steps results in performance degradation.

Motivated by these findings, we propose SparseRepairer, a method which uses sparse next-token entropy to trigger a KV refresh - a full-attention pass that recomputes and replaces the cached KV states to yield the dense next-token distribution for sampling.

Across three reasoning models and four benchmarks, SparseRepairer improves accuracy by up to 18.0 percentage points and reduces generation length by up to 49.1% over Quest, while achieving better accuracy-efficiency trade-offs than periodic refresh with both Quest and TidalDecode. With an optimized GPU implementation, SparseRepairer matches dense decoding accuracy with 23.6% lower wall-clock time and runs 7.9% faster than periodic refresh on 87 long-generation MATH-500 problems.