TL;DR
When Large Language Models (LLMs) generate text over massive contexts, searching through their entire memory at every single layer creates a severe speed bottleneck. Prism Attention solves this by having a few "anchor" layers cast a slightly wider net of important past tokens—using ultra-compressed 2-bit keys—so that subsequent layers can quickly refine their exact focus from that smaller pool. The result is a 3.4× end-to-end decoding speedup at 128K context lengths while preserving near-lossless reasoning and comprehension accuracy.
What Problem Does This Paper Address?
Every time an LLM generates a new word, it looks back at all previous words stored in its Key-Value (KV) cache. As contexts stretch into hundreds of thousands of tokens—especially during long chain-of-thought reasoning—reading this massive cache at every step becomes painfully slow.
Sparse attention tries to fix this by attending only to the top-$\kappa$ most relevant past tokens. Yet a catch-22 remains: to figure out which tokens are the top-$\kappa$ at every layer, you still have to score the entire context, eating up the speed gains you hoped to get.
A popular workaround is cross-layer index sharing: compute the top-$\kappa$ token indices at one "anchor" layer and blindly reuse that exact list for the next several layers. Unfortunately, attention isn't static; what Layer 5 cares about isn't identical to what Layer 8 cares about. As you move deeper away from the anchor layer, the overlap of truly important tokens drops sharply—especially in longer contexts—causing rigid reuse methods to miss critical information and fumble complex reasoning tasks.
Methods
Instead of rigid index copying, Prism Attention introduces a coarse-to-fine strategy built on top of a standard offline calibration setup (adapted from IndexCache), which partitions transformer layers into Proposal Layers (anchors) and Refined Layers (typically at a 1:3 ratio). What’s new is what gets passed between them and how it's computed:
- Proposal-Refined Index Sharing (Coarse-to-Fine): Rather than exporting a strict top-$\kappa$ list, a Proposal Layer selects an expanded candidate pool of size $\rho\kappa$ (where $\rho$ is a small expansion factor like 2 or 4). The Proposal Layer attends to its own top-$\kappa$ tokens, while passing the wider $\rho\kappa$ candidate pool downstream. Subsequent Refined Layers then score only the tokens inside this candidate pool against their own queries to pick their layer-specific top-$\kappa$ tokens. Because the pool size is fixed, refinement cost is completely independent of total context length.
- Quantized Proposal Construction: Even if only 1 in 4 layers scans the full context, reading a massive 16-bit key cache is still memory-bandwidth heavy. Prism compresses historical keys into 2-bit integers (INT2) using group-wise asymmetric quantization exclusively for candidate scoring at Proposal Layers (aggregating across Grouped Query Attention heads via max-reduction). Once the final top-$\kappa$ indices are chosen at any layer, actual sparse attention still uses the standard full-precision (BF16) KV cache.
Datasets
No new benchmarks were introduced. The authors used:
- Offline Calibration: A 64-sample held-out subset of OpenR1-MATH-220k to greedily assign Proposal vs. Refined layers.
- Long-Context Understanding: Subsets of LongBench whose average input length exceeds 8,192 tokens (including 2WikiMQA, TriviaQA, HotpotQA, TREC, Qasper, PCount, MF-en, PRe, and GovReport).
- Reasoning: AIME24, AIME25, MATH500, and GPQA-Diamond (generating up to 32,768 thinking/output tokens per problem).
Key Insights and Ideas
- Attention drift is localized, not chaotic: When moving from one layer to the next, attention doesn't suddenly jump to random, neglected corners of the prompt. Instead, the "salient token shift" happens right along the runners-up boundary—tokens that ranked just outside the top-128 in an earlier layer (say, ranks 128 to 512) are overwhelmingly the ones that get promoted into the top-128 in subsequent layers.
- Doubling the net recovers cross-layer coverage: Simply expanding the candidate pool by $2\times$ (e.g., passing top-256 so the next layer can pick its favorite 128) dramatically restores the overlap with each layer's true optimal attention set across the network's depth.
- Bigger candidate pools aren't always better: In ablations, expanding the pool factor $\rho$ from 1 to 4 boosted AIME25 accuracy from 59.22% to 64.43%, but pushing $\rho$ to 8 caused a slight drop (to 62.50%), suggesting overly wide pools let noisy candidates creep in and distract refinement.
Key Results
Evaluated on Qwen3-4B and Qwen3-8B against Full Attention and four sparse baselines (Quest, SeerAttention-R, LessIsMore, and IndexCache):
- Reasoning Accuracy: Prism achieved the highest average accuracy among all sparse methods on both Qwen3-4B (71.43% vs. 71.95% Full Attention) and Qwen3-8B (73.83% vs. 74.33% Full Attention), shining brightest on tough math benchmarks like AIME24/25 (+1.46 points over IndexCache).
- Long-Context Accuracy: On LongBench, Prism scored 54.98 on Qwen3-4B (nearly matching Full Attention's 55.07) and 54.97 on Qwen3-8B (slightly edging out Full Attention's 54.58, and beating IndexCache by 2.32 points).
- Inference Speedup: Using SGLang on NVIDIA H800 GPUs (batch size 16, 128K context on Qwen3-4B), Prism cut per-step decoding latency from 15.03 ms (FlashAttention) to 4.47 ms—a 3.36× (reported as ~3.4×) end-to-end speedup. At 128K context, Prism's local refinement added just 0.7% latency overhead compared to rigid reuse (IndexCache), while isolated attention kernel speedups reached 7.50×.
Limitations and Future Work
While the paper does not include a standalone limitations section, several constraints are apparent from the experiments and design:
- Short-Context Overhead: At shorter contexts (e.g., 8K at batch size 4), kernel latency is slightly slower than FlashAttention ($0.90\times$ speedup), and at 16K end-to-end serving, refinement makes Prism 15.7% slower than rigid reuse (IndexCache) before amortizing down to 0.7% at 128K.
- Calibration & Hyperparameter Dependency: Optimal performance relies on an offline greedy calibration pass to assign Proposal/Refined layers, as well as task-dependent tuning of the expansion factor ($\rho=2$ for reasoning vs. $\rho=4$ for long-context tasks), since setting $\rho$ too high (e.g., $\rho=8$) slightly degrades accuracy.
- Decoding-Only Scope: The framework exclusively targets autoregressive decoding latency rather than the initial prompt prefill stage.
Summary updated