Cache Partitioning for Mitigating Timing Side-Channel Attacks in LLM Serving Systems

The continuous development of Large Language Models (LLMs) has led to a significant demand for improving their inference efficiency. However, recent studies indicate that shared Key-Value (KV) cache, a widely used optimization techniques, can be exploited as a side-channel to recover user's prompts in multi-users settings, which is confirmed to be widespread across various LLM inference services, posing threats to user's privacy. This paper proposes a user-boundary-based cache partition mechanism to mitigate the above prompt leakage induced by shared caches. Our design partitions the KV cache into different prefix trees by user identities, preventing attackers from detecting cache hits and recovering shared prompt prefixes in the caches. The experimental results shows that cache partitioning mechanism can eliminate the timing difference, and the system's overhead remains within an acceptable range (6.44% in Time- To-First- Token and 3.06% in throughput) across different models and scenarios.

Authors

Institutions

Publication Details

Published
2024-12-13
DOI
https://doi.org/10.1109/icftic64248.2024.10913329
Primary Topic
Radiation Effects in Electronics
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Cache Partitioning for Mitigating Timing Side-Channel Attacks in LLM Serving Systems

Yong Liao, Wenhao Wang, Zixuan Pang
Radiation Effects in Electronics
article

Cache Partitioning for Mitigating Timing Side-Channel Attacks in LLM Serving Systems

Yong Liao, Wenhao Wang, Zixuan Pang
article en

Abstract

The continuous development of Large Language Models (LLMs) has led to a significant demand for improving their inference efficiency. However, recent studies indicate that shared Key-Value (KV) cache, a widely used optimization techniques, can be exploited as a side-channel to recover user's prompts in multi-users settings, which is confirmed to be widespread across various LLM inference services, posing threats to user's privacy. This paper proposes a user-boundary-based cache partition mechanism to mitigate the above prompt leakage induced by shared caches. Our design partitions the KV cache into different prefix trees by user identities, preventing attackers from detecting cache hits and recovering shared prompt prefixes in the caches. The experimental results shows that cache partitioning mechanism can eliminate the timing difference, and the system's overhead remains within an acceptable range (6.44% in Time- To-First- Token and 3.06% in throughput) across different models and scenarios.

University of Science and Technology of China (CN), Institute of Information Engineering (CN)
Openalex Percentile: Top 74%
Radiation Effects in Electronics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.