PIVOT: Efficient Query-Group Indexing for Token-Level Sparse Attention
Summary
PIVOT, or Proxy Indexing Via One full-prefix Traversal, is a new training-free, drop-in replacement for the DeepSeek Sparse Attention (DSA) indexer designed to address its O(L^2) bottleneck. While DSA makes downstream attention efficient, its indexer still scores every preceding token to select top-k tokens for each query. PIVOT exploits the observation that nearby queries select highly overlapping top-k tokens and indexer scores are long-tailed. It aggregates a group of nearby queries into a single proxy query, performs one shared full-prefix scan to obtain a candidate set, and then selects a top-k for each query from that set. Two variants exist: PIVOT-Reuse for maximum speed by sharing the proxy top-k, and PIVOT-Refine for higher fidelity by re-scoring the candidate set. PIVOT applies to both prefill and decode phases. Benchmarked on DeepSeek-V3.2 and GLM-5.1 across LongBench and RULER, PIVOT matches the accuracy of the dense DSA indexer, accelerating it by up to 4x and reducing end-to-end latency by up to 1.6x at long context.
Key takeaway
For Machine Learning Engineers optimizing large language models with sparse attention, PIVOT offers a significant performance upgrade. If your DeepSeek Sparse Attention (DSA) indexer is a bottleneck, implementing PIVOT can accelerate it by up to 4x. This also reduces end-to-end latency by 1.6x at long contexts, matching accuracy. Consider PIVOT-Reuse for maximum speed or PIVOT-Refine for dense indexer fidelity, integrating it into both prefill and decode phases.
Key insights
PIVOT efficiently optimizes sparse attention indexing by sharing prefix scans across query groups, accelerating performance without accuracy loss.
Principles
- Redundancy in per-query scans can be exploited.
- Nearby queries select highly overlapping top-k tokens.
- Indexer scores are long-tailed along the key axis.
Method
Aggregate a query group into a proxy, perform one shared full-prefix scan for candidates, then select top-k for each query from that set.
In practice
- Implement PIVOT as a drop-in DSA indexer replacement.
- Use PIVOT-Reuse for maximum speed.
- Use PIVOT-Refine for dense indexer fidelity.
Topics
- Sparse Attention
- DeepSeek Sparse Attention
- LLM Inference Optimization
- Query-Group Indexing
- Long Context Models
- Performance Benchmarking
Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Computation and Language.