- Rating
- 4
- Clarity
- 3
- Confidence
- 4
- Originality
- 3
- Quality
- 3
- Significance
- 3
Read review
Summary
This paper proposes PatchKV, a framework for compensating KV cache compression through context-specific weight patches. Instead of storing all context information only in a compressed KV cache, PatchKV transfers part of the information lost during compression into temporary updates to the MLP output projections. The patch is computed once when loading a context by matching full-cache and compressed-cache activations on reference queries derived from the context. The method uses a closed-form ridge regression and does not require gradient-based training. The patch is then merged into the model weights, so downstream queries use the same forward graph and incur no additional per-query computation.
Strengths and weaknesses
Strength
- I like the idea of compensating KV cache compression errors in weight space. After a proxy-query-based method constructs a compressed cache and evicts part of the original context, it is natural to ask whether the missing information can be partially encoded into a context-specific weight update. PatchKV provides a clear formulation of this idea and treats the weight patch as complementary to, rather than a replacement for, the compressed KV cache.
- The mathematical formulation is clean and easy to follow. The paper derives the patch through block-wise activation matching and closed-form ridge regression, avoiding gradient-based optimization. The use of sufficient statistics for chunked computation is also a sensible design for long reference sequences.
Weakness
- The practical setting is restrictive. PatchKV assumes that a single long context is reused across many downstream queries, so that the cost of constructing the context-specific patch can be amortized. It is less clear how useful the method would be in settings with only one or a few queries per context, or in production systems that serve many different contexts concurrently.
- The patch is optimized to match activations on proxy reference queries, while the actual downstream query distribution remains unknown. Although the paper shows that the patch can generalize beyond the reference set, it does not fully establish how robust this generalization is under larger distribution shift. The method may be sensitive to whether the chosen repeat-context or self-study references adequately represent future user queries.
Questions
- I am curious whether the proposed weight-space compensation can be extended to long reasoning scenarios. For example, during long decoding, could the model periodically merge information from every (T) generated tokens into an updated weight patch, while compressing or evicting the corresponding generated KV states? This would help evaluate whether PatchKV can support long reasoning trajectories in addition to the current single-context, multi-query setting.
- How would the method compare with directly fine-tuning using the same context, even if this requires more context-loading time? Such a comparison would help clarify whether the closed-form ridge-regression patch provides the best accuracy-efficiency trade-off, or whether a more expensive context-specific adaptation method could recover substantially more of the full-KV performance.
Limitations
See weakness and quesitons.
Paper formatting concerns
No
We appreciate the reviewer for detailed and constructive feedback. We address the raised concerns as follows.
We appreciate the reviewer for highlighting the deployment consideration. We clarify below the intended deployment setting of PatchKV, together with its applicability to concurrent serving and the lifecycle management of context-specific patches.
PatchKV is primarily designed for and best suited to the single-context, multi-query setting, where a static context or prefix is prefilled once and reused across many subsequent queries (e.g. KVzip [1], Attention Matching [2]). This includes real-world scenarios such as personalized conversational agents retaining permanent information[3] or enterprise systems utilizing precomputed document KV caches for retrieval [4].
PatchKV is not necessarily beneficial when a context is used for only one or a few short queries. In such cases, the one-time cost of PatchKV may exceed the decoding time savings obtained from the smaller cache. However, amortization also depends on the number of decoding steps per query. Thus, even with only one or a few queries, long generated outputs such as multi-step reasoning or code generation can make KV compression useful because the reduced KV cache lowers memory and computation throughout many decoding steps.
Multi-context batching and concurrent serving are not the primary targets of PatchKV, as each context induces its own context-specific patch. However, PatchKV can be extended to this setting by retaining each patch as a context-specific adapter instead of merging it into the base model, as described in the low-rank patch variant in Appendix C. This follows the multi-LoRA serving paradigm used by systems such as Punica [5] and S-LoRA[6]. In this serving system, requests share a common base model and batch its shared computation, while adapter-specific low-rank update is separately applied according to the adapter associated with each request.
Thank you for raising this point. Reference selection is an important factor in query-agnostic cache compression, where the reference queries serve as proxies for unknown future queries. Following prior query-agnostic cache compressors[1,2], PatchKV therefore uses standard context-derived references, including repeat-context and self-study, rather than actual downstream queries. These references have been shown to serve as effective proxies for unseen queries, and PatchKV uses them to derive a closed-form, context-specific weight update that compensates for cache-compression error.
The reference queries are initially designed to broadly cover context information and downstream query, and the robustness under larger distribution shifts can only be assessed empirically. In experiments, patches constructed from these references improve performance across retrieval, QA, mathematical reasoning, code, and summarization, showing that these references generalize well across diverse downstream tasks and task structures. Table 1 further shows reduced perplexity on downstream answer tokens not used for patch construction, while Figure 4 demonstrates transfer across different task structures. We agree that reference-query mismatch remains a limitation, as reflected by the differences among reference strategies. Better proxy construction is therefore a promising complementary direction, while our weight-space compensation framework remains applicable to different reference strategies and cache compressors.
We implemented an online variant and evaluated it on AIME 2025 with Qwen3-4B, following the online evaluation setting used by Attention Matching (AM) [2].
During decoding, we trigger a fold whenever the physical KV cache, including the prompt, reaches P=2048 entries. At each fold, we protect the most recent 20 KV entries and apply AM to compact the remaining prefix. We then apply PatchKV over AM, and add the update to the model before resuming autoregressive decoding. Thus, KV compaction and weight-space compensation are repeatedly applied throughout a single reasoning trajectory.
We evaluate logical generation caps of 4096 and 8192 tokens, while keeping the physical KV limit fixed at 2048 and varying the retention rate of the compactable prefix. The reported retention rate excludes the protected 20 tokens. Lower retention leaves a smaller cache after each fold and therefore allows more tokens to be generated before the next fold.
Table A shows that the benefit of PatchKV is most pronounced under aggressive compression. At 10% retention, AM+Patch outperforms AM under both logical caps. With an 8K cap and 25% retention, AM+Patch solves two additional problems and reaches 13/30, close to the 14/30 Full-KV baseline. Even at 5% retention, PatchKV improves AM from 2/30 to 5/30, although both methods degrade substantially under this extremely small KV budget.
The 8K results also illustrate the latency benefit of more aggressive compression. Reducing retention rate from 50% to 25% decreases the mean fold count from 5.47 to 3.73 and maintains a shorter physical cache, both of which reduce inference cost as shown in the result. Note that the resulting latency also depends on the generated trajectory length, which may change under different compression levels.
Overall, these results provide initial evidence that PatchKV can be repeatedly updated during long reasoning while generated KV states are periodically compressed, extending its applicability beyond the static single-context, multi-query setting.
Table A. Comparison of online PatchKV on the AIME 2025 over 4K and 8K logical cap.
We added a paired experiment on all 88 SCBench RepoQA contexts using Qwen2.5-7B at 0.05 KV cache ratio.
Since directly fine-tuning all MLP ‘down_proj’ layers will be expensive, we freeze the base model and train rank-32 LoRA updates on all 28 MLP ‘down_proj’ layers. We consider two objectives. FT-Act minimizes the MSE between full- and compressed-KV transformer block outputs, LAct(ϕ)=L1∑l=1LMSE(HlC(ϕ),HlF), while FT-KD minimizes the KL divergence between next-token distributions, LKD(ϕ)=NT2∑t=1NDKL(softmax(ztF/T)∣∣softmax(ztC(ϕ)/T)) . Here, ϕ denotes the LoRA parameters, and neither objective uses downstream questions or answers.
We compare PatchKV with a repeat-context reference query over KVzip with FT-Act and FT-FD in Table B. At matched adaptation time, closed-form ridge provides the strongest accuracy–efficiency trade-off (28.2%). With substantially longer optimization, FT-Act exceeds PatchKV by only 1.1 points while requiring over 16× more adaptation time, whereas FT-KD remains below PatchKV. Both remain far below full-KV accuracy.
We therefore find that, under this controlled setting, closed-form ridge provides a substantially better measured accuracy–efficiency trade-off, while more expensive context-specific gradient adaptation yields only limited additional recovery. We do not interpret these results as an upper bound on gradient-based adaptation, since exhaustive hyperparameter optimization across context-specific adapters was computationally infeasible. More extensive optimization may yield further gains, but would incur substantially greater adaptation and search cost. We leave this trade-off to future work.
Table B. Comparison between PatchKV and fine-tuning variants.
[1] Kim et al., KVzip: Query-Agnostic KV Cache Compression with Context Reconstruction. NeurIPS 2025
[2] Zwieger et al., Fast KV Compaction via Attention Matching. ICML 2026
[3] Li et al., Personal LLM Agents: Insights and Survey about the Capability, Efficiency and Security. arXiv preprint 2024
[4] Chan et al., Don’t Do RAG: When Cache-Augmented Generation is All You Need forKnowledge Tasks. WWW 2025
[5] Chen et al., Punica: Multi-Tenant LoRA Serving. MLSys 2024
[6] Sheng et al., S-LoRA: Serving Thousands of Concurrent LoRA Adapters. MLSys 2024