Files
myWiki/concepts/oracle-importance.md

2.1 KiB
Raw Blame History

title, created, updated, type, tags, sources
title created updated type tags sources
Oracle Importance 2026-06-18 2026-06-18 concept
kv-cache
attention
evaluation-metric
https://arxiv.org/abs/2602.08585

Oracle Importance

定义

Oracle ImportanceOracle 重要性)是 LU-KV 论文中提出的理论概念,用于严格量化 KV Cache 中每个 token 在未来解码窗口中对其注意力头的最大潜在贡献。它是评估 heuristic-metric 质量的金标准ground truth

数学定义

对于注意力头 (l, h) 中位置 j 的 token其 Oracle 重要性 I_{l,h,j} 定义为:

I_{l,h,j} = max_{k in {1,...,K_max}} || A_{l,h,k,j} * v_{l,h,j} * W_O^{(l,h)} ||

其中:

  • A_{l,h,k,j}:未来解码步骤 k 时对位置 j 的注意力权重
  • v_{l,h,j}:位置 j 的 value 向量
  • W_O输出投影矩阵
  • K_max未来解码窗口大小

直观理解:在所有未来解码步骤中,该 token 的加权 value 向量能达到的最大 L2 范数

核心作用

Oracle Importance 在 LU-KV 框架中承担三个关键角色:

  1. Ground truth:定义"真正重要"的 token——启发式指标应尽可能逼近的目标
  2. 损失分解:将驱逐损失分解为 Oracle 损失(固定)+ optimality-gap(指标差距)
  3. Profiling 目标offline-profiling 中通过全注意力解码计算 Oracle 重要性,用于标定各 head 的效用曲线

与启发式指标的关系

指标类型 时间视角 可用性
heuristic-metricSnapKV、KeyDiff 瞬时prefill 阶段) 在线可用
Oracle Importance 长视界(未来解码窗口) 仅离线 profiling 可用

相关概念

参考

  • tang-lukv (Tang et al., ICML 2026) — 提出 Oracle Importance 概念
  • AdaKV (Feng et al., 2026b) — 输出扰动界分析Oracle Importance 的灵感来源)