WorksComputer Science
NoHairCache: Calibrate-Once KV Cache Eviction with One Power-Law Exponent
Abstract
The decay exponent in KV-cache eviction is an intrinsic property of the model: calibrated once on a single corpus, it transfers directly across domains. Attention-based accumulation (H2O) and recency-based sliding windows (StreamingLLM) are two dominant eviction frameworks, often treated as unrelated, but we show that they are the two endpoints of a single power-law family: by scoring each token as , where is cumulative attention and controls the age penalty, H2O and StreamingLLM correspond to and , respectively (with StreamingLLM additionally hard-coding an attention-sink patch). The no-hair mechanism of \citet{xiang2026nohair} bounds the admissible range of , and the measured exponents agree: calibrating once on WikiText yields for a representative model (Qwen2.5-1.5B-Instruct). The per-model ranges are consistent across five models (410M–1.5B) and independently match the optimal regions from perplexity sweeps. NoHairCache achieves the lowest perplexity across three datasets (WikiText, PG19, and arXiv) without per-dataset tuning, outperforming both H2O and StreamingLLM ( on all three datasets, with – PPL gains over StreamingLLM at budget ). On downstream four-way multiple-choice QA, it matches or outperforms StreamingLLM across all nine (task, budget) cells, retaining of full-cache accuracy on NarrativeQA at retention versus for StreamingLLM; per-cell McNemar tests are not significant, so QA is corroborating only. We release our calibration script and drop-in scorer upon publication.
Introduction
Long-context inference is often bottlenecked at generation time: every decoded token has to attend to the entire KV cache, causing memory usage to grow linearly and, as a result, total attention compute to scale quadratically with sequence length. Caching every past key-value pair is therefore untenable, making token eviction unavoidable. The question now is: by what criterion should tokens be evicted?
Existing eviction policies rely on diverse scoring heuristics: accumulated attention (H2O) [17], recency windows (StreamingLLM) [15], observation-window pooling (SnapKV) [8], query-aware relevance (Quest) [5], or even random selection. Two paradigms dominate in practice: accumulation-based methods (e.g., H2O) and recency-based methods (e.g., StreamingLLM) [17, 15]. Although power-law decay of token influence has been observed empirically [9, 14], these two paradigms remain disconnected heuristics without a unified parameterization.
In this work, we show that they are in fact opposite endpoints of a single power-law family. By scoring each cached token at decoding step as
where denotes cumulative attention and governs the age penalty, we are able to unify both strategies under a single framework. The H2O and StreamingLLM scoring rules then correspond to the endpoints and , respectively (StreamingLLM additionally hard-codes an attention sink). Consequently, designing an eviction policy reduces from choosing between competing heuristics to identifying the decay exponent of this family, which we calibrate per layer.
The exponent is an intrinsic property of the model architecture rather than the input data distribution. Measuring for each model once on a single calibration corpus (e.g., WikiText-103) yields consistent means and bulk ranges across models (such as Qwen2.5-1.5B and Pythia-1.4B), although the detailed layer-wise profiles are only partly preserved; the measured values align closely with optimal perplexity sweeps, and each model’s frozen transfers unchanged to distinct domains like PG19 and arXiv.
To ground theoretically, we draw on the empirical no-hair mechanism established in our prior work [14], which shows that a prompt’s hidden-state influence on position decays as , with bounded layer-wise within [0.2, 0.7] by attention-dilution geometry. The theorem constrains the exponent within a family but does not select the family itself.
Building on this insight, we introduce NoHairCache, a lightweight, drop-in scorer that replaces the scoring function of top- eviction policies with our power-law formulation based on offline-calibrated, per-layer values, incurring only a single scalar multiplication per eviction step over H2O. In summary, we make the main following contributions:
Intrinsic, Calibrate-Once Decay Profiles. We demonstrate that the per-layer decay exponent is an intrinsic property of the model rather than the corpus: across five models its mean lies in 0.602–0.663, and a single offline calibration transfers without re-tuning across WikiText, PG19, arXiv, cache budgets, and downstream QA. We further show why hidden-state influence avoids the softmax recency bias that underestimates in attention-mass proxies.
Unified Power-Law Framework. We relate accumulation-based (H2O) and recency-based (StreamingLLM) KV-cache eviction as opposite endpoints ( and ) of a single power-law decay family ; the family is a modeling choice, not a consequence of the no-hair theorem, which only constrains the exponent within a family.
Lightweight Drop-In Algorithm (NoHairCache). We propose a training-free, plug-and-play eviction scorer that integrates per-layer calibrated exponents into standard top- eviction pipelines with negligible overhead (a single scalar multiplication per step over H2O).
Cross-Domain and Downstream Gains. Across three corpora (WikiText, PG19, arXiv) and three long-context QA benchmarks (NarrativeQA, HotpotQA, Qasper), NoHairCache improves perplexity with statistical significance (paired Wilcoxon on every dataset), while on QA it is never worse than StreamingLLM (e.g., retaining 98.2% of full-cache accuracy on NarrativeQA at a 25% cache budget vs. 91.1% for StreamingLLM) though the gains are not statistically significant (per-cell McNemar).
Echoing the “no-hair” principle in black hole physics, which argues that complex objects collapse down to just a few fundamental parameters, our findings suggest that the seemingly complex behavior of KV cache eviction policies is largely governed by a single intrinsic power-law form, whose exponent profile is fixed once per model. Rather than designing increasingly intricate heuristics, future cache compression methods can build directly on this unified power-law formulation with a one-time, per-model calibration.
Organization. We organize this work as follows. § 2 reviews prior work on long-context degradation, attention mechanics, and KV-cache compression. § 3 introduces the unified score family and its limiting cases, gives the power-law form, and presents the calibration-and-eviction algorithm. § 4 reports the measured exponents across models and scales, confirms them against perplexity sweeps, and evaluates cross-dataset transfer, budget regimes, cross-model robustness, and downstream QA. Finally, § 5 discusses limitations, and § 6 concludes.
Related Work
Our work bridges theoretical analyses of information propagation in Transformers with practical memory management for long-context inference. We build our contributions across three primary lines of research.
Long-Context Degradation and Instruction Drift. A well-documented failure mode of autoregressive language models is the gradual erosion of early context and system instructions over extended generation horizons [7, 10]. Even when prompts remain within the nominal context window, models exhibit recency bias and fail to retrieve or adhere to initial constraints. To stabilize infinite-length generation, Xiao et al. [ [15] identified the phenomenon of attention sinks, which is, the disproportionate allocation of attention mass to initial tokens, and proposed retaining them alongside a local sliding window. Subsequent theoretical work by Barbero et al. [ [3] suggests that these sinks act as a mechanism to prevent over-mixing across layers. Training-dynamics measurements in Xiang [ [14] show that prompt forgetting sets in much earlier in training (roughly 0.3–1B tokens) than sink formation, so sinks are neither the initial cause of forgetting nor a reliable proxy for prompt retention.
Attention Mechanics, Over-Squashing, and Information Flow. Understanding how information travels across tokens and layers has been extensively studied through norm-based decompositions [6] and attention flow graphs [1]. Dong et al. [ [4] showed that pure self-attention suffers from doubly exponential rank collapse with depth, while Noci et al. [ [13] analyzed signal propagation at initialization using mean-field theory. Along the sequence axis, Barbero et al. [ [2] formalized over-squashing in decoder-only Transformers, bounding the sensitivity of final representations to distant tokens. Complementing this, Nakanishi [ [12] observed that softmax distributions flatten as context length grows (“attention fading”) and proposed length-dependent logit scaling (Scalable-Softmax). Furthermore, natural language itself exhibits power-law decay in long-range mutual information [9]. The conditional no-hair theorem of Xiang [ [14] provides an asymptotic bound of on prompt offset decay, isolating the exact roles of direct attention dilution and multi-layer token relay. We take its finite power-law exponent as the quantity to calibrate here.
KV Cache Eviction and Compression. To mitigate the memory bottleneck of long contexts, numerous heuristics have been proposed to evict unimportant tokens from the KV cache during inference. Heavy-Hitter Oracle (H2O) [17] greedily retains tokens with the highest cumulative attention scores, exploiting the sparsity of attention weights. Similarly, ScissorHands [11] leverages the persistence of pivotal tokens across decoding steps, while SnapKV [8] selects clustered important KV positions based on observation windows. Other approaches allocate cache budgets non-uniformly across layers, such as PyramidKV [16], or select tokens by query-aware relevance [5].
Unlike these isolated heuristics or rigid sliding-window policies [15], our theoretical framework unifies KV cache eviction under a single power-law score family parameterized by the decay exponent . We prove that H2O () and pure sliding windows () are merely boundary extremes of this continuum. Crucially, because is governed by architectural dilution and relay dynamics rather than corpus-specific statistics, it exhibits strong cross-dataset generalizability—allowing a single measured to serve as a reusable parameter across the datasets and tasks we test.
NoHairCache: Theory and Algorithm
The Score Family and Limiting Cases
The admissible range of . To establish the valid range of , we first formalize how a prompt’s effect decays over generation steps.
Following Xiang [ [14], we take two minimally differing prompts and feed each with the same continuation . At layer and generation step , the prompt offset is defined as
which can be considered as the difference between the two residual-stream hidden states at the same position. Its norm measures how much of the prompt still affects the model’s internal state after steps. In this sense we call it the prompt’s influence. To form an influence profile comparable across coordinates, we average the offset over continuations, normalize each coordinate by its spread across continuations in the first window, and take the root mean square:
where is coordinate of , is the hidden width, averages over the continuations shared by the prompt pair, and is the standard deviation of across those continuations in the first window (pooled over both prompts, so no coordinate dominates by scale). This profile decays approximately as a power law, that is, . We give now the no-hair result of Xiang [ [14]:
Theorem 1 (No-hair bound, Xiang [ [14]). For trained Transformer language models, the power-law decay exponent of token influence satisfies for the bulk of layers asymptotically in depth while boundary layers of finite-depth models may lie outside this interval.
The bound is therefore a statement about the bulk of layers rather than every layer: measured bulk ranges agree with it, while boundary layers in some models exceed it (Table 1).
| Architecture | Model | mean | range | Bulk |
| Pythia | 410M | 0.637 | [0.576, 0.898] | [0.576, 0.676] |
| Pythia | 1B | 0.663 | [0.597, 0.896] | [0.611, 0.640] |
| Pythia | 1.4B | 0.634 | [0.563, 0.902] | [0.563, 0.643] |
| Qwen | 0.5B | 0.602 | [0.533, 0.709] | [0.533, 0.656] |
| Qwen | 1.5B | 0.620 | [0.556, 0.822] | [0.556, 0.667] |
Table 1. Measured decay exponent across five models and two architectures. “Bulk” is the range of the middle layers after removing the first and last four measured layers; layers without a valid fit are excluded, so the layer count may differ from the official depth by one.
Remark. Here, the word “trained” means the released checkpoints our calibration script loads (Pythia-410M/1B at step143000, the other three at default revisions). Models with randomly initialized weights do not show this property. However, we make no claim about partially trained model. Refer to Xiang [ [14] for more details.
Note that Theorem 1 constrains within the power-law family but does not select the family itself (§ 3.2). Its role in this paper is thus motivational: it tells us which range of is worth measuring. Whether and where a given model realizes an exponent in this range remains an empirical question and we measure it across five models in § 4.2 and confirm the measured value against downstream PPL in § 4.3.
To bridge our theoretical dilution results with practical KV cache management, we introduce a unified view of eviction policies. Specifically, for the -th attention head in layer , the attention matrix is
where is the head dimension and the causal mask. We write for the weight assigned by the query at position to the key at position . The cumulative historical importance of token at step is , and its age is , the number of decoding steps elapsed since token was generated.
We now propose the unified score family for KV-cache eviction that combines historical importance with distance-induced dilution. In its most general form the exponent may depend on the layer,
A single scalar is the special case for all layers. Throughout the theoretical discussion denotes a generic exponent and every statement below holds pointwise for each layer upon setting . Per-layer is the default while scalar is used for analysis and as a deployment tier. Eviction is per-head, unlike StreamingLLM. Two axes are separate: age-penalty shape ( vs. ) and exponent granularity (scalar vs. per-layer). Here, captures the accumulated historical importance, while (or in the scalar case) models the accessibility penalty under dilution. This family seamlessly connects existing heuristics (Figure 1) and the two propositions below are stated for a uniform exponent and hold for each layer pointwise upon setting :
Figure 1. One score family, three policies. (a) The relative score versus token age, from the H2O endpoint () through a finite power law to the StreamingLLM endpoint (). Markers show where a fixed eviction threshold is crossed. (b) A finite lets an old, high-attention token outrank a recent, low-attention one until the crossover with and , , inside the measured range.
Proposition 1 ( recovers the H2O scoring term). For any sequence length and token position , setting yields , the Heavy-Hitter Oracle (H2O) scoring term.
Proof. The proof comes directly from the definition: .
Proposition 2 ( Sliding Window). Assume the historical importance ratio is bounded in for all . There exists a finite threshold such that for all , the score is strictly monotonic with respect to token age, recovering a pure sliding window policy.
Proof. For any two positions , we have . The score ratio can be written as:
where . Taking the natural logarithm of both sides:
Since , we have . As , the second term dominates, driving the logarithm to , and thus . Consequently, for any fixed pair , there exists a threshold beyond which . Setting ensures that older tokens are strictly penalized for all .
:::
Remark (The Attention Sink is Orthogonal). According to Proposition 2, taking the limit gives a pure sliding window without an attention sink, because a power-law score inherently penalizes position 0 as . Thus the scoring component of StreamingLLM corresponds to the endpoint, but the full policy additionally hard-codes an attention-sink patch; a single value of alone cannot reproduce that mechanism. We therefore treat as a continuous parameter for decay shape and hard-coded sinks as orthogonal architectural patches where is uniform across layers.
Why Power-Law over Exponential Decay
Notice that we parameterize token-value decay within the power-law family rather than the exponential family . This is a modeling choice rather than a consequence of the no-hair theorem: the theorem constrains the exponent within the power-law family. We choose the power-law family for two reasons.
No characteristic length. Exponential decay introduces a characteristic scale beyond which token value collapses. This would impose an artificial “age cutoff” on attention dilution. Attention dilution in long contexts exhibits no such natural cutoff. Instead, a token’s relevance decays gradually without a preferred time scale. Power-law decay is scale-free and matches this natural behavior. For example, setting causes exponential weights to plummet by nearly four orders of magnitude from to ( vs. ), whereas a power law with decays by only a factor of across the same tenfold span.
Tail-safe retention. Because exponential decay collapses rapidly, old tokens are effectively zeroed out and may be evicted even when they still carry residual global context. Power-law decay falls slowly, so an old-but-relevant token survives eviction as long as its score remains above the budget threshold. For instance, early anchor tokens, such as system prompts, entity
Algorithm 1 NoHairCache: Offline Calibration and Online KV Eviction
Require: Model with $L$ layers and $H$ heads per layer, calibration prompt pairs $\mathcal{P}_{\mathrm{cal}}$ (default 100 pairs per axis across 4 axes, each pair being two minimally differing prompts with 8 shared continuations), KV budget $B$, optional preset $\alpha_{\mathrm{fixed}}$.
Ensure: Frozen per-layer exponents $\{\alpha^{(l)}\}_{l=1}^{L}$ (or a scalar $\alpha$) and evicted KV cache at each decoding step $t$.
Stage 1: Offline Calibration (Run Once per Model)
1: if $\alpha_{\mathrm{fixed}}$ is not specified then
2: Run forward passes on $\mathcal{P}_{\mathrm{cal}}$ with shared continuations to record prompt offsets $\delta_l(t;c)$ and the influence profile $S_l(t)$ across octave windows.
3: Fit $\alpha^{(l)}=-\operatorname{slope}\{\log S_l(t),\log t\}$ (or aggregate to a scalar $\alpha$).
4: else
5: Set $\alpha\leftarrow\alpha_{\mathrm{fixed}}$ (e.g., $\alpha=1/2$).
6: end if
7: Freeze the exponents in the model configuration; precompute per-layer age-decay tables $D_l[d]=d^{-\alpha^{(l)}}$ for $d\ge1$ (a shared table $D[d]=d^{-\alpha}$ in the scalar case).
Stage 2: Online Eviction (At Decoding Step $t$)
8: for layer $l=1,\ldots,L$ and head $h=1,\ldots,H$ do
9: Update cumulative attention score $A_i^{(l,h)}(t)$ for active cache positions $i\le t$.
10: if cache size exceeds budget $B$ then
11: for each candidate token $i$ in cache do
12: Compute score $s_i^{(l,h)}(t)\leftarrow A_i^{(l,h)}(t)\cdot D_l[t-i]$.
13: end for
14: Evict lowest-scoring tokens (subject to any fixed sink/window policy if configured) to maintain budget $B$.
15: end if
16: end for
definitions, or task constraints defined thousands of steps ago, retain non-negligible scores under a heavy tail rather than being purged in favor of transient local context.
Calibration and Eviction Algorithm
The decay exponents are an intrinsic property of the model, not of the dataset or task, so we can calibrate it once and reuse for other dataset or tasks. On this basis, we formulate NoHairCache as a two-stage procedure of offline calibration and online KV-cache eviction (Algorithm 1, Figure 2). Following Xiang [ [14], for each pair of minimally differing prompts with a shared continuation we record the prompt offset , aggregate the squared offsets over prompts and continuations into a root-mean-square influence profile over logarithmically spaced (“octave”) windows , and fit (since the influence decays as , the log–log slope is ).

Figure 2. NoHairCache pipeline corresponding to Algorithm 1. Stage 1 runs once per model: prompt offsets are aggregated into influence curves , whose log–log slope gives the per-layer exponent via . The frozen exponents and per-layer age tables are reused at every decoding step. Stage 2 scores cached tokens with and evicts the lowest-scoring ones.
Online efficiency and deployment tiers. Once the exponents are frozen, precomputing into per-layer age-indexed lookup tables avoids repeated exponentiation during decoding: scoring a token requires only one table lookup and one multiplication. Compared to H2O (), the incremental online overhead is just one multiplication per scored entry at eviction steps. In practice, the framework supports three deployment tiers under a single configuration switch: (i) the theoretical default with zero calibration cost, (ii) a single frozen scalar calibrated offline, and (iii) per-layer calibrated offline for finer layer-wise granularity.
Calibration is not hyperparameter tuning. Like LayerNorm’s running statistics, is a structural model quantity estimated once and read at inference, not tuned per downstream task. We calibrate once per model on WikiText-103 and keep it frozen across all datasets, budgets, and benchmarks.
Experiments and Results
In this section, we evaluate the NoHairCache algorithm introduced in § 3.3. We first describe the setup, then examine the measured exponents, verify them against perplexity sweeps, and test cross-dataset transfer, budget regimes, cross-model robustness, and downstream QA.
Setup
Models and calibration. We evaluate on autoregressive language models from the Pythia and Qwen families, including Pythia-410M, Pythia-1B, Pythia-1.4B, Qwen2.5-0.5B, and Qwen2.5-1.5B-Instruct (denoted Qwen2.5-1.5B below). All calibrations are performed once on the WikiText-103 validation split using 100 prompt pairs per axis across 4 axes (detail, para, lang, unrelated). Each pair consists of two minimally differing prompts, and both prompts are teacher-forced with the same 8 shared continuations, i.e. 16 forward passes per pair and passes in total (the subsequent bootstrap resampling and power-law fitting take only a few seconds). On a MacBook with an Apple M3 chip and 36 GB unified memory (MPS backend, octave windows up to 1024 tokens), a full calibration run takes approximately 20.3 min for Pythia-410M (23 layers), 49.8 min for Pythia-1B (15 layers), 67.4 min for Pythia-1.4B (24 layers), and 78.6 min for Qwen2.5-1.5B (27 layers), scaling roughly linearly with the number of pairs and continuations and with maximum window length (timings reported for four of the five models and Qwen2.5-0.5B calibration follows the same procedure). However, our framework scales to larger models and context windows for readers with greater compute budgets.
Evaluation protocol. We evaluate perplexity across WikiText-103, PG19, and arXiv on 50 sequences of 2,048 tokens per dataset with a streaming chunk size of 128. KV-cache eviction is simulated via an attention mask, which is mathematically equivalent to physically cropping key and value entries while avoiding RoPE position-index bookkeeping artifacts.
Measured across Models and Scales
Table 1 reports the measured exponent across five models and two architectures: three Pythia variants (410M, 1B, 1.4B) and two Qwen variants (0.5B, 1.5B), spanning a 3× parameter range. The per-model mean lies between 0.602 and 0.663 (coefficient of variation under 4%), and the per-model bulk intervals all fall inside [0.533, 0.676]. Two observations follow. First, does not drift with scale: the three Pythia means are 0.637, 0.663, and 0.634 for 410M, 1B, and 1.4B, and the two Qwen means are 0.602 and 0.620 for 0.5B and 1.5B—the Pythia means are non-monotonic in scale, and the Qwen mean rises by only 0.018. Second, does not drift with architecture: the Qwen means are slightly lower than the Pythia means (0.602–0.620 vs. 0.634–0.663) but still fall within the Pythia per-layer range.
The layer structure is only partly preserved (Figure 3): in every model the first two layers carry the highest exponent and the middle layers are comparatively flat, but the final layers do not show a consistent rebound across models; the full per-layer profile for Qwen2.5-1.5B is listed in Table 9 (Appendix § 7).
Figure 3. Measured per-layer exponent (hidden-state influence, detail axis) for all five models, plotted against normalised depth . The means span only 0.602–0.663, and the no-hair interval [0.2, 0.7] is shaded. Boundary layers carry the highest exponent in every model while the middle layers are comparatively flat, as discussed in § 4.2.
Table 9: Per-layer measured by hidden-state influence (teacher-forced prompt pairs, detail axis), Qwen2.5-1.5B. The measured range [0.556, 0.822] is consistent with a finite power-law exponent and matches the PPL-optimal plateau [0.6, 0.8] while boundary layers (L1–L2) sit slightly higher, as expected for finite-depth models.
| Layer | Layer | Layer | |||
| 1 | 0.822 | 10 | 0.658 | 19 | 0.570 |
| 2 | 0.774 | 11 | 0.649 | 20 | 0.556 |
| 3 | 0.622 | 12 | 0.615 | 21 | 0.575 |
| 4 | 0.611 | 13 | 0.595 | 22 | 0.614 |
| 5 | 0.576 | 14 | 0.584 | 23 | 0.627 |
| 6 | 0.602 | 15 | 0.589 | 24 | 0.623 |
| 7 | 0.627 | 16 | 0.577 | 25 | 0.612 |
| 8 | 0.657 | 17 | 0.604 | 26 | 0.589 |
| 9 | 0.667 | 18 | 0.568 | 27 | 0.581 |
Table 9.
The one systematic scale effect we observe is in the upper end of the range: Qwen-0.5B, the smallest model, has an upper bound of only 0.709, barely above the no-hair bound of 0.7, whereas Qwen-1.5B reaches 0.822. For Pythia, by contrast, the upper bound is flat across scales (0.896–0.902). We have no explanation for this architecture-dependent difference; note that Qwen-0.5B and Pythia-410M have the same depth (23 measured layers) yet very different upper bounds. The mean , a scalar summary of the calibrated profile, is unaffected by this effect and stays within 0.602–0.663 across the full scale range.
We read these observations as evidence that the mean is a property of the training dynamics rather than of a particular depth, width, or architecture: depth varies from 15 to 27 across our models, width from 896 to 2048, yet the mean exponent moves by less than 0.07 in absolute terms. This is consistent with the attention-dilution mechanism of Xiang [ [14], which is a property of the attention operation itself and should not depend on the specific architecture.
The Measured Agrees with the PPL Optimum
Before evaluating the full system, we verify that the measured is the right value to deploy. An -sweep on downstream perplexity, that is, a diagnostic sweep, not a deployment-time calibration, varies from 0.1 to 4.0 on all three evaluation datasets (Figure 4, Table 2). The PPL-optimal exponent falls in [0.6, 0.8] on every dataset, overlapping the hidden-state measurement [0.556, 0.822] of § 4.2. The curve is flat on this interval and rises monotonically for , so the plateau is a genuine optimum rather than a boundary artifact of the sweep range. The coarse 0.1-step grid resolves the arXiv minimum to 4.068, and refining or using the per-layer vector lowers it by a further 0.002 PPL (Table 3) without moving the optimum. As grows, PG19 PPL approaches the StreamingLLM endpoint (17.360 at versus 17.395), confirming the limit of Proposition 2 empirically while remaining far below the H2O endpoint. Three datasets and the hidden-state measurement therefore agree on where lives, and all are consistent with a finite power-law exponent without assuming a specific range. The sweep uses a global scalar for clarity and the per-layer variant used in Table 4 differs by at most 0.04 PPL (Table 3). The full NoHairCache pipeline, with frozen at the measured value, is evaluated below.
| WikiText | PG19 | arXiv | |
| 0.1 | 10.541 | 19.297 | 4.628 |
| 0.2 | 10.186 | 18.538 | 4.425 |
| 0.3 | 9.920 | 17.935 | 4.231 |
| 0.4 | 9.732 | 17.349 | 4.093 |
| 0.5 | 9.698 | 17.288 | 4.071 |
| 0.6 | 9.666 | 17.271 | 4.068 |
| 0.7 | 9.666 | 17.267 | 4.068 |
| 0.8 | 9.662 | 17.266 | 4.073 |
| 1.0 | 9.666 | 17.268 | 4.083 |
| 1.5 | 9.687 | 17.293 | 4.103 |
| 2.0 | 9.698 | 17.321 | 4.120 |
| 4.0 | 9.725 | 17.360 | 4.149 |
Table 2. -sweep on WikiText validation, 50 sequences, budget = 512, evaluated on all three datasets with the same calibration. PPL is flat on [0.6, 0.8] and rises monotonically for on every dataset. The three per-dataset minima (WikiText and PG19 at , arXiv at – on this grid, to within the 0.002 PPL refinement in Table 3) all lie inside the hidden-state measurement range [0.556, 0.822]. This is a diagnostic sweep, not a deployment-time calibration: it varies a single frozen across all layers.
| Calibration | WikiText | PG19 | arXiv |
| Theory default () | 9.698 | 17.288 | 4.071 |
| Global scalar () | 9.664 | 17.271 | 4.066 |
| Per-layer | 9.691 | 17.305 | 4.066 |
| Shuffled per-layer | 9.672 | 17.283 | 4.066 |
Table 3. Calibration sensitivity at budget = 512, Qwen2.5-1.5B. All rows use the same score family, only how is obtained differs. Global, per-layer, and shuffled per-layer are within 0.04 PPL. The theory default is slightly worse than the global and shuffled variants on every dataset. “Shuffled per-layer” randomly permutes the vector across layers.
Figure 4. -sweep perplexity at budget 512 on all three datasets (same calibration, diagnostic only). The grey band marks the hidden-state measurement range [0.556, 0.822] and stars mark each dataset’s minimum. PPL is flat for and rises for , so the optimum is a finite power-law exponent rather than a boundary artifact. This is the raw data behind Table 2.
Table 4: Cross-dataset generalization at budget = 512. calibrated on WikiText only (Qwen2.5-1.5B), used unchanged on all three datasets. NoHairCache is the lowest-PPL method on every row. and are NoHairCache vs StreamingLLM (Wilcoxon signed-rank, 50 sequences).
| Dataset | H2O | NoHairCache | StreamingLLM | ||
| WikiText | 10.764 | 9.691 | 9.748 | −0.057 | 0.0059 |
| PG19 | 19.696 | 17.305 | 17.395 | −0.090 | 0.0218 |
| arXiv | 4.786 | 4.066 | 4.170 | −0.104 | <0.001 |
Table 4.
How sensitive is the result to how is set? Table 3 varies the calibration strategy while holding everything else fixed. A single global scalar matched to the measured mean (), the per-layer vector, and a randomly shuffled per-layer vector all land within 0.04 PPL of each other on every dataset. The theory default is slightly worse than the global-scalar and shuffled variants on all three datasets. On PG19 it is marginally better than the per-layer row (17.288 vs 17.305), which itself sits slightly above the other calibrated variants. The result is therefore insensitive to the granularity of calibration: a single scalar matched to the measured mean suffices, and the per-layer structure contributes only a second-order correction. We report the per-layer variant throughout as the principled choice, noting that on this fixed evaluation slice the differences among calibrated variants are small and do not change the conclusions, and that the global scalar is in fact slightly better on WikiText and PG19. This is consistent with being a coarse-grained model property rather than a per-layer tuning knob.
Cross-Dataset Generalization
The comparison is stable across corpora: with frozen from WikiText at budget = 512 (Table 4), NoHairCache attains the lowest perplexity on every dataset, outperforming StreamingLLM () by 0.057/0.090/0.104 PPL on WikiText/PG19/arXiv and also beating H2O (). Against StreamingLLM: WikiText 9.691 vs 9.748 (), PG19 17.305 vs 17.395 (), arXiv 4.066 vs 4.170 (). Against H2O the margins are larger (−1.07, −2.39, and −0.72 PPL respectively). A paired Wilcoxon signed-rank test over the 50 sequences confirms both comparisons on every dataset: NoHairCache beats StreamingLLM on 34/33/44 of 50 sequences, and beats H2O on 50/50/50 sequences ( on all three datasets). We attribute H2O’s poor performance to cumulative attention being dominated by early high-frequency filler tokens, so middle-context content is crowded out of the top- regardless of dataset.
Budget Curves
Table 5 and Figure 5 report PG19 with six budgets from 32 to 1024. NoHairCache wins when 6–25% of tokens are retained, ties StreamingLLM near full cache (> 50% retained), and loses only below retention (budget ), where the pure-recent strategy is optimal. H2O is worst at every budget. The crossover point moves with distribution: PG19 at , WikiText at , and arXiv at (Appendix § 8).
Table 5: PG19 budget curve (Qwen2.5-1.5B, from WikiText calibration). The crossover between StreamingLLM and NoHairCache occurs between 64 and 128 ( 3–6% retained). Below it, StreamingLLM’s pure-recent strategy wins. Above it, NoHairCache wins. Near full cache the two nearly tie, with NoHairCache still slightly ahead. H2O is worst at every budget.
| Budget | Retained (%) | H2O | NoHairCache | StreamingLLM |
| 32 | 1.5 | 24.705 | 21.845 | 21.042 |
| 64 | 3.1 | 23.770 | 20.158 | 19.919 |
| 128 | 6.2 | 22.621 | 18.746 | 18.893 |
| 256 | 12.5 | 21.227 | 17.830 | 17.990 |
| 512 | 25.0 | 19.696 | 17.305 | 17.395 |
| 1024 | 50.0 | 18.088 | 17.006 | 17.025 |
Table 5.
Figure 5. KV-budget curves for Qwen2.5-1.5B with calibrated on WikiText only (shaded: budgets where NoHairCache beats StreamingLLM). NoHairCache dominates at moderate compression, nearly ties near full cache (still slightly ahead), and loses only at the tightest budgets. The crossover shifts with the dataset (PG19 , arXiv , WikiText ). Raw numbers: Table 5 and Appendix § 8.
Cross-Model Verification
Table 6 reports Pythia-1.4B on all three datasets at budgets 128 and 512, using Pythia’s own per-layer measured on WikiText only. NoHairCache wins every cell on this model. For WikiText and PG19 the margin is larger at budget 128 (−0.23 and −0.32) than at 512 (−0.06 and −0.12), consistent with the budget-curve finding that the advantage is largest under moderate compression.
Table 6: Cross-model verification on Pythia-1.4B. calibrated on WikiText only. NoHairCache wins every cell and the margin is larger at budget 128 than at 512, consistent with the budget curve on Qwen.
| Dataset | Budget | H2O | NoHairCache | StreamingLLM | |
| WikiText | 128 | 17.964 | 14.180 | 14.408 | −0.228 |
| WikiText | 512 | 14.251 | 12.367 | 12.431 | −0.064 |
| PG19 | 128 | 19.615 | 15.630 | 15.951 | −0.321 |
| PG19 | 512 | 16.924 | 14.735 | 14.857 | −0.122 |
| arXiv | 128 | 7.129 | 5.380 | 5.461 | −0.081 |
| arXiv | 512 | 5.385 | 4.470 | 4.564 | −0.094 |
Table 6.
For arXiv the two budgets are comparable (−0.081 at 128, −0.094 at 512), consistent with arXiv’s earlier crossover ( 64).
To test whether the advantage depends on model capacity, we repeat the comparison on Pythia-1B, Pythia-410M, and Qwen-0.5B (Table 7). The advantage over StreamingLLM grows with scale, and the pattern is consistent across the two architectures. At 1.4B and 1.5B, NoHairCache wins every cell (). At 1B, it ties on WikiText at budget 128 and is better or equal elsewhere (). At 410M and 0.5B, the picture separates by dataset: Pythia-410M is worse on WikiText (+0.21 and +0.14) but comparable on PG19 (−0.01 and +0.01) and better on arXiv (−0.01 and −0.08) while Qwen-0.5B is better on WikiText-128 (−0.31) and on arXiv, but worse on PG19 (+0.26 and +0.04). Against H2O, every model still improves substantially at every budget.
| Model | Params | WT-128 | WT-512 | PG-128 | PG-512 | AX-128 | AX-512 |
| Pythia-410M | 410M | 0.213 | 0.140 | −0.014 | 0.012 | −0.008 | −0.083 |
| Pythia-1B | 1.0B | 0.000 | −0.038 | −0.097 | −0.040 | −0.011 | −0.106 |
| Pythia-1.4B | 1.4B | −0.228 | −0.064 | −0.321 | −0.122 | −0.081 | −0.094 |
| Qwen-0.5B | 0.5B | −0.305 | −0.013 | 0.255 | 0.038 | −0.025 | −0.114 |
| Qwen-1.5B | 1.5B | −0.226 | −0.057 | −0.379 | −0.090 | −0.104 | −0.104 |
Table 7. Cross-scale robustness: = NoHairCache − StreamingLLM in aggregate PPL (negative is better). The advantage grows with scale and the pattern is consistent across architectures: the 1.4B/1.5B models win every cell, the three B models are mixed. Evaluation uses a fixed slice of 50 non-overlapping 2048-token segments per dataset, so the differences are deterministic rather than sampling noise. is calibrated on WikiText and frozen for every cell.
The measured itself is stable across these scales (Table 1), so the trend reflects the eviction policy’s usable signal rather than the exponent’s estimation. Small models attend more locally, so a pure sliding window is already close to optimal and the benefit of retaining distant tokens is small. The advantage over StreamingLLM emerges once the model has enough capacity to exploit the retained context. The asymmetry between datasets at small scale, which is, worse on PG19, better on WikiText, is consistent with this account: PG19’s narrative structure is the most locally predictable of the three, so a pure-recent window is hardest to beat there. NoHairCache therefore targets models of roughly 1B parameters and above, which is also the regime where KV-cache eviction matters in practice. At smaller scales it remains a strict improvement over attention-accumulation baselines but not over a well-tuned sliding window.
Downstream Task Accuracy
Table 8 and Figure 6 report four-way multiple-choice accuracy (random = 0.25) on three LongBench QA subsets, 100 samples per cell, with calibrated on WikiText only. NoHairCache is never worse than StreamingLLM (6 better, 3 tied, 0 worse, one-sided sign test ) while H2O is worst in all 9 cells. A paired per-question McNemar test (exact binomial, two-sided) finds no significant advantage in any individual cell: exact for all nine (task, budget) cells, with Holm-adjusted throughout. The sign test above is therefore descriptive rather than confirmatory, and we do not claim per-task statistical significance for the accuracy gains. The advantage is largest on NarrativeQA, the single-document task where the answer lies in the middle of a long narrative: at budget = 512, NoHairCache retains 98.2% of full-cache accuracy (0.55 vs 0.56), whereas StreamingLLM retains 91.1% (0.51 vs 0.56). This 7-percentage-point gap is consistent with truncation of middle-context tokens. We do not test this mechanism directly. On Qasper, full-cache accuracy is only 0.49 and all methods degrade to 0.31–0.38, and the task does not discriminate between policies (Appendix § 10).
Table 8: Four-way multiple-choice accuracy on LongBench QA subsets (random = 0.25), 100 samples per cell, calibrated on WikiText only. NoHairCache is never worse than StreamingLLM (6 better, 3 tied, 0 worse, one-sided sign test ) while H2O is worst in all 9 cells. Per-cell exact McNemar tests are not significant after Holm correction. The largest margin is on NarrativeQA at budget = 512, where NoHairCache retains 98.2% of full-cache accuracy versus 91.1% for StreamingLLM.
| Subset | Budget | Full | H2O | StreamingLLM | NoHairCache | Retain (%) |
| NarrativeQA | 128 | 0.56 | 0.30 | 0.50 | 0.52 | 92.9 |
| NarrativeQA | 256 | 0.56 | 0.35 | 0.51 | 0.53 | 94.6 |
| NarrativeQA | 512 | 0.56 | 0.35 | 0.51 | 0.55 | 98.2 |
| HotpotQA | 128 | 0.79 | 0.61 | 0.72 | 0.73 | 92.4 |
| HotpotQA | 256 | 0.79 | 0.64 | 0.72 | 0.72 | 91.1 |
| HotpotQA | 512 | 0.79 | 0.66 | 0.73 | 0.75 | 94.9 |
| Qasper | 128 | 0.49 | 0.31 | 0.33 | 0.33 | 67.3 |
| Qasper | 256 | 0.49 | 0.31 | 0.35 | 0.35 | 71.4 |
| Qasper | 512 | 0.49 | 0.34 | 0.37 | 0.38 | 77.6 |
Table 8.
Figure 6. Four-way multiple-choice accuracy on three LongBench QA subsets (random = 0.25, 100 samples per cell, s.e.), dashed lines are full-cache accuracy. NoHairCache is never worse than StreamingLLM and H2O is worst in every cell, with the largest margin on NarrativeQA at budget 512. Raw numbers: Table 8.
Discussion and Limitations
Why NoHairCache wins. The mechanism is visible in the budget curve, not in a separate retrieval benchmark: under moderate compression, the cache has enough room to retain some distant tokens, and a finite retains exactly those whose cumulative attention justifies their age. Under extreme compression, there is little room for distant tokens regardless of score, where StreamingLLM wins is dataset-specific (budgets on PG19, 32 on arXiv, and at or below 32 on WikiText). Near full cache, all policies approximate full attention. NoHairCache’s advantage is therefore regime-specific and mechanistically explained by the budget curve itself.
Proxy limitation. Prior work suggests that attention-mass proxies can underestimate the decay exponent due to softmax recency bias [14] and we do not quantify the discrepancy here. This is a property of the proxy, not of the framework: the hidden-state measurement and the PPL sweep agree with each other.
What we do not claim. We do not claim that NoHairCache preserves middle-context information better than StreamingLLM and we have not run a retrieval benchmark that would establish this. We claim that (i) the decay exponent is a measurable model property, (ii) measuring it once on one dataset generalizes to others, and (iii) using it improves language-modeling perplexity across datasets and models without per-dataset tuning.
Boundary conditions. Our results cover models up to 1.5B parameters and 2048-token sequences. The dilution mechanism behind the no-hair bound is scale-free, so we expect the calibrated exponent to remain stable at larger scales, but this has not been tested.
Conclusion
Existing KV-eviction policies implicitly choose a decay exponent: H2O sets it to zero, StreamingLLM to infinity. We have shown that these are the two endpoints of a single power-law score family, and that the exponent between them is not a heuristic knob but a measurable property of the model, whose admissible range is narrowed by the no-hair bound.
What we established. The decay exponent is measurable from hidden-state influence with a one-time calibration per model: its bulk value is stable across scale and architecture and agrees with the optimum of an independent perplexity sweep. Once frozen on a single corpus, the exponent transfers unchanged to unseen domains, cache budgets, and downstream tasks, without per-dataset tuning. The resulting drop-in scorer adds one multiplication per eviction over H2O and lowers perplexity on WikiText, PG19, and arXiv, and improves four-way multiple-choice accuracy on LongBench, in the regime where eviction actually matters.
Scope and outlook. The gain is regime-specific and mechanistically explained by the budget curve: a finite exponent helps when there is enough room to retain distant tokens whose cumulative attention justifies their age, and vanishes near full cache or under the tightest budgets. Our results cover five models and 2048-token sequences, and we do not claim to preserve middle-context information beyond what perplexity and QA measure. More broadly, the no-hair view suggests that cache compression need not be a search over heuristics: a single structural quantity, calibrated once, may be enough to place any policy on the accumulation–recency spectrum. Extending this view to longer contexts, other architectures, and per-head exponents is left to future work.
Per-layer (Qwen2.5-1.5B, WikiText, detail axis)
Budget curves on WikiText and arXiv
| Budget | Retained (%) | H2O | NoHairCache | StreamingLLM |
| 32 | 1.5 | 14.853 | 12.695 | 13.041 |
| 64 | 3.1 | 13.910 | 11.602 | 12.056 |
| 128 | 6.2 | 12.799 | 10.830 | 11.073 |
| 256 | 12.5 | 11.726 | 10.200 | 10.289 |
| 512 | 25.0 | 10.764 | 9.691 | 9.748 |
| 1024 | 50.0 | 9.874 | 9.369 | 9.373 |
Table 10. WikiText budget curve (Qwen2.5-1.5B, from WikiText calibration). NoHairCache has the lowest PPL at every budget; the margin over StreamingLLM narrows toward full cache.
| Budget | Retained (%) | H2O | NoHairCache | StreamingLLM |
| 32 | 1.5 | 7.388 | 6.298 | 6.247 |
| 64 | 3.1 | 6.879 | 5.476 | 5.605 |
| 128 | 6.2 | 6.228 | 4.855 | 4.978 |
| 256 | 12.5 | 5.502 | 4.387 | 4.525 |
| 512 | 25.0 | 4.786 | 4.066 | 4.170 |
| 1024 | 50.0 | 4.196 | 3.911 | 3.948 |
Table 11. arXiv budget curve (Qwen2.5-1.5B, from WikiText calibration). StreamingLLM wins only at the tightest budget (32), NoHairCache wins at all larger budgets.
Proposition 2 proof (full)
This appendix complements the condensed proof of Proposition 2 in § 3.1 with the complete derivation and an explicit statement of its single-step limit. The multi-step trajectory extension is not used and the single-step limit is used only for the endpoint interpretation in § 3.1.
Assumption. At step , for all , .
Proof. Fix ; then , so . The score ratio is
Since as and is a positive constant, . Moreover, iff iff ; since , this is with . Let (finitely many pairs). For all , every satisfies , so the score is strictly decreasing in age and the top- set is . □
Remark. This is a single-step limit, which we use only for the endpoint interpretation in § 3.1; multi-step trajectories require an additional fixed-point argument, which we leave to future work and do not use in the main text.
LongBench four-way multiple-choice details
Distractors are sampled from other questions’ ground-truth answers (3 per question, excluding the correct answer) and options are shuffled. Accuracy is computed by comparing the log-probability of each option after the prompt “Answer:”. Qasper is included for completeness but sits near the Qwen2.5-1.5B capability floor (full-cache accuracy 0.49), and does not discriminate between eviction policies.
References
- [1]Samira Abnar and Willem Zuidema. Quantifying attention flow in transformers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics (ACL), pages 4190–4197, 2020.arxiv.org/abs/2005.00928
- [2]Federico Barbero, Andrea Banino, Steven Kapturowski, Dharshan Kumaran, João GM Araújo, Alex Vitvitsky, Razvan Pascanu, and Petar Veličković. Transformers need glasses! information over-squashing in language tasks. In Advances in Neural Information Processing Systems (NeurIPS), 2024.arxiv.org/abs/2406.04267
- [3]Federico Barbero, Alvaro Arroyo, Xiangming Gu, Christos Perivolaropoulos, Michael Bronstein, Petar Velicković, and Razvan Pascanu. Why do LLMs attend to the first token? arXiv preprint arXiv:2504.02732, 2025.arxiv.org/abs/2504.02732
- [4]Yihe Dong, Jean-Baptiste Cordonnier, and Andreas Loukas. Attention is not all you need: Pure attention loses rank doubly exponentially with depth. In International Conference on Machine Learning (ICML), pages 2793–2803, 2021.
- [5]Suyu Ge, Yunan Zhang, Liyuan Liu, Minjia Zhang, Jiawei Han, and Jianfeng Gao. Model tells you what to discard: Adaptive KV cache compression for LLMs. In International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2310.01801
- [6]Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, and Kentaro Inui. Attention is not only a weight: Analyzing transformers with vector norms. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7057–7075, 2020.
- [7]Kenneth Li, Tianle Liu, Naomi Bashkansky, David Bau, Fernanda Viégas, Hanspeter Pfister, and Martin Wattenberg. Measuring and controlling instruction (in)stability in language model dialogs. arXiv preprint arXiv:2402.10962, 2024a.
- [8]Yuhong Li, Yingbing Huang, Bowen Yang, Bharat Venkitesh, Acyr Locatelli, Hanchen Ye, Tianle Cai, Patrick Lewis, and Deming Chen. SnapKV: LLM knows what you are looking for before generation. In Advances in Neural Information Processing Systems (NeurIPS), 2024b.
- [9]Henry W Lin and Max Tegmark. Critical behavior from deep dynamics and hidden variables in natural language. Entropy, 19(7):299, 2017.
- [10]Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12:157–173, 2024.
- [11]Zichang Liu, Aditya Desai, Fangshuo Liao, Weitao Wang, Victor Xie, Zhaozhuo Xu, Anastasios Kyrillidis, and Anshumali Shrivastava. Scissorhands: Exploiting the persistence of importance hypothesis for LLM KV cache compression at test time. In Advances in Neural Information Processing Systems (NeurIPS), volume 36, 2023.arxiv.org/abs/2305.17118
- [12]Ken M Nakanishi. Scalable-softmax is a superior alternative to softmax. arXiv preprint arXiv:2501.19399, 2025.
- [13]Lorenzo Noci, Sotiris Anagnostidis, Luca Biggio, Antonio Orvieto, Sidak Pal Singh, and Aurelien Lucchi. Signal propagation in transformers: Theoretical perspectives and the role of rank collapse. In Advances in Neural Information Processing Systems (NeurIPS), volume 35, pages 27198–27211, 2022.arxiv.org/abs/2206.03126
- [14]Shuyang Xiang. A conditional no-hair theorem for transformers: How language models forget their prompt. arXiv preprint arXiv:2610.24133, 2026.arxiv.org/abs/2610.24133
- [15]Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. In International Conference on Learning Representations (ICLR), 2024.arxiv.org/abs/2309.17453
- [16]Yichi Zhang, Bofei Gao, Tianyu Liu, Keming Lu, Wayne Xiong, Yue Dong, Baobao Chang, Junjie Hu, Wen Xiao, et al. PyramidKV: Dynamic KV cache compression based on pyramidal information funneling. arXiv preprint arXiv:2406.02069, 2024.arxiv.org/abs/2406.02069
- [17]Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark Barrett, Zhangyang Wang, and Beidi Chen. H2O: Heavy-hitter oracle for efficient generative inference of large language models. In Advances in Neural Information Processing Systems (NeurIPS), volume 36, 2023.arxiv.org/abs/2306.14048




