Double-P: Hierarchical Top-P Sparse Attention for Long-Context LLMs

Wentao Ni, Kangqi Zhang, Zhongming Yu, Oren Nelson, Mingu Lee +5 more
2/5/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

As long-context inference becomes central to large language models (LLMs), attention over growing key-value caches emerges as a dominant decoding bottleneck, motivating sparse attention for scalable inference. Fixed-budget top-k sparse attention cannot adapt to heterogeneous attention distributions across heads and layers, whereas top-p sparse attention directly preserves attention mass and provides stronger accuracy guarantees.

Show full abstract

Existing top-p methods, however, fail to jointly optimize top-p accuracy, selection overhead, and sparse attention cost, which limits their overall efficiency. We present Double-P, a hierarchical sparse attention framework that optimizes all three stages. Double-P first performs coarse-grained top-p estimation at the cluster level using size-weighted centroids, then adaptively refines computation through a second top-p stage that allocates token-level attention only when needed. Across long-context benchmarks, Double-P consistently achieves near-zero accuracy drop, reducing attention computation overhead by up to 1.8x and delivers up to 1.3x end-to-end decoding speedup over state-of-the-art fixed-budget sparse attention methods.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ni2026doublep,
  title  = {Double-P: Hierarchical Top-P Sparse Attention for Long-Context LLMs},
  author = {Wentao Ni and Kangqi Zhang and Zhongming Yu and Oren Nelson and Mingu Lee and Hong Cai and Fatih Porikli and Jongryool Kim and Zhijian Liu and Jishen Zhao},
  year   = {2026},
  eprint = {2602.05191},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2602.05191v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2602.05191.svg)](https://codeofpaper.com/paper/2602.05191)

Discussion