信任大众:KV缓存驱逐中的强制权重 Trust the Mass: Forced Weights in KV-Cache Eviction 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-08-25
👁️ 预览文献
💡 AI 中文简介
稀疏注意力和KV缓存驱逐方法通常只保留部分键,丢弃其余键,并在保留集上重新归一化注意力权重。研究在五个模型的168,192个注意力行上枚举最佳保留子集,发现保留最大权重的简单方法已接近最优,最佳子集仅能缩小与全注意力差距的中位数2%至5%。由于选择带来的改进很小,不同驱逐方法的性能差异主要来自内存管理方式。在统一评估流程中,最强的查询无关方法因使用掩码存储而实际保留完整缓存,只有按头存储才能释放内存。在固定选择上强制名义预算会导致基准分数下降14至62点。一个87.6点的检索差距源于在问题可见时计算的排名。ContourKV是一种基于丢弃质量统计的无训练分配器,在160对比较中赢得93次,输掉22次,并在字节数上达到预算强制基线的水平,与最强方法持平。
领域机器学习 / 自然语言处理
适合谁读需要一定专业背景
核心贡献1. 通过枚举实验证明现有驱逐方法中保留最大权重已接近最优,选择本身带来的提升有限。2. 揭示性能差异主要源于内存存储方式,并提出无训练分配器ContourKV,在字节数约束下达到最先进水平。
关键数据最佳子集仅缩小与全注意力差距的中位数2-5%;强制预算导致基准分数下降14-62点;ContourKV在160对比较中赢93输22。
推荐理由这篇文章揭示了KV缓存驱逐的真正瓶颈不在选择策略而在内存管理,值得一读,特别是对优化大模型推理性能感兴趣的人。
关键词["KV缓存驱逐", "稀疏注意力", "内存效率", "注意力权重", "ContourKV"]

原文摘要

查看英文原文摘要

Every deployed sparse-attention or KV-cache-eviction rule keeps a subset of the keys, discards the rest, and renormalizes the attention weights over the kept set. Enumerating the exact best subset under that constraint on $168{,}192$ attention rows from five models shows that keeping the largest weights is already near-optimal, since the best subset closes only a median $2$ to $5\%$ of the remaining gap to full attention. If selection closes this little, published margins between eviction methods must come from elsewhere, so we measure the bytes each method holds. In the shared evaluation pipeline, the strongest query-agnostic methods hold the full cache because their per-head selections are stored as masks, and only ragged per-head storage frees that memory. Enforcing a nominal budget on one fixed selection costs $14$ to $62$ benchmark points. We trace an $87.6$-point retrieval margin to rankings computed while the question is visible. ContourKV, a training-free allocator built from the dropped-mass statistic, wins $93$ of $160$ paired comparisons against that state of the art and loses $22$ at the byte count of the budget-enforcing baselines, and it ties the strongest of them.