arXiv:2610.30951cs.LGOct 2026

Manuscript Offprint

arXiv:2610.30951

OpenAttention: One Percent Is Enough with Tail Proxies

Hyunwoo Yu, Jongbeom Lee, Hyunbin Kim, Sungjun Park, Jaemin Choi, Jincheol Yang, Seunghun Moon, Bongjoon Hyun, Kyomin Sohn, Kyeongbo Kong, Suk-Ju Kang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Sparse attention reads only a small subset of the key-value cache, and how to treat the unread tail remains a key challenge. Discarding the tail biases the output, and sampling it as previous approaches do fails at reads of 5% and below, where the tail likely holds heavy hitters the selector missed. Our key observation is that the simplest possible proxy, one token that folds the entire tail into its count-aware mean, already yields lower output error than a sample at every read behind a practical selector. We further show in closed form that at low reads sampling nearly doubles the weight error of discarding while a single proxy stays below it. Building on these findings, we explore approximating the dense attention distribution with a few proxies that target the tail. We propose OpenAttention, a pipeline of clustering, ErrorGate and top-k selection followed by a count-aware mean proxy. To implement clustering and selection both efficiently and effectively, we design training-free Query-Geometry Clustering (QGC) and a Query-Geometry Selector (QGS), which compress the keys while respecting the query directions. Additionally, unlike prior methods that rank clusters by centroid alone, ErrorGate allocates the exact read by the estimated weight error of each cluster. On RULER-32K HARD with Llama-3.1-8B, OpenAttention retains 99% of dense accuracy at a 1% read. It also achieves state-of-the-art accuracy across models, context lengths and datasets. Our customized attention kernel, OpenAttention.flash, runs the decode attention stage 10× faster than dense attention at a 1% read.

(a) Per-Task Accuracy at 1% Density

Figure

(b) Accuracy vs Density

(c) Decode Attention Speedup

… dense HashAttention vAttention MagicPIG OpenAttention (ours)

Figure 1: OpenAttention against sparse attention baselines on RULER-32K HARD with Llama-3.1-8B. (a) Per-task accuracy at a 1% read. (b) Mean accuracy against the total per-query read. (c) Decode attention-stage speedup over dense attention at batch 32 and 32K context.

1 INTRODUCTION

Long-context decoding is bound by the memory traffic of the key-value (KV) cache, and sparse attention reduces this cost by computing attention over only a subset of the cache. Existing top-k approaches (Singhania et al., 2024; Yang et al., 2024; Desai et al., 2025) explore frameworks that

(a) Approximate Top-K

Figure

Tail Discarded

(b) Top-K + Sampling

Figure

Tail Sampled: Misses Heavy Hitters at a Low Density

(c) Top-K + Proxies (Ours)

Query-Geometry Clustering

Figure

Tail Proxied: Whole Tail at Any Density

Figure 2: Three treatments of the tail for sparse attention. (a) Approximate top-k relies on top-k accuracy and ignores the tail. (b) Top-k with sampling misses heavy hitters at low density. (c) Ours clusters and represents the tail by proxies built with a method that minimizes the weight error.

focus solely on predicting the top-k scores accurately and discard the remaining tail, as shown in Figure 2(a). However, omitting the tail information fundamentally prevents these methods from approximating the dense attention distribution. This limitation becomes especially critical in aggregation tasks (e.g., FWE) that depend on the entire distribution of attention weights. To address this problem, as shown in Figure 2 (b), MagicPIG (Chen et al., 2025) estimates the output by locality-sensitive hashing (LSH) based importance sampling, and vAttention (Desai et al., 2026) selects heavy hitters and then approximates the residual tail by a random sample sized to a relative error bound. Both methods presume that the softmax output of the tail can be estimated from a small sample. However, the estimation error of sampling grows sharply as the density decreases.

Our key finding, as shown in Figure 3, is that a random sample complements the tail well at high density but yields a higher error than top-k alone at low density. However, folding the same tail into a single proxy with a simple count-aware mean keeps the error low in every setting we examine. This holds across different attention distributions and densities as well as behind both HashAttention and the oracle top-k selector. Based on this empirical finding, we measure the statistics of the tails left by HashAttention and the oracle top-k. Using these quantities, we show in closed form that a single proxy yields a lower attention weight error than sampling. Consequently, the tail should be approximated by well-constructed proxies rather than by samples, and this work explores how to build and exploit such proxies effectively.

As shown in Figure 2(c), we propose OpenAttention to approximate the tail distribution rather than truncate or sample the tail. OpenAttention constructs tail proxies through a framework that consists of clustering, ErrorGate, top-k selection and a count-aware mean. The effectiveness of this framework depends on how well it minimizes the weight error, which is governed by the mean and variance of each cluster. Two considerations are central to achieving this goal. First, the clustering and the selector must run both effectively and efficiently to form clusters with small variance. Since this variance is measured in attention scores, the keys alone are insufficient and the query geometry must also be taken into account. We therefore compress the key tokens with the query eigenvectors and perform both clustering and top-k selection on the compressed keys. Second, clusters should be selected by their error, which then determines the top-k budget. Unlike prior methods that select clusters only by the mass of their centroid or mean, ErrorGate efficiently approximates the weight error from a mean token and an approximate variance token and uses it to allocate the budget.

With these methods, OpenAttention preserves 99% of dense accuracy at a 1% read, scoring 86.30 against 87.04 for full attention and 48.2 for the best baseline on RULER-32K HARD (Hsieh et al., 2024) with Llama-3.1-8B (Grattafiori et al., 2024). It also achieves state-of-the-art accuracy on DeepSeek-R1-Distill-Llama-8B (DeepSeek-AI, 2025) and Mistral-7B (Mistral AI, 2024) and across context lengths from 16K to 96K. Moreover, unlike prior sampling-based methods (Chen et al., 2025; Desai et al., 2026), OpenAttention targets practical latency gains. Our Triton-based (Tillet et al., 2019) customized kernel, OpenAttention.flash, processes the exact tokens and proxies in one online softmax pass and runs the decode attention stage 10×10\times faster than dense attention at a 1% read.

Our contributions are the following.

• We propose OpenAttention, which approximates the full softmax distribution rather than truncating or sampling the tail. It represents the tail by proxies built through clustering, ErrorGate, top-k selection and a count-aware mean.

Figure

random sample only 1/2 top-k + 1/2 random sample of the tail top-k top-k + one tail proxy

Figure 3: Relative attention-output error versus total tokens read for four tail treatments on two RULER-32K HARD attention heads, using oracle top-k (a,b) or HashAttention (c,d).

• We design QGC and QGS, which compress the key tokens under the query geometry so that clustering and top-k selection follow the attention scores while remaining efficient.

• We introduce ErrorGate, which selects clusters and allocates the budget based on an approximated weight error rather than the mass of each cluster alone.

• OpenAttention preserves 99% of dense accuracy at a 1% read on RULER-32K HARD with Llama-3.1-8B. It also achieves state-of-the-art accuracy across different models and context lengths from 16K to 96K.

• We customise a Triton-based FlashAttention-2 (Dao, 2024) decode kernel into OpenAttention.flash, which runs the estimator as one online softmax pass. It accelerates the decode attention stage by 5–10× over dense attention at 3% and 1% reads.

References (63)