# LongCat Recall Sparse Attention: Co-Designing Key Organization and Retrieval for Long-Context Inference

> Source: <https://www.machinebrief.com/news/longcat-recall-sparse-attention-co-designing-key-organizatio-vcvx>
> Published: 2026-11-23 05:00:00+00:00

**Recommendation:** For long-context sparse attention, index new keys in independently maintained time buckets and pack capacity-balanced groups into pages so retrieval avoids rescanning full history; LRSA measured 4.70× faster key selection than DSA at 1024K tokens.
More in the playbook "Inference and self-hosting": <https://wpnews.pro/playbooks/inference-serving>

arXiv:2611.27233v1 Announce Type: new 
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.
