SparDA: Sparse Decoupled Attention for Efficient Long-Context LLM Inference

Yaosheng Fu, Guangxuan Xiao, Xin Dong, Song Han, Oreste Villa

TL;DR

SparDA introduces a novel "Forecast" projection layer to LLMs that predicts which Key-Value (KV) cache blocks the next layer will need. By decoupling sparse selection from the attention query, it allows the system to prefetch data from CPU memory asynchronously, hiding PCIe latency and delivering up to a 5.3× boost in decoding throughput for long-context inference.

What Problem Does This Paper Address?

As Large Language Models (LLMs) tackle increasingly long documents and extended conversations, managing the Key-Value (KV) cache becomes a massive headache. The KV cache grows linearly with sequence length, quickly exhausting GPU memory.

To bypass this hardware limit, systems often offload the KV cache to cheap CPU memory and fetch blocks back to the GPU on demand. However, this introduces two severe bottlenecks:

  1. The PCIe Bottleneck: Transferring KV blocks from CPU to GPU over the PCIe bus is painfully slow and stalls the GPU.
  2. The Selection Overhead: Even in "sparse attention" models (which only look at a subset of important tokens), the algorithm must still compute a selection score across the entire history. This selection step scales quadratically ($O(T^2)$) with sequence length and can dominate decoding time at long contexts.

Methods

The authors introduce SparDA (Sparse Decoupled Attention), an architecture that untangles block selection from the main attention loop.

Standard attention uses three projections: Query (Q), Key (K), and Value (V). SparDA adds a fourth per-layer projection called the Forecast ($F_l$).

Overview of the SparDA architecture compared to standard sparse attention.
  • Trainable Lookahead Selection: Instead of using the current layer's Query to find its own KV blocks, layer $l$'s Forecast projection predicts the top-$k$ blocks needed by layer $l+1$. Because this prediction happens one layer ahead, a persistent Triton kernel can asynchronously prefetch the required KV blocks from the CPU in the background while the GPU computes the current layer.
  • Compact Forecast Indexer: Traditional sparse attention runs selection across all query heads. SparDA exploits the fact that block selection doesn't require such fine-grained resolution; it uses just one Forecast head per Grouped-Query Attention (GQA) group and skips the expensive softmax operation entirely, slashing the $O(T^2)$ selection overhead.
  • Parameter-Efficient Training: SparDA is designed as a lightweight plug-in. The base LLM remains completely frozen. Only the Forecast projection weights (accounting for <0.5% of total parameters) are trained using Knowledge Distillation (KL divergence) to mimic the attention distribution of the original model.

Datasets

  • Training: The Forecast indexer was trained using the ProLong-64K dataset.
  • Evaluation: The method was validated on two 8B sparse-pretrained models (MiniCPM4.1-8B and NOSA-8B) across a rigorous battery of long-context benchmarks:
  • HELMET: For core long-context capabilities (recall, RAG, summarization).
  • LongBench: For real-world long-document tasks.
  • RULER: For testing effective context window limits up to 128K tokens.
  • Reasoning Suite: Hard reasoning tasks including MATH-500, AIME 2024, and AIME 2025.

Key Insights and Ideas

  • Sparsity is a Schedulable Signal: Traditional sparse attention treats block selection as a synchronous, reactive step. SparDA proves that future memory access patterns can be predicted accurately enough to turn a hardware bottleneck (PCIe transfer) into a background scheduling task.
  • Asymmetry of Attention vs. Selection: You need multiple query heads to compute rich attention outputs, but you only need a single, coarse head per GQA group to index which blocks are relevant.
  • Finer Supervision for Sharper Indexing: The authors found that supervising the indexer with a finer-grained compression window during training—and then down-pooling it to match the inference grid—forced the model to learn sharper, more discriminative selection boundaries.

Key Results

  • Throughput Gains: By overlapping prefetching with computation and shrinking the indexer, SparDA achieves up to a 1.7× decode speedup and 1.25× prefill speedup over standard sparse offloading.
  • Massive Batch Scaling: Because offloading frees up GPU memory, SparDA can handle much larger batch sizes. At a 64K context on an NVIDIA H100, SparDA delivers up to 5.3× higher decoding throughput than non-offloaded sparse baselines that quickly run out of memory (OOM).
Decoding throughput comparison showing SparDA's scaling advantages over baselines.
  • Accuracy Maintained: SparDA preserves or slightly improves the accuracy of the base models across all benchmarks (e.g., increasing the average score on NOSA-8B from 49.4 to 51.7). It vastly outperforms training-free lookahead methods like InfiniGen, which suffer from severe accuracy degradation.

Limitations and Future Work

  • Bounded by the Backbone: SparDA is an optimization framework for sparse attention; it cannot fix inherent flaws or accuracy limits present in the underlying base model's sparse attention pattern.
  • Scale and Token-Level Sparsity: The current evaluation is limited to 8B parameter models using block-level sparsity. Extending decoupled lookahead selection to massive token-level sparse architectures—such as DeepSeek-V3/V4 or GLM-5—remains an open and promising direction for future engineering.

Summary updated

BibTeX
@inproceedings{fu2026sparda,
  author = {Yaosheng Fu and Guangxuan Xiao and Xin Dong and Song Han and Oreste Villa},
  title = {{SparDA: Sparse Decoupled Attention for Efficient Long-Context LLM Inference}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=ebgCEX65Tc},
}
Figure