acceptodds
Under review as a conference paper at ICLR 2027

To Cache or Not to Cache: Understanding and Mitigating Safety Incompatibility in Cross-Model KV Cache Reuse

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%.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
KV cache, Safety alignment, LLM safety

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_mPiZOpenReview ↗
Rating
3
Confidence
2
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

This paper investigates safety incompatibility in cross-model KV cache reuse, where a receiver model continues generation using KV states produced by a related sender model. The authors define safety incompatibility relative to receiver-native inference and introduce metrics to distinguish safety degradation, improvement, and overall deviation. Through experiments involving six base/instruction-tuned model pairs and two directional LoRI-D configurations, they show that cache reuse can substantially alter safety behavior in either direction. Their experiments further suggest that reusing value tensors generally produces larger changes in aggregate harmfulness than reusing key tensors.

To mitigate this issue, the authors propose VReparo, which learns per-layer, per-KV-head affine transformations to align reused value tensors with receiver-native values. These transformations are fitted offline, with their application strength calibrated using refusal behavior. Experiments on HarmBench and StrongREJECT demonstrate improvements in safety metrics under both full KV reuse and DroidSpeak-based selective reuse, while additional evaluations examine benign refusal, QA performance, and inference latency.

Critical strengths
  1. The paper identifies a safety concern that is largely overlooked in existing cross-model KV cache reuse research. The systematic comparisons across model families, reuse directions, and K/V configurations provide useful evidence that preserving serving efficiency or conventional generation quality does not necessarily preserve safety behavior. The observation that reuse can either increase or decrease harmfulness is particularly informative.
  2. The reported reductions of VReparo in harmfulness across both full and selective reuse settings are encouraging, particularly given that mapping is applied only once to the reused prefix values.
Critical weaknesses
  1. While the paper provides extensive empirical evidence that cross-model KV cache reuse can alter safety behavior, it offers limited theoretical or mechanistic explanations for why such incompatibility arises. In particular, it remains unclear why value reuse generally induces larger safety deviations than key reuse, and why the direction and magnitude of safety changes vary substantially across model pairs.
  2. While VReparo improves safety compatibility, it remains unclear whether its benefits justify the additional computational overhead compared with simpler alternatives, such as recomputing more receiver layers in DroidSpeak. In Section 6, the authors fix the recomputation block and evaluate VReparo on top of it. Can the authors add additional experiments on that?
Questions for authors
  1. How does model size affect safety incompatibility under cross-model KV cache reuse? The current results suggest different trends across model families: Qwen3-8B exhibits substantially smaller safety deviations than Qwen3-4B, whereas Llama-3-8B exhibits larger deviations than Llama-3.2-3B. Could the authors investigate whether these differences are attributable to model scale, model-specific alignment, or other factors? Additionally, does the effectiveness of VReparo generalize across different model sizes?
  2. Can the authors provide a theoretical or mechanistic explanation for the observed safety incompatibility, as mentioned in Weakness 1?
  3. Refer to Weakness 2.
5 comments
AuthorsOpenReview ↗

1. Mechanistic explanation

We added comparisons using the same set of prompts and layer-group tests alongside the internal traces.

Replacing V changes what attention reads. At reused prefix positions, K-only changes attention weights but keeps the receiver’s own V, whereas V-only replaces that V. Relative to Native, V-only exceeds K-only in attention-output deviation by 0.256 (95% CI [0.239, 0.272]) for LoRI-D and 0.658 ([0.648, 0.668]) for Llama-3-8B.

LoRI-D behavior moves toward the sender. On the 111 prompts valid in both LoRI-D directions, V-only reuse moves ASR close to the sender’s Native ASR:

Receiver ← SenderReceiver Native ASR (%)V-only ASR (%)Sender Native ASR (%)
Safety ← Code27.0381.9881.08
Code ← Safety81.0838.7427.03

