NEURON VISION← All reviews

About this review

Right and wrong cache hits look alike, so a global cutoff fails. vCache learns a threshold per entry and bounds the error rate, with up to 12.5x more hits and 26x fewer errors.

Source: vCache · arXiv 2502.03771

Transcript

Welcome. Today we look at one threshold for all, and why that fails in semantic caching. A single global similarity cutoff cannot tell good hits from bad ones. vCache learns a cutoff per entry and caps the error rate.

The idea is to recycle answers to similar questions. A new prompt hits the cache. If it is similar enough, it is a hit, and we return the saved answer, fast and cheap. If not, it is a miss and we ask the model again. Set the cutoff too high and you miss good hits. Too low, and wrong answers come back.

Here is the flaw. On the chart, correct hits and incorrect hits sit at almost the same similarity. The mean is point eight five for correct hits and point eight four for wrong ones. And the best cutoff varies from point seven one to one across embeddings. No single threshold can work.

The method learns the probability that a cached answer is correct, separately for each entry. It uses a sigmoid curve with two parameters: t, the transition point, and gamma, the sharpness. So it gives a probability, not a hard hit or miss. You choose the tolerance, the maximum error rate.

Now the guarantee. When a request arrives, draw a random number between zero and one. If it is below tau, we explore: ignore the cache, ask the model, and learn. Otherwise we exploit and use the cached answer. Tau comes from the worst case in a confidence band, so error stays under your tolerance.

The results. Up to twelve and a half times more cache hits than the baselines, and up to twenty six times fewer errors. The bars on the right are illustrative, comparing a fixed threshold baseline to vCache, which gets up to twelve and a half times more hits.

Now the fine print. The guarantee holds inside the framework. It assumes prompts are independent and identically distributed, which breaks in multi turn chat. It assumes similarity versus correctness is a clean S curve, which can be noisy. And part of the benchmark was generated by a small model, so it is cleaner than production traffic.

To wrap up. One global threshold cannot separate right from wrong hits. The fix is a per entry probability with a bounded error rate. And you should test the assumptions on your traffic. The takeaway: vCache makes semantic caching controllable, as long as your traffic fits its assumptions.

Related reviews

Cost

All reviews

Paper review · vCache · arXiv 2502.03771

One threshold for all? Not in semantic caching

A semantic cache reuses an old answer when a new prompt looks close enough. A single global similarity cutoff cannot tell good hits from bad ones. vCache learns a cutoff per entry and caps the error rate.

Global thresholdvCacheWrong answersFine print
01 · The idea

Recycle answers to similar questions

New promptCache lookupsimilar enough?Hitreturn the saved answer: fast and cheapMissask the model againSaves latency and compute, if the hit is right.
Set the cutoff too high and you miss good hits. Set it too low and the cache returns wrong answers.
02 · The flaw

Good and bad hits look the same

0.6similarity1.0correct hit · mean 0.85incorrect hit · mean 0.84
Mean similarity: 0.85 for correct hits, 0.84 for wrong ones. And the best cutoff varies from 0.71 to 1.0 across embeddings. No single number can work.
03 · The method

Learn P(correct) for each cached answer

t · transition pointsimilarityP(correct)γ · sharpness

Per entry

A sigmoid with two parameters: t and γ.

Probability

Not a hard hit or miss.

Tolerance δ

You choose the maximum error rate.

04 · The guarantee

Sometimes verify, so the error stays bounded

Request arrivesdraw random u in [0, 1]u ≤ τ ?τ = how often we must verifyExploreignore cache, ask the model, learnExploituse the cached answerτ comes from the worst case in a confidence band, so error stays under δ.
05 · Results

More hits, far fewer errors

12.5×

more cache hits than baselines (up to)

26×

fewer errors than baselines (up to)

Illustrative scale of the hit-rate gain
Fixed threshold hits
baseline
vCache hits
up to 12.5×
06 · The fine print

"Verified" holds inside the framework

Assumption 1prompts are independent and identically distributed: breaks in multi-turn chatAssumption 2similarity vs correctness is a clean S-curve: can be noisy or task-dependentBenchmark biaspart of SemCacheLMArena was generated by GPT-nano, so it is cleaner than production traffic
Theorem 4.1 is a real proof: if both assumptions hold, error stays below δ. It is a guarantee within the model, not in the wild.