arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.23640cs.CR
收藏

CachePrune:面向高效LLM推理的隐私感知细粒度KV缓存共享

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

SUSTech(南方科技大学);ByteDance(字节跳动)

Guanlong Wu, Zhaohan li, Yao Zhang, Zheng Zhang, Jianyu Niu, Ye Wu, Yinqian Zhang

AI总结:

针对跨用户KV缓存共享带来的侧信道泄露问题,提出CachePrune机制,通过令牌级细粒度缓存管理实现隐私感知的KV条目选择性重用,在消除直接泄露的同时显著降低首令牌延迟并提高缓存命中率。

摘要:

大型语言模型(LLM)依赖键值(KV)缓存来加速推理,许多服务系统进一步跨用户请求共享KV缓存以减少冗余计算。虽然被广泛采用,但不受限制的跨用户共享引入了侧信道漏洞,允许攻击者通过探测缓存重用来推断用户输入。现有防御完全禁用共享以防止泄露;然而这种粗粒度策略牺牲了巨大的重用潜力,因为提示通常包含大量隐私无关的片段,例如系统指令或公开可访问的材料。基于此,我们提出CachePrune,一种隐私感知的KV缓存共享机制,支持跨请求的细粒度KV条目重用。实现这种细粒度需要令牌级缓存管理,因为可重用片段的长度和位置因敏感性屏蔽而变化,使得重用比现有粗粒度方案中使用的固定大小或句子级分块更复杂。具体来说,CachePrune通过解决两个关键挑战使细粒度重用变得实用:准确高效地推导可重用KV段,以及高效检索可变长度跨度上的这些段。我们在vLLM之上实现CachePrune,并在三个数据集上进行评估,结果表明它消除了通过KV缓存重用侧信道的直接泄露,同时与最先进的方法相比,将TTFT降低了4.5倍,并将缓存命中率提高了44%。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