Configuration and layer position affect the result. Qwen3-8B shows opposite directions under V-only and full-KV reuse (Table 2). Under DroidSpeak-style reuse [1], with maps and α unchanged, mapping early reused layers lowers HarmBench SDV more than mapping middle or late layers:

Mapped layersHarmBench SDV (%)
None (raw reuse)59.84 / 26.77
Early (2–11)48.03 / 18.11
Middle (12–21)55.12 / 18.90
Late (22–31)58.27 / 25.98
All (2–31)40.16 / 11.02

These results help explain the observed differences but do not predict their magnitude across model pairs. The analyses are in Sections 4.3.2 and 6.2 and Appendices A.3 and B.8.

AuthorsOpenReview ↗

2. Additional recomputation

Thanks for suggesting this baseline. During the rebuttal period, we added 4-, 8- and 16-layer recomputation under DroidSpeak-style reuse [1], selecting each block by QA quality alone. VReparo has lower SDV than four-layer recomputation at about 18% lower receiver TTFT. Sixteen-layer recomputation achieves lower SDV at higher latency. In the table below, paired entries report LoRI-D / Llama-3-8B, with receiver TTFT measured from resident sender states. VReparo safety results average five fits, while timing uses one fixed fit.

ConditionReceiver TTFT (ms)HarmBench SDV (%)StrongREJECT SDV
Raw reuse: 2 layers recomputed202.32 / 200.5359.84 / 26.770.5270 / 0.1470
VReparo: 2 layers + maps234.93 / 233.2138.58 / 13.390.2989 / 0.0362
4 layers recomputed286.24 / 283.2857.48 / 18.110.5160 / 0.0938
8 layers recomputed453.30 / 448.3652.76 / 28.350.4729 / 0.1352
16 layers recomputed788.15 / 779.626.30 / 11.810.0263 / 0.0118

Timing removes a redundant suffix prefill from the Table 4 implementation, and generated tokens are unchanged in all 66 parity checks. On Llama-3-8B, VReparo has similar HotpotQA F1 to four-layer recomputation (43.42 vs. 43.73) but higher benign refusal (17.1% vs. 12.0%). The comparison is in Section 6.2 and Appendix B.7 (Table 14) of the revised paper.

AuthorsOpenReview ↗

3. Model size and Qwen3-4B

We cannot attribute the original differences to model size alone, because training and alignment also differ across pairs and the two Llama sizes come from different generations (Table 1). To test VReparo at another size, we added Qwen3-4B Base→Instruct under both full-KV and DroidSpeak-style reuse [1], with α = 0.5.

ConfigurationConditionHarmBench ASR (%)HarmBench SDV (%)StrongREJECT SDV
Full KVRaw reuse21.2615.750.0958
VReparo13.237.720.0620
DroidSpeakRaw reuse18.1111.020.0647
VReparo14.496.770.0503

VReparo also reduces SDV at 4B. HarmBench and StrongREJECT SDV both fall under full-KV and DroidSpeak-style reuse, and HarmBench ASR moves toward Native.

Benign refusal stays near Native under full-KV reuse. OR-Bench full refusal is 9.0% with VReparo, compared with 8.5% for Native.

Reviewer_KdV5OpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper investigates the safety incompatibitliy of cross-model KV cache reuse, a scenario where a receiver model reuses KV generated by a different sender model. The authors formalize "safety incompatibility" as deviations from the receiver’s native safety behavior and conduct a systematic empirical study across multiple model pairs and reuse configurations (full KV, K-only, V-only). They find that value reuse consistently causes larger safety degradation than key reuse. To mitigate this, they propose VREPARO, a lightweight offline affine mapping that aligns reused value tensors with receiver-native ones. Experiments on HarmBench and StrongREJECT show that VREPARO substantially reduces attack success rates while retaining most of the latency benefits of cache reuse.

Critical strengths
  1. Cross-model KV cache reuse is an emerging optimization technique, but its safety risks have been overlooked. This paper fills an important gap.

  2. The study covers multiple model families, reuse configurations, and both directions of safety change (degradation and improvement), providing clear evidence that value reuse is the important factor.

  3. Detailed appendices describe experimental setups, hyperparameters, and per-seed results, making the work easy to reproduce.

