Prism Attention: Proposal-Refined Index Sharing Mechanism for Efficient LLMs Inference
Zhenxu Tian, Kebin Liu, Zhengwu Yang, Yi Su, Qingqing Dang, Kaipeng Deng, Yanlin Sha, Yanjun Ma, Dianhai Yu, Juntao Li, Min zhang
NeurIPS page · Open on the map
Category: Efficient LLM Inference & Training › Sparse Long-Context Attention · Type: new method · Keywords: sparse attention, LLM inference efficiency, cross-layer index sharing, coarse-to-fine refinement, long-context benchmarks
Areas: LLM Reasoning › Efficient Reasoning › Sparse Attention; Memory › Model Memory Optimization › Efficient Attention for LLMs; Long Context › Long-context mechanisms › Efficient attention; Model Architectures & Sequence Modeling › Language Model Architectures › Sparse Attention
Summary
Prism Attention introduces a proposal-refined sparse attention framework that shares indices coarsely then refines them per layer, achieving state-of-the-art performance and up to 7.5× kernel speedup over FlashAttention at long context lengths.
Explained to a 5-year-old
A big computer program that writes stories needs to remember many words to keep the story consistent. Remembering everything takes a lot of memory and makes the program slow. Scientists found a way to only remember a few key words that matter most. They first pick a small group of important words that can be shared, then adjust them a little for each part of the program. This makes the program faster and still tells good stories.
Explained to a 5-year-old, longer
Big computer programs that write long stories need to keep track of many words they have already used. If they remember every single word, they need a lot of memory and become slow. To save memory, scientists created a trick where the program only pays attention to a few important words at a time. They first decide on a small set of words that are useful for many parts of the story. Then, for each part of the program, they look at the story a bit more and adjust which words are most important. This way, the program still knows the key ideas but doesn't have to store everything. The adjusted words help the program make better choices without being too slow. By sharing the first set of words, the program doesn't have to recompute them from scratch each time. This sharing saves time and keeps the story coherent. The result is a faster program that can handle longer stories without running out of memory. It also helps the program understand the story better because the important words stay consistent. Overall, this trick makes big writing programs more efficient and easier to use on smaller computers.
For a technical reader
The method computes a shared set of salient tokens at anchor layers and then locally refines these indices for each layer, preserving layer-specific attention patterns while retaining cross-layer efficiency. This coarse-to-fine scheme reduces the need for repeated recomputation of sparse indices, lowering both memory usage and kernel runtime. Experiments show state-of-the-art performance on reasoning and long-context benchmarks and up to 7.5× speedup over FlashAttention at 128K tokens. The approach is orthogonal to existing sparse attention designs and can be integrated into any transformer-based model.
Problem
Adapting large language models to long contexts is memory and compute intensive due to the need to attend over a growing key-value cache at each decoding step. Existing token-level sparse attention methods either recompute layer-wise indices repeatedly or reuse static indices, leading to inefficiency or degraded attention quality.
Method
The approach adopts a coarse-to-fine strategy: it first computes a shared set of salient tokens at anchor layers, then refines these indices locally for each layer to preserve layer-specific attention patterns. This retains the efficiency of cross-layer sharing while maintaining adaptability as context expands.
Results
The approach achieves state-of-the-art results on reasoning and long-context benchmarks and provides a 2.6×-7.5× kernel speedup over FlashAttention at a 128K token context length.
Contributions
A coarse-to-fine proposal-refined index sharing mechanism that retains layer-wise adaptability while preserving cross-layer efficiency, along with extensive empirical validation on reasoning and long-context tasks.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction