LongCat Recall Sparse Attention: Co-Designing Key Organization and Retrieval for Long-Context Inference
Hao Zhang, Bin Xiao, Kefeng Zhang
Key points
From the paper's conclusion- To address this problem, we propose LongCat Recall Sparse Attention (LRSA), which combines fine-grained representatives with paged retrieval in an incrementally maintained index.
Abstract
Retrieval-based sparse attention, exemplified by DeepSeek Sparse Attention (DSA), reduces attention computation by selecting a small subset of key-value entries. However, selecting these entries can still require searching the entire visible history. For long sequences, retrieval becomes a major bottleneck, limiting the efficiency gains from sparse attention. To address this problem, we propose LongCat Recall Sparse Attention (LRSA), which combines fine-grained representatives with paged retrieval in an incrementally maintained index. LRSA partitions the sequence into time buckets that can be indexed independently as new keys arrive, without regrouping existing history. Within each bucket, it organizes indexing keys into capacity-balanced directional groups and packs a fixed number of complete groups into each page, retaining a separate center for every group. These centers provide fine-grained representatives for page selection, after which refinement scores members of the selected pages together with sink, sliding-window, and visible unindexed candidates to select the final Top-$K$ logical positions. To execute this retrieval process efficiently, we store members in reordered pages, fuse construction stages according to group size, and share storage for overlapping fixed candidates across queries during chunked prefill. These choices support regular member access while reducing kernel launches during construction and repeated candidate transfers. Moreover, we integrate LRSA into SGLang to maintain the index during inference, overlapping asynchronous index construction for new buckets with subsequent computation and reusing compatible bucket indices and member pages after a prefix match in the original key-value pool. With a 1024K-token context, LRSA accelerates key selection by 4.70$\times$ over DSA and combined selection and attention by 35.60$\times$ over full attention.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Recursive Sparse Attention: Million-Token Length Extrapolation at Logarithmic CostarXiv · 2026
- Multi-layer Indexer: Overlapping Selection and Attention in DeepSeek Sparse AttentionarXiv · 2026
- ADIndex: Layer-Adaptive Sparse Attention Indexing via Group-Level DistillationarXiv · 2026
- AttentionIndex: Accelerating Learned Sparse Attention with a Causal Inverted-File IndexarXiv · 2026
- Block Sparse Attention with Log-Linear ComplexityarXiv · 2026
- Stratified Sparse Attention: Reducing the Sparse-to-Dense Gap at Extreme SparsityarXiv · 2026