跳到正文
arXiv cs.CL· Jonas Loos, Oliver Eberle·· 11 小时前AI 评分34

KV-Cache Patching:追踪微调行为如何以及在何处产生

KV-Cache Patching: Tracing How and Where Fine-Tuned Behaviors Arise

AI 导读

研究通过将 LoRA 微调模型的 KV cache 补丁进未修改的基座模型(及反向操作),验证微调行为是否可随 KV cache 迁移。结果显示,德语回复、涌现性失配等行为可从微调模型转移至基座模型,反向补丁则能部分或完全移除微调行为。补丁效果随 KV cache 补丁比例增大而增强,并集中在少数关键位置,system prompt 与 chat template token 影响尤为显著。

正文 · 原文

View PDF HTML (experimental)

Abstract:Fine-tuning a language model changes how it responds, but where is this fine-tuned behavior instantiated? To better understand this, we evaluate whether the change in model behavior arises only during the generation of the answer tokens where the change manifests, or whether altered processing of previous tokens causes it via the attention mechanism. For this, we patch the KV cache from a LoRA fine-tuned model into the unmodified base model, and vice versa. Our results show that for some behaviors, like responding in German or emergent misalignment, patching the KV cache can indeed transfer them from the fine-tuned to the base model. Correspondingly, patching the KV cache from base to fine-tune can partially or fully remove fine-tuned behavior. Furthermore, we find that the effect of patching grows with how much of the KV cache is patched and concentrates at a few pivotal positions, with system-prompt and chat-template tokens having disproportionate influence.
Comments: Interpretability as a Science Workshop at NeurIPS 2026. Project page: this https URL
Subjects: Computation and Language (cs.CL); Machine Learning (cs.LG)
Cite as: arXiv:2610.41480 [cs.CL]
  (or arXiv:2610.41480v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.41480

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Jonas Loos [view email]
[v1] Fri, 30 Oct 2026 09:35:33 UTC (240 KB)

来源:arXiv cs.CL · arxiv.org