2025-02-12 · 专家 · 自然语言处理 · 机器学习

Auditing Prompt Caching in Language Model APIs

这篇论文通过审计大型语言模型(LLM)API中的提示缓存,发现并分析了提示缓存导致的隐私泄露和架构信息泄露的风险。

更新于 2025-02-12。作者:Chenchen Gu、Xiang Lisa Li、Rohith Kuditipudi、Percy Liang、Tatsunori Hashimoto。

中文摘要

在大语言模型(LLMs)中,提示缓存会导致数据依赖的时间变化:缓存过的提示处理速度比未缓存的提示快。这些时间差异引入了侧信道时间攻击的风险。例如,如果缓存被多个用户共享,攻击者可以通过快速API响应时间识别出缓存的提示,从而了解其他用户提示的信息。由于提示缓存可能导致隐私泄露,因此了解API提供商的缓存策略的透明度至关重要。为此,我们开发和执行统计审计,以检测现实世界LLM API提供商中的提示缓存。我们在包括OpenAI在内的七个API提供商中检测到跨用户的全局缓存共享,这可能导致用户提示的潜在隐私泄露。由于提示缓存引起的时间变化也可能导致模型架构信息的泄露。具体来说,我们发现证据表明OpenAI的嵌入模型是一个仅解码器的Transformer,这一信息之前并未公开。

英文摘要

Prompt caching in large language models (LLMs) results in data-dependent timing variations: cached prompts are processed faster than non-cached prompts. These timing differences introduce the risk of side-channel timing attacks. For example, if the cache is shared across users, an attacker could identify cached prompts from fast API response times to learn information about other users' prompts. Because prompt caching may cause privacy leakage, transparency around the caching policies of API providers is important. To this end, we develop and conduct statistical audits to detect prompt caching in real-world LLM API providers. We detect global cache sharing across users in seven API providers, including OpenAI, resulting in potential privacy leakage about users' prompts. Timing variations due to prompt caching can also result in leakage of information about model architecture. Namely, we find evidence that OpenAI's embedding model is a decoder-only Transformer, which was previously not publicly known.

解读

一句话总结

这篇论文通过审计大型语言模型(LLM)API中的提示缓存,发现并分析了提示缓存导致的隐私泄露和架构信息泄露的风险。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源