acceptodds
Under review as a conference paper at ICLR 2027

KVRecover: Cross-Model Prompt Recovery from Leaked KV Caches

Abstract

Key–value (KV) caches retain input information that can be exploited to reconstruct private prompts.However, reconstruction attacks that rely on a large source model can require substantial GPU resources.We introduce KVRecover, a cross-model prompt-reconstruction method that enables a smaller frozen receiver to recover input content from complete leaked KV caches.Its model-pair-specific converter uses depth-dependent projection to map source states into the receiver's representation space, while local cross-layer fusion coordinates the converted states.Progressive supervision combines cache alignment, attention alignment, and text reconstruction to optimize the converted caches for input recovery.Once trained, the converter can be distributed and reused on unseen prompts within the same model pair, without source-model inference or further converter optimization during recovery.Experiments across three Qwen3 model pairs and four datasets achieve a macro-average BERTScore F1 of up to 0.834.Recovery from Qwen3-235B-A22B caches using Qwen3-14B further demonstrates the feasibility of the attack across a substantial model-size gap.These findings show that leaked caches can remain vulnerable even to attackers unable to deploy the source model.

Primary area:
alignment, fairness, safety, privacy, and societal considerations
Keywords:
LLM security, KV Cache, Prompt Reconstruction, Cross-Model Cache Transfer, Privacy Leakage

Reviews

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

This paper presents KVRecover, an attack that enables cross-LLM prompt reconstruction from KV cache entries. For a given source–reciever pair, KVRecover trains a small “converter” model that transforms KV cache entries of the source model into semantically similar KV cache entries of the receiver model that can then be used to reconstruct the prompt that produced the source model’s original KV cache entries. The paper evaluates KVRecover across several model pairs and datasets, showing it is generally effective at recovering semantically similar prompts, even when model sizes differ substantially.

Critical strengths
  • KVRecover appears generally effective at recovering text that is semantically similar to the original prompts, with BERTScores ranging from 0.679 to 0.962. It also significantly outperforms the baseline adaptation of C2C.
Critical weaknesses
  • The threat model and motivation are not convincing. The motivation of KVRecover is that using the source model to reconstruct prompts is infeasible due to its high GPU memory consumption. The paper’s solution is to first train a small model that converts KV cache entries of the source model to the smaller receiver model. However, training such a model requires hosting the source model, meaning that step requires no less memory than just using the source model to reconstruct prompts. While the paper attempts to alleviate this in its threat model by saying a third (non-attacker) party could train and release these converters, it seems like an unlikely practice, and the paper does not argue for why it would be feasible. Furthermore, if a third party capable of hosting the source model did exist, it seems a more enticing alternative would be to simply release a model that maps source KV cache prefixes to prompts directly, rather than an arbitrary receiver model.

  • Several design decisions in the method are not well-motivated. While the method seems reasonably constructed, it reads as purely a list of what was done without any justifications. For instance, why do shallow layers use affine maps while deeper layers use residual MLPs? Why are there three progressive training stages that freeze different components and utilize different training objectives? Overall, it is difficult to understand what problems this method is overcoming and if the solution is well-justified. Additionally, Sec. 5.4 shows that stage three substantially harms semantic recovery while only marginally improving the exact match rate, calling into question its inclusion in the main method.

Questions for authors
  • Is it practical to assume that third-party developers would publish KV cache conversion models with the sole purpose of facilitating prompt reconstruction? Why not simply publish models mapping KV cache entries to prompts?

  • What is the motivation and reasoning behind the method’s core technical components, such as the depth-dependent projection and progressive training stages? Furthermore, as it seems semantic similarity is more practically useful to an attacker than preserving an already low exact match rate, why include stage 3 in the main method?

  • Given exact matches are rare, what types of information is lost during prompt reconstruction? In particular, are PII (something an attacker may have motivation to extract) generally preserved or is it mainly high-level concepts and topics?

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

