To Cache or Not to Cache: Understanding and Mitigating Safety Incompatibility in Cross-Model KV Cache Reuse
cs.LG, cs.CR, cs.SE
Submitted: 2026-10-11
Updated: 2026-10-11
Comments: 17 pages, 2 figures. Code: https://github.com/Snakinya/VReparo
Code: https://github.com/Snakinya/VReparo
License: http://creativecommons.org/licenses/by-nc-nd/4.0/
The gist: Cross-model KV cache sharing reduces prefill computation by allowing a receiver model to reuse prefix KV states generated by a related sender model.
Terminology
Abstract
Cross-model KV cache sharing reduces prefill computation by allowing a receiver model to reuse prefix KV states generated by a related sender model. Existing methods optimize such reuse for latency and generation quality, but its safety implications remain unclear. In this work, we systematically evaluate this issue across diverse sender-receiver pairs and reuse configurations. We refer to deviations from the receiver's native safety behavior as safety incompatibility. Our study shows that both the direction and magnitude of safety incompatibility depend on the model pair and reuse configuration, with value reuse causing substantially larger deviations than key reuse across all evaluated pairs. Furthermore, we propose VReparo, a technique that learns per-layer and per-KV-head affine maps offline to align reused sender value tensors with their receiver-native counterparts before decoding. Across two model pairs under full KV reuse and the state-of-the-art selective reuse setting, VReparo reduces the average HarmBench attack success rate (ASR) from 57.28% to 39.21% and the average StrongREJECT score from 0.4215 to 0.2163 upon our benchmarks, while retaining an average Time to First Token (TTFT) reduction of 85.62%.
Sources
- The Pitfalls of KV Cache Compression
- OR-Bench: An Over-Refusal Benchmark for Large Language Models
- Activated LoRA: Fine-tuned LLMs for Intrinsics
- Cross-Model KV Cache Transfer in LLM Families: A Closed-Form Linear Mapping for Prefill Reuse
- Efficient Multi-Adapter LLM Serving via Cross-Model KV-Cache Reuse with Activated LoRA
- Semantic Integrity Matters: Benchmarking and Preserving High-Density Reasoning in KV Cache Compression
- Semantic Cache Distillation: Efficient State Transfer via Reuse and Selective Patching
- AnchorKV: Safety-Aware KV Cache Compression via Soft Penalty with a Refusal Anchor
- Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!
- CacheBridge: Efficient Cross-Model KV Cache Transfer
- KVSharer: Efficient Inference via Layer-Wise Dissimilar KV Cache Sharing
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks