Memory consumption of the key-value (KV) cache remains a central bottleneck for long-context LLM inference. We introduce PRKV, a training-free KV eviction method that estimates multi-hop global token importance by applying Personalized PageRank over attention-induced transition graphs. This enables importance propagation beyond recency or instantaneous attention, without modifying the model. We benchmark PRKV on long-context understanding, sparse retrieval, and chain-of-thought reasoning tasks using multiple LLM families. Under moderate to aggressive compression ratios, including up to 90%, PRKV achieves competitive task performance against established eviction baselines while reducing peak memory usage with low end-to-end overhead. These results demonstrate that multi-hop global influence estimation yields a favorable accuracy--memory trade-off for scalable long-context inference.
Figures & tables
Figure 1: Overview of PRKV. PRKV propagates token influence over an attention-induced transition graph to select globally important KV states.
Figure 2: Motivational analysis of PPR. (a) PPR recovers stable high-importance tokens under budgeted eviction, capturing long-range influence. (b) PPR scores rapidly stabilize within a few propagation steps. (c) PPR shows stronger alignment with downstream attention than baselines. (d) PPR induces the smallest eviction-induced output distortion, preserving long-range influence. Results are reported on 25 th layer of Llama-3.1-8B.
Method
Llama-3.1-8B
Qwen3-8B
Gemma-3-12B
0%
10%
25%
50%
75%
90%
0%
10%
25%
50%
75%
90%
0%
10%
25%
50%
75%
90%
SnapKV
45.35
45.20
45.03
43.69
40.84
33.23
47.27
47.07
46.65
45.12
41.90
35.09
49.79
49.45
49.36
47.37
44.36
37.27
PyramidKV
45.35
45.39
45.00
43.75
40.35
33.28
47.27
46.97
46.10
42.50
39.78
34.04
49.79
49.65
48.99
46.74
43.01
36.73
EA
45.35
45.91
47.56
47.11
44.03
35.79
47.27
48.08
48.87
48.46
45.42
37.19
49.79
49.48
49.06
47.58
43.08
36.81
TOVA
45.35
45.20
44.59
43.07
39.58
33.96
47.27
46.95
46.87
45.35
41.91
36.60
49.79
49.63
49.19
47.47
43.34
38.39
KeyDiff
45.35
45.24
47.40
45.68
41.40
34.50
47.27
46.83
43.85
38.57
29.17
20.63
49.79
48.33
46.02
40.35
31.39
22.81
Table 1: Performance comparison on LongBench. We report the average of sixteen tasks from LongBench benchmarks over five compression ratios and three models. 0% indicates average results without compression. Bold values indicate the best performance within each block.
Model
Method
Ruler 4K
Ruler 16K
0%
10%
25%
50%
75%
90%
0%
10%
25%
50%
75%
90%
Qwen3-8B
SnapKV
95.37
92.38
80.24
55.23
36.19
23.35
93.02
88.67
80.54
61.57
39.80
27.47
PyramidKV
95.37
91.55
73.21
43.72
36.26
23.47
93.02
86.88
76.22
45.51
32.33
27.48
EA
95.37
95.20
93.84
86.68
71.00
58.85
93.02
93.20
90.97
83.85
67.72
56.53
TOVA
95.37
89.15
82.44
77.66
62.60
24.78
93.02
88.30
81.68
76.25
68.66
52.36
KeyDiff
95.37
93.76
89.34
78.72
64.29
38.08
93.02
89.02
83.29
74.44
66.89
53.36
Table 2: Performance comparison on RULER. We report the average of thirteen tasks from RULER benchmarks (sequence length 4K, 16K) over five compression ratios and two models. 0% indicates average results without compression. Bold values indicate the best performance within each block.
Figure 3: NIAH accuracy under varying sequence lengths. We report NIAH results with 50% compression ratio on Llama-3.1-8B. Full KV refers to an uncompressed KV cache. Color indicates retrieval accuracy on a continuous green–to–red scale (green = 1.0, red = 0.0).
Method
Dataset (Max Gen.)
×16
×8
×4
×2
×1
Dataset (Max Gen.)
×8
×4
×2
×1
PRKV-GLB
AIME25 (32K)
0.233
0.233
0.300
0.300
0.300
MATH-500 (4K)
0.524
0.550
0.560
0.524
PRKV
0.233
0.200
0.300
0.300
0.300
0.474
0.542
0.544
0.522
EA
0.233
0.233
0.300
0.300
0.300
0.460
0.532
0.522
0.524
KeyDiff
0.167
0.200
0.300
0.300
0.300
0.288
0.458
0.532
0.522
KNorm
0.100
0.133
0.267
0.300
0.300
0.052
0.246
0.436
0.524
StreamingLLM
0.133
0.267
0.267
0.300
0.300
0.352
0.490
0.528
0.524
Table 3: Decoding eviction accuracy under varying KV cache budgets on DeepSeek-R1-Distill-Qwen-7B. Bold values indicate the best performance for each budget size.
Figure 4: Visualization and convergence of PRKV scores. (a) Token-level scores produced by PRKV and PRKV-GLB compared to the future attention signal. (b) Rank correlation between PRKV and π∗ as a function of window size W . (c) Convergence of PPR scores to their converged values under finite iterations. All diagnosed on Llama-3.1-8B, 20 th layer.
Figure 5: Latency and memory analysis of PRKV. (Left) Peak memory usage across sequence lengths (16K–128K) at compression ratios of 0.5 and 0.9. (Right) End-to-end latency at 64K sequence length with compression ratio 0.5. Results are obtained on Llama-3.1-8B.
Component
Variant
PRKV
PRKV-GLB
0%
10%
25%
50%
75%
90%
0%
10%
25%
50%
75%
90%
α
0.75
47.27
47.68
48.51
48.96
46.02
37.60
47.27
47.34
47.99
48.63
45.74
38.80
0.85
47.27
47.74
48.56
48.92
46.26
37.59
47.27
47.52
47.86
48.81
45.84
39.09
0.95
47.27
47.80
48.82
49.23
46.32
37.27
47.27
47.47
47.74
48.77
45.78
39.17
W
64
47.27
47.74
48.56
48.92
46.26
37.59
47.27
47.52
47.86
48.81
45.84
39.09
128
47.27
47.66
48.08
48.68
45.82
37.14
47.27
47.47
47.87
48.58
45.59
38.80
Table 4: Ablation studies of PRKV and PRKV-GLB on Qwen3-8B. We report the average of sixteen tasks from LongBench benchmarks over five compression ratios. 0% indicates average results without compression. Bold values indicate the best performance within each block.
Appendix figures & tables26 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Definition of si
Signal encoded
Random
si∼i.i.d.U(0,1)
No information; chance ranking.
Recency
si=t−i+11
Positional recency relative to the anchor.
Frequency
si=j=1∑t1{tok(j)=tok(i)}
Number of occurrences of the candidate token ID in the observed prefix.
Attention
si=Aˉt,i
Direct head-averaged attention from the anchor position.
PPR
si=ri(nhops)
Propagation of the same anchor-attention signal over the causal attention-induced token graph.
Appendix
Table 5: Definitions of the diagnostic scoring rules in Figure 2 .
Figure 6: Empirical analyses of locality. (a) Empirical distributions of outside-window attention mass, (b) logit separation margins, and (c) their exponential transform, measured on 13 th layer of Llama-3.1-8B using ten samples from LongBench NarrativeQA. The distributions indicate strong preference for in-window tokens, supporting the locality assumptions used in our analysis.
Figure 7: Case study of token selection. We report token selection result of (a) observed attention, (b) PRKV, and (c) PRKV-GLB. All measurements are conducted using the bfloat16 data type on 11 th layer, 27 th head of Llama-3.1-8B with PaulGrahamEssays dataset.
Figure 8: Behavior analysis of PRKV. We report how transition matrix is formed and how actual PPR score evolves from personalization vector of both PRKV and PRKV-GLB. Results are obtained from 20 th layer of Llama-3.1-8B with context from PaulGrahamEssays dataset.
Component
Variant
PRKV
PRKV-GLB
0%
10%
25%
50%
75%
90%
0%
10%
25%
50%
75%
90%
Personalization
Recent
47.27
47.74
48.56
48.92
46.26
37.59
47.27
47.52
47.86
48.81
45.84
39.09
Query
47.27
47.63
48.92
49.00
46.35
38.11
47.27
47.34
47.74
48.90
45.59
39.78
Query EMA
47.27
47.82
48.59
48.86
46.01
37.47
47.27
47.35
47.66
48.93
46.16
39.49
Value-norm scaling
Only VNorm
47.27
48.68
48.76
48.53
44.66
35.17
47.27
48.68
48.76
48.53
44.66
35.17
Only PPR
47.27
46.05
44.30
41.24
37.42
32.86
47.27
47.10
46.70
45.02
41.86
35.93
Appendix
Table 6: Extended ablation studies of PRKV and PRKV-GLB on Qwen3-8B. We report the average of sixteen tasks from LongBench benchmarks over five compression ratios. 0% indicates average results without compression. Bold values indicate the best performance within each block.
Component
Variant
LongBench
Component
Variant
LongBench
0%
10%
25%
50%
75%
90%
0%
10%
25%
50%
75%
90%
C
64
47.27
47.74
48.56
48.92
46.26
37.59
Landmark selection
Cosine diversity
47.27
47.74
48.56
48.92
46.26
37.59
128
47.27
47.81
48.55
48.72
45.84
36.90
Cosine similarity
47.27
47.23
48.33
48.75
46.46
37.89
256
47.27
47.90
48.38
48.63
46.03
37.31
L2 Norm
47.27
47.23
47.83
48.57
45.74
37.06
Appendix
Table 7: Ablation studies of PRKV on Qwen3-8B. We report the average of sixteen tasks from LongBench benchmarks over five compression ratios. 0% indicates average results without compression. Bold values indicate the best performance within each block.
PRKV
PRKV-GLB
Ratio
Mean
Std
CV(%)
Mean
Std
CV(%)
10%
47.8
0.16
0.3
47.3
0.12
0.3
25%
48.3
0.35
0.7
47.4
0.51
1.1
50%
48.9
0.11
0.2
47.1
1.52
3.2
75%
46.0
0.26
0.6
44.0
1.59
3.6
90%
37.4
0.52
1.4
37.5
1.33
3.6
Appendix
Table 8: Hyperparameter Sensitivity . We provide performance spread across 25 PRKV hyperparameter variants on LongBench (Qwen3-8B). CV denotes coefficient of variation (%). Low CV values indicate robustness to hyperparameter choices.
Model
Method
Retrieval
Tracing
Aggregation
QA
AVG.
Qwen3-32B
Full KV
100.0
100.0
96.3
75.2
95.6
SnapKV
49.4
93.5
96.4
68.9
63.0
PRKV
83.8
100.0
93.6
71.1
84.6
PRKV-GLB
83.9
100.0
94.3
71.9
84.9
Qwen3-30B-A3B (MoE)
Full KV
100.0
100.0
96.0
70.2
94.8
SnapKV
27.6
27.3
68.0
54.9
38.0
Appendix
Table 9: Performance comparison on RULER-4K with a larger dense model and an MoE model. We report the categorical average score of thirteen tasks from RULER benchmarks at 50 % compression ratio. Full KV refers to an uncompressed KV cache. Higher scores are better.
Figure 9: Effect of cache quantization on peak memory usage. All measurements are conducted on Llama-3.1-8B.
Figure 10: Memory consumption and generation latency under varying compression ratios. We report (a) peak memory usage, (b) KV cache size, and (c) generation time as functions of the compression ratio. Results are shown for sequence lengths ranging from 8K to 128K tokens. All measurements are conducted using the bfloat16 data type on Llama-3.1-8B.
Method
Total Time (sec)
Prefill Time (sec)
Score Time (sec)
Score Time / Prefill Time (%)
Score Time / Total Time (%)
PRKV
14.3757
10.4953
0.1379
1.3138
0.9591
PRKV-GLB
14.7180
10.7578
0.4602
4.2782
3.1271
Appendix
Table 10: Scoring overhead of PRKV variants. Measured at 64K context with 50% compression on Llama-3.1-8B. Score time measures only importance-score computation and is reported together with its fraction of total end-to-end runtime.
Method
LongBench
RULER-4K
RULER-16K
TTFT
tok/s
TTFT
tok/s
TTFT
tok/s
Full KV
0.879
48.09
0.259
49.78
1.327
46.49
SnapKV
0.912
49.73
0.272
50.39
1.366
49.21
PyramidKV
0.914
49.65
0.273
50.41
1.366
48.93
TOVA
0.899
49.74
0.268
50.35
1.341
49.08
KeyDiff
0.895
49.80
0.264
50.36
1.337
49.12
Appendix
Table 11: Prefill eviction efficiency comparison. We report TTFT in seconds and decode throughput in tokens/s on each benchmark on Llama-3.1-8B-Instruct at 50% compression ratio. Full KV refers to an uncompressed KV cache.
Method
MATH-500
AIME25
tok/s
GB
tok/s
GB
Full KV
46.20
14.46
52.19
16.04
KNorm
51.05
14.39
50.23
14.40
StreamingLLM
51.04
14.39
50.29
14.40
KeyDiff
51.04
14.40
50.30
14.41
TOVA
50.94
14.40
50.22
14.42
Appendix
Table 12: Decoding eviction efficiency comparison. We report peak memory allocation (GB) and throughput (token/s) on each benchmark on DeepSeek-R1-Distill-Qwen-7B at 2,048-token target cache and an eviction interval of 128 steps. Full KV refers to an uncompressed KV cache.
TP=1
TP=2
TP=4
Method
TTFT (s)
Mem (GB)
TTFT (s)
Mem (GB)
TTFT (s)
Mem (GB)
Full KV
14.66
74.66
9.02
39.41
6.98
21.78
KNorm
14.51
70.76
8.74
37.46
6.48
20.80
SnapKV
14.85
70.76
8.77
37.46
6.42
20.80
PRKV
14.65
70.76
8.71
37.46
6.40
20.80
PRKV-GLB
15.19
70.75
8.87
37.46
6.46
20.80
Appendix
Table 13: TP scaling on Qwen3-32B at 32,000 context tokens. Compressed methods retain 16,000 context KV entries. Mem denotes peak allocated memory per GPU. All policies use the same measurement configuration within each TP degree.
Context tokens
Full KV
PRKV
PRKV-GLB
Saving
32,000
21.78
20.80
20.80
0.98
64,000
26.11
24.16
24.16
1.95
128,000
34.78
30.87
30.87
3.91
Appendix
Table 14: Peak allocated memory per GPU (GB) at TP=4 on Qwen3-32B. Both PRKV variants retain 50% of the context KV entries. Saving is Full KV minus PRKV, calculated before rounding.
Comp.Ratio
Method
S-NIAH-1
S-NIAH-2
S-NIAH-3
MK-NIAH-1
MK-NIAH-2
MK-NIAH-3
MV-NIAH
MQ-NIAH
VT
CWE
FWE
QA-1
QA-2
AVG
Full KV
100.00
100.00
100.00
100.00
100.00
100.00
100.00
99.90
100.00
98.96
95.33
81.80
63.80
95.37
10%
SnapKV
93.80
100.00
99.60
98.40
95.20
80.00
99.00
99.45
98.56
98.74
95.80
80.80
61.60
92.38
PyramidKV
92.40
100.00
98.40
96.60
93.80
77.20
98.10
98.20
97.84
98.80
96.00
81.00
61.80
91.55
EA
100.00
100.00
100.00
99.80
100.00
99.80
99.95
99.90
100.00
99.04
95.33
80.60
63.20
95.20
KeyDiff
100.00
100.00
99.80
98.80
99.20
93.20
100.00
100.00
100.00
98.10
93.60
80.80
55.40
93.76
TOVA
100.00
100.00
100.00
100.00
69.80
51.60
100.00
99.90
100.00
98.84
94.67
81.60
62.60
89.15
Appendix
Table 15: RULER 4K Full Result on Qwen3-8B
Comp.Ratio
Method
S-NIAH-1
S-NIAH-2
S-NIAH-3
MK-NIAH-1
MK-NIAH-2
MK-NIAH-3
MV-NIAH
MQ-NIAH
VT
CWE
FWE
QA-1
QA-2
AVG
Full KV
100.00
100.00
99.80
99.60
100.00
99.60
99.60
100.00
100.00
83.06
94.00
75.40
58.20
93.02
10%
SnapKV
100.00
100.00
75.20
99.60
95.00
80.40
99.60
99.85
99.96
83.46
94.27
69.80
55.60
88.67
PyramidKV
100.00
99.80
61.00
99.40
94.20
74.20
98.60
99.60
99.92
83.04
94.13
69.00
56.60
86.88
EA
100.00
100.00
100.00
99.40
99.80
99.80
99.55
100.00
100.00
87.24
93.60
74.00
58.20
93.20
KeyDiff
100.00
100.00
99.80
96.60
87.20
83.20
99.35
99.75
100.00
84.44
95.67
60.20
51.00
89.02
TOVA
100.00
100.00
99.80
99.60
75.40
63.20
99.60
100.00
100.00
83.78
94.67
74.00
57.80
88.30
Appendix
Table 16: RULER 16K Full Result on Qwen3-8B
Comp.Ratio
Method
S-NIAH-1
S-NIAH-2
S-NIAH-3
MK-NIAH-1
MK-NIAH-2
MK-NIAH-3
MV-NIAH
MQ-NIAH
VT
CWE
FWE
QA-1
QA-2
AVG
Full KV
100.00
100.00
100.00
99.80
98.80
99.80
99.75
99.95
99.68
95.10
97.33
87.60
60.80
95.28
10%
SnapKV
99.60
98.60
6.80
84.80
97.40
92.20
85.25
89.40
99.16
95.98
97.67
87.60
59.80
84.17
PyramidKV
99.00
98.60
6.40
79.00
98.20
90.00
80.05
84.30
99.44
95.66
97.53
85.40
59.80
82.57
EA
100.00
100.00
99.80
99.60
98.60
99.40
99.30
99.90
99.68
94.92
97.27
87.60
60.80
95.14
KeyDiff
100.00
100.00
100.00
99.40
96.80
92.60
99.85
100.00
99.64
95.38
97.07
86.60
60.00
94.41
TOVA
100.00
100.00
100.00
99.80
59.00
67.40
99.70
99.95
99.60
94.88
97.33
87.40
60.40
89.65
Appendix
Table 17: RULER 4K Full Result on Gemma-3-12B
Comp.Ratio
Method
S-NIAH-1
S-NIAH-2
S-NIAH-3
MK-NIAH-1
MK-NIAH-2
MK-NIAH-3
MV-NIAH
MQ-NIAH
VT
CWE
FWE
QA-1
QA-2
AVG
Full KV
100.00
100.00
100.00
89.60
56.00
60.80
95.65
99.05
96.48
89.84
98.60
76.80
55.00
85.99
10%
SnapKV
100.00
88.60
5.80
77.20
54.80
55.40
78.75
87.00
93.72
89.76
99.07
72.80
53.40
73.56
PyramidKV
99.80
87.00
4.00
72.40
54.80
53.80
72.65
82.85
93.96
90.20
98.87
73.20
54.00
72.12
EA
100.00
100.00
100.00
85.80
53.80
42.60
88.65
99.20
93.72
85.40
97.87
72.80
53.00
82.53
KeyDiff
100.00
100.00
100.00
79.80
46.40
31.80
95.40
99.20
96.48
89.10
98.47
72.20
53.40
81.71
TOVA
100.00
100.00
80.00
89.40
31.20
27.80
95.05
98.75
96.48
89.64
98.73
75.40
54.00
79.73
Appendix
Table 18: RULER 16K Full Result on Gemma-3-12B
Ratio
Method
Single-Document QA
Multi-Document QA
Summarization
Few-shot Learning
Synthetic
Code
Avg
NQA
QA
MQA
HQA
2WM
MSQ
GR
QM
MN
TR
TQA
SS
PC
PR
LCC
RB
0%
Full KV
30.99
47.39
56.31
59.80
51.33
33.51
35.19
25.34
26.99
29.00
84.81
38.76
10.70
100.00
51.21
44.21
45.35
10%
SnapKV
30.46
46.98
56.15
58.44
52.03
32.28
34.70
24.85
26.99
28.50
84.98
39.98
11.15
99.50
51.39
44.84
45.20
PyramidKV
30.86
47.07
56.39
58.63
52.56
32.32
34.92
24.96
26.99
30.00
84.81
39.62
11.20
100.00
51.06
44.86
45.39
EA
31.00
48.61
55.76
59.87
51.92
33.80
34.98
24.91
27.38
30.50
86.96
38.90
13.64
100.00
51.15
45.22
45.91
KeyDiff
30.75
47.67
55.19
58.29
51.24
33.90
34.92
24.97
26.98
31.00
85.56
39.61
10.15
99.50
50.29
43.81
45.24
Appendix
Table 19: LongBench Full Result on Llama-3.1-8B-Instruct
Ratio
Method
Single-Document QA
Multi-Document QA
Summarization
Few-shot Learning
Synthetic
Code
Avg
NQA
QA
MQA
HQA
2WM
MSQ
GR
QM
MN
TR
TQA
SS
PC
PR
LCC
RB
0%
Full KV
28.64
43.54
55.65
62.80
48.88
35.92
33.34
24.43
24.68
41.00
90.31
39.98
10.50
92.02
65.03
59.61
47.27
10%
SnapKV
29.20
43.91
54.73
62.18
49.16
34.73
33.08
24.54
24.79
39.50
90.21
40.47
9.50
92.56
64.75
59.86
47.07
PyramidKV
29.14
44.13
55.22
61.92
48.18
34.81
33.10
24.68
24.59
40.50
89.81
40.59
9.50
90.93
64.63
59.74
46.97
EA
28.18
44.38
53.36
62.55
49.60
34.28
33.70
24.13
24.60
54.00
90.51
40.57
9.50
95.38
64.01
60.45
48.08
KeyDiff
25.81
38.37
51.53
53.98
47.03
28.16
34.14
23.76
25.17
63.00
86.74
40.29
7.69
100.00
67.71
55.82
46.83
Appendix
Table 20: LongBench Full Result on Qwen3-8B
Ratio
Method
Single-Document QA
Multi-Document QA
Summarization
Few-shot Learning
Synthetic
Code
Avg
NQA
QA
MQA
HQA
2WM
MSQ
GR
QM
MN
TR
TQA
SS
PC
PR
LCC
RB
0%
Full KV
25.59
41.18
58.17
61.42
55.95
37.83
29.89
23.01
23.14
70.50
90.42
43.92
4.50
98.00
68.11
64.94
49.79
10%
SnapKV
25.51
41.17
57.18
60.04
54.66
37.82
29.83
22.86
23.19
69.00
90.42
44.20
4.50
98.00
68.13
64.74
49.45
PyramidKV
26.04
41.11
57.66
61.17
55.82
36.89
29.77
22.66
23.04
70.50
90.42
43.74
4.50
98.00
67.99
65.03
49.65
EA
25.25
41.50
56.57
60.40
56.01
37.11
30.20
22.99
23.19
71.00
90.92
43.89
3.50
97.00
67.64
64.48
49.48
KeyDiff
27.68
35.55
57.48
54.80
51.35
32.74
29.77
23.43
23.10
68.50
89.96
43.92
6.00
98.50
67.41
63.02
48.33
Appendix
Table 21: LongBench Full Result on Gemma-3-12B
Figure 11: Layer-wise motivational analysis of PPR. From left to right, the columns show: (1) Top- K overlap with later-window attention under budgeted eviction, (2) predictive stability of importance scores across PPR hops, (3) alignment with future attention usage measured by AUC, and (4) eviction-induced output distortion measured by logit KL divergence. Results are shown for the 5 th , 20 th , and 32 nd layers of Llama-3.1-8B.
Figure 12: Behavior analysis of PRKV and PRKV-GLB across layers. Each row corresponds to a different layer of Llama-3.1-8B. From left to right, the columns show: (1) transition matrix of PRKV, (2) transition matrix of PRKV-GLB, (3) score evolution of PRKV, and (4) score evolution of PRKV-GLB. Results are obtained with contexts from the PaulGrahamEssays dataset and shown for the 10 th , 20 th , and 30 th layers.
Figure 13: Layer-wise analysis of PRKV and PRKV-GLB. (Left) Token-level scores produced by PRKV and PRKV-GLB compared to the future attention signal. (Center) Rank correlation between PRKV and π∗ as W varies. (Right) Convergence of PPR scores to their converged values under finite iterations. Results are shown for the 10 th , 20 th , and 30 th layers of Llama-3.1-8B.
Figure 14: Layer-wise case study of token selection. We report token selection result of (a) observed attention, (b) PRKV, and (c) PRKV-GLB. All measurements are conducted using the bfloat16 data type on Llama-3.1-8B with PaulGrahamEssays dataset.
Large language models (LLMs) support long-context inference but suffer from substantial memory and runtime overhead due to Key-Value (KV) Cache growth. Existing KV Cache eviction methods primarily rely on local attention weights, neglecting the influence of value representations, output projection, and inter-head interactions. In this work, we reformulate KV Cache eviction from a conventional head-wise, weight-averaging approach into an output-aware, layer-wise matrix multiplication approximation problem. We introduce LaProx, a novel eviction strategy that explicitly models the multiplicative interaction between attention maps and projected value states to accurately quantify token contributions while accounting for inter-head dependencies. Building on this metric, we propose the first unified eviction strategy that assigns globally comparable importance scores to tokens, enabling model-wide selection instead of local, head-wise decisions. Experimental results across 19 datasets on long-context benchmarks LongBench and Needle-In-A-Haystack demonstrate that our approach maintains model performance with only 5% of the KV cache and consistently outperforms prior works across all configurations. Notably, our method achieves up to 2× accuracy loss reduction under extreme compression scenarios compared to existing state-of-the-art baselines with minimal overhead. Our code is available at https://github.com/huuthomai/LaProx.
Large Language Models (LLMs) are increasingly expected to operate over long contexts, yet standard softmax attention incurs a KV cache that grows linearly with sequence length, quickly becoming the bottleneck for long context inference. A practical remedy is to evict less important KV entries; however, existing eviction policies are largely heuristic and struggle to capture the rich, input-dependent distribution of token importance. In this work, we introduce a learnable indexer that predicts KV importance, enabling more accurate retention of critical tokens. Meanwhile, naively evicting tokens permanently discards their information, leading to irreversible forgetting and degraded retrieval over long ranges. To address this, we propose a lightweight latent memory module that compresses evicted tokens into a compact, online-updated state and provides residual readouts to compensate for the attention contributions lost through KV eviction. Collectively, our method enables accurate long-context inference under a bounded KV budget, delivering consistent improvements on RULER (4K/16K) across Qwen, Mistral, and Llama models (up to 25 points under aggressive eviction), markedly more stable Needle-in-a-Haystack retrieval, and superior LongBench scores and compression curves compared to existing eviction policies.
Xintong Yang, Hao Gu, Binxing Xu +6
The Hong Kong University of Science and Technology · Zhejiang University
The key-value (KV) cache is a major bottleneck in long-context inference, where memory and computation grow with sequence length. Existing KV eviction methods reduce this cost but typically degrade performance relative to full-cache inference. Our key insight is that full-cache attention is not always optimal: in long contexts, irrelevant tokens can dilute attention away from useful evidence, so selective, learnable eviction can improve generation rather than merely approximate the full cache. We introduce a global retention-based KV eviction method that learns each token's future utility under a unified memory budget. Lightweight retention gates assign utility scores to cached KV entries, and a shared final scoring projection calibrates these scores across all layers and heads. This enables a single global eviction policy in which tokens from different layers, heads, and modalities compete directly for cache capacity. We further provide theoretical analysis showing that preferentially retaining useful tokens reduces attention dilution, and we justify geometric retention as a query-agnostic proxy for future utility. Across diverse long-context language and vision-language reasoning, and multi-turn dialogue benchmarks, our method substantially reduces KV memory while matching or surpassing full-cache inference. These results suggest that learned, globally calibrated KV eviction is not only a compression technique, but also a mechanism for improving long-context reasoning.
Ngoc Bui, Hieu Trung Nguyen, Arman Cohan +1
Department of Computer Science, Yale University · The Chinese University of Hong Kong