20260625:很多新内容
This commit is contained in:
55
concepts/optimality-gap.md
Normal file
55
concepts/optimality-gap.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: "Optimality Gap"
|
||||
created: 2026-06-18
|
||||
updated: 2026-06-18
|
||||
type: concept
|
||||
tags: ["kv-cache", "optimization", "evaluation"]
|
||||
sources: ["https://arxiv.org/abs/2602.08585"]
|
||||
---
|
||||
|
||||
# Optimality Gap
|
||||
|
||||
## 定义
|
||||
|
||||
Optimality Gap(最优性差距)是 LU-KV 论文中提出的概念,指 [[heuristic-metric]] 与 [[oracle-importance]] 之间的性能差距。它量化了使用次优指标 π(如 SnapKV、KeyDiff)来近似 Oracle 指标 π* 所导致的额外驱逐损失。
|
||||
|
||||
## 形式化
|
||||
|
||||
LU-KV 将驱逐损失严格分解为两项:
|
||||
|
||||
```
|
||||
L(M^π) = L(M^*) + Δ(π, π*, b)
|
||||
```
|
||||
|
||||
其中:
|
||||
- L(M^*):Oracle Metric Loss — 即使使用完美指标,压缩率约束下仍不可避免的损失
|
||||
- Δ(π, π*, b):Optimality Gap — 指标 π 与 Oracle π* 在预算 b 下的差距
|
||||
|
||||
## 三个组成类别
|
||||
|
||||
在给定预算 b 下,启发式指标保留的 token 集合 M^π 可分解为:
|
||||
|
||||
- **Hits**:M^π ∩ M^* — 正确保留的高 Oracle 重要性 token
|
||||
- **Misses**:M^* \ M^π — 高 Oracle 重要性但被错误驱逐的 token(**损失来源**)
|
||||
- **False Positives**:M^π \ M^* — 低 Oracle 重要性但被错误保留的 token(**浪费预算**)
|
||||
|
||||
Optimality Gap = Misses 中 Oracle 重要性之和 − False Positives 中 Oracle 重要性之和
|
||||
|
||||
## 根本原因
|
||||
|
||||
不同 attention head 中,同一个启发式指标(如注意力分数)与 Oracle 重要性的**对齐程度**不同。高注意力分数的 token 在某些 head 中确实重要,但在另一些 head 中可能只是瞬时噪声。
|
||||
|
||||
## 实践意义
|
||||
|
||||
- LU-KV 的核心贡献之一就是**显式优化 Optimality Gap**:通过 [[global-combinatorial-optimization]] 将更多预算分配给指标-Oracle 对齐度高的 head
|
||||
- [[offline-profiling]] 的核心目的正是为每个 head 标定其 optimality gap curve
|
||||
|
||||
## 相关概念
|
||||
|
||||
- [[oracle-importance]] — Optimality Gap 的参照基准
|
||||
- [[marginal-utility]] — 缩小 optimality gap 意味着更高的边际效用
|
||||
- [[head-level-budget-allocation]] — 不同 head 的 optimality gap 决定预算分配策略
|
||||
|
||||
## 参考
|
||||
|
||||
- [[tang-lukv|LU-KV]] (Tang et al., ICML 2026)
|
||||
Reference in New Issue
Block a user