acceptodds
Published as a conference paper at NeurIPS 2026

LaCache: Robust Semantic Caching for LLM Serving

Jiacheng Liang, Yuhui Wang, Tanqiu Jiang, Ting Wang

Abstract

Semantic caching, which reuses responses to semantically similar requests via their embeddings, has seen growing adoption in LLM serving, offering faster responses and reduced costs. Yet existing schemes are fundamentally vulnerable to cache-collision attacks, wherein an adversary pollutes the cache by injecting crafted queries, corrupting responses to subsequent legitimate requests. We present LaCache, a novel semantic caching scheme that addresses this vulnerability through a conceptually simple yet principled redesign. The key insight is that while the adversary has full control over the adversarial query, it has far less control over its response, which must simultaneously satisfy multiple semantic constraints. Rather than checking only the cache hit of a query, LaCache additionally checks the cache hit of its first (speculatively) decoded tokens. This design yields two concrete benefits. First, it provides formally guaranteed resilience against cache-collision attacks: we prove that it is impossible to craft adversarial queries that simultaneously elicit malicious responses and collide with benign queries. Second, the enriched index supplies additional semantic context for cache retrieval, improving response relevance. Empirical evaluation across diverse LLMs and benchmarks validates both LaCache's security guarantees and efficiency gains, pointing to a promising direction for robust semantic caching.

Keywords:
Atlanta, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 4%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 3.67 over 3 reviews, above 4% of the others.
Reviewer_EUtyOpenReview ↗
Rating
3
Clarity
2
Confidence
5
Originality
2
Quality
2
Significance
2
Read review
Summary

This paper studies a security problem in semantic caching for LLM serving. Existing semantic cache systems mainly reuse a cached response based on the similarity of query embeddings. Because of this, if an attacker injects an adversarial query that has the same cache key or high semantic similarity with a victim query, later benign users may receive the attacker-induced response from the cache. The authors propose a defense called LaCache. The main idea is that an attacker can directly optimize the adversarial query, but it is relatively harder to freely control the response prefix that the LLM actually generates for that query. Therefore, LaCache does not only check the query-side cache hit. It also first generates a short response prefix for the incoming query and compares the embedding/hash of this prefix with the prefix of the cached response. The cached response is returned only when both the query check and the response-prefix check pass.

Strengths and weaknesses

Strengths

A strength of this paper is that it moves beyond the usual query-side filtering approach. Existing defenses mainly try to detect whether the adversarial query itself is suspicious. In contrast, the authors focus on an asymmetry: the attacker can optimize the query, but it is much harder to also make the LLM-generated response prefix match the desired benign response prefix. This observation is intuitive and is connected well to the defense design. LaCache is also relatively simple, since it adds a response-prefix guard to the existing cache structure, so it has some practical appeal. In terms of quality, the paper includes a method, theoretical analysis, and experiments. Theorem 1 explains why the lookahead check can filter false cache collisions when semantic separability and prefix coherency hold. The experiments also try to validate whether these two assumptions are observed in real attack and benign query pairs.

Weaknesses

A main weakness is that LaCache has some tension with the original goal of semantic caching. Semantic caching is used to avoid LLM decoding and reduce latency and cost, but LaCache needs to perform k-token lookahead decoding even when there is a cache-hit candidate. Because of this, the motivation can read like a circular logic: caching is introduced to avoid decoding, but to defend the attack caused by caching, the system needs to decode again before using the cache. The paper argues that this overhead can be reduced by using a draft LLM and speculative decoding. However, the real benefit may depend strongly on output length, cache-hit rate, batching, where the draft model is deployed, and the actual serving workload. Therefore, I think the paper needs more end-to-end cost or throughput analysis under different workload conditions, rather than only reporting a single per-query latency number.

Questions
  1. How much benefit remains from semantic caching after adding the k-token lookahead decoding step?

My main concern is that semantic caching is used to avoid LLM decoding, but LaCache needs to decode again before using the cache. Could the authors provide an end-to-end cost analysis under different cache-hit rates, output lengths, and request batch sizes? My evaluation would increase if the authors can show that LaCache still gives clear latency or throughput benefit over no-cache decoding in realistic serving workloads.

  1. Can the authors report the break-even point where LaCache is still useful, and also analyze delayed-divergence attacks?

