20260625:很多新内容

This commit is contained in:
2026-06-25 14:08:47 +08:00
parent 91fac5b6fc
commit 6021dea160
375 changed files with 19263 additions and 251 deletions

View File

@@ -0,0 +1,56 @@
---
title: "Oracle Importance"
created: 2026-06-18
updated: 2026-06-18
type: concept
tags: ["kv-cache", "attention", "evaluation-metric"]
sources: ["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-metric]]SnapKV、KeyDiff | 瞬时prefill 阶段) | 在线可用 |
| Oracle Importance | 长视界(未来解码窗口) | 仅离线 profiling 可用 |
## 相关概念
- [[long-horizon-utility]] — Oracle Importance 是长视界效用的形式化度量
- [[optimality-gap]] — 启发式与 Oracle 之间的差距
- [[head-level-budget-allocation]] — 基于 Oracle 效用曲线分配预算
## 参考
- [[tang-lukv|LU-KV]] (Tang et al., ICML 2026) — 提出 Oracle Importance 概念
- AdaKV (Feng et al., 2026b) — 输出扰动界分析Oracle Importance 的灵感来源)