Abstract
Knowledge Editing (KE) enables the modification of outdated or incorrect information in large language models (LLMs). While existing KE methods can update isolated facts, they struggle to generalize these updates to multi-hop reasoning tasks that depend on the modified knowledge. Through an analysis of reasoning circuits—the neural pathways LLMs use for knowledge-based inference—we observe that current layer-localized KE approaches, such as MEMIT and WISE, struggle to effectively incorporate updated information into these pathways. We propose CaKE (Circuit-aware Knowledge Editing), a novel method that leverages strategically curated data to stimulate the model to develop appropriate reasoning circuits for newly integrated knowledge. Experimental results show that CaKE leads to an average of 20% improvement in multi-hop reasoning accuracy on the MQuAKE dataset compared to existing KE methods.
Introduction
Large Language Models (LLMs) are notoriously difficult to update post-training. When world events shift, re-training the entire model is computationally prohibitive. Knowledge Editing (KE) aims to surgically update specific facts. However, current KE methods suffer from a "propagation problem": they may successfully update an isolated fact (e.g., "Eddie Mathews is a citizen of the UK") but fail to update downstream reasoning chains (e.g., answering "What is the capital of Eddie Mathews' country?").
This failure occurs because localized edits (like those in ROME or MEMIT) often fail to integrate new knowledge into the model's global "reasoning circuits"—the neural pathways used for multi-step inference.
Circuit Analysis: Identifying the "Broken Links"
Using "PatchScope" to analyze internal activations, the authors identified two primary reasons for reasoning failure in edited models:
- Weak Signal: The updated information exists but lacks the activation strength to trigger subsequent steps in a reasoning chain.
- Propagation Failure: Information remains trapped in early layers or specific token positions, failing to reach the final token position where the answer is generated.
The CaKE Method
CaKE addresses these failures by focusing on building robust internal pathways rather than just modifying weights to store a fact.
1. Circuit-aware Data Generation
CaKE generates a minimal set (typically 3) of specialized training samples designed to "exercise" the circuit. These tasks include Late-layer Integration (linking facts to intermediate attributes) and Reasoning Enhancement (forcing the model to use the fact to find secondary information).
2. LoRA Fine-tuning
The model is fine-tuned using LoRA (Low-Rank Adaptation) on this curated dataset. This process stimulates the model to reorganize its internal wiring, ensuring the new fact is accessible across layers and token positions.
Experimental Evaluation
The method was primarily tested on the MQuAKE (Multi-hop Question Answering for Knowledge Editing) dataset and its counterfactual variants (MQuAKE-CF/CF-v2).
- Performance: CaKE improved multi-hop reasoning accuracy (MAcc) by 20% on average compared to MEMIT and WISE.
- State-of-the-Art Results: On LLaMA3-8B, CaKE achieved 57.1% MAcc, significantly outperforming the next best specialized method, IFMET (36.5%).
- Efficiency: CaKE is more memory-efficient than matrix-based methods, requiring ~18.5GB VRAM for an 8B model compared to MEMIT's 24.4GB.
Conclusion
CaKE demonstrates that LLMs are not just databases but dynamic systems of information flow. By treating knowledge as a "circuit," CaKE enables more reliable and generalizable updates. Future work will extend this approach to more complex logic and "slow-thinking" paradigms like Chain-of-Thought.
Summary updated