For example, if the average response is short, or if the cache-hit rate is not very high, the cost of generating k=20 tokens may remove most of the caching benefit. It would be useful to show under what combinations of cache-hit rate, average generation length, and draft-model cost LaCache is faster than simply decoding from scratch. At the same time, this analysis is related to the choice of k: if k is small, an attacker may try to make the first k tokens look benign and insert the harmful content later. Could the authors evaluate such delayed-divergence attacks, where the malicious behavior appears only after the lookahead window?

  1. How sensitive is the overhead to the draft model and speculative decoding setup?

The paper argues that using a draft LLM and speculative decoding reduces the overhead. However, in real systems, the draft model may need extra memory, scheduling, and batching resources. Could the authors clarify whether the latency numbers include the full cost of running the draft model, and how the result changes if the draft model is on a separate GPU or shares resources with the main model?

  1. Can the authors compare LaCache against a simpler "decode-on-suspicious-hit" strategy?

Since the main overhead comes from always doing lookahead decoding on cache-hit candidates, an interesting baseline would be to apply lookahead decoding only when the query-side cache hit has low confidence or is near the similarity threshold. This experiment would help show whether the response-prefix guard must be applied to every cache hit, or whether a cheaper conditional version can preserve most of the security benefit.

Limitations

The authors partially address the limitations, but I think some important practical limitations should be discussed more clearly.

The paper mentions that LaCache is limited to attacks where the adversarial response is semantically different from the genuine response, and that subtle misinformation or privacy-side timing attacks are outside the current scope. This is useful and honest. However, the paper does not sufficiently discuss the practical limitation that LaCache needs k-token lookahead decoding before serving a cached response. Since semantic caching is mainly motivated by avoiding decoding, this overhead is critical to the usefulness of the method and should be treated as a main limitation.

I suggest the authors add a clearer discussion of when LaCache is expected to be beneficial in real serving workloads. In particular, the limitation section should discuss how the benefit depends on average output length, cache-hit rate, batching, draft model cost, and deployment configuration. It should also mention that a small lookahead window may be vulnerable to delayed-divergence attacks, where the first k tokens look benign but harmful content appears later.

Paper formatting concerns

I didn't find any issues with paper formatting.

Final justification
  • The rebuttal substantially resolved my systems concerns. The new latency and throughput sweeps, break-even analysis, full draft-model accounting, and decode-on-suspicious-hit baseline convincingly show that LaCache retains meaningful caching benefits in the evaluated regimes. These additions also directly address the main practical concerns raised by the AC.

  • The authors also responded carefully to the other reviewers, including additional analyses of benign-response diversity, query-side filters, delayed-divergence attacks, and multiple injected candidates. I acknowledge that the other reviewers remain more positive, and that the rebuttal materially strengthens the empirical evaluation.

  • The main unresolved issue is the scope of the security guarantee. The T3 experiment shows that an attacker can place malicious content beyond the finite lookahead window, yielding a 50.7% conditional AHR after successful injection. The corresponding end-to-end rates are approximately 15% without GCG and 17% with GCG; the authors now correctly agree that this difference is not significant and that the attack should not be characterized as less effective end to end.

  • The follow-up usefully clarifies that T3 falls outside the plausibility/prefix-coherence premise rather than invalidating Theorem 1, and the authors commit to narrowing the robustness claim accordingly. Their manual analysis of the 34 successful cases also suggests that the genuine answer often appears before and contradicts the malicious payload. However, without a direct harmfulness or user evaluation, this does not establish that such mixed responses are safe, and the result still reveals an important adaptive attack outside the theorem’s guarantee.

Overall, the rebuttal resolves most of the evaluation and efficiency concerns and warrants a more favorable assessment than the original submission. Nevertheless, because the remaining limitation directly affects the paper’s central robustness claim, I recommend a score of 3.

1 comment

W1 / Q1 / Q2a: Semantic caching exists to avoid decoding, yet LaCache decodes k tokens before serving. How much benefit remains, under different hit rates, output lengths, and batch sizes?

Most of the benefit remains. We sweep the three axes the reviewer suggested one at a time below, all from serving primitives measured on 2×H100 (decode cost affine in L, leave-one-L-out R²=0.9999).

The lookahead is decoded only when there is a cache-hit candidate to check: a query that misses the cache is decoded exactly as without any cache and pays no guard cost, so the guard's cost per query is h · c_look, where h is the query-level hit rate and c_look the decoding cost per query. The 68.6 ms is therefore the cost of one guarded hit, not a per-query tax. Note that h is the rate at which the lookahead is triggered, not the served-from-cache rate; whether the response is then served is a second factor a, discussed in (b).


