Continuous Semantic Caching for Low-Cost LLM Serving
Baran Atalar, Xutong Liu, Jinhang Zuo, Siwei Wang, Wei Chen, Carlee Joe-Wong

TL;DR
This paper introduces a theoretical framework for semantic caching of LLM responses in continuous query spaces, using discretization and kernel methods to reduce costs and improve efficiency.
Contribution
It presents the first rigorous approach to continuous semantic caching for LLMs, with algorithms that adapt online and minimize switching costs.
Findings
The online algorithm achieves sublinear regret compared to an optimal continuous oracle.
The framework effectively approximates the continuous optimal cache in empirical tests.
It reduces computational and switching overhead relative to existing methods.
Abstract
As Large Language Models (LLMs) become increasingly popular, caching responses so that they can be reused by users with semantically similar queries has become a vital strategy for reducing inference costs and latency. Existing caching frameworks have proposed to decide which query responses to cache by assuming a finite, known universe of discrete queries and learning their serving costs and arrival probabilities. As LLMs' pool of users and queries expands, however, such an assumption becomes increasingly untenable: real-world LLM queries reside in an infinite, continuous embedding space. In this paper, we establish the first rigorous theoretical framework for semantic LLM response caching in continuous query space under uncertainty. To bridge the gap between discrete optimization and continuous representation spaces, we introduce dynamic -net discretization coupled with…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
