KVGuard catches all known KV cache bugs and discovers 8 new violations with <0.12% memory overhead
KVGuard detects every historical KV cache safety bug and uncovers additional violations while adding minimal overhead
Security & privacy arXiv 4 Nov 2026 Defense Prototype evidence
Published as “KVGuard: A KV Cache Safety Checker for LLM Serving Systems”
Why it matters
Enables early detection of KV-cache memory bugs in LLM serving, preventing silent output corruption and request isolation failures during development.
Summary
KVGuard detects every known KV-cache safety bug (29 historical bugs) and uncovers 8 new violations with zero false positives. It adds only 3.0%-7.4% geomean TPOT overhead on Qwen 2.5 14B and at most 0.11% KV-cache memory overhead, but on the smallest model (Llama 3.2 1B) the TPOT slowdown can reach 3.67×, showing the overhead is modest for large models but high for tiny ones.
What they found 2
- KVGuard covers all 29 historical KV-cache bugs and finds 8 new safety violations with no false positives.
“A prototype of KVGuard on vLLM and SGLang covers all 29 historical real-world KV cache safety bugs collected from the two systems’ patch histories. KVGuard further found 8 previously unknown safety violations while reporting no false positives.”
- Runtime overhead is low on large models (3.0%-7.4% TPOT) and memory overhead is ≤0.11% of the KV cache.
“It adds 3.0% and 7.4% geomean TPOT overhead on Qwen 2.5 14B on vLLM and SGLang and at most 0.11% of the KV cache in memory overhead, two orders of magnitude below NVIDIA Compute Sanitizer on the same workloads.”
Caveats 1
- On the smallest model (Llama 3.2 1B) KVGuard’s TPOT slowdown grows from 1.83× at 2 req/s to 3.67× at 24 req/s on vLLM, indicating a significant performance penalty for small models.
What’s new here 4
- First systematic memory-safety abstraction for KV-cache management in LLM serving.
- Compact shadow block metadata per physical KV block tracking per-request permissions and per-entry initialization.
- Five safety checks spanning CPU allocation, block-table construction, CPU-to-GPU translation, GPU block-table lookup, and KV entry access.
- Works across multiple PagedAttention-style serving systems (vLLM, SGLang) without altering the single-buffer KV layout.