arXiv:2611.09700cs.AINov 2026

Manuscript Offprint

arXiv:2611.09700

Attend at the Right Resolution: Head-Adaptive Sparse Attention via Query-Key Interaction Structure

Wajih Hassan Raza, Ahsan Bilal, Yidan Shen, Renjie Hu, Xin Fu, Yu Wen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

ABSTRACT

Attention is a major scalability bottleneck in large language models (LLMs), with its computational cost and key-value (KV) memory traffic becoming increasingly prohibitive as context length grows. Sparse attention addresses this bottleneck by restricting each query to a subset of the context, but its effectiveness hinges on identifying relevant regions both cheaply and reliably. Existing training-free methods primarily rely on runtime relevance estimates, with selection dimensionality and granularity typically governed by fixed heuristics rather than the intrinsic interaction structure of pretrained attention heads. We take a different perspective: the query-key operator of each pretrained head defines a characteristic response structure that determines the resolution needed for sparse selection, both across feature directions and across context tokens. Building on this insight, we propose Head-Adaptive Sparse Attention (HASA), a training-free sparse attention framework that jointly adapts selection resolution along these two dimensions. Along the feature dimension, the singular spectrum of each head's query-key operator determines an effective rank, yielding a compact, head-specific response space. Along the sequence dimension, neighboring regions are progressively merged according to the directional coherence of their token responses in this same space, while heterogeneous regions remain separate. Exact attention is then computed using the original full-dimensional KV states of the selected regions. HASA captures 88.1% of dense-attention mass and, compared with UNIQUE, a strong recent sparse-attention baseline, improves accuracy by up to 3.47 and 2.57 points on RULER and LongBench-Pro, respectively, and accelerates self-attention by up to 1.32×, while achieving up to 14.07× speedup over dense attention.

1 INTRODUCTION

Large language models (LLMs) have become a general-purpose foundation for a wide range of applications, with attention serving as the core mechanism for integrating information across the input context. However, dense attention requires each query to interact with the entire available context, incurring substantial computational cost and key-value (KV) memory traffic as sequence lengths and inference workloads increase (OpenAI et al., 2024; Grattafori et al., 2024; Comanici et al., 2025; Pope et al., 2023; Dao, 2024; Kwon et al., 2023). These growing costs make efficient attention increasingly important for scaling LLM inference to longer contexts and larger workloads.

Sparse attention reduces these costs by exploiting the observation that attention is often highly concentrated, allowing computation and KV access to be restricted to a small subset of the context while preserving most relevant interactions. Existing methods broadly follow two strategies. Approaches without per-query selection impose predefined access patterns or reduce the retained KV context using structural or historical signals, offering regular and predictable computation but limited ability to adapt to the interactions required by each query (Beltagy et al., 2020; Xiao et al., 2024b; 2025; Zhang et al., 2023; Li et al., 2024). Content-adaptive approaches, in contrast, estimate query-dependent relevance from runtime information to select relevant tokens, enabling sparse patterns to better capture input-dependent and long-range dependencies, albeit at the cost of additional selection computation (Yuan et al., 2025; Zhao et al., 2026). Despite these differences, both strategies face a fundamental challenge in determining the appropriate resolution for context selection. As illustrated in Fig. 1, coarse-grained selection groups relevant and irrelevant tokens into the same region, forcing a choice between accessing unnecessary KV states and missing important interactions. Fine-grained selection localizes relevant tokens more precisely, but requires evaluating and comparing more candidate regions across the context, even where neighboring tokens need not be distinguished. Moreover, attention heads differ in the token relationships they capture, so a selection granularity appropriate for one head may be too coarse or unnecessarily fine for another (Correia et al., 2019).

However, characterizing each head's full input-dependent sensitivity would be costly during inference. Instead, we leverage the distinct, input-independent interaction structure defined by each head's pretrained query-key transformations. This structure identifies the directions to which each head is most responsive, providing a basis for determining both important feature directions and consequential distinctions between context tokens. Along the feature dimension, strongly responsive directions carry the distinctions most consequential to relevance estimation, whereas weak-response directions contribute less and can be represented more coarsely during selection. Along the sequence dimension, the same response structure determines whether tokens need to be distinguished by that head: tokens that differ substantially in the original representation space may induce

Figure

Figure 1: Motivation for HASA. Coarse-grained selection risks missing relevant tokens, while fine-grained selection increases selection overhead. HASA adapts selection granularity for each head.

similar responses if their differences lie primarily along weak-response directions, whereas seemingly similar tokens may need to remain distinct when their differences align with strongly responsive directions. Token redundancy is therefore relative to the attention head rather than solely to the original token representations. Together, these observations motivate jointly adapting feature and sequence resolution according to the same head-specific interaction structure.

Based on this insight, we propose HASA, a training-free sparse attention framework that adapts the resolution used for sparse selection along both feature and sequence dimensions. Along the feature dimension, HASA uses the singular spectrum of each pretrained query-key operator to determine a head-specific effective rank, retaining the dominant interaction directions needed for relevance estimation. Along the sequence dimension, tokens are represented in this compact head-specific space, and neighboring regions are progressively merged when their representations remain directionally coherent, while heterogeneous regions retain finer granularity. These compact representations are used only for routing; exact attention is computed over the original full-dimensional KV states of the selected regions. By reducing both the dimensionality of relevance estimation and the number of candidate regions, HASA lowers selection overhead while retaining head-relevant distinctions for sparse selection. The spectral structure and effective ranks are determined offline, avoiding input-dependent rank-selection overhead during inference.

Our contributions are as follows:

  • We reveal that each head's pretrained query-key interaction structure characterizes its selection requirements along both feature and sequence dimensions, providing a unified basis for head-adaptive sparse attention.
  • We develop a head-adaptive feature resolution mechanism that determines each head's effective rank using spectral entropy and a truncation-error criterion, yielding a compact response space that preserves dominant interaction directions.
  • We develop a head-adaptive sequence resolution mechanism that progressively merges neighboring regions based on token-response coherence in the head-specific response space, yielding candidate regions of varying granularity.
  • Extensive experiments show that HASA captures 88.1% of dense-attention mass, improves accuracy over UNIQUE by up to 3.47 and 2.57 points on RULER and LongBench-Pro, respectively, and achieves self-attention speedups of up to 14.07× over dense attention and 1.32× over UNIQUE.

References (40)