CachePrune: Privacy-Aware and Fine-Grained KV Cache Sharing for Efficient LLM Inference

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Wu, Guanlong, li, Zhaohan, Zhang, Yao, Zhang, Zheng, Niu, Jianyu, Wu, Ye, Zhang, Yinqian
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866917524608647168
author Wu, Guanlong
li, Zhaohan
Zhang, Yao
Zhang, Zheng
Niu, Jianyu
Wu, Ye
Zhang, Yinqian
author_facet Wu, Guanlong
li, Zhaohan
Zhang, Yao
Zhang, Zheng
Niu, Jianyu
Wu, Ye
Zhang, Yinqian
contents Large Language Models (LLMs) rely on Key-Value (KV) caching to accelerate inference, and many serving systems further share the KV cache across users' requests to reduce redundant computation. While widely adopted, unrestricted cross-user sharing introduces side-channel vulnerabilities, allowing an adversary to infer user inputs by probing for cache reuse. Existing defenses disable sharing entirely to prevent leakage; yet such a coarse-grained strategy sacrifices substantial reuse potential, since prompts often include large portions of privacy-irrelevant segments, such as system instructions or publicly accessible materials. Building on this, we present CachePrune, a privacy-aware KV cache sharing mechanism that enables fine-grained reuse of KV entries across requests. Realizing such fine granularity requires token-level cache management, as reusable segments vary in length and position due to sensitivity masking, making reuse more complex than the fixed-size or sentence-level chunking used in existing coarse-grained schemes. Specifically, CachePrune makes fine-grained reuse practical by addressing two key challenges: accurately and efficiently deriving reusable KV segments and efficiently retrieving them over variable-length spans. We implement CachePrune on top of vLLM and evaluate it on three datasets, showing that it eliminates direct leakage through KV cache reuse side channels while reducing TTFT by 4.5x and increasing cache hit rates by 44% compared with state-of-the-art approaches.
format Preprint
id arxiv_https___arxiv_org_abs_2605_23640
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle CachePrune: Privacy-Aware and Fine-Grained KV Cache Sharing for Efficient LLM Inference
Wu, Guanlong
li, Zhaohan
Zhang, Yao
Zhang, Zheng
Niu, Jianyu
Wu, Ye
Zhang, Yinqian
Cryptography and Security
Large Language Models (LLMs) rely on Key-Value (KV) caching to accelerate inference, and many serving systems further share the KV cache across users' requests to reduce redundant computation. While widely adopted, unrestricted cross-user sharing introduces side-channel vulnerabilities, allowing an adversary to infer user inputs by probing for cache reuse. Existing defenses disable sharing entirely to prevent leakage; yet such a coarse-grained strategy sacrifices substantial reuse potential, since prompts often include large portions of privacy-irrelevant segments, such as system instructions or publicly accessible materials. Building on this, we present CachePrune, a privacy-aware KV cache sharing mechanism that enables fine-grained reuse of KV entries across requests. Realizing such fine granularity requires token-level cache management, as reusable segments vary in length and position due to sensitivity masking, making reuse more complex than the fixed-size or sentence-level chunking used in existing coarse-grained schemes. Specifically, CachePrune makes fine-grained reuse practical by addressing two key challenges: accurately and efficiently deriving reusable KV segments and efficiently retrieving them over variable-length spans. We implement CachePrune on top of vLLM and evaluate it on three datasets, showing that it eliminates direct leakage through KV cache reuse side channels while reducing TTFT by 4.5x and increasing cache hit rates by 44% compared with state-of-the-art approaches.
title CachePrune: Privacy-Aware and Fine-Grained KV Cache Sharing for Efficient LLM Inference
topic Cryptography and Security
url https://arxiv.org/abs/2605.23640