Skip to content

Attention Routing Stabilizes Early: Working-Set Inference for Recurrent Language Models

Ke Wan, Chen Chen

cs.CL

Abstract

Recurrent-depth language models, such as looped Transformers, repeatedly apply shared network blocks to refine latent representations, enabling additional test-time computation without generating explicit intermediate reasoning tokens. However, recurrent inference repeatedly accesses long contexts: full attention incurs quadratic computation during prefill, while autoregressive decoding repeatedly reads large key-value (KV) caches, introducing substantial memory traffic and capacity pressure. We study how attention routing evolves across recurrent depth and uncover a consistent separation in convergence timescales: routing-related quantities, including the attention support and the attention distribution, stabilize substantially earlier than representation-related quantities such as hidden states and attention outputs. This suggests a two-stage structure in which the model discovers a sparse working set and then refines representations over largely the same routing support. Motivated by this structure, we introduce WISE (Working-set Inference with Support Exploitation), a training-free method that uses unrestricted global attention during early recurrent steps to discover a block-structured working set, and then reuses it as the routing support in later steps while keeping recurrent refinement and within-support attention computation dynamic. By combining sparse recurrent attention with compact KV-cache management, WISE reduces both redundant attention computation and memory movement during inference. Across reasoning and long-context benchmarks, WISE closely approaches full-attention accuracy on key evaluated workloads while outperforming early-static support baselines. At 64K context, our implementation achieves up to a 6.46x decode throughput improvement under GPU memory pressure. Our code is available at https://github.com/tbn5pj/WISEcode.

Create a lesson

Metadata

Categories
cs.CL, cs.LG
Comments
Code: https://github.com/tbn5pj/WISE_code