Critical weaknesses
  1. Definitional validity of safety deviation metrics. The paper defines safety incompatibility as deviations in the receiver’s output-level safety scores (σ\sigma), quantified by ΔS\Delta S, SD, SI, and SDV. While this output-based approach is standard, it relies entirely on the chosen harmfulness evaluator. These classifiers are imperfect proxies for true safety — they may have biases, limited coverage, or calibration issues, especially across different model families and response styles. Moreover, the definition conflates "change in safety behavior" with "change in a specific classifier's score." A low SDV does not guarantee that the receiver’s internal safety mechanisms are preserved, it only guarantees that the external judge agrees with the native judgment. The paper would benefit from a discussion of how sensitive the reported conclusions are to the choice of safety evaluator, and whether alternative definitionsmight offer complementary insights.

  2. Lack of theoretical justification for why offline fitting improves safety. VREPARO learns an affine map to minimize the MSE between reused and native value vectors, under the implicit assumption that aligning value activations will recover the receiver’s native safety behavior. However, there is no formal argument linking value reconstruction fidelity to safety alignment. Safety-critical features may involve nonlinear interactions between keys and values, attention patterns, or later transformer layers that are not captured by per-head linear corrections. Furthermore, the objective function is purely reconstruction-based and contains no explicit safety signal — the safety improvement is an emergent side effect, not a guaranteed property. The paper would be strengthened by an analysis of why value-space alignment suffices (or fails) for safety recovery, by examining the relationship between residual error in value space and the resulting change in safety scores across layers. Without such analysis, the mechanism remains somewhat heuristic.

  3. Missing discussion on adversarial reuse. The paper assumes the sender cache is benign. However, in practice, an attacker could craft malicious sender KV caches to induce harmful behavior. This threat model is not addressed.

Questions for authors

see weaknesses.

5 comments
AuthorsOpenReview ↗

1. Safety metrics and evaluators

Our metrics quantify changes from the receiver’s native output-level safety scores (Section 3.2). We use SDV to measure the average absolute per-prompt change, because increases and decreases can cancel in the mean score shift ΔS. SD and SI separate these two directions. We also report HarmBench ASR, mean StrongREJECT scores, and benign-refusal rates to assess absolute harmfulness and over-refusal (Table 11). Lower SDV indicates closer agreement with native safety scores; it does not establish lower harmfulness or preservation of internal safety mechanisms.

To assess sensitivity to the evaluator, during the rebuttal we rescored the same DroidSpeak-style [3] responses with both the HarmBench [1] and StrongREJECT [2] judges. The table below reports SDV on a 0–1 scale as raw reuse → VReparo, with VReparo averaged over five fitting runs.

ModelPromptsHarmBench judgeStrongREJECT judge
LoRI-DHarmBench0.5984 → 0.38580.4260 → 0.2685
StrongREJECT0.6677 → 0.37700.5270 → 0.2989
Llama-3-8BHarmBench0.2677 → 0.13390.2140 → 0.0953
StrongREJECT0.1597 → 0.04150.1470 → 0.0362
AuthorsOpenReview ↗

2. Value fitting and safety recovery

Thank you for raising this point. Fitting reused V toward receiver-native V aims to reduce the mismatch in the content read by receiver attention. However, Equation 7 minimizes reconstruction error, which does not guarantee safety recovery. We therefore calibrate α to increase unsafe-prompt refusal while limiting additional benign-prompt refusal on the calibration data (Section 5, Appendix B.1).

To test whether value correction improves safety compatibility and how its effect varies across layers, we added a layer-group analysis under DroidSpeak-style reuse [3], mapping one group of reused layers at a time with the maps and α unchanged.

