Manuscript Offprint
arXiv:2609.08131Jacap: Robust KV Cache Eviction via Jacobian-Based Nonlinear Information Capacity Preservation
Abstract
Key-value (KV) cache eviction is essential for scaling long-context inference in Large Language Models. However, existing policies predominantly rely on empirical heuristics, lacking a rigorous characterization of token utility under the inherently nonlinear softmax attention mechanism. In this work, we rethink KV cache eviction through the lens of local information geometry, modeling the attention process as a nonlinear Gaussian communication channel. By performing a first-order Taylor expansion of the attention mapping, we derive the Jacobian Information Capacity, a novel objective that explicitly captures query relevance, softmax sensitivity, and structural diversity. Guided by this theory, we introduce Jacap, a capacity-aware eviction method that utilizes softmax-aware importance weighting and statistical leverage scores for subset selection. Extensive experiments across diverse architectures and benchmarks demonstrate that JACAP delivers superior performance in most scenarios, particularly in high-compression regimes.
1 Introduction
Large language models (LLMs) are increasingly deployed in complex, long-horizon settings such as multi-step reasoning [17], tool-augmented agents [7], and interactive decision-making systems [32]. These applications require processing extremely long contexts, where models must retain and reuse information across thousands or even millions of tokens. Although transformer-based architectures are capable of supporting such tasks in principle, their inference cost grows rapidly with context length, making efficient memory management a critical bottleneck. In particular, the key-value (KV) cache, which stores past attention states for autoregressive decoding, incurs both significant memory overhead and latency as the context grows [19, 18]. This has led to extensive research on KV cache compression, spanning techniques such as representation-level quantization and structural pruning [14, 20]. KV cache eviction, which dynamically prunes redundant entries based on importance, has emerged as a particularly promising approach due to its model-agnostic nature and seamless integration into inference pipelines.
KV cache eviction methods operate by assigning an importance score to each cached token and retaining only the top-ranked subset under a given memory budget. Existing methods generally rely on heuristic criteria such as attention scores [15], token recency [25], or value norms [21] to estimate token importance. While effective in practice, these heuristics lack a principled understanding of which information should be preserved for future queries. As a result, they often treat tokens in
Preprint.
isolation and fail to capture the complex redundancy and complementarity across cache entries, leading to inconsistent performance under aggressive compression regimes.
Recent work [27] has sought a more rigorous foundation by framing KV cache eviction through the Information Bottleneck (IB) principle [23]. By adopting a linear-gaussian surrogate for attention dynamics, this work defines an information capacity objective that quantifies the mutual information between future queries and attention outputs. This framework provides a unified interpretation of query relevance and output diversity, resulting in practical algorithms based on capacity-aware selection. However, we argue that the linear assumption limits the descriptive power of this framework. Transformer attention is governed by the softmax operator, where normalization and competition effects dictate that a token's contribution depends not only on its individual representation but also on its relative sensitivity within the total distribution. A linear approximation treats the query-to-output mapping as a fixed transformation, overlooking the saturation and competition dynamics central to information flow in real attention mechanisms.
In this work, we revisit KV cache eviction from a nonlinear information-theoretic perspective. We model the retained attention mechanism as a nonlinear information channel and derive a local approximation of its information capacity using the Jacobian of the attention mapping around a representative query distribution. This formulation explicitly incorporates query-key alignment, softmax competition, and value-space diversity into a unified objective, with linear capacity emerging as a special case under a linear channel approximation.
Building on this insight, we propose JACAP, a practical eviction method that approximates nonlinear capacity using a softmax-sensitive weighting scheme combined with capacity-based selection. Extensive experiments across diverse architectures and benchmarks demonstrate that JACAP delivers superior performance in most scenarios, especially under high compression ratios.
Our contributions are summarized as follows:
-
We propose a nonlinear information-theoretic framework for KV cache eviction, modeling retained attention as a nonlinear channel and deriving a Jacobian-based local capacity objective.
-
We develop JACAP, a practical eviction algorithm that incorporates softmax sensitivity into capacity-aware token selection.
-
We empirically demonstrate consistent improvements over prior methods on LongBench, NIAH and AIME25 benchmarks, especially under high compression ratio.
2.1 Efficient LLM Inference
The rapidly growing computational cost of LLM inference has motivated optimizations across multiple levels of the inference stack. At the representation level, quantization methods such as TurboQuant [28], PolarQuant [9], and KVQuant [11] reduce memory footprint by storing KV Cache in low-precision formats, though they may introduce non-negligible degradation under extreme long-context settings. At the sequence level, token reduction techniques, including token merging methods such as D2O [24] and CAM [30], aim to shorten the effective context length by consolidating redundant tokens. At the system level, memory management optimizations such as PagedAttention [13] and FlashDecoding++ [10] improve hardware utilization by reducing KV cache fragmentation and increasing token throughput.
Orthogonal to these approaches, structural methods directly compress the KV cache by selectively retaining tokens during decoding. Our method, JACAP, belongs to this category and is complementary to quantization and system-level optimizations.
2.2 KV Cache Eviction
Heuristic-based Eviction. KV cache eviction methods aim to alleviate the memory bottleneck by selectively pruning cached tokens during autoregressive decoding. Early approaches primarily rely on heuristic importance metrics derived from observed token behavior. Attention-based methods, such as H2O [31] and SNAPKV [15], prioritize tokens that receive consistently high attention weights across decoding steps. Other approaches emphasize structural diversity: KEYDIFF [16] promotes geometric dissimilarity among keys to reduce redundancy, while KNORM [5] uses -norms as lightweight proxies for token salience. Recent work has explored estimating token importance beyond observed attention patterns. Expected Attention [6] approximates the expected attention of future queries under a distributional assumption, enabling importance scoring without access to explicit attention matrices.
Despite their empirical effectiveness, these methods typically score tokens independently and therefore fail to capture higher-order interactions such as redundancy and complementarity among retained tokens.
Information-Theoretic Perspectives. Recent work has introduced information-theoretic formulations for KV-cache eviction based on the Information Bottleneck (IB) principle [23, 4]. In particular, CAPKV [27] formulates token selection as maximizing the mutual information between future queries and attention outputs. Under a linear-Gaussian approximation, the objective reduces to a tractable log-determinant form.
However, this formulation relies on a linear approximation of the attention mechanism, effectively treating the query-to-output mapping as a fixed channel. This simplification neglects the nonlinear normalization and competition effects induced by softmax attention, which fundamentally govern how information is distributed across tokens. In contrast, our work models attention as a nonlinear information channel and derives a Jacobian-based local capacity objective, enabling a more faithful characterization of information flow in the KV cache.
3 Methodology
In this section, we first revisit the core principles behind KV cache eviction. We then introduce a local information-capacity framework that accounts for the nonlinear sensitivity of softmax attention. Based on this objective, we propose JACAP (Jacobian-Capacity Aware Eviction), a practical KV cache eviction policy.
3.1 Preliminary
During autoregressive decoding, each step t attends to all previously generated tokens. Given the current hidden state , the model computes
Let be the query/key dimension and be the output dimension. The attention output is
Modern inference systems maintain a KV cache to avoid recomputing past keys and values. However, the memory cost of the cache grows linearly with the sequence length, making KV cache eviction necessary for long-context inference.
From a functional perspective, full attention defines a nonlinear mapping from query to output:
where , , and . Given a memory budget , eviction selects a subset with , resulting in a retained cache
For the subset C, define
The compressed cache induces the restricted mapping

