--- title: "Intra-Head Eviction" created: 2026-06-18 updated: 2026-06-18 type: concept tags: ["kv-cache", "attention"] sources: ["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 应该保留多少 token(b_{l,h}) - 这使得 LU-KV 成为"指标无关"(metric-agnostic)框架 LU-KV 不创造新的 intra-head 指标,而是**最大化任何已有指标的效用**。 ## 核心限制 传统方法的主要问题在 intra-head 层面暴露: - 同一指标 π 在不同 head 中与 [[oracle-importance]] 的**对齐度不同** - 高注意力分数在某些 head 中对应真正重要的 token(Hits),在另一些 head 中仅为瞬时噪声(False Positives) - 由此产生 [[optimality-gap]] ## 相关概念 - [[cross-head-budget-allocation]] — 两阶段范式的第二阶段 - [[heuristic-metric]] — 所有 intra-head 评分方法的统称 - [[head-level-budget-allocation]] — 决定每个 head 保留多少 token ## 参考 - [[tang-lukv|LU-KV]] (Tang et al., ICML 2026)