Reproduce “PIVOT: Efficient Query-Group Indexing for Token-Level Sparse Attention” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Hong Liu, Yuan Cheng, Lin Niu, Yi Su, Yufei Xue, Anmin Liu, Guanghua Yu, Jianchen Zhu

PIVOT (Proxy Indexing Via One full-prefix Traversal), developed by Tencent, optimizes token-level sparse attention indexers by sharing a single full-prefix scan across groups of queries. This method improves computational efficiency, yielding up to a 4.8x speedup for the indexer kernel and a 1.6x reduction in end-to-end latency for long-context LLM inference, while preserving accuracy relative to dense baselines on RULER and LongBench.

Key insights

  • Neighboring queries in a sequence select highly overlapping sets of top-k tokens (80-90% overlap), indicating significant redundancy in individual full-prefix scans.
  • The union of top-k tokens across a group of 'g' queries grows sub-linearly with 'g' (e.g., 1.3-1.5x 'k' for g=4), suggesting a relatively small shared candidate set can cover all group members' needs.
  • Indexer scores exhibit a long-tailed distribution, where a small fraction of keys accumulates most of the score mass, implying that re-ranking within a limited candidate set can maintain top-k selection quality.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.