Figure 1: Nonlinear retained attention channel. A retained KV subset defines a nonlinear softmax attention map from future queries to output features, .
Thus, KV cache eviction can be formulated as a constrained function approximation problem:
where denotes the distribution of future queries.
3.2 An Information Bottleneck Perspective on KV Cache Eviction
The Information Bottleneck (IB) principle provides a formal view of the trade-off between compression and predictive information [22, 3]. In KV cache eviction, however, the representations are produced by a frozen model, and compression is imposed through a hard cache budget rather than a learned encoder. Therefore, instead of optimizing the full IB Lagrangian, we focus on the predictive information preserved by the retained cache.
Given the retained cache , we model the future query as a random variable and define the stochastic channel output as
The information capacity of the retained cache is then
Prior work [27] instantiated this objective with a linear-gaussian surrogate,
Under this model, the capacity admits the closed form
3.3 Jacobian Information Capacity for KV Cache Selection
The linear-Gaussian surrogate in the previous section provides a tractable capacity objective for KV cache selection. However, the actual attention computation induced by a retained cache is nonlinear, since the softmax operator normalizes token logits and introduces competition among cached entries. Therefore, instead of directly treating the retained cache as a fixed linear channel, we first formulate it as a nonlinear query-to-output mapping.
Given a retained KV subset , we denote by the matrix of retained keys and by the corresponding value-induced output directions. The retained attention map is defined as
We then model the output representation produced by the retained cache as a noisy nonlinear channel:
As illustrated in Fig. 1, this formulation preserves the nonlinear softmax normalization that is absent from the global linear surrogate. The retained cache no longer defines independent linear channels, but also coupled nonlinear attention channel whose output depends on both query-key accessibility and token-token competition.

Figure 2: Jacobian Information Capacity. Around the center of the future query distribution, the nonlinear retained attention map is locally approximated by its Jacobian tangent channel. The Jacobian decomposes the local channel into key accessibility , output directions , and the softmax competition matrix . This yields a local information-capacity objective , which quantifies how much query-dependent information is preserved by the retained cache under query statistics and modeling uncertainty .
To obtain a tractable local capacity measure, we assume that future queries concentrate around a distribution center :
Under this local query model, the nonlinear map in Eq. (3) can be approximated by its first-order Taylor expansion around .
Lemma 1 (Local Jacobian Linearization). For a retained cache , the nonlinear attention map admits the first-order expansion
where is
Treating as the effective local channel gain yields the Jacobian-capacity objective.
Theorem 1 (Jacobian Information Capacity). Under the local Gaussian perturbation model above and the first-order approximation in Lemma 1, the retained cache capacity is approximated by
The key difference from the linear capacity in Eq. (2) lies in the softmax Jacobian . Its diagonal entries measure the local sensitivity of each token's attention probability to its own logit, while its off-diagonal entries encode the normalization-induced competition between different tokens. Therefore, does not merely reward keys that are aligned with future queries, it rewards retained subsets whose output directions remain locally distinguishable under the nonlinear softmax response. As illustrated in Fig. 2, the resulting capacity decomposes into five interpretable components: key accessibility, output directions, softmax competition, query statistics, and model uncertainty.
Remark 1. Under standard smoothness and non-degenerate noise assumptions, the Jacobian approximation matches the first-order local channel induced by nonlinear attention. The remaining approximation error is governed by higher-order Taylor residuals. We provide the detailed derivation and analysis of Theorem 1 in Appendix A.
3.4 JACAP: A Jacobian-Capacity Aware Eviction Policy
While Theorem 1 provides a high-fidelity objective for measuring cache utility, directly optimizing this subset-dependent log-determinant objective during online inference is computationally prohibitive. Our goal is therefore not to optimize the full Jacobian capacity exactly, but to preserve its essential structure in a lightweight eviction score. Following the decomposition in Fig. 2, we retain three
Algorithm 1: JACAP: Jacobian-Capacity-Aware KV Eviction
Require: KV cache , cache budget , query statistics , temperature
Output: Updated retained KV subset with
; // Compute attention weights at query center
; // softmax-sensitive weight
; // jacobian capacity matrix
score; // marginal Jacobian-capacity contribution
return
ingredients that are most relevant for token selection: local query relevance, softmax sensitivity, and output-space diversity.
The first difficulty comes from the subset-dependent local attention distribution . Since the retained subset is unknown before eviction, we compute the local attention distribution over the pre-eviction candidate pool :
Here denotes the temperature. We use as a subset-independent approximation to the local attention weight of token .
The second difficulty comes from the dense softmax competition matrix , which couples all tokens in the retained subset. For efficient scoring, we retain its diagonal sensitivity and approximate
This approximation keeps the local sensitivity induced by softmax saturation while avoiding pairwise token coupling. Under this approximation, the local Jacobian is reduced to a weighted key-output interaction.
We further approximate the query-response covariance by its diagonal entries
which measure the variance of the -th key response under future query perturbations. Combining the diagonal softmax sensitivity and the diagonal query covariance yields the nonlinear importance weight
The weight accounts for three local factors: query relevance through , softmax sensitivity through , and query-space variability through . This form differs from pure attention-based scoring: tokens with extremely large attention may become saturated and thus contribute limited local sensitivity, while tokens with moderate but responsive attention can carry larger Jacobian capacity.
With these approximations, the Jacobian capacity reduces to the log-determinant of a weighted output-space capacity matrix. For one-shot selection, we construct this matrix over the full candidate pool:
This matrix summarizes the output directions already represented by the candidate cache. Applying the matrix determinant lemma gives the final importance score for each token:
In practice, and are estimated from historical queries observed during decoding. When applying the output projection is undesirable, we use as a lightweight proxy for , following prior capacity-based eviction methods. The full procedure is summarized in Algorithm 1.
We provide the detailed derivation of JACAP together with its computational complexity analysis in Appendix B. We further conduct empirical runtime evaluations, which show that JACAP achieves comparable efficiency to existing mainstream methods in practice. Detailed runtime comparisons are reported in Appendix C.1.
4 Experiment

