Accurate KV Cache Eviction via Anchor Direction Projection for Efficient LLM Inference

Zijie Geng, Jie Wang, Ziqi Liu, Feng Ju, Yi-Ming Li +6 more
1/1/2025

No official code found. Best implementation: MIRALab-USTC/LLM-AnDPro (3 stars).

Abstract

Key-Value (KV) cache eviction—which retains the KV pairs of the most important tokens while discarding less important ones—is a critical technique for optimizing both memory usage and inference latency in large language models (LLMs). However, existing approaches often rely on simple heuristics—such as attention weights—to measure token importance, overlooking the spatial relationships be-tween token value states in the vector space.

Show full abstract

This often leads to suboptimal token selections and thus performance degradation. To tackle this problem, we propose a novel method, namely AnDPro ( An chor D irection Pro jection), which introduces a projection-based scoring function to more accurately measure token importance. Specifically, AnDPro operates in the space of value vectors and leverages the projections of these vectors onto an “Anchor Direction” —the direction of the pre-eviction output—to measure token importance and guide more accurate token selection. Experiments on 16 datasets from the LongBench benchmark demonstrate that AnDPro can maintain 96 . 07% of the full cache accuracy using only 3 . 44% KV cache budget, reducing KV cache budget size by 46 . 0% without compromising quality compared to previous state-of-the-arts.

DOISemantic Scholar

Code Implementations(1)

This is the code of our paper "Accurate KV Cache Eviction via Anchor Direction Projection for Efficient LLM Inference", which has been accepted by NeurIPS 2025.

30

Similar Papers

Cite this paper

@article{geng2025accurate,
  title  = {Accurate KV Cache Eviction via Anchor Direction Projection for Efficient LLM Inference},
  author = {Zijie Geng and Jie Wang and Ziqi Liu and Feng Ju and Yi-Ming Li and Xing Li and Ming-Xuan Yuan and Jian-Ye Hao and De-Fu Lian and En-Hong Chen and Feng Wu},
  year   = {2025},
  doi    = {10.52202/085713-0350},
  url    = {https://doi.org/10.52202/085713-0350},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/69233828b38f614a9e3a742b4c835b8328710e4e.svg)](https://codeofpaper.com/paper/69233828b38f614a9e3a742b4c835b8328710e4e)

Discussion