Temporal Working Sets for Sparse Attention
Abstract
Sparse attention algorithms output the attention support over a small subset of input tokens, but finding this subset can require full cache search at each step in the decoder. We prove that this search has further structure not captured by the sparsity of attention support compared to previous attention supports. Larger working sets in two pretrained models are useful for finding subsequent attention sets. Query permutation against fixed memory reduces working set lifetimes from 22.9 and 19.7 to 4.3 and 3.9 steps for the Llama-3.1-8B and Qwen3-8B models respectively, without affecting each query's answer. Recurrent Attention Routing (RAR) maintains working sets and updates bounds from previous page visits instead of learning these bounds. Each query ranks the best set of current candidates and the best scores for new keys, and expands attention search to pages that may change its top-. We prove that this algorithm exhaustively selects all relevant tokens, derive sufficient conditions to reuse working sets by margins in query ranks and query displacements, and show a RAR speedup in routing with 128K context of and , and a decoding speedup for both models. All 65,069,056 selected head routes coincide with exhaustive selection. Temporal working sets lower the cost of computing each new attention support without training.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.