Figure 3: Performance of JACAP and baseline KV-cache eviction methods on the Needle-in-Haystack (NIAH) benchmark at compression ratio 0.75 using Qwen3-8B.
We evaluate our proposed JACAP eviction strategy against representative baselines, including CAPKV [27], SNAPKV [15], KEYDIFF [16], Expected Attention (EA) [6], and KNORM [5]. The experiments are designed to assess the effectiveness of KV-cache compression in preserving predictive information, handling extremely long contexts, and supporting online decoding under dynamic eviction.
4.1 Experiments on LongBench
We evaluate JACAP against CAPKV, SNAPKV, KEYDIFF, EA, and KNORM on the LongBench [2] across four compression ratios (0.25, 0.5, 0.75, 0.9), using Qwen3-8B, Qwen3-14B [26], and Llama3.1-8B [8]. Table 1 summarizes the results. We focus on high compression ratios (0.75 and 0.9), where the memory constraints are most severe and differences among methods are pronounced.
At 0.75 compression, JACAP generally matches or slightly exceeds CAPKV on average, while significantly outperforming heuristic baselines (SNAPKV, KEYDIFF, EA, KNORM). When compression is further increased to 0.9, JACAP achieves the largest advantage, leading the average score by approximately 5 points over the next best baseline. This demonstrates its superior ability to retain critical KV information under extreme cache constraints.
At the task level, JACAP maintains stronger performance on both SD-QA and MD-QA tasks, indicating better preservation of context-relevant information for long-context reasoning. It also exhibits more stable degradation on summarization and few-shot tasks as compression increases. These trends remain consistent across all three models, demonstrating the robustness and generality of the proposed method.
4.2 Experiments on NIAH
We evaluate the performance of JACAP and baseline KV-cache eviction methods on the Needle-in-Haystack (NIAH) [12] benchmark under a compression ratio of 0.75 using Qwen3-8B. The NIAH setup tests extremely long contexts (10k–120k tokens) and varying Needle Depths (0.15–0.95), simulating sparse target retrieval under constrained cache budgets.
Table 1: Performance of JACAP and baseline KV-cache eviction methods on LongBench across different compression ratios (C.R.). For each metric, bold indicates the best-performing method, while underlined indicates the second-best. SD-QA MD-QA SUMM. FSL SYNTH. CODE C.R. NQA QSER MF HPQA 2WQA MQUE GR QMS MN TREC TQA SSUM PC PR LCC RBP AVG. QWEN3-8B 28.89 43.57 54.76 62.86 49.20 35.69 33.67 24.60 24.99 41.00 90.21 39.95 10.50 91.02 66.83 61.95 47.48 CAPKV 0.25 28.30 44.13 54.26 62.95 48.47 34.93 33.55 24.21 25.05 72.00 88.47 41.00 10.50 95.54 65.60 63.23 49.51 0.5 29.43 41.84 51.11 61.15 44.40 34.08 33.09 24.25 24.59 66.50 87.49 39.64 11.00 98.42 60.06 63.32 48.15 0.75 28.62 37.69 44.16 54.33 38.44 30.54 30.99 23.58 23.12 60.50 85.67 38.29 9.50 96.96 51.92 63.81 44.88 0.9 24.60 27.49 36.12 47.69 31.49 25.12 27.11 21.61 20.27 36.00 85.97 35.00 6.50 57.38 39.65 63.06 36.57 EA 0.25 28.69 42.84 53.02 62.23 48.37 33.99 33.61 24.22 24.94 57.00 88.13 40.25 8.00 91.81 66.33 62.17 47.85 0.5 28.34 39.54 51.11 61.22 46.78 30.13 33.38 24.00 24.94 64.00 86.96 39.81 8.50 87.46 65.41 62.30 47.12 0.75 27.23 34.65 39.60 57.52 39.27 27.58 32.04 22.76 23.70 70.00 85.29 39.71 10.00 49.74 59.30 63.46 42.62 0.9 23.28 27.76 32.42 43.62 31.74 23.28 29.65 20.98 22.00 61.75 84.16 38.15 11.50 17.42 50.93 62.92 36.35 KEYDIFF 0.25 25.44 35.02 49.12 47.28 42.49 23.07 32.84 22.94 24.93 62.50 83.61 38.84 6.37 91.50 61.75 56.71 44.03 0.5 23.30 29.97 39.86 35.86 33.86 16.60 29.49 22.43 21.93 55.00 85.62 38.25 5.49 86.33 46.51 53.65 39.01 0.75 14.90 18.21 29.26 19.68 27.49 9.51 21.97 21.18 14.22 39.00 81.56 36.15 5.81 45.58 27.38 53.66 29.10 0.9 10.62 7.80 23.18 15.76 23.01 7.01 16.07 19.85 8.02 6.50 78.15 31.41 7.78 13.92 13.57 52.57 20.95 KNORM 0.25 25.35 34.04 49.59 49.24 40.66 24.62 32.53 23.17 24.51 63.00 84.55 41.94 11.50 93.00 50.21 47.71 43.48 0.5 17.84 24.04 39.55 29.63 28.61 14.82 28.85 21.55 21.26 50.50 81.30 40.80 6.64 78.46 36.13 51.59 35.72 0.75 13.39 12.33 27.76 13.90 18.25 6.39 22.63 20.24 14.73 25.75 81.36 38.51 9.88 20.00 16.83 54.66 24.79 0.9 9.66 7.65 23.48 8.78 19.54 4.11 15.46 19.24 8.15 14.00 80.68 33.08 3.75 6.50 11.54 55.83 20.09 JACAP (OURS) 0.25 28.61 43.45 53.05 62.37 48.04 33.94 33.84 24.09 24.72 71.50 90.01 40.63 12.50 95.54 65.10 63.02 49.40 0.5 28.40 43.92 50.90 62.61 46.25 34.04 33.48 24.47 24.87 75.00 87.82 40.01 9.50 96.71 62.24 62.91 48.95 0.75 27.70 39.07 43.48 59.54 42.13 28.50 32.60 23.44 23.89 72.50 84.36 39.55 10.00 95.96 57.65 63.36 46.48 0.9 24.12 31.39 34.32 49.68 37.26 28.34 30.21 22.80 22.14 62.25 86.90 36.56 9.00 70.29 46.93 62.37 40.91 QWEN3-14B 30.32 44.05 52.14 62.30 55.87 32.79 32.84 24.32 24.96 70.00 89.10 42.01 9.80 99.42 69.36 67.27 50.41 CAPKV 0.25 30.56 43.25 52.49 63.55 54.25 35.68 32.85 24.66 24.88 75.00 90.10 41.80 8.00 99.08 69.42 67.25 50.80 0.5 29.92 43.96 51.95 65.06 54.11 35.42 32.80 24.19 24.87 72.00 91.85 41.27 9.50 97.62 66.82 67.84 50.57 0.75 27.62 37.53 45.64 58.93 46.67 32.22 31.09 24.24 23.70 66.00 89.71 40.80 7.15 98.58 57.86 66.89 47.16 0.9 25.16 27.78 35.16 49.75 32.62 26.88 27.45 21.98 20.70 48.25 87.82 38.41 5.50 76.67 45.08 63.25 39.53 EA 0.25 29.31 44.25 51.06 63.10 56.44 32.64 32.79 24.47 24.85 70.50 89.60 41.49 9.00 97.45 69.30 66.54 50.17 0.5 28.28 43.70 49.47 63.83 50.77 31.47 32.29 24.13 25.15 70.50 90.56 41.46 8.70 94.17 67.75 65.82 49.25 0.75 23.62 35.92 37.70 52.92 38.91 26.90 31.37 22.79 24.74 66.50 90.10 41.20 8.55 72.74 61.32 64.21 43.72 0.9 22.78 25.16 27.36 41.20 23.29 20.64 28.79 21.28 22.39 61.42 89.02 39.65 10.50 27.96 50.87 62.00 35.89 KEYDIFF 0.25 28.11 36.18 50.24 51.61 45.09 26.48 33.02 24.06 24.94 69.00 82.57 41.52 11.50 98.58 66.02 62.22 46.95 0.5 24.93 30.20 44.89 41.04 35.61 21.60 28.69 23.16 22.65 57.50 75.73 39.56 13.00 95.50 49.69 57.42 41.32 0.75 21.03 21.80 34.10 26.79 27.78 14.63 20.31 21.41 15.55 33.00 74.33 34.99 10.50 81.83 28.68 54.69 32.59 0.9 12.76 12.12 24.13 18.97 25.03 6.77 11.41 19.50 6.68 3.00 74.32 30.10 10.50 39.00 15.19 54.80 22.77 KNORM 0.25 28.28 40.58 52.17 54.61 43.52 28.23 33.24 23.74 24.95 65.00 79.56 39.75 10.50 100.00 58.96 62.29 46.59 0.5 23.58 34.56 44.65 43.17 36.84 15.95 26.18 22.96 22.80 60.00 78.35 39.15 12.50 95.08 44.16 59.78 41.23 0.75 17.72 17.80 35.08 22.71 25.99 6.97 15.05 20.99 16.87 44.50 82.07 36.27 13.00 63.58 27.58 54.15 31.27 0.9 10.07 16.59 26.61 11.10 21.02 4.54 10.45 19.66 11.37 23.50 77.52 33.51 8.50 13.58 20.85 46.55 22.21 JACAP (OURS) 0.25 29.28 43.70 52.14 62.43 56.03 35.50 32.96 24.50 25.13 71.00 90.85 41.95 9.00 97.75 69.24 67.20 50.54 0.5 28.50 42.62 51.19 63.26 54.65 34.06 32.81 24.79 25.22 74.00 90.31 42.27 7.05 97.62 67.43 67.32 50.19 0.75 27.90 41.32 45.78 57.85 52.86 33.29 32.09 24.83 24.86 75.50 88.94 41.08 7.99 96.92 62.58 67.92 48.86 0.9 27.19 32.42 38.16 54.21 45.41 30.60 29.59 22.62 23.21 68.50 88.57 38.62 8.56 88.08 51.73 66.00 44.59 LLAMA3.1-8B 30.46 47.27 55.98 59.00 51.23 33.55 35.24 25.27 26.80 29.50 86.01 39.31 10.65 100.00 53.47 47.73 45.72 CAPKV 0.25 31.53 47.74 56.95 57.31 51.90 32.91 34.61 24.65 26.78 68.50 90.21 38.80 13.65 100.00 53.47 48.52 48.60 0.5 31.69 44.84 51.42 58.24 48.35 30.66 33.88 24.65 26.47 65.25 90.71 37.72 12.00 98.50 50.12 49.47 47.12 0.75 29.73 39.93 43.71 53.19 46.49 24.66 29.32 23.71 25.19 30.75 90.83 33.44 9.00 66.50 44.47 50.91 40.11 0.9 25.33 24.72 27.81 43.90 30.86 21.58 24.56 22.14 21.54 7.00 91.22 28.79 10.00 21.50 35.61 51.06 30.48 EA 0.25 31.17 47.49 56.85 58.33 49.98 33.82 34.94 24.78 27.18 29.50 85.66 38.03 11.20 99.00 52.49 47.54 45.50 0.5 31.19 46.67 51.49 56.34 48.65 33.48 33.63 24.74 27.04 19.00 85.91 38.87 12.50 87.00 52.97 48.64 43.63 0.75 30.17 39.70 41.55 55.53 44.55 26.75 31.77 23.26 26.06 27.00 88.98 38.59 10.00 45.00 49.84 50.01 39.30 0.9 25.87 29.04 32.51 48.46 31.27 24.48 29.07 22.72 24.60 50.50 92.17 26.90 7.55 18.00 40.11 48.94 34.51 KEYDIFF 0.25 31.50 47.20 54.17 58.79 50.95 35.85 34.48 24.77 26.83 62.50 86.56 40.13 10.65 99.50 52.25 47.03 47.70 0.5 32.30 44.93 52.98 55.52 46.60 30.26 32.45 24.47 25.71 64.00 87.29 40.35 10.65 99.50 45.18 46.77 46.18 0.75 29.62 33.01 41.37 52.51 37.97 25.28 29.41 23.95 22.93 52.00 84.36 40.03 9.66 99.50 37.48 47.58 41.67 0.9 28.49 16.95 34.22 40.71 25.38 15.27 26.30 21.03 19.15 40.00 80.01 39.18 8.50 89.00 26.07 47.99 34.89 KNORM 0.25 30.71 45.34 56.16 58.43 50.63 35.27 34.07 24.83 26.67 66.00 87.26 36.85 11.15 97.50 36.91 48.35 46.63 0.5 27.45 39.59 49.46 55.72 44.23 26.95 32.22 24.25 25.51 59.00 86.44 33.60 9.55 87.50 33.05 49.16 42.73 0.75 22.18 29.67 39.44 47.45 30.45 20.51 28.68 22.78 23.48 51.50 72.85 28.98 9.15 52.50 27.20 49.17 34.75 0.9 22.44 16.23 28.48 37.69 21.73 13.30 26.03 20.64 20.56 45.50 62.78 29.03 11.50 25.00 23.06 51.52 28.47 JACAP (OURS) 0.25 31.46 47.52 55.57 57.79 50.26 32.54 35.04 24.99 27.30 44.50 90.06 39.82 11.15 100.00 53.68 50.50 47.01 0.5 30.32 46.74 52.37 55.51 48.92 27.33 33.71 24.75 27.14 66.00 89.31 40.59 11.00 99.00 51.78 49.87 47.15 0.75 30.77 42.32 45.32 54.92 45.89 28.65 31.05 23.34 25.94 56.50 91.96 37.26 7.00 87.50 48.04 50.51 44.19 0.9 29.13 30.94 35.46 49.26 34.00 25.15 27.52 22.64 24.48 32.50 90.40 27.93 8.00 46.50 40.52 51.21 35.98 8
Figure 3 presents the retrieval performance heatmaps across different context lengths and Needle Depths. JACAP consistently achieves stronger retrieval performance, particularly for deep needles and long contexts where heuristic baselines show significant degradation. Although CAPKV performs competitively at moderate depths, JACAP maintains more stable performance across the full range of settings. These results suggest that Jacobian-capacity-aware eviction more effectively preserves KV pairs relevant to sparse and distant queries, leading to more reliable retrieval in extreme long-context scenarios. Additional results are provided in Appendix C.2.
4.3 Experiments on Decoding Eviction
Table 2: Performance comparison of different KV-cache eviction methods on AIME25 under decoding-stage eviction using Nemotron-7B. The number of reserved tokens controls the decoding cache budget. Bold indicates the best-performing method under each budget.
| Reserved Tokens | EA | KeyDiff | KNorm | CapKV | Jacap (Ours) |
|---|---|---|---|---|---|
| 2048 | 0.17 | 0.07 | 0 | 0.20 | 0.30 |
| 4096 | 0.30 | 0.33 | 0.03 | 0.50 | 0.50 |
| 8192 | 0.40 | 0.53 | 0.27 | 0.73 | 0.53 |
| 16384 | 0.63 | 0.67 | 0.57 | 0.67 | 0.73 |
We evaluate JACAP during online decoding on AIME25 [29] using Nemotron-7B [1]. Table 2 summarizes performance across different reserved token budgets, compared with EA, KEYDIFF, KNORM, and CAPKV. At the smallest cache budget (2048 tokens), JACAP achieves the best score, showing its effectiveness in preserving critical KV entries under extreme constraints. With 4096 reserved tokens, it matches CAPKV and clearly outperforms other baselines. At 8192 tokens, CAPKV surpasses JACAP, but when the budget increases to 16384 tokens, JACAP recovers the lead, outperforming all methods.
These results indicate that JACAP remains competitive in dynamic decoding scenarios, especially under tight or large cache budgets. Its sensitivity-aware, non-redundant selection helps maintain reasoning performance throughout autoregressive generation, highlighting the practical benefits of Jacobian-capacity-aware eviction.
4.4 Ablation Study
Figure 4 reports the average LongBench performance of Qwen3-8B under different temperature values and compression ratios. We observe that JACAP achieves the best overall performance when is around 10. A small makes the estimated attention prior overly sharp, causing the eviction score to focus excessively on a few high-alignment tokens and potentially discard other informative entries. Conversely, a large over-smooths the prior, weakening the query-dependent relevance signal and reducing the method toward a more diversity-dominated selection rule. The optimal performance around indicates that a moderate temperature provides a suitable balance between local query relevance and cache diversity.

