Files
myWiki/concepts/adkv.md

47 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "AdaKV"
created: 2026-06-18
updated: 2026-06-18
type: concept
tags: ["kv-cache", "cross-head-budget-allocation", "dynamic-allocation"]
sources: []
---
# AdaKV
## 定义
AdaKV (Feng et al., 2026b) 是一种动态的 [[cross-head-budget-allocation]] 方法,通过全局 Top-K 选择在 attention head 之间分配缓存预算。它基于注意力熵等实时统计量动态调整分配。
## 核心机制
1. **全局池化**:将所有 head 的候选 token 及其代理分数集中
2. **全局 Top-K**:跨所有 head 选择分数最高的 K 个 token
3. **动态分配**:各 head 的实际预算由 Top-K 选择结果自然决定
## 与 LU-KV 的关系
LU-KV 论文对 AdaKV 进行了关键性分析:
- **借鉴**AdaKV 的输出扰动界分析启发了 [[oracle-importance]] 的定义
- **超越**AdaKV 基于**原始代理分数**做全局比较(假设分数跨 head 可比LU-KV 基于**边际效用曲线**做跨 head 比较
- **形式化差异**AdaKV 的贪心策略未考虑 [[optimality-gap]]LU-KV 显式优化它
## 局限性
1. **分数不可比假设**:不同 head 的注意力分数尺度和分布不同,直接全局 Top-K 可能偏向分数尺度大的 head
2. **瞬时视角**:使用当前注意力熵,无法捕捉 [[long-horizon-utility]]
3. **无离线 profiling**:每次推理需在线计算,但开销仍可接受
## 相关概念
- [[cross-head-budget-allocation]] — AdaKV 所在的类别
- [[pyramidkv]] — 静态分配的替代方案
- [[global-combinatorial-optimization]] — LU-KV 采用的形式化更强的优化框架
- [[tang-lukv|LU-KV]] — 基于边际效用的改进方法
## 参考
- AdaKV (Feng et al., 2026b)
- [[tang-lukv|LU-KV]] (Tang et al., ICML 2026)