Existing low-rank KV-cache indexes preserve model weights or key variance, not the attention scores that determine retrieval. We derive the expected score distortion of key-side rank-r compression, a two-sided covariance-weighted low-rank problem that uses both query and key statistics, and solve it exactly: the optimum is an optimal rank-r linear score map, computed in closed form from two d x d covariances per head, and its predicted per-head score-MSE reduction matches measurement (Pearson r = 0.997). The resulting training-free index, SAKI, beats key-PCA at every rank on LLaMA-3.1-8B, Qwen2.5-7B, Mistral-7B and Llama-3.2-3B, at every context length from 4K to 64K, and in every calibration-domain pair (0.748 -> 0.799 recall@64 at r = 32 on LLaMA-3.1-8B). Because RoPE rotates keys by their distance from the query, we make the closed form RoPE-aware by averaging the query covariance over rotations; this SAKI-RoPE, our main method, raises recall to 0.861, beats PCA on every head of all four models, and needs only 28-39% of PCA's rank to match it at r = 32 across the four models. Random-matrix theory of the covariance estimation noise shows that 512 calibration tokens suffice and that clipping the Marchenko-Pastur noise bulk helps SAKI when calibration is short. We make no perplexity claim: with the attention sink pinned, perplexity differences between indexes are small and depend on model and text, and we show that any low-rank index calibrated on a long prefix drops the attention-sink token, which collapses 32K perplexity unless the sink is pinned.


翻译:暂无翻译

0
下载
关闭预览

相关内容

强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
干货|掌握机器学习数学基础之优化[1](重点知识)
机器学习研究会
10+阅读 · 2017年11月19日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
乌克兰无人机饱和战场中的错误教训
专知会员服务
9+阅读 · 11月17日
面向最后一战术英里:美军无人机创新尝试
专知会员服务
5+阅读 · 11月17日
《美空军2026条令文件:对海压制作战》
专知会员服务
26+阅读 · 11月9日
人工智能与战争的未来
专知会员服务
10+阅读 · 11月8日
《Agent Mosaic:识别智能体LLM系统中的机密泄露》
专知会员服务
14+阅读 · 11月8日
人工智能在军事教育中的应用:若干视角与经验
专知会员服务
13+阅读 · 11月6日
相关VIP内容
相关基金
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员