Mapped layersHarmBench ASR (%)HarmBench SDV (%)
None (raw reuse)82.68 / 32.2859.84 / 26.77
Early (2–11)72.44 / 22.0548.03 / 18.11
Middle (12–21)77.95 / 24.4155.12 / 18.90
Late (22–31)79.53 / 31.5058.27 / 25.98
All (2–31)59.84 / 13.3940.16 / 11.02

Mapping early layers gives the largest single-group SDV reduction, and mapping all reused layers gives the lowest SDV. For Llama-3-8B, increasing α from 0.5 to 1 lowers value MSE but increases attention-output deviation. Across prompts, changes in attention-weighted V error have near-zero linear correlations with changes in SDV (r = 0.011 for LoRI-D and −0.064 for Llama-3-8B). The analysis is in Appendix B.8 of the revised paper.

AuthorsOpenReview ↗

3. Adversarial reuse

We assume common provenance: both models and their caches belong to one trusted system, and users interact only through the normal query interface. Our experiments use normally generated caches, and VReparo has not been evaluated against deliberately crafted KV states. We also agree that adversarial reuse is important to investigate, as attacker-influenced caches could alter downstream safety behavior. For example, KVComm [4] and LatentMAS [5] use caches for agent communication. In future work, we will explore how adversarial KV cache reuse affects downstream safety behavior.

Reviewer_jvziOpenReview ↗
Rating
2(+1)
Confidence
3
Informativeness
1
Presentation
3
Soundness
2
Read review
Paper summary

The paper studies changes in a receiver model's safety behavior when it uses KV states computed by a related sender model. It compares full-KV, key-only, and value-only substitution across base/instruction-tuned and task-adapted model pairs. It then proposes VReparo, which fits per-layer, per-head affine maps toward receiver-native values and calibrates their application strength using refusal behavior. Evaluation on two model pairs under full and DroidSpeak-style selective reuse reports reduced safety deviations, residual safety and utility differences, and latency savings conditional on resident sender caches.

Critical strengths

Component-level comparisons. Value-only substitution produces larger HarmBench ASR deviations than key-only substitution across the evaluated pairs (Table 2), providing a concrete observation beyond aggregate full-cache results.

Critical weaknesses
  • Limited research innovation. Changed KVs are expected to change computation and behavior, including safety. Quantifying these effects after substituting non-native states (Section 3.1) does not, in my assessment, establish substantial research innovation. From a threat-model perspective, models sharing internal caches should be treated as one system under common provenance: direct write access to sender KVs does not establish a distinct threat without explaining why equivalent access to receiver KVs is unavailable. An external actor indirectly influencing sender states through a distinct access path could present a meaningful cross-model threat, but that boundary and capability would need to be established. The present study does not require adversarial cache construction.
  • The target application does not sufficiently justify the mismatches studied. Without attacks or intentional cache modification, reuse should either preserve receiver-native KVs, in which case mismatch-induced effects do not arise, or use an explicitly accepted approximation whose consequences are controlled for the intended application. Activated LoRA [2] illustrates exact-compatible reuse; DroidSpeak [1] deliberately profiles an approximation to control measured task degradation, rather than permitting arbitrary changes to sender KVs. Neither citation alone justifies accepting the deviations evaluated here. The paper should therefore justify why the reported mismatches are acceptable in the absence of attacks or intentional modification. If an attack-based setting is intended, it should establish how an attacker can influence the sender's KVs without equivalent access to modify the receiver's KVs directly, given the common provenance discussed in weakness 1.
  • Affine correction lacks sufficient justification and broad utility evaluation. VReparo applies standard affine fitting to all reused value vectors. Selectively identifying which vectors require correction could itself incur costs that negate the benefit of cross-model caching, particularly if receiver-native values must be computed for comparison. Yet evaluation on HotpotQA alone cannot establish that this blanket transformation preserves an LLM's broader capabilities. DroidSpeak already limits reuse to layers outside a recomputed block selected for task quality, reducing reliance on sender KVs in task-sensitive layers. Limited utility changes in this configuration are therefore consistent with DroidSpeak's design, not strong evidence that affine correction generally preserves utility. The essentially unchanged F1 (43.43 to 43.42) supports only no measured performance change on that task and configuration; it does not establish preservation of untested capabilities or robustness to arbitrary changes in sender KVs.
  • The reported speedups omit the cost of obtaining the reused cache. Table 4 times reuse only after sender caches and required intermediate states are already resident, whereas native inference includes full receiver prefill. Sender prefill and cache transfer are excluded, as are tokenization and distributed scheduling (Section 6.2). The comparison therefore does not show whether reuse is faster once the workflow's actual cache-production and delivery costs are included. If sender computation is independently required or its cost is amortized across requests, that workload and amortization must be demonstrated. Without this evidence, the reported speedups do not establish a practical latency benefit.

