保护几乎就是一切:结构保护在全局受限的KV淘汰中占据主导地位
Protection Is (Nearly) All You Need: Structural Protection Dominates Scoring in Globally Capped KV Eviction
AI总结:
本文研究了在共享全局受限解码时间Harness下的KV缓存淘汰问题,发现结构保护在保持质量方面起关键作用,通过保留边界缓存恢复了大部分参考天花板质量,并展示了保护机制在不同模型上的有效性。
摘要:
我们研究了在共享全局受限解码时间Harness下的KV缓存淘汰问题。七种策略(LRU、H2O、SnapKV、StreamingLLM、Ada-KV、QUEST、Random)共享一个提示边界漏洞:在没有结构保护的情况下,它们在六个纯Transformer模型上几乎降级到质量为零(F1≤0.064)。保留每个边界10%的缓存可在七个LongBench模型上恢复69-90%的C=2048参考天花板质量(13%保留率);一个十模型面板覆盖68-98%。一个注意力质量试点(Qwen2.5-3B,N=30)表明原因:位置0的sink占据约75%的前缀质量,而其他边界token接近约0.41倍的均匀期望,因此注意力评分器保留sink但仍会丢弃结构关键token。有保护的情况下,简化评分隔离变体在K=32时与LRU TOST等价(Δ=0.02);在K=8时,注意力策略对彼此收敛但仍比LRU高0.011-0.021 F1(在C=256和C=512时)。忠实的Ada-KV/QUEST在Mistral-7B和Phi-3.5上添加约0.03-0.04 F1超过简化变体。在Qwen3-4B上的NIAH-32K领域转移试点(解码vs.预填,C∈{512,2048})显示保护提升几乎相同(比率0.99-1.00)。在64K时,保护有所帮助但恢复有限;忠实的每头评分在Gemma-3-4B上仅在模型已支持强64K检索而不淘汰时才能在6.3%保留率下达到全缓存天花板。总体而言:保护占主导;一旦边界被保护,评分差异变得次要;每头分配进一步带来小幅提升。
英文摘要:
We study KV cache eviction under a shared globally capped decode-time harness. Seven policies (LRU, H2O, SnapKV, StreamingLLM, Ada-KV, QUEST, Random) share a prompt-boundary vulnerability: without structural protection, they collapse to near-zero quality on six pure-transformer models (F1$\leq$0.064). Reserving 10\% of cache at each boundary recovers 69--90\% of the $C{=}2{,}048$ reference-ceiling quality on seven LongBench models at $C{=}256$ (13\% retention); a ten-model panel spans 68--98\%. An attention-mass pilot (Qwen2.5-3B, $N{=}30$) suggests why: the position-0 sink holds ${\sim}75\%$ of prefix mass, while other boundary tokens sit near ${\sim}0.41{\times}$ uniform expectation, so attention scorers retain the sink but still drop structurally critical tokens. With protection, simplified score-isolation variants are TOST-equivalent to LRU at $K{=}32$ ($Δ{=}0.02$); at $K{=}8$, attention policies pairwise converge yet beat LRU by 0.011--0.021 F1 across $C{=}256$ and $C{=}512$. Faithful Ada-KV/QUEST add ${\sim}0.03$--$0.04$ F1 on Mistral-7B and Phi-3.5 beyond simplified variants. A NIAH-32K regime-transfer pilot on Qwen3-4B (decode vs.\ prefill, $C{\in}\{512,2048\}$) shows near-identical protection lifts (ratio 0.99--1.00). At 64K, protection helps but recovery is modest; faithful per-head scoring matches full-cache ceiling on Gemma-3-4B at 6.3\% retention only when the model already supports strong 64K retrieval without eviction. Overall: protection dominates; scoring differences are secondary once boundaries are guarded; per-head allocation gives a further modest gain.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。