Figure 4: Ablation study of the temperature parameter on LongBench.
5 Conclusion
In this work, we introduced a local nonlinear information-theoretic framework to analyze the predictive capacity of KV caches in LLMs, explicitly capturing the competition and sensitivity induced by softmax attention. Based on this framework, we proposed JACAP, a Jacobian-capacity-aware eviction strategy that prioritizes informative and non-redundant tokens. Experiments on standard reasoning benchmarks, extreme long-context retrieval, and dynamic decoding tasks show that JACAP outperforms existing heuristics and capacity-aware baselines, especially under tight cache constraints. Nevertheless, our method relies on a first-order local approximation and simplifies pairwise softmax competition into token-wise sensitivity weights, which may limit its expressiveness in highly dynamic decoding scenarios. Future work may explore higher-order local approximations, more faithful competition modeling, and adaptive cache management across layers and decoding stages.
References
[1] Wasi Uddin Ahmad, Sean Narenthiran, Somshubra Majumdar, Aleksander Ficek, Siddhartha Jain, Jocelyn Huang, Vahid Noroozi, and Boris Ginsburg. Opencodereasoning: Advancing data distillation for competitive coding. CoRR, abs/2504.01943, 2025. doi: 10.48550/ARXIV.2504.01943. URL https://doi.org/10.48550/arXiv.2504.01943.
[2] Yushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lyu, Jiankai Tang, Zhidian Huang, Zhengxiao Du, Xiao Liu, Aohan Zeng, Lei Hou, Yuxiao Dong, Jie Tang, and Juanzi Li. Longbench: A bilingual, multitask benchmark for long context understanding, 2023.
[3] Gal Chechik, Amir Globerson, Naftali Tishby, and Yair Weiss. Information bottleneck for gaussian variables. Advances in Neural Information Processing Systems, 16, 2003.
[4] Henry C. Conklin, Tom Hosking, Tan Yi-Chern, Julian Gold, Jonathan D. Cohen, Thomas L. Griffiths, Max Bartolo, and Seraphina Goldfarb-Tarrant. Learning is forgetting: Llm training as lossy compression, 2026. URL https://arxiv.org/abs/2604.07569.
[5] Alessio Devoto, Yu Zhao, Simone Scardapane, and Pasquale Minervini. A simple and effective l_2 norm-based strategy for kv cache compression. arXiv preprint arXiv:2406.11430, 2024.
[6] Alessio Devoto, Maximilian Jeblick, and Simon Jégou. Expected attention: Kv cache compression by estimating attention from future queries distribution. arXiv preprint arXiv:2510.00636, 2025. URL https://arxiv.org/abs/2510.00636.
[7] Mohamed Amine Ferrag, Norbert Tihanyi, and Merouane Debbah. From llm reasoning to autonomous ai agents: A comprehensive review. arXiv preprint arXiv:2504.19678, 2025.
[8] Aaron Grattafori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
[9] Insu Han, Praneeth Kacham, Amin Karbasi, Vahab Mirrokni, and Amir Zandieh. Polarquant: Quantizing kv caches with polar transformation. arXiv preprint arXiv:2502.02617, 2025.
[10] Ke Hong, Guohao Dai, Jiaming Xu, Qiuli Mao, Xiuhong Li, Jun Liu, Kangdi Chen, Yuhan Dong, and Yu Wang. Flashdecoding++: Faster large language model inference on gpus. arXiv preprint arXiv:2311.01282, 2023.
[11] Coleman Hooper, Sehoon Kim, Hiva Mohammadzadeh, Michael W Mahoney, Yakun S Shao, Kurt Keutzer, and Amir Gholami. Kvquant: Towards 10 million context length llm inference with kv cache quantization. Advances in Neural Information Processing Systems, 37:1270–1303, 2024.
[12] Greg Kamradt. Needle in a haystack - pressure testing llms. https://github.com/gkamradt/LLMTest_NeedleInAHaystack, 2023.
[13] Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th symposium on operating systems principles, pages 611–626, 2023.
[14] Haoyang Li, Yiming Li, Anxin Tian, Tianhao Tang, Zhanchao Xu, Xuejia Chen, Nicole Hu, Wei Dong, Qing Li, and Lei Chen. A survey on large language model acceleration based on kv cache management. arXiv preprint arXiv:2412.19442, 2024.
[15] 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. Advances in Neural Information Processing Systems, 37:22947–22970, 2024.
[16] Junyoung Park, Dalton Jones, Matthew J Morse, Raghav Goel, Mingu Lee, and Chris Lott. Keydiff: Key similarity-based kv cache eviction for long-context llm inference in resource-constrained environments. arXiv preprint arXiv:2504.15364, 2025.
[17] Aske Plaat, Annie Wong, Suzan Verberne, Joost Broekens, Niki Van Stein, and Thomas Bäck. Multi-step reasoning with large language models, a survey. ACM Computing Surveys, 58(6): 1–35, 2025.
[18] Pol G Recasens, Ferran Agullo, Yue Zhu, Chen Wang, Eun Kyung Lee, Olivier Tardieu, Jordi Torres, and Josep Ll Berral. Mind the memory gap: Unveiling gpu bottlenecks in large-batch llm inference. arXiv preprint arXiv:2503.08311, 2025.
[19] Luohe Shi, Hongyi Zhang, Yao Yao, Zuchao Li, and Hai Zhao. Keep the cost down: A review on methods to optimize llm's kv-cache consumption. CoRR, abs/2407.18003, 2024. doi:10.48550/ARXIV.2407.18003. URL https://doi.org/10.48550/arXiv.2407.18003.
[20] Luohe Shi, Hongyi Zhang, Yao Yao, Zuchao Li, and Hai Zhao. Keep the cost down: A review on methods to optimize llm's kv-cache consumption. arXiv preprint arXiv:2407.18003, 2024.
[21] Yuxuan Tian, Zihan Wang, Yebo Peng, Aomufei Yuan, Zhiming Wang, Bairen Yi, Xin Liu, Yong Cui, and Tong Yang. Keepkv: Eliminating output perturbation in kv cache compression for efficient llms inference. arXiv preprint arXiv:2504.09936, 2025.
[22] Naftali Tishby and Noga Zaslavsky. Deep learning and the information bottleneck principle. In 2015 IEEE Information Theory Workshop, ITW 2015, Jerusalem, Israel, April 26 - May 1, 2015, pages 1–5. IEEE, 2015. doi: 10.1109/ITW.2015.7133169. URL https://doi.org/10.1109/ITW.2015.7133169.
[23] Naftali Tishby, Fernando C Pereira, and William Bialek. The information bottleneck method. arXiv preprint physics/0004057, 2000.
[24] Zhongwei Wan, Xinjian Wu, Yu Zhang, Yi Xin, Chaofan Tao, Zhihong Zhu, Xin Wang, Siqi Luo, Jing Xiong, Longyue Wang, et al. D2o: Dynamic discriminative operations for efficient long-context inference of large language models. arXiv preprint arXiv:2406.13035, 2024.
[25] Guangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han, and Mike Lewis. Efficient streaming language models with attention sinks. arXiv preprint arXiv:2309.17453, 2023.
[26] An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.
[27] Jiaming Yang, Chenwei Tang, Liangli Zhen, and Jiancheng Lv. Rethinking kv cache eviction via a unified information-theoretic objective, 2026. URL https://arxiv.org/abs/2604.25975.
[28] Amir Zandieh, Majid Daliri, Majid Hadian, and Vahab Mirrokni. Turboquant: Online vector quantization with near-optimal distortion rate. arXiv preprint arXiv:2504.19874, 2025.
[29] Yifan Zhang and Team Math-AI. American invitational mathematics examination (aime) 2025, 2025.
[30] Yuxin Zhang, Yuxuan Du, Gen Luo, Yunshan Zhong, Zhenyu Zhang, Shiwei Liu, and Rongrong Ji. Cam: Cache merging for memory-efficient llms inference. In Forty-first international conference on machine learning, 2024.
[31] Zhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen, Lianmin Zheng, Ruisi Cai, Zhao Song, Yuandong Tian, Christopher Ré, Clark Barrett, et al. H2o: Heavy-hitter oracle for efficient generative inference of large language models. Advances in Neural Information Processing Systems, 36:34661–34710, 2023.
[32] Bingxi Zhao, Lin Geng Foo, Ping Hu, Christian Theobalt, Hossein Rahmani, and Jun Liu. Llm-based agentic reasoning frameworks: A survey from methods to scenarios. arXiv preprint arXiv:2508.17692, 2025.
A Derivation and analysis of Jacobian Information Capacity
In this appendix, we provide the rigorous mathematical derivation of the Jacobian Information Capacity presented in Theorem 1 of the main text. We begin by explicitly defining the local linearization framework and then derive the closed-form mutual information objective under the resulting Gaussian approximation. Finally, we analyze the structure of the derived Jacobian matrix to provide deeper insights into how it captures the nonlinear dynamics of softmax attention.
A.1 Proof of Theorem 1
Let be the retained subset of key-value pairs, where . Let and be the stacked key and output-value matrices, respectively. The retained attention mechanism defines a nonlinear mapping from a query to the output :
We model the attention process as a noisy nonlinear channel:
We assume future queries are localized around a center with covariance , i.e., . Our goal is to approximate the mutual information .
To make the analysis tractable, we perform a first-order Taylor expansion of the nonlinear mapping around the query center . Let . The expansion is given by:
where is the Jacobian matrix evaluated at .
We now derive the explicit form of . Let be the logits, and be the attention weights. By the chain rule:
The derivative of the logits with respect to is . The derivative of the softmax function with respect to its input logits is given by the standard result:
Evaluating these derivatives at , we define the attention weights at the center as , and the softmax Jacobian matrix as . Substituting these back yields the Jacobian of the attention map:
This completes the proof of Lemma 1 and provides the explicit form of the effective local linear channel.
Under the first-order approximation, the noisy channel becomes a linear Gaussian channel with respect to the perturbation :
Since and are independent Gaussian random variables, the output is also Gaussian. The mutual information is invariant to the constant bias term. We compute the relevant covariance matrices:
(13)
For Gaussian distributions, the mutual information is the difference between marginal and conditional differential entropies, which can be calculated via determinants of covariance matrices:
Applying the matrix determinant identity , we obtain the final closed-form objective:
This completes the derivation of Theorem 1.
A.2 Analysis of the Jacobian Information Capacity
The derived Jacobian capacity differs from prior linear information-theoretic objectives primarily through the structure of the Jacobian matrix . The core novelty lies in the Softmax Competition Matrix , which explicitly captures the nonlinear dynamics of attention. Here we analyze its two key components:
- Local Sensitivity and Saturation. The diagonal elements of are given by , where is the attention weight of the -th token at the query center . This term measures the local sensitivity of the softmax function. offers two new and important insights:
• Peak Sensitivity: The term is maximized when , indicating that tokens with moderate attention weights are most sensitive to query perturbations and thus provide the highest potential information gain locally.
• Saturation Regions: As (irrelevant) or (dominant), the term . This captures the saturation effect: if a token is already ignored or fully dominant, small changes in the query will not significantly change its contribution to the output.
This contrasts sharply with linear models or heuristics that assume higher attention weights always imply higher importance. Our theory suggests that saturated tokens, despite high attention, may have low marginal information value.
- Token Competition. The off-diagonal elements (for ) are always negative. This explicitly models the competition introduced by softmax normalization. An increase in the logit of token necessarily decreases the attention weights of all other tokens , coupling their contributions.
The linear gaussian surrogate [27] effectively assumes is proportional to the identity matrix. By explicitly incorporating , the Jacobian Information Capacity rewards retained subsets that are not only aligned with future queries ( and ) but also possess high local sensitivity and distinct output directions () under the constraints of softmax competition.
B More details on Jacap Eviction Method
In this appendix, we detail the principled approximations that reduce the full Jacobian Information Capacity to the efficient, one-shot JACAP scoring rule presented in Algorithm 1. We also provide a complexity analysis of the proposed algorithm.
B.1 Derivation of the JACAP Algorithm
The complexity of the objective stems from three coupled structured matrices: the softmax competition matrix , the query-key response covariance , and the subset-dependent selection problem itself. We address these via a series of approximations.
Decoupling Softmax Competition via Diagonal Approximation. The matrix couples all tokens through its off-diagonal terms. To enable efficient token-wise scoring, we approximate by retaining only its diagonal elements, which capture the local sensitivity of each token's weight to its own logit:
As analyzed in Appendix A.2, the diagonal term perfectly encapsulates the "sensitivity vs. saturation" trade-off. While the off-diagonal terms model negative pairwise competition, neglecting them is a common and effective simplification in variational inference and large-scale approximations. It preserves the most critical nonlinear effect—that saturated tokens have low local influence—while decoupling token interactions in the sensitivity term.
Under this approximation, the Jacobian becomes , and the effective channel matrix inside the log-determinant becomes:
Decoupling Query Response via Diagonal Approximation. The term is an matrix representing the covariance of key responses to future queries. Its off-diagonal element measures the correlation between the responses of token and token . To further decouple the tokens, we approximate this matrix by its diagonal:
The scalar quantifies the variance of the -th token's logit under the future query distribution. A larger indicates that the token's alignment with queries is highly variable, making it potentially more informative than a token with a constant alignment. Ignoring off-diagonal correlations is equivalent to assuming independent key responses under the query prior, a necessary simplification for efficient scoring that is prevalent in similar analyses.
Combining the two diagonal approximations, the inner term becomes a diagonal matrix of scalar weights:
Defining the combined importance weight for token as
the approximated objective becomes:
Assuming isotropic noise and absorbing constants into , this reduces to the standard form of maximizing the log-determinant of a sum of rank-one matrices.
Leverage Score Selection. Similar to CapKV [27], instead of combinatorially searching for the optimal subset , we define a global capacity matrix over the entire candidate pool :
We then select tokens greedily based on their marginal contribution to the log-determinant, which is approximated by the statistical leverage score using the matrix determinant lemma ( for small ):
This final form, used in Algorithm 1, elegantly combines the theoretically derived nonlinear importance weight with the structural diversity term , providing a principled and efficient eviction criterion.
B.2 Computational Complexity Analysis
We analyze the computational complexity of JACAP for a single eviction step with candidate tokens and head dimension . The computation consists of three stages.
First, the weight computation requires evaluating the attention weights , which costs for the query-key products and softmax normalization. The query response variance
requires when is full, and reduces to under a diagonal approximation. Since we adopt a diagonal covariance in practice, the overall cost of computing is .
Second, constructing the Jacobian capacity matrix
requires , as each rank-one update costs . The inversion of the resulting matrix further incurs complexity. The total cost of this stage is therefore .
Finally, the leverage-score evaluation
requires per token, leading to a total complexity of for all candidates. Combining all stages, the overall complexity per layer and eviction step is
which is dominated by the capacity matrix construction and inversion.
Compared with heuristic approaches such as SNAPKV, H2O, KEYDIFF, and KNORM, whose complexity is typically or due to independent per-token scoring, JACAP introduces additional quadratic dependence on the head dimension through inter-token matrix interactions. However, this complexity is shared by other capacity-based approaches such as CAPKV, which also rely on leverage-score computations over a capacity matrix.
In practice, the additional overhead remains moderate because the attention head dimension is usually small (e.g., ), and the matrix operations are highly parallelizable on modern GPUs. As demonstrated in our runtime experiments, the improved retention quality in high-compression regimes justifies this additional computational cost.
C More Experiment Results
Our all experiments were conducted on 4× NVIDIA RTX Pro 6000 GPUs with 1024 GB system memory under Ubuntu 22.04.
C.1 Runtime Efficiency Analysis
To evaluate the practical overhead of our proposed method, we confirm the runtime efficiency of JACAP against representative baselines. We measured the total generation time for generating 100 tokens using the Qwen3-8B model on a single NVIDIA RTX pro6000 GPU. The evaluation covers increasing input context lengths from 8k to 64k tokens under two compression ratios (C.R. = 0.6 and 0.8).

