Manuscript Offprint

arXiv:2610.22985

Prism Attention: Proposal-Refined Index Sharing Mechanism for Efficient LLMs Inference

Zhenxu Tian, Kebin Liu, Zhengwu Yang, Yi Su, Qingqing Dang, Yanlin Sha, Kaipeng Deng, Dianhai Yu, Yanjun Ma, Juntao Li, Min Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Long-context decoding in large language models (LLMs) is increasingly bottlenecked by the memory and computation required to attend over an ever-growing Key-Value (KV) cache at each autoregressive step. Although token-level sparse attention reduces this burden by restricting computation to a small subset of relevant past tokens, its practical gains are often offset by repeatedly recomputing layer-wise sparse indices as the context grows. A common remedy is to share sparse indices across layers by computing them only at designated anchor layers, but such static reuse ignores the layer-wise evolution of attention patterns, causing the reused indices to progressively deviate from the layer-specific optima and incur substantial attention loss. By revisiting cross-layer sparsity from the perspective of attention dynamics, we find that inter-layer salient token shift is highly localized: although the exact top- κ\kappa indices differ across layers, the core high-attention tokens remain stable, with changes concentrated near the expanded boundary of previously selected regions. Motivated by this, we propose Prism Attention, a proposal-refined sparse attention framework. It replaces rigid cross-layer index reuse with a coarse-to-fine strategy, preserving layer-wise adaptability while retaining the efficiency benefits of cross-layer sharing. Extensive experiments show that Prism Attention achieves state-of-the-art performance among mainstream sparse attention methods on both reasoning and long-context benchmarks, while attaining a 3.4×3.4\times end-to-end decoding speedup over FlashAttention at 128K context length.

1 Introduction

As large language models (LLMs) [2, 10, 11, 15, 33] are pushed toward longer-context reasoning, autoregressive decoding increasingly becomes bottlenecked by attention over the growing Key-Value (KV) cache. At each decoding step, the newly generated token must attend over the entire accumulated context, causing the attention cost to scale linearly with sequence length. Sparse attention mitigates this by restricting computation to a small subset of relevant past tokens. Among existing paradigms, token-level [19, 38] sparsity achieves stronger empirical performance.

Figure

Figure 1: Cross-layer overlap ratio across varying distances of different layer offset.

∗^{*}Equal contribution.

†^{\dagger}Project lead. ‡^{\ddagger}Corresponding author.

Work done during an internship at Baidu Inc.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

(a) Layer-wise evolution of refined-layer top-128 indices within expanded proposal regions.

Figure

(b) Adjacent-layer distribution of next-layer top-128 indices within preceding-layer proposal regions.

Figure 2: Localized evolution of sparse indices across layers within proposal regions. For each target (refined) layer, we categorize its own top-128 sparse indices according to their ranks in the corresponding reference (proposal) layer: “Prop. Top-128”, “Prop. Top-128512”, and “Outside Prop. Top-512” denote the ratios of target-layer top-128 indices falling in the reference-layer top-128 set, ranks 128511, and outside the top-512 set, respectively. The above two panels share the same legend. (a) tracks this distribution from proposal layers L0L_0, L9L_9, L18L_{18}, and L27L_{27} to their subsequent refined layers, showing that a slightly expanded proposal pool ( ρ=4\rho = 4, i.e., 4×4 \times the base size) consistently captures a significant majority of layer-wise sparse-index variations. (b) measures, for each adjacent pair Lℓ→Lℓ+1L_\ell \to L_{\ell+1}, how the top-128 indices of Lℓ+1L_{\ell+1} fall into the proposal regions of LℓL_\ell. This demonstrates that adjacent-layer shifts are heavily concentrated within the expanded proposal window, significantly reducing the risk of missing salient tokens while avoiding the prohibitive cost of full-context search. A more comprehensive analysis is provided in Appendix B.

than coarse-grained block-wise alternatives [8, 9, 17, 18, 21, 25, 26, 30, 32, 37]. However, its practical efficiency is often constrained by sparse index construction: identifying the exact top- κ\kappa relevant tokens for each query still requires scoring the entire context. As sequence length increases, repeatedly recomputing these layer-wise indices introduces substantial overhead, which can largely offset the theoretical benefits of sparsity.

A natural strategy to circumvent the per-layer selection overhead is cross-layer index sharing, which computes the exact top- κ\kappa token indices at a few designated anchor layers and reuses them across multiple subsequent layers. While effective in reducing redundant computation, existing approaches [1, 3, 5, 12, 34, 35] adopt a static sharing paradigm that ignores inter-layer differences by implicitly assuming attention patterns remain invariant with network depth. In reality, attention distributions evolve dynamically across layers. As the distance from the designated anchor layer increases in Figure 1, the index overlap ratio between the anchor layer and subsequent layers drops sharply and continues to decay. Notably, this degradation accelerates under longer contexts (8K vs. 1K), causing static reuse to repeatedly miss critical tokens and severely degrade long-context performance.

To better understand this limitation, we revisit cross-layer sparsity from the perspective of attention dynamics. Our empirical analysis reveals a key property: inter-layer salient token shift is highly localized. As illustrated in Figure 2a and 2b, although the exact top- κ\kappa indices differ across layers, these changes are far from arbitrary: the core high-attention tokens remain largely stable, while most changes occur near the boundary of previously selected regions. This indicates that preserving a slightly expanded candidate pool is sufficient to capture layer-wise variations.

Motivated by this observation, we propose Prism Attention, a proposal-refined sparse attention framework for efficient long-context decoding, driven by two parallel algorithmic components: Dynamic Index Refinement and Quantized Proposal Generation. Instead of rigidly reusing a fixed set of indices, Prism Attention first constructs a relaxed candidate pool at a few designated anchor layers (Proposal Layer) and then allows subsequent layers (Refined Layer) to perform lightweight token selection within this expanded boundary, thereby adapting to localized inter-layer shifts at low cost. To further reduce the overhead of proposal construction, Prism Attention employs a quantized proposal mechanism that substantially lowers the cost of full-context scoring. Together, these designs enable efficient cross-layer sparsity while preserving attention quality. Extensive experiments show that Prism Attention achieves state-of-the-art performance among mainstream sparse attention methods on both reasoning and long-context benchmarks, while attaining a 3.4×3.4\times end-to-end decoding speedup over FlashAttention at 128K context length.

Our contributions are as follows:

• Revisiting cross-layer sparse attention from the perspective of attention dynamics reveals a key property: inter-layer salient token shift is highly localized. This observation reveals the limitation of rigid index sharing and motivates localized cross-layer refinement.

• We propose Prism Attention, a proposal-refined sparse attention framework for efficient long-context decoding, which replaces static cross-layer index sharing with a coarse-to-fine selection strategy, enabling efficient adaptation to layer-wise attention variation.

• Two complementary algorithmic components make this design practical: Dynamic Index Refinement, which tracks localized layer-wise token shifts with low overhead, and Quantized Proposal Generation, which reduces the cost of full-context proposal construction via low-bit quantization.

References (35)