References

[1] Yuhan Liu et al. DroidSpeak: KV Cache Sharing Across Fine-Tuned Model Variants. NSDI, 2026.

[2] Kristjan Greenewald et al. Activated LoRA: Fine-Tuned LLMs for Intrinsics, 2025.

Questions for authors
  • Research innovation: What substantive research insight goes beyond the expected effects of substituting non-native KVs? If a distinct cross-model threat is claimed, what external influence or access boundary distinguishes it from directly modifying the receiver's own cache under common provenance?
  • Justification of mismatches: Without attacks or intentional modification, what concrete application accepts the evaluated mismatches, and how are their safety and utility consequences controlled? Please explain why exact-compatible reuse in Activated LoRA or task-profiled approximation in DroidSpeak justifies these particular settings. If an attack-based setting is intended instead, how can an attacker influence sender KVs without equivalent access to receiver KVs?
  • Affine correction and utility: What evidence shows that transforming all reused value vectors preserves capabilities beyond HotpotQA? How does the evaluation distinguish the correction's utility impact from the protection already provided by DroidSpeak's task-selected recomputation? Without broader evidence, please scope conclusions to measured performance on the specific task and configurations tested.
  • Cache acquisition costs: Does reuse remain faster when the actual costs of producing and delivering the sender cache are included? Please report end-to-end latency, including transfer and scheduling where incurred, and demonstrate any workload assumptions that make sender prefill independently required or amortizable across requests.
8 comments
AuthorsOpenReview ↗

1. Research contribution

Our contribution is not to reveal that non-native KVs change behavior. Instead, we address the gap in understanding how receiver safety changes under cross-model reuse and which factors drive these changes. We further show that task-quality profiling does not ensure safety compatibility. These findings motivate correcting reused values toward receiver-native values. VReparo implements this correction through per-layer, per-KV-head affine maps, fitted offline for each model pair and reuse configuration and applied once to reused prefix values.

AuthorsOpenReview ↗

2. Target justification

Following the prior studies that examine how benign customization or efficiency optimizations can change safety, including fine-tuning [3] and compression [5, 6, 7], we study the same question for cross-model reuse with the similar settings.

  • DroidSpeak [1] accepts approximate reuse based on task-quality profiling: it recomputes a selected layer block and reuses the remaining sender KVs. Our results show that passing this task-quality check does not ensure safety compatibility (Appendix B.1).

  • We use full-KV, K-only, and V-only reuse as diagnostic settings to isolate the effects of keys and values. Xu et al.’s K/V quantization tests [4] and DroidSpeak’s full-cache and individual-layer tests (its Section 3.2) have the same purpose. Activated LoRA [2] uses exact-compatible KV reuse and does not introduce the mismatch studied here.

AuthorsOpenReview ↗

3. Threat model

Following prior KV-quantization and compression studies [4, 6], we assume that both models and their normally computed caches belong to one trusted system. Users submit harmful requests through the normal query interface; no malicious cache modification or asymmetric cache-write access is assumed. Cross-model reuse can change receiver safety even in this setting (Tables 1–2). In our original paper, we have stated that our study involves no adversarial cache construction.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.