Manuscript Offprint

arXiv:2609.06663

ECOKV: Geometry-Aware KV Cache Eviction via Complementary Diversity Metrics

Chin Ting Hsu, Yu-Syuan Xu, Ling Zou, Hsien-Kai Kuo, Wen-Huang Cheng

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.

1. Multimodal Large Language Model Efficiency

Multimodal large language models (MLLMs) [46–48] have gained widespread attention for their ability to process and reason over multimodal inputs, including text, images, and audio, while providing contextually relevant responses.

In the realm of computer vision, they have been widely adopted in various tasks, including visual question answering [2, 18], image captioning [10, 12], and object detection [15, 51]. Recent advances have enabled the processing of increasingly long and complex inputs [3, 37]. However, this progress introduces substantial computational and memory overhead, making inference efficiency a critical concern. To address this challenge, KV cache eviction methods [13, 20] offer a training-free alternative that reduces memory usage and inference latency while preserving model capability, by selectively removing redundant key-value pairs from the KV cache.

Early KV cache eviction algorithms are primarily designed for Large Language Models (LLMs). They perform top-K selection within a fixed budget, retaining key-value pairs by importance scores estimated via accumulated attention score [49], average attention scores within an observation window [23], or approximated by heuristic metrics such as Key Norm (KNorm) [7] or Value Norm (VNorm) [17]. To account for the varying information density across layers and attention heads, subsequent work explores dynamic budget allocation frameworks that support adaptive and fine-grained budget sharing [4, 8]. Recently, diversity-aware criteria have been incorporated to improve coverage of the retained key-value set and mitigate redundancy [6, 33], yielding better preservation of the token distribution under constrained memory budgets. Recent studies have begun exploring KV cache eviction for MLLMs [22, 27, 42–44]. These works observe that visual tokens often exhibit higher redundancy than text tokens, motivating strategies that prioritize the preservation of text tokens or leverage diversity metrics to identify and remove redundant visual tokens.

Despite these advances, existing diversity-based methods mostly rely on cosine similarity over normalized embeddings, which introduces a fundamental geometric limitation. Recent studies [11, 24] have highlighted the issue of anisotropy, where high-dimensional transformer embed-

Figure

Figure 1. Distribution of layer-wise key cosine similarities in Qwen2-VL-7B-Instruct. Cosine similarity remains consistently high across all layers.

dings concentrate within a narrow cone, resulting in uniformly high cosine similarity scores. As illustrated in Figure 1, cosine similarity produces consistently high average similarity scores across layers, exposing its tendency to overestimate redundancy and potentially corrupt eviction decisions. Moreover, cosine similarity operates on normalized vectors, thereby losing magnitude information. Relying on a single, biased metric without jointly accounting for complementary geometric information can lead to incorrect token prioritization during eviction, while overestimation of redundancy may induce an undue preference for diversity over importance across layers. Euclidean distance offers a potential measure of token diversity by capturing magnitude information in token representations. However, lacking explicit directional information, it has shown inferior performance for token diversity assessment in prior LLM studies [33]. Consequently, each metric captures distinct information while having inherent limitations, and the potential benefits of combining them into a composite metric remain largely unexplored.

To address the limitations, we propose Geometry-Aware KV Cache Eviction via Complementary Diversity Metrics (ECOKV), a novel eviction framework that integrates Euclidean distance and cosine similarity to capture richer geometric information for token diversity. Specifically, we introduce a Euclidean-based diversity metric that measures the distance between each key and the global average, followed by normalization to facilitate its integration with a cosine-similarity-based metric. Furthermore, we employ Euclidean distance to capture layer-wise redundancy while mitigating its unbounded scale issue. In addition, previous methods inherit the observation window size of 32 from [23], which has not been thoroughly examined for MLLMs under tight memory budgets. With a small cache budget, the observation window consumes a substantial portion of the cache, leaving fewer tokens for selection. We therefore evaluate different observation window sizes and find that

smaller windows consistently improve performance by allocating more budget to our token selection strategy.

Extensive experiments validate that ECOKV achieves state-of-the-art performance across multiple multimodal benchmarks and compression ratios, integrating seamlessly with existing eviction frameworks. We further analyze the relative weighting between Euclidean distance and cosine similarity, the effect of observation window size, and the layer-wise correlation between importance and diversity, offering insights into where diversity plays a critical role in key-value selection. Our key contributions are:

  • (i) We provide in-depth analysis on different diversity metrics and their impact on model performance

  • (ii) We introduce a head-adaptive key diversity and redundancy estimator that jointly leverages Euclidean distance and cosine similarity to dynamically adjust diversity contribution across attention heads

  • (iii) We observe that a reduced observation window strategy can improve performance under tight budget constraints

  • (iv) We achieve state-of-the-art performance on multi-model question answering benchmarks, and provide diverse empirical analysis on the choice of diversity implementation and the relation between different metrics

References (49)