arXiv cs.CL· Ekaterina Seregina·· 11 小时前AI 评分34
谁该为 KV-Cache 打分?中层才是 KV-Cache 淘汰的最佳评判者
Who Should Score the Cache? Mid-Depth Layers Are the Best Judges of KV-Cache Eviction
AI 导读
研究在 21 个模型上发现,KV-Cache 淘汰质量由打分层的深度决定:在 18 个具备逐层缓存的 0.5B 至 109B 模型上,长上下文检索准确率在浅层崩溃、在 0.4 至 0.75 深度处达到峰值、在最后一层下降。
正文 · 原文
Abstract:Key-value (KV) cache eviction methods rank tokens by attention scores, and each layer scores its own cache. To our knowledge, no eviction method asks which layer should score. We find, across twenty-one models, that the depth of the scoring layer governs eviction quality. On the eighteen models with per-layer caches, spanning 0.5B to 109B, long-context retrieval accuracy collapses at shallow layers, peaks between 0.4 and 0.75 of depth, and degrades at the last layer. The curve arises because a layer judges tokens well only once it has used the question to find the answer, which takes several layers. Modeling eviction as a top-$k$ cut, we compute answer survival probability from prefill attention and reproduce the measured curves. This approach selects the scoring layer using calibration prompts with known answers, and the selected layer is the best layer measured on most models and never significantly below it. It improves on the own-layer default on sixteen of the eighteen models, with significant gains on seven, all at 14B or below, while on larger models the default is already close to the best mid-depth layer. Scoring every cache from the selected layer while keeping one set of tokens for all heads also beats per-head SnapKV by 18 to 43 points on five models up to 14B under tight budgets. This gain carries over to financial filings at 32K context, all at the same memory budget, with no extra forward pass. The same curve explains a penalty in shared-cache models, where several layers read one cache and the layer that writes it scores by default. On Gemma-4-E2B the writer is shallow and loses 28 points to a mid-depth reader at a 10% budget. We also find that in open-book question answering (LongBench) no mid-depth layer beats the own-layer default.
| Comments: | 19 pages, 3 figures |
| Subjects: | Machine Learning (cs.LG); Computation and Language (cs.CL) |
| Cite as: | arXiv:2611.02230 [cs.LG] |
| (or arXiv:2611.02230v1 [cs.LG] for this version) | |
| https://doi.org/10.48550/arXiv.2611.02230 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Ekaterina Seregina [view email]
[v1]
Sun, 1 Nov 2026 21:46:00 UTC (104 KB)
来源:arXiv cs.CL · arxiv.org