vAttention: Verified Sparse Attention via Sampling

Aditya Desai, Kumar Krishna Agrawal, Shuo Yang, Alejandro Cuadron, Luis Gaspar Schroeder, Matei Zaharia, Joseph E. Gonzalez, Ion StoicaICLR 2026

As Large Language Models (LLMs) scale toward near-infinite context windows, the primary bottleneck during decoding shifts from compute to memory bandwidth. The model must read a massive Key-Value (KV) cache for every new token, making generation slow and memory-bound.

Sparse attention—attending to only a fraction of the KV cache—is the standard solution, but current methods suffer from two major flaws:

  1. Inconsistency: Popular methods like top-$k$ (picking the highest scores) work well when attention is "sharp" (concentrated on a few tokens) but fail when it is "uniform" (spread across many). Conversely, random sampling works better for uniform distributions but misses the crucial "heavy hitters."
  2. Lack of Guarantees: Existing methods act as black boxes. Users cannot specify a desired accuracy threshold (e.g., "ensure 95% accuracy"). This lack of reliability makes it difficult to deploy sparse attention in production environments where unpredictable model degradation is unacceptable.

To solve this, researchers have introduced vAttention (Verified Sparse Attention), the first sparse attention mechanism that provides rigorous $(\epsilon, \delta)$ guarantees on approximation accuracy. By intelligently combining deterministic top-$k$ selection with adaptive random sampling, it matches full-model quality at up to 20x sparsity and outperforms existing state-of-the-art methods on long-context benchmarks.

The vAttention Architecture: Unifying Top-k and Sampling

vAttention unifies deterministic and stochastic approaches into a single, mathematically grounded framework:

  • Hybrid Selection: vAttention first selects "heavy hitter" tokens deterministically. This includes attention sinks (initial tokens), a local sliding window (recent tokens), and predicted top-$k$ tokens.
  • Adaptive Sampling: For the remaining "long tail" of tokens, vAttention uses uniform random sampling.
  • The "Verified" Mechanism: This is the core innovation. Using the Central Limit Theorem (CLT), the algorithm dynamically calculates the required sample size for every single query. If a user specifies a tolerance $\epsilon$ (relative error) and a confidence $\delta$, vAttention computes exactly how many tokens it needs to sample to meet those statistical bounds.
  • Verification of Numerator and Denominator: Because the attention operation (Softmax) involves a numerator (weighted values) and a denominator (sum of scores), vAttention applies these guarantees to both to ensure the final output is strictly verified.

Key Insights

The breakthrough of vAttention relies on realizing that top-$k$ and sampling are complementary, not competitive. Top-$k$ reduces the variance of the sampling estimator by removing outliers. This allows the statistical bounds to be much tighter, drastically reducing the required sample size.

Furthermore, the paper argues that in deep models, reducing bias in attention estimation is more important than reducing variance. Errors in the mean (bias) compound aggressively across layers—acting like a random walk—whereas random fluctuations (variance) are less destructive. By turning accuracy into a controllable "knob," vAttention allows engineers to predictably trade off speed and quality.

Overview of vAttention: Conceptual flow, performance-efficiency trade-offs compared to baselines, and the strong correlation between user-defined tolerance and actual error.

Experimental Results

The researchers evaluated vAttention across several demanding long-context suites, including RULER (32K), LongBench, Loogle, and AIME2024, using models like Llama-3.1-8B-Instruct and Mistral-7B-Instruct-v0.3.

  • Superior Trade-offs: At 10% sparsity (using only 1/10th of the tokens), vAttention improved accuracy on the "RULER-HARD" tasks by roughly 4.5 percentage points compared to HashAttention, a leading top-$k$ method.
  • Matching Full Attention: Across multiple datasets, vAttention matched the quality of full (dense) attention while using 10x to 20x fewer tokens.
  • Stable Long Generation: In complex reasoning tasks (AIME2024), vAttention maintained full model quality even when generating up to 32,000 tokens, proving it does not "drift" or degrade over long horizons.
  • Predictable Control: The authors demonstrated a near-perfect correlation between the user-specified tolerance ($\epsilon$) and the actual observed error, validating the mathematical guarantees.

Limitations and Future Work

While vAttention represents a significant leap forward, it has a few practical limitations. The current index computation is implemented in naive PyTorch; achieving maximum hardware speedup on GPUs will require specialized CUDA kernels to handle the dynamic budget calculation and sparse gathering. Additionally, while vAttention reduces memory movement, it still requires partial access to the KV cache to estimate statistics. Optimizing this "look-ahead" access is a target for future systems research. Finally, extending these $(\epsilon, \delta)$ guarantees from inference decoding to the training phase remains an open and promising challenge.

Summary updated

BibTeX
@inproceedings{desai2026vattention,
  author = {Aditya Desai and Kumar Krishna Agrawal and Shuo Yang and Alejandro Cuadron and Luis Gaspar Schroeder and Matei Zaharia and Joseph E. Gonzalez and Ion Stoica},
  title = {{vAttention: Verified Sparse Attention via Sampling}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=zzTDulLys0},
}
Figure