(a) C.R. = 0.6
(b) C.R. = 0.8
Figure 5: Runtime comparison of generating 100 tokens with Qwen3-8B on a single RTX 6000 GPU under varying input context lengths and compression ratios (C.R.)
The results are summarized in Figure 5. We observe that JACAP exhibits runtime performance that is highly comparable to existing methods across all settings.
The analysis in Appendix B.2 indicates a theoretical complexity of for JACAP. These empirical results suggest that in practice, with typical head dimensions (e.g., ), the matrix operations are efficiently handled by the GPU, making the actual overhead negligible compared to the overall inference process. Therefore, JACAP delivers significant performance gains in high-compression regimes without incurring a prohibitive computational cost.
C.2 More Experiment Result on NIAH

EA

KeyDiff

SnapKV

KNorm

CapKV

Jacap
Figure 6: Performance of JACAP and baseline KV-cache eviction methods on the NIAH benchmark at compression ratio 0.5 using Qwen3-8B.
To provide a more comprehensive evaluation across different sparsity regimes, we further evaluate the Needle-in-Haystack (NIAH) performance under a moderate compression ratio of 0.5 using the Qwen3-8B model. The results are shown in Figure 6.
Consistent with the findings under higher compression in the main text, JACAP achieves the best overall performance. The heatmaps reveal that while purely structural methods like KEYDIFF and KNORM fail significantly at long contexts, and attention-based baselines like SNAPKV begin to degrade at extreme lengths (e.g., >100k tokens) and deeper positions, JACAP maintains remarkable robustness. It consistently retrieves the needle across the entire spectrum of context lengths and depths, demonstrating that incorporating nonlinear sensitivity effectively identifies and preserves crucial information even when it is sparsely located deep within very long sequences.