ImageNet classification with deep convolutional neural networks
Alex Krizhevsky, Ilya Sutskever et al.
22
Citations
3
Influential Citations
International Conference on Machine Learning
Venue
2025
Year
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.
Prompt caching is a widely used optimization in large language model (LLM) APIs to reduce latency and cost by reusing cached responses for identical or similar prompts. However, this paper reveals a critical and often overlooked security implication: caching introduces data-dependent timing variations that can be exploited as side-channel attacks. By measuring API response times, an attacker can determine whether a prompt was cached, potentially leaking sensitive information about other users' queries. This is particularly concerning when caches are shared globally across all users, as detected in seven major API providers including OpenAI.
The paper's significance extends beyond privacy leakage. The same timing variations can inadvertently reveal details about the underlying model architecture. The authors provide evidence that OpenAI's embedding model is a decoder-only Transformer, a fact that was previously not publicly known. This demonstrates that side-channel information can bypass corporate secrecy around model design, which has implications for competitive intelligence and model security.
The paper introduces a novel statistical auditing framework to detect prompt caching in black-box LLM APIs. Key innovations include:
The audits revealed that seven out of the tested API providers, including OpenAI, employ global cache sharing across users. This means that an attacker could potentially learn about other users' prompts by observing fast response times for cached inputs. Additionally, the timing variations provided evidence that OpenAI's embedding model is a decoder-only Transformer, contradicting prior assumptions or lack of public disclosure. The paper does not provide exact metrics like false positive rates or effect sizes, but the statistical significance of the findings is established through rigorous auditing.
This work has broad implications for the AI industry. It underscores the need for transparency from API providers regarding their caching policies, as well as the potential privacy risks of shared caches. The findings also highlight that side-channel attacks are not limited to traditional cryptographic systems but extend to modern LLM services. For practitioners, this means that deploying prompt caching without careful consideration of privacy implications could lead to data leakage. The paper calls for more robust auditing tools and potentially for cache isolation mechanisms to protect user privacy. Furthermore, the ability to infer model architecture through timing side channels opens new avenues for model reverse engineering, which could impact intellectual property and security.
Alex Krizhevsky, Ilya Sutskever et al.
Ashish Vaswani, Noam Shazeer et al.
Douglas M. Bates, Martin Mächler et al.
Diederik P. Kingma, Jimmy Ba