The paper asks whether an attacker who holds a leaked KV cache but cannot execute the (large) source model can still recover the prompt. It trains a per-model-pair converter consisting of learned source-layer mixtures, depth-dependent projectors (affine for shallow layers, residual MLPs for deeper layers), and a local five-layer cross-attention fusion module, using a three-stage curriculum of cache regression, attention-distribution KL alignment, and reconstruction cross-entropy with output distillation. A smaller frozen receiver then generates the prompt from the converted cache given a fixed recovery instruction. Experiments cover three Qwen3 pairs on GSM8K, MBPP, SQuAD2, and MultiNews against a single adapted C2C baseline, a Qwen3-235B-A22B->14B demonstration, one cross-family pair (Qwen3-14B->Llama-3.1-8B-Instruct), architectural and stage ablations, and several diagnostics.

Critical strengths
  1. The question is well motivated. Separating converter development from downstream attacks and showing that a trained converter transfers to unseen prompts is a meaningful relaxation of the cache-injection threat in Luo et al. (2026), and the paper states its assumptions clearly.

  2. The 235B-A22B->14B result is the strongest evidence in the paper. Bridging 94 to 40 layers and 4 to 8 KV heads while still recovering names, quantities, and test assertions (Figs. 12–13) is non-trivial, and SQuAD2 recovery in the 14B to 8B setting (ROUGE-L 0.948) shows near-verbatim reconstruction is achievable in favorable cases.

  3. The experimental section is reasonably complete for a single-method paper: architectural and stage ablations, a prediction-agreement diagnostic with bootstrap intervals, layer-wise PCA, and a length-stratified analysis. Unfavorable results are reported rather than hidden, and the appendix gives enough detail to reproduce.

Critical weaknesses
  1. The threat model has structural problems. Under the paper's own assumptions (complete unencrypted cache, known model identity and configuration, hence public weights), the first-layer keys and values of a pre-norm decoder such as Qwen3 are deterministic functions of the token embedding, so exact token recovery is possible via a precomputed vocabulary lookup with no model inference; the authors must either rebut this or restrict the threat model to partial or late-layer caches, which the experiments do not cover. The GPU barrier is also not the binding constraint: an attacker with read access to GPU memory or a KV store is typically inside the cluster where the source model is already loaded, an outside attacker can rent an H100 or run a quantized/offloaded source (the 235B MoE has only 22B active parameters), and the proposed receiver itself needs 28.4 GiB, so the "consumer-grade GPU" claim in Fig. 2 is unsupported. The converter trainer necessarily has the source model and can attack directly, so the scenario reduces to tool proliferation; whether converters trained for legitimate cross-model transfer leak prompts as a side effect, the more realistic question, is not examined. Finally, the attack is never tested under FP8/INT8 KV quantization, paged or chunked layouts, compression, or fine-tuned source variants, and no mitigations are proposed or tested.

  2. The empirical comparison rests on a single baseline that is both repurposed and under-trained. C2C-adapted zeros out the receiver-context input it was designed around and is trained for 391 updates in BF16 versus 60,000 updates in FP32 for KVRecover, so the reported gains cannot be attributed to the architecture. In the only cross-family setting (Table 8), C2C-adapted outperforms KVRecover on the macro-average (BERTScore 0.774 vs 0.694, ROUGE-L 0.501 vs 0.299) and by a very large margin on GSM8K, which contradicts the "effective across model pairs" claim is not truth. The natural reference points are missing: a source-model injection upper bound, a native-receiver-cache upper bound, and the zero-cache and shuffled-cache controls that A.1.4 describes but never reports.

  3. The full three-stage recipe is outperformed by its own two-stage ablation. Removing Stage 3 raises average ROUGE-L/BERTScore from 0.529/0.826 to 0.694/0.868 and GSM8K from 0.320/0.740 to 0.947/0.978 (Table 2), with exact match (10% vs 0%) the only metric favoring the full model, while generation-cap hits rise from 5.9% to 44.4%. The A.4.5 diagnostic confirms the damage: on GSM8K and MBPP the zero-cache condition agrees with native predictions more often than the converted cache does. Thirty thousand updates over 800 UltraChat prompts with scheduled sampling looks like overfitting to the chat distribution, and the 235B configuration quietly switching to teacher forcing suggests the authors know it. It is unclear which configuration constitutes the method.

  4. The evaluation does not measure recovery of private text and the metrics inflate the story. All evaluation sets are public benchmark text that both models likely memorized in pretraining; SQuAD2 is Wikipedia, which may explain the 0.948 ROUGE-L there versus ~0.3 elsewhere, and no test on unmemorizable or PII-like content is reported despite the adversary's stated objective. BERTScore with multilingual MiniLM and no baseline rescaling has a high floor, the 235B row uses a different scorer on 512-token prefixes yet sits in the same table, 74 of 80 MultiNews outputs hit the generation cap, all results are single-seed, and ablations are not seed-matched. Appendix A.5.2 also contains duplicated figure panels, inconsistent numbering, and a garbled text fragment.

