KV-Cache Patching: Tracing How and Where Fine-Tuned Behaviors Arise
On the map: Efficient LLM inference and serving → Efficient reasoning and agent inference also fits: KV cache optimization
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Placed in Efficient reasoning and agent inference, one of 12 directions in Efficient LLM inference and serving. Builds on 68 of its 77 references that are in the map. Submitted 30 Oct 2026.
Builds on
68 of 77 references.
Closest ancestors · 2
Same direction, newest first
- 2026ICaRus: Identical Cache Reuse for Efficient Multi Model Inference27 Feb
- 2025KV Cache Steering for Controlling Frozen LLMs11 Jul
Other references · 66
- 2024The Llama 3 Herd of Modelscited by 16,113
- 2021Training Verifiers to Solve Math Word Problemscited by 11,055
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 6,685
- 2024Qwen2.5 Technical Reportcited by 5,525
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 4,046
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,931
- 2022Locating and Editing Factual Associations in GPTcited by 2,951
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,444
- 2023Representation Engineering: A Top-Down Approach to AI Transparencycited by 1,530
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,270
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,174
- 2023Steering Language Models With Activation Engineeringcited by 1,128
38 more
- 2019Plug and Play Language Models: A Simple Approach to Controlled Text Generationcited by 822
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 690
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 578
- 2024Safety Alignment Should Be Made More Than Just a Few Tokens Deepcited by 528
- 2021Causal Abstractions of Neural Networkscited by 461
- 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 425
- 2025Persona Vectors: Monitoring and Controlling Character Traits in Language Modelscited by 416
- 2024LoRA Learns Less and Forgets Lesscited by 387
- 2023Function Vectors in Large Language Modelscited by 353
- 2023In-Context Learning Creates Task Vectorscited by 337
- 2023Prompt Cache: Modular Attention Reuse for Low-Latency Inferencecited by 307
- 2023A Rank Stabilization Scaling Factor for Fine-Tuning with LoRAcited by 281
- 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 268
- 2015Explaining NonLinear Classification Decisions with Deep Taylor Decompositioncited by 255
- 2024How to use and interpret activation patchingcited by 252
- 2023Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learningcited by 247
- 2023Attribution Patching Outperforms Automated Circuit Discoverycited by 239
- 2025Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMscited by 211
- 2024Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluationscited by 203
- 2022Learning by Distilling Contextcited by 180
- 2024Fine-Tuning Enhances Existing Mechanisms: A Case Study on Entity Trackingcited by 165
- 2020MTOP: A Comprehensive Multilingual Task-Oriented Semantic Parsing Benchmarkcited by 164
- 2017The Shattered Gradients Problem: If resnets are the answer, then what is the question?cited by 160
- 2023Mechanistically analyzing the effects of fine-tuning on procedurally defined taskscited by 131
- 2024LoRA vs Full Fine-tuning: An Illusion of Equivalencecited by 123
- 2025Model Organisms for Emergent Misalignmentcited by 112
- 2025Persona Features Control Emergent Misalignmentcited by 112
- 2022XAI for Transformers: Better Explanations through Conservative Propagationcited by 107
- 2025Cache-to-Cache: Direct Semantic Communication Between Large Language Modelscited by 83
- 2025Convergent Linear Representations of Emergent Misalignmentcited by 81
- 2023When Do Prompting and Prefix-Tuning Work? A Theory of Capabilities and Limitationscited by 52
- 2025Overcoming Sparsity Artifacts in Crosscoders to Interpret Chat-Tuningcited by 40
- 2025Base Models Know How to Reason, Thinking Models Learn Whencited by 40
- 2025Narrow Finetuning Leaves Clearly Readable Traces in Activation Differencescited by 36
- 2024Prompting a Pretrained Transformer Can Be a Universal Approximatorcited by 31
- 2025KVComm: Enabling Efficient LLM Communication through Selective KV Sharingcited by 28
- 2025Activated LoRA: Fine-tuned LLMs for Intrinsicscited by 22
- 2025How Post-Training Reshapes LLMs: A Mechanistic View on Knowledge, Truthfulness, Refusal, and Confidencecited by 14
50 most cited of 66 All 66 (JSON)
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Suppressing Misaligned Behaviors in Language Models, Durably
- 2026Translating KV Caches Between Hybrid-Attention Language Models: MLA Latents, Linear-Attention States and Sparse-Attention Indexers
- 2026Random Attention: Rethinking KV Cache Eviction for Efficient Reasoning
- 2026Probing the Prompt KV Cache: Where It Becomes Dispensable
- 2024Scaling Laws for Forgetting When Fine-Tuning Large Language Models
- 2026Contiguity, Not Importance: Budgeted Repair of Stale KV Caches After Document Edits
- 2025KV Cache Recycling to Expand Usable Context Capacity in Low Parameter LLMs
- 2026What Attention Recalls and Recurrence Controls in Hybrid Language Models