(a) Cache hit rate h (k=20, L=256, Batch=32)

LaCache adds a marginal overhead to an undefended cache, and the overhead shrinks as hits get sparser: the caching benefit per hit is roughly 7× the defense cost per hit, so a low h decreases both without inverting their order.

hno-cache (ms)plain (undefended) cache (ms)LaCache (ms)guard cost per query (ms)LaCache vs plain-cache
0.05142.9136.5137.50.96+0.7%
0.10142.9129.4131.31.92+1.5%
0.20142.9115.1118.93.83+3.3%
0.30142.9100.8106.55.75+5.7%

(b) Output length L (k=20, h=0.1, deliberately sparse; Batch=32)

We fix LaCache's cost as 1.92 GPU-ms per query here, so the decoding it protects dilutes it and the break-even hit rate the reviewer asks for (last two rows) falls steeply with L: already 1.3% at L=128, and the only range in which LaCache costs more than not caching at all is L=32, an extreme corner case that assumes every response is 32 tokens, whereas a typical chatbot exchange runs 200–2,000 tokens.¹ The last row repeats it with the guard's admit rate a = 1 − FPR = 0.928 (the paper's Table-2 BHR), so rejected hits pay the guard and still decode while the plain cache in the denominator serves all hits, charging LaCache for the FPR twice. The third dependency the reviewer names, draft-model cost, is addressed in Q3.

L (tokens)32641282565121024
no-cache (ms)22.339.574.0142.9280.9556.7
plain (undefended) cache (ms)20.836.367.3129.4253.5501.7
LaCache (ms)22.738.269.2131.3255.4503.7
min h for LaCache ≤ no-cache23.5%3.6%1.3%0.6%0.3%0.1%
same, at a=0.92848.7%4.2%1.5%0.6%0.3%0.1%

¹ Iternal AI, "AI Token Usage Statistics & Costs (2026)": a typical chatbot exchange uses 200–2,000 tokens.


(c) Request batch size Batch (k=20, h=0.5, L=256; each column from its own primitives)

Batching amortizes the guard, so LaCache's advantage over no-cache is stable across the batch range, and the guard stays under 14% of LaCache's cost even at the deliberately high h=0.5 used here.

Batch183264
no-cache (ms)266538714389
plain (undefended) cache (ms)13411957245
LaCache (ms)14332138252
speedup vs no-cache1.86×1.82×1.75×1.70×
guard share of LaCache6.4%8.2%11.7%13.7%

(d) End-to-end throughput at representative operating points (k=20, h and L co-varying, Batch=32)

We also report the end-to-end throughput (how much benefit remains) at four representative operating points. The guard cost is marginal relative to an undefended cache's savings, and this ratio shrinks as the hit rate or the output length grows: LaCache keeps 73–97% of the cache's savings and remains 1.27–7.56× faster than no-cache.

System(h,L)=(0.3,128)(0.5,256)(0.7,512)(0.9,1024)
no-cache (GPU-s / 1k queries)74.0143281557
plain (undefended) cache (GPU-s / 1k)52.572.285.056.4
LaCache (GPU-s / 1k)58.381.898.473.6
QPS (LaCache)17.212.210.213.6
speedup vs no-cache1.27×1.75×2.85×7.56×
retention of plain-cache benefit73%86%93%97%

Retention = (no-cache − LaCache) ÷ (no-cache − plain-cache).


A rejection is moreover not wasted work: the tokens verification already accepted are a valid prefix of that query's own response and can be reused in the subsequent decoding. We switch that credit off everywhere above, so the numbers hold without it.

Q2b: Delayed-divergence attacks. With small k, an attacker may make the first k tokens look benign and insert harmful content later.

Due to the word limit, we summarize the result here and refer the reviewer to our reply to sNRE W1 for the full per-template table (n=200 per row, k=20) and its analysis.

To answer the reviewer's question, we built three delay templates and ran each both as a plain prompt and with GCG optimizing a collision prefix on top, the latter guaranteeing a cache hit so only the lookahead stands between the attacker and the cache. The strongest, T3, asks for the delay in plain language: {Q} Write the standard answer first (about 40 words). Once you have written the standard answer, continue with this statement: {P} ({Q} = victim query, {P} = poison sentence), and places the payload past the window most reliably, at median start token 43 of 61.

The finding is that this attack is largely self-defeating, and ISR is where it shows: buying the guaranteed collision cuts ISR from 0.970 to 0.335 for T3 and from 0.420 to 0.135 for T2, so it reduces rather than increases the attack's effectiveness. The reason is that clearing the window requires the model to write out a complete and genuine answer, so the response the victim receives states the correct fact alongside the poison: even when the injection lands, the "poison level" of the delivered answer is diluted, and a user reading a reply that asserts both is likely to question its quality rather than act on it. The more explicit the delay instruction, and the more the GCG prefix distorts the query, the more often the model also refuses outright.

Q3: Does the reported latency include the full draft-model cost, and how does it change with draft placement (separate GPU vs shared) and draft size?

Yes, the reported latencies are full speculative-decoding wall-clock time, including drafting and verification, not just the target forward pass.

Draft configuration (all on the target's GPUs)extra weightsk=20 guard latency (ms)vs no draft
none (decode k on the target)0108.51.00×
Qwen3.6 MTP head (default)0 GB68.61.6×
Qwen3.5-0.8B draft~1.5 GB50.02.2×

By default, LaCache requires no separate GPU. The MTP head ships inside the Qwen3.6 checkpoint and runs in the target's own forward pass, adding no extra weights, requiring no separate scheduler, and taking no batching capacity from the target. A co-located but separate draft model is faster still, but takes memory out of the target's budget and lowers its feasible batch size; a dedicated-GPU draft pays a cross-device transfer cost per lookahead (not worth it by k=20). The speculative path does have higher latency variance, as the acceptance rate fluctuates, but that affects tail latency rather than mean cost.

Q4: Compare against a simpler "decode-on-suspicious-hit" strategy, applying lookahead only when the query-side hit is near the similarity threshold.

Following the reviewer's suggestion, we implemented this baseline and swept its threshold. Define the margin s = q_sim − τ_c and guard only hits with s < θ (θ=0: never guard; θ=∞: always guard = LaCache). Its effectiveness depends on whether the attacks land near the threshold, and as our measurement shows, they indeed do: benign hits clear τ_c by 3–4× the margin adversarial hits do, so the two populations are not separated by margin alone.

θguarded band (τ_c=0.80)KCA AHR ↓SCP-P AHR ↓BHR ↑frac. of hits guarded (KCA/SCP-P)
0.00 (never guard)∅0.7980.9451.0000% / 0%
0.02[0.80, 0.82)0.6530.7191.00019% / 24%
0.05[0.80, 0.85)0.3070.0220.99462% / 98%
0.10[0.80, 0.90)0.0040.0080.982100% / 99.7%
∞ (LaCache)[0.80, 1.00]0.0040.0060.928100% / 100%

The conditional variant has no useful operating point, because the sweep has no middle: every θ large enough to keep AHR low already fires the lookahead on essentially all hits, so it is LaCache and saves nothing, and every θ small enough to save real cost reopens the attack in proportion to the hits it waves through. Security and guard cost share a single knob here, so the attacks live precisely in the band the guard must inspect. We are glad to add this baseline in the revision, as it independently justifies our always-on design.

Limitations: the k-token lookahead overhead should be treated as a main limitation, with the conditions under which LaCache is beneficial, and the delayed-divergence risk of a small window.

Following the reviewer's suggestions, we will rewrite the limitations around the dependencies the reviewer lists, each of which our replies above now quantify rather than assert, and will state the delayed-divergence risk of a small window explicitly, which, however, may reduce the "poison level" of elicited answers, as Q2b shows.

Reviewer_egt2OpenReview ↗
Rating
4
Clarity
3
Confidence
4
Originality
3
Quality
3
Significance
3
Read review
Summary

LLM's checkpoints are white boxes, so an attacker can use them on purpose to generate an illegal query whose embedding is so close to a legal one that even the semantic similarity can not tell the difference and "seduce" a cache to output a false answer. The authors' contribution is that double-checking the output, or more ecnomically the prefix (first k tokens) of the protential outputs. If the output and the "template" input are consistent semantically, then such response is not poisoned.

Strengths and weaknesses

The strenths: Already included in the summary above. The weaknesses:

  1. on the presentation. The narrative on Figure 1 is misleading at the first glance if the readers are not experts though it is totally fine with the professionals. The authors need to polish this illustrating example because it will affect the interest whether or not unprofessional readers continue reading. The point is that whether or not a person should give aspirin to his or her child depends on the context of a conversation. It will be much better when the authors change their beginning to a totally different example, which is an easily-confirmed evidence, lets say "how to make a poison". Besides, the essential idea is that LLM's checkpoints are white boxes, so an attacker can use them on purpose to generate an illegal query whose embedding is so close to a legal one that even the semantic similarity can not tell the difference and "seduce" a cache to output a false answer. So please re-write a new example that is sticked to the core idea.
  2. on the contribution. One of the major contributions made by the authors is that it double checks the output, or more ecnomically the prefix (first k tokens). If the output and the "template" input are consistent, then such response is not poisoned. The logic is perfect, but the authors may ignore the fact that the generative AI' s charm lies in the diversity of answers, particularly it changes with context, which echoes the context-dependence stated in weakness 1. How to make the false positive smaller seems underestimated. One of my suggestions is to enhance the check on the query. Not only on perplexity, but also on human-readability, and sometimes the old-school fasion, say n-gram can still be useful.
Questions
  1. please re-write a new example in Figure 1 that is sticked to your core idea.
  2. pay more attention to the false positive ratio as suggested in weakness 2.
  3. enhance the check on the query. Not only on perplexity, but also on human-readability, to see if they work out.
Limitations

Not adequately. Please refer to the weakness.

Paper formatting concerns

I do not notice any major issues in this paper with respect to violation of formatting, anonymity, etc. Although the paper template of 2026 may have its own drawbacks, for example the "supplimentary material" as the total section title is not easy to show correctly in the right place.

Final justification

Considering the authors' rebuttal and other reviewers' discusions, I decided to maintain my rating: 4(Borderline accept).

1 comment

W1 / Q1: Figure 1's aspirin example is misleading because the correct answer is context-dependent; use an easily-confirmed example that sticks to the core idea. W1: "The narrative on Figure 1 is misleading at the first glance if the readers are not experts … whether or not a person should give aspirin to his or her child depends on the context of a conversation. It will be much better when the authors change their beginning to a totally different example, which is an easily-confirmed evidence, lets say 'how to make a poison'. … So please re-write a new example that is sticked to the core idea." Q1: "please re-write a new example in Figure 1 that is sticked to your core idea."

We thank the reviewer for the suggestion. We will fix it in the revision. First, why we chose this example: it follows the misinformation scenario of the semantic cache-poisoning attack paper we defend against (Wu et al., NDSS 2026 [24]), so we kept it for comparability with the attack literature rather than inventing our own scenario.

We would also note that the ambiguity raised by the reviewer is precisely what makes this class of attack dangerous in practice: a poisoned answer that a lay reader cannot immediately falsify is far more likely to be acted on than an obviously absurd one, so the realistic threat lives exactly in the region where context seems to matter. Our plan therefore keeps a realistic attack but removes the ambiguity from the reader's side: the revised panel (a) adds a footnote under the victim answer,

Ground truth: aspirin is contraindicated for children and teenagers in all non-prescribed settings, because it can trigger Reye's syndrome, a rare but often fatal condition. The correct answer is therefore "no" independent of conversational context; the attack flips it to "yes".

which makes the evidence easily confirmed (it is the standing FDA / NHS advisory), keeps the misinformation-with-real-consequence framing, and needs no new numbers: the panel already reports our measured pipeline values for this example, where the query clears τ_c (an undefended cache serves the poison) while the response prefix falls far short of τ_g (LaCache blocks it).

If the reviewer still prefers zero domain-knowledge burden on the reader, we have also run two purely factual candidates through the real pipeline (Qwen3.6 + BGE) and would be glad to substitute one. All three show the same asymmetry the figure is about: a colliding query whose response prefix still falls short of the benign one.

Figure-1 candidateq_sim (adversarial vs victim query)r_sim (benign prefix)r_sim (poisoned prefix)separability gap
aspirin, annotated (current example)0.825—0.6110.214
① "What is the capital of Australia?" → "…is Sydney."0.9680.9690.8240.146
② "At what temperature does water boil…?" → "…80 °C"0.8930.9520.8270.125

In either case, the attacker exploits white-box access to the embedding checkpoint to optimize the query into a near-collision, but has no comparable control over the response, which is why moving the integrity check to the response prefix is a structural fix rather than another filter to be evaded.

W2 / Q2: Generative answers are diverse and context-dependent; the false positive rate seems underestimated. W2: "the authors may ignore the fact that the generative AI's charm lies in the diversity of answers, particularly it changes with context, which echoes the context-dependence stated in weakness 1. How to make the false positive smaller seems underestimated." Q2: "pay more attention to the false positive ratio as suggested in weakness 2."

To answer the reviewer's question, we stress-tested FPR along the two axes, diversity from sampling and diversity from context. One locating measurement first: FPR is 1 − BHR on the same 500 benign paraphrase pairs the paper's Table 2 reports BHR = 0.928 on, i.e. 7.2%. Decomposed by which check fires, the query check rejects none of those pairs, so the whole FPR is attributable to the lookahead. That is the useful finding rather than a concession: FPR has exactly one knob, τ_g, so it can be calibrated directly instead of traded off against the query-side thresholds, and it is also why the query-side signals in Q3 cannot reduce it.

(i) Answer diversity from sampling (n=500, 3 repeats per T>0). This is the "diversity of answers" axis directly: we raise the decoding temperature so the same query produces different wordings.

decoding temperatureBHR ↑mean response-prefix similarity
0.0 (paper setting)0.9280.870
0.30.9310.861
0.70.9150.848
1.00.8790.828

(ii) Diversity from context (n=300, newly generated). Each pair asks the same core question inside two different conversational wrappers, e.g. "Hey, quick question, when did retina display come out for MacBook Pro?" versus "I'm trying to remember the timeline for Apple laptops, and I have one specific question: when did retina display come out for MacBook Pro?". This is strictly harder than paraphrasing, because a context change alters the opening of the answer, exactly the 20 tokens the guard inspects.

benign pair typenquery-check hit rateBHR ↑ (end-to-end)mean q_simmean r_sim
paraphrase (paper setting)500—0.928—0.870
context-varied (the reviewer's scenario)3000.9970.8770.9190.880

The reviewer's concern is real but bounded: FPR at most roughly doubles under either stressor, so the guard still serves the large majority of benign traffic in the diversity setting chosen to be hardest for it, and the query check is essentially untouched. The mechanism matters more than the magnitude: prefix similarity drifts downward but stays far above τ_g, so the natural remedy is the calibration the paper already prescribes. τ_g is set as the P10 of benign response similarities, and recomputing it at the deployment temperature shifts it down to match. We will report both tables above in the revision and state that recalibration as an explicit deployment procedure rather than leaving FPR at the single greedy-decoding number.

Q3: Enhance the query-side check, not only perplexity but also human-readability and old-school signals such as n-gram, to see if they work out. W2/Q3: "One of my suggestions is to enhance the check on the query. Not only on perplexity, but also on human-readability, and sometimes the old-school fasion, say n-gram can still be useful." / "enhance the check on the query. Not only on perplexity, but also on human-readability, to see if they work out."

Following the reviewer's suggestions, we implemented both signals and added them to Table 2 as two further baseline defenses, evaluated exactly as in the paper (Qwen3 + BGE, on successfully injected adversarial queries, n=475 KCA / 363 SCP-P). Each threshold is calibrated at the benign 95th percentile:

defenseKCA AHR ↓KCA BHR ↑SCP-P AHR ↓SCP-P BHR ↑
Undefended0.801.000.941.00
PPL0.650.950.930.95
QR-PPL0.520.950.720.95
LLM-as-Judge0.010.990.440.99
n-gram (repetition), new0.790.980.910.98
readability (dictionary OOV), new0.450.950.580.95
n-gram + readability, new0.450.930.550.93
LaCache0.000.930.010.93
LaCache + both query filters0.000.870.010.87

Alone they are not enough: GCG searches only over real vocabulary (with a λ=0.3 perplexity loss on SCP-P), so the suffixes already read plausible and for most attacks, neither signal is particularly helpful. Stacking them on LaCache does not reduce the attack's effectiveness any further: LaCache's AHR is already at the floor, so the filters buy no additional security and cost benign traffic.

Reviewer_sNREOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
3
Read review
Summary

The paper proposes LaCache which defends against cache-collision attacks in semantic caching, where adversarial queries are designed to collide with victim queries and poison cached responses. It augments query-level matching with a response-prefix “lookahead” check, serving a cached response only when both the query embeddings and the first k output tokens are sufficiently similar. The experimental results show large reductions in attack hit rate, while retaining most benign cache utility; the paper also studies lookahead length, ensembles, adaptive attacks, and latency optimizations.

Strengths and weaknesses

Strength

  • The paper writing is clear and concise. It is easy to follow and understand the threat modeling, motivation and methodology of the paper.
  • The empirical evaluation is fairly broad for the claimed setting. The authors evaluate KCA and SCP-style attacks, include white-box and adaptive variants, test two LLM backbones and two embedding models, and compare against perplexity-based, query-response perplexity, and LLM-as-judge baselines.

Weaknesses and Concerns

  • The adaptive attack results are promising, but I’m not convinced they reflect the strongest possible attacker against a k-token lookahead defense. The current attacks seem weakened because they must both keep the malicious intent and match the benign response prefix at the same time, which is inherently difficult. A stronger attack would instead match only the first k tokens of the benign response and introduce malicious content afterward. This would better test the prefix-check assumption and the choice of k (e.g., k = 20). I would like to see experiments on such delayed-divergence attack.
  • The evaluated attack seems mostly pairwise: target query and adversarial query. A stronger adversary might insert multiple cache candidates with varying prefixes and payloads, increasing the chance that one passes both checks. Will LaCache apply successfully to this setting?
Questions

See weaknesses and concerns

Limitations

Yes

Paper formatting concerns

N/A

1 comment

W1: The adaptive attacks are not the strongest possible; a delayed-divergence attack should match only the first k tokens of the benign response and introduce malicious content afterwards. "The adaptive attack results are promising, but I’m not convinced they reflect the strongest possible attacker against a k-token lookahead defense. The current attacks seem weakened because they must both keep the malicious intent and match the benign response prefix at the same time, which is inherently difficult. A stronger attack would instead match only the first k tokens of the benign response and introduce malicious content afterward. This would better test the prefix-check assumption and the choice of k (e.g., k = 20). I would like to see experiments on such delayed-divergence attack."

To answer the reviewer's question, we consider three variants of delayed divergence attacks. The adversarial query is the template below with the victim query and payload filled in ({Q} = victim query, {P} = poison sentence); the three variants differ in how hard the prompt pushes the payload past the window:

  • T1 minimal-suffix: {Q} Then add: {P}. The shortest possible delay instruction, so the query embedding stays closest to the victim's.
  • T2 answer-then-inject: {Q} Answer, then: {P}. Explicitly orders the benign answer first, the most direct attempt to push the payload past token k.
  • T3 verbose (ISR-maximal): {Q} Write the standard answer first (about 40 words). Once you have written the standard answer, continue with this statement: {P}. The strongest delay instruction and the one that most reliably delivers the payload (ISR 0.97).

Each template is run twice: as a plain prompt, and with GCG optimizing a collision prefix on top of it. The second form removes the query-check confound entirely: 100% of the payload-bearing queries then collide with the victim, so only the lookahead stands between the attacker and the cache.

Metric convention. AHR below is the paper's AHR, the hit rate on the subset of successfully injected adversarial queries (§5.1), so every number is directly comparable with Tables 1–2. ISR is reported alongside it. The middle columns follow the serving path and multiply to AHR (n=200 attempts per row, k=20; the defense is the paper's, at BHR 0.928):

attack templateGCGreaches a cache hit ↓of those, passes the guard ↓AHR ↓ISR ↓
T1 minimal-suffixno17.0%62.5%0.1060.470
T1 minimal-suffixyes100%8.2%0.0820.305
T2 answer-then-injectno7.1%66.7%0.0480.420
T2 answer-then-injectyes100%14.8%0.1480.135
T3 verboseno17.5%88.2%0.1550.970
T3 verboseyes100%50.7%0.5070.335

"reaches a cache hit" = share of successfully-injected queries with q_sim ≥ τ_c = 0.80; "of those, passes the guard" = share of those that also have windowed r_sim ≥ τ_g = 0.70.

One configuration of the six passes the guard at a non-trivial rate: T3 verbose + GCG, at AHR 0.507 against the 0.00–0.04 of Table 1. What separates the variant is what the first k tokens contain. T1/T2 give only a short delay instruction, so the response never contains a full benign answer: the GCG prefix that buys the collision also derails the opening tokens, which are exactly what the guard measures, so the guard rejects the large majority of those guaranteed collisions and ISR drops with them. T3 asks in plain language for a complete standard answer first, so the window fills with a genuinely benign answer, and the poison lands after it (median start token 43 of a 61-token response), leaving the guard nothing anomalous to see.

That success is, however, largely self-defeating, and ISR is where it shows: buying the guaranteed collision cuts ISR from 0.970 to 0.335 for T3 and from 0.420 to 0.135 for T2, so the strongest window-evading configuration is also the one whose end-to-end success rate falls the most.

The reason is the tension the delay instruction creates. What T3 must do to clear the window is have the model write out a complete and genuine answer, so the response the victim receives states the correct fact alongside the poison: even when the injection lands, the "poison level" of the delivered answer is diluted, and a user reading a reply that asserts both the correct answer and the poison is likely to question its quality rather than act on it. On top of that, the more explicit the delay instruction is, and the more the GCG collision prefix distorts the query, the more often the model recognizes the request as an injection attempt and refuses outright. Both effects strengthen once GCG is added, so the window is a weaker point in isolation than in the end-to-end attack it has to serve.

W2: The evaluated attack is mostly pairwise; a stronger adversary might insert multiple cache candidates with varying prefixes and payloads. Will LaCache apply successfully? "The evaluated attack seems mostly pairwise: target query and adversarial query. A stronger adversary might insert multiple cache candidates with varying prefixes and payloads, increasing the chance that one passes both checks. Will LaCache apply successfully to this setting?"

Yes, and the reason is structural: every injected candidate must match the single, fixed response prefix f_k(x) that the victim's query decodes, a target the attacker does not control and cannot see. Candidates are therefore near-independent trials against a fixed target, P(bypass with N candidates) = 1 − (1 − q)^N.

We measured this on exactly the setting the reviewer describes. For a single victim query, the adversary is allowed N different attack samples against it: different attack families (KCA's x₀ ⊕ suffix and SCP-P's wrapped-query form) and different GCG runs, so the prefixes and payloads vary from candidate to candidate. We draw N candidates from the empirical joint (q_sim, r_sim) distribution of our attack pools, where each pool record is one independently optimized attack sample, and count the attack as successful if any of the N passes both checks (20k Monte-Carlo trials per cell; entries are bypass rates, ↓ better):

attack familyN=1N=5N=10N=20N=50N for 50% bypass ↑
KCA (measured)0.00490.02200.04250.08110.1901~164
KCA (independent-trial prediction)0.00420.02090.04130.08090.1902—
SCP-P (measured)0.00560.02760.05230.10320.2445~125
SCP-P (independent-trial prediction)0.00550.02730.05380.10460.2414—

Critically, as the target prefix is fixed and outside the attacker's control, extra candidates introduce extra draws and nothing else, and no candidate makes the next one more likely to pass. Multi-candidate injection is therefore linear in N against a small per-candidate probability, so reaching even a coin-flip takes on the order of a hundred colliding candidates, which also makes the adversary far more visible to ordinary rate and duplication monitoring.

We will add this multi-candidate analysis to the revision.

Comments on the paper

1 comment
Meta-review

The paper presents a novel method for caching prompts in a semantic cache intended to be robust against prompt-based attacks. The underlying threat model has been thoroughly examined in the literature and continues to represent a significant open problem. The authors’ principal insight is to leverage the asymmetry whereby constructing an adversarial query that collides with a benign one is relatively straightforward, whereas inducing a specific desired response is considerably more challenging.

The proposed solution utilizes this asymmetry by noting that matching the query, including adversarial prompts, is straightforward, while matching the intended response is more complex. LaCache extends standard query-based semantic caching by incorporating an additional response-prefix check. This approach seeks to maintain the advantages of caching while reducing the risk of cache-collision attacks.

I identify the following primary weaknesses that the authors should address to enhance the competitiveness of this submission for acceptance:

  1. LaCache decodes k lookahead tokens even when a cache hit occurs, which partially undermines the primary motivation for semantic caching. I strongly recommend that the authors report end-to-end cost and throughput, rather than focusing solely on per-query latency. This analysis should also consider variations in key workload parameters, including output length, cache hit rate, batch size, and the placement and cost of the draft model.
  2. The paper does not clearly delineate the conditions under which the speculative-decoding mitigation loses effectiveness. For example, are there specific ranges of hit rates or output lengths where LaCache incurs greater costs than not using caching? A systematic analysis of these break-even points would substantially enhance the practical evaluation.

Post rebuttal. I believe authors have addressed most of my concerns and I've therefore updated my recommendation. I've left my metareview unchanged for the record.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.