Questions for authors
  1. Please address the first-layer lookup attack: under your access assumptions, why is a converter needed at all, and if the intended setting excludes early layers, what do results look like on late-layer-only caches?

  2. Report zero-cache, shuffled-cache, native-receiver, and source-model-injection reconstruction scores in the Table 1 setting.

  3. Why does the full model lose to the two-stage model on GSM8K/MBPP and on average? Does early-stopped or teacher-forced Stage 3 recover them without losing exact match?

  4. How does recovery degrade under FP8/INT8 cache quantization or a fine-tuned source, and what is the re

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

This paper proposes KVRecover, a cross‑model prompt reconstruction attack: given fully leaked raw KV‑cache tensors produced by a large source model, a separately trained converter maps source KV states into the representation space of a smaller frozen receiver model. After one‑time converter training for a specific source‑receiver model pair, attackers only need the converter plus the small receiver to reconstruct prompts from leaked caches, without running the original source model at recovery time. The method uses depth‑dependent projection, local cross‑layer fusion and three‑stage progressive supervision (cache alignment, attention alignment, text reconstruction). Evaluations are conducted on several Qwen3 model‑pairs across four datasets. Results show decent semantic recovery (high BERTScore) but limited lexical exact‑sequence recovery (low ROUGE‑L). Cross‑family transfer performance degrades noticeably.

Critical strengths
  1. The topic of KV‑cache privacy leakage is practically relevant for LLM serving systems. The paper draws attention to a potential secondary risk: once converters are pre‑trained, low‑resource adversaries could reuse them for attacks.
  2. Empirical work is reasonably complete. The authors perform ablation over key architectural components and training stages, conduct diagnostics on token‑prediction agreement, test a large‑size gap setting, and openly report performance gaps including poor lexical reconstruction and degraded cross‑family results. Appendices contain rich implementation details.
Critical weaknesses
  1. The high per‑pair training burden substantially undermines the practical threat value of this attack. Intuitively: if you already need heavy compute, paired cache dataset collection, and full source‑receiver model access to train a separate converter for every new source‑receiver combination, the overall barrier is not really lowered in practice. The hardest work shifts to converter development; only the final inference‑time cost becomes cheap.
  2. Recovery quality is imbalanced: high semantic similarity (BERTScore) coexists with poor lexical / exact‑sequence reconstruction (low ROUGE‑L). While semantic leakage is still harmful, the paper over‑states the practical impact; outputs often paraphrase or append extra content rather than faithfully reproduce original prompts.
  3. Strong threat‑model assumptions: the attack requires full access to unmodified raw KV‑cache tensors plus complete model metadata.
  4. Limited generalization. Converters are strictly tied to one specific source‑receiver pair. Performance drops markedly for cross‑family model settings. No exploration of possible defenses or mitigations is provided in the paper.
Questions for authors
  1. Since every source‑receiver combination demands heavy dedicated converter training: how would you argue that this represents a meaningful real‑world threat, rather than mainly an academic thought‑experiment? Who would bear the large computational burden of building these converters in practice?
  2. Given large gaps between BERTScore (semantic similarity) and ROUGE‑L (lexical reconstruction): how should we quantify the actual privacy harm when outputs paraphrase and add extra content instead of verbatim prompt recovery?
  3. Could you discuss why you do not evaluate simple mitigation strategies, such as adding noise to KV‑cache tensors, cache quantization or position‑encoding perturbation? Would lightweight countermeasures neutralize this attack?
  4. What fundamental obstacles prevent a single converter from working across different source‑receiver pairs? What changes would be required to improve cross‑family generalization?

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.