Files
myWiki/concepts/head-level-budget-allocation.md

52 lines
1.9 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: "Head-Level Budget Allocation"
created: 2026-06-18
updated: 2026-06-18
type: concept
tags: ["kv-cache", "attention", "budget-allocation"]
sources: ["https://arxiv.org/abs/2602.08585"]
---
# Head-Level Budget Allocation
## 定义
Head-Level Budget Allocation注意力头级别预算分配是在 [[kv-cache-eviction]] 中将全局缓存预算 B_total 分配到每个注意力头 (l, h) 的策略。这是 LU-KV 框架的直接优化对象。
## 为什么需要
不同注意力头的"信息价值"高度异质:
- 某些头对长距离依赖敏感 — 应分配更多预算
- 某些头仅关注局部 token 模式 — 可大幅压缩
- [[] [[heuristic-metric]] 在不同头中的预测保真度不同
**关键洞察**:若某个 head 的启发式指标 π 与实际 [[oracle-importance]] 对齐度低,增加其预算的边际回报递减。
## 分配策略对比
| 策略 | 方法 | 是否差异化 | 是否全局优化 |
|------|------|----------|------------|
| Uniform | 所有 head 等预算 | 否 | 否 |
| [[pyramidkv]] | 深层 head 减少预算(信息漏斗假说) | 是 | 否(静态规则) |
| [[adkv]] | 全局 Top-K 基于注意熵 | 是 | 是(但基于原始分数) |
| LU-KV | [[global-combinatorial-optimization]] + [[marginal-utility]] | 是 | 是(基于长期效用曲线) |
## LU-KV 的独特贡献
LU-KV 将 Head-Level Budget Allocation 从两个层面重新定义:
1. **目标函数**:最小化全局 [[optimality-gap]] 而非简单最大化分数和
2. **优化方法**[[convex-hull-relaxation]] → 边际效用贪心 → 近优解
3. **部署方式**[[offline-profiling]] 预计算 → 在线查表
## 相关概念
- [[cross-head-budget-allocation]] — 同一问题的不同命名视角
- [[intra-head-eviction]] — 预算分配后,每个 head 内独立执行的 token 选择
- [[marginal-utility]] — 驱动分配决策的核心信号
## 参考
- [[tang-lukv|LU-KV]] (Tang et al., ICML 2026)