SABlock: Semantic-Aware KV Cache Eviction with Adaptive Compression Block Size

Jinhan Chen, Jianchun Liu, Hongli Xu, Xianjun Gao, Shilong Wang
10/26/2025
cs.CL

No confident code implementation found for this paper.

Abstract

The growing memory footprint of the Key-Value (KV) cache poses a severe scalability bottleneck for long-context Large Language Model (LLM) inference. While KV cache eviction has emerged as an effective solution by discarding less critical tokens, existing token-, block-, and sentence-level compression methods struggle to balance semantic coherence and memory efficiency. To this end, we introduce SABlock, a \underline{s}emantic-aware KV cache eviction framework with \underline{a}daptive \underline{block} sizes. Specifically, SABlock first performs semantic segmentation to align compression boundaries with linguistic structures, then applies segment-guided token scoring to refine token importance estimation. Finally, for each segment, a budget-driven search strategy adaptively determines the optimal block size that preserves semantic integrity while improving compression efficiency under a given cache budget. Extensive experiments on long-context benchmarks demonstrate that SABlock consistently outperforms state-of-the-art baselines under the same memory budgets. For instance, on Needle-in-a-Haystack (NIAH), SABlock achieves 99.9% retrieval accuracy with only 96 KV entries, nearly matching the performance of the full-cache baseline that retains up to 8K entries. Under a fixed cache budget of 1,024, SABlock further reduces peak memory usage by 46.28% and achieves up to 9.5x faster decoding on a 128K context length.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{chen2025sablock,
  title  = {SABlock: Semantic-Aware KV Cache Eviction with Adaptive Compression Block Size},
  author = {Jinhan Chen and Jianchun Liu and Hongli Xu and Xianjun Gao and Shilong Wang},
  year   = {2025},
  eprint = {2510.22556},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.22556v1}
}

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/2510.22556.svg)](https://codeofpaper.com/paper/2510.22556)

Discussion