This work proposes a geometry-aware composite metric that jointly leverages Euclidean distance and cosine similarity to capture token diversity from complementary perspectives and uses these two metrics to estimate the redundancy level of each attention head, allowing adaptive weighting between diversity and importance scores during token selection.
Abstract
Although multimodal Large Language Models (MLLMs) excel in diverse tasks, their scalability remains limited by the memory and computational overhead of KV cache storage. Recent KV cache eviction approaches incorporate a cosine similarity-based diversity metric with importance metrics to selectively retain critical key-value pairs. However, cosine similarity involves normalization that discards magnitude information, and it often yields uniformly high similarity values across layers due to the anisotropy property of hidden representations. In our study ECOKV, we rigorously deconstruct the capabilities of existing diversity metrics. Moving beyond simple measurement, we propose a geometry-aware composite metric that jointly leverages Euclidean distance and cosine similarity to capture token diversity from complementary perspectives. Furthermore, we use these two metrics to estimate the redundancy level of each attention head, allowing adaptive weighting between diversity and importance scores during token selection. Finally, we demonstrate that the observation window commonly employed to preserve recent tokens can be substantially reduced, thereby allocating more cache capacity to informative tokens and yielding consistent improvements. Extensive experiments demonstrate that ECOKV achieves state-of-the-art performance under various compression ratios and can be seamlessly integrated with existing KV cache eviction methods. We further analyze the relationship between importance and diversity, and examine redundancy patterns across layers and attention heads.
A unified score, $\mu_i+\lambda_1\sigma_i+\lambda_2\mathrm{corr}(i,S)$, is studied, adding attention dispersion across window queries and redundancy relative to selected tokens to test whether this relevance-diversity balance should vary with depth.
This work proposes MoEZip, a routing-aware KV cache compression for sparse MoE language models, and proposes a novel metric based on the Fisher information matrix of routing distributions that combines attention weights for routing-aware scoring of contexts.
The memory usage and decoding latency of LLM inference grow rapidly with context length. To reduce these costs, key-value (KV) cache compression methods selectively retain cached states based on token importance or differences in attention patterns across heads. However, we discover that retrieval capability varies sub...
Xian-Peng Shang, Can-Bin Huang, Jiang Li et al.· arXiv.org· 0 citations
Large Language Models (LLMs) rely on a Key-Value (KV) Cache to avoid recomputation of attention information for the previously generated tokens, but the cache keeps growing linearly with the sequence length and thus quickly becomes the dominant memory bottleneck during long context inference. This paper presents a surv...
Chaitra Samant, Dhruv Panchal, Kevin Shah et al.· International Journal of Com...· 0 citations
The large KV-cache size of modern LLMs creates a barrier to efficient deployment. Recent work has explored replacing attention layers'RoPE positional embeddings with alternative decay-based mechanisms, which can then be used to prune KV-cache during inference. However, these decay functions have limited expressivity, a...
Davis Wertheimer, Hao-Chen Shen, Ahan Gupta et al.· 2 citations
This work learns a selector that is able to produce, based on context, a per-layer cache configuration towards an overall compression budget, and achieves the Pareto frontier of accuracy against cache size, against learning-free and post-hoc baselines.
João Monteiro, Louis Béthune, Anastasiia Filippova et al.· arXiv.org· 1 citation