Files
myWiki/concepts/intra-head-eviction.md

1.8 KiB
Raw Blame History

title, created, updated, type, tags, sources
title created updated type tags sources
Intra-Head Eviction 2026-06-18 2026-06-18 concept
kv-cache
attention
https://arxiv.org/abs/2602.08585

Intra-Head Eviction

定义

Intra-Head Eviction头内驱逐kv-cache-eviction 两阶段范式的第一阶段:在每个注意力头内部,使用评分指标 π 对缓存 token 排序,保留前 b_{l,h} 个高分 token驱逐其余。

代表性指标

指标 方法 评分依据
累积注意力 snapkv、H2O 历史注意力权重的累积和
Key 向量几何 keydiff 相邻 Key 向量之间的差分模式
输出扰动 CriticalKV value 向量 × 输出投影矩阵的潜在扰动
重构误差 KVZip 上下文重构目标query-agnostic

在 LU-KV 中的位置

LU-KV 的独特之处在于解耦 intra-head scoring 和 cross-head allocation

  • Intra-head scoring 由用户任意选择的启发式指标 π 完成
  • LU-KV 仅负责确定每个 head 应该保留多少 tokenb_{l,h}
  • 这使得 LU-KV 成为"指标无关"metric-agnostic框架

LU-KV 不创造新的 intra-head 指标,而是最大化任何已有指标的效用

核心限制

传统方法的主要问题在 intra-head 层面暴露:

  • 同一指标 π 在不同 head 中与 oracle-importance对齐度不同
  • 高注意力分数在某些 head 中对应真正重要的 tokenHits在另一些 head 中仅为瞬时噪声False Positives
  • 由此产生 optimality-gap

相关概念

参考