TL;DR
Traditional model editing methods assume knowledge is localized to a single layer, which fails for complex, structured rules. By using fine-grained causal tracing, this paper discovers that an LLM stores abstract rule components (formulas and descriptions) in its early layers, while storing concrete applications (numerical instances) in its middle layers. Leveraging this insight, the authors introduce Distributed Multi-Layer Editing (DMLE), a method that updates these distinct layers separately to achieve massive gains in rule-level consistency and understanding.
What Problem Does This Paper Address?
When we update or correct knowledge in Large Language Models (LLMs)—a process known as model editing—we usually treat knowledge as isolated, localized facts (e.g., "The capital of France is Paris"). Popular locate-then-edit frameworks like ROME and MEMIT work by identifying a specific layer or small block of layers responsible for a fact and modifying the weights there.
However, this assumption breaks down for rule-level knowledge, such as mathematical or physical laws. A single rule doesn't exist as a solitary fact; it is a structured web of interdependent forms, including symbolic formulas, natural language descriptions, and concrete numerical instances. Prior editing methods struggle to propagate changes coherently across all these forms. If you edit the formula, the model might still apply the old rule when solving a word problem. This paper investigates why this happens from a mechanistic perspective and seeks a way to edit rules so they remain consistent across all expressions.
Methods
The authors first employ layer-wise causal tracing to see exactly where different forms of a rule are processed in an LLM. They corrupt the input embeddings of a rule's subject with Gaussian noise and then systematically restore hidden states across different layers to measure their indirect effect on the correct output.
The causal tracing reveals a clear, form-specific layer-wise organization:
- Formulas and Descriptions consistently show the strongest causal effects in the early layers (e.g., layers 2–4 in GPT-J).
- Numerical Instances consistently peak in the middle layers (e.g., layers 13–15 in GPT-J).
Armed with this insight, the authors propose Distributed Multi-Layer Editing (DMLE). Instead of forcing a single uniform update to one contiguous block of layers, DMLE splits the intervention:
- It computes a shared update ($\Delta W_{fd}$) for formulas and descriptions and applies it to the early-layer group.
- It computes a separate update ($\Delta W_i$) specifically for instances and applies it to the middle-layer group.
Both updates are solved using a closed-form least-squares objective, building on top of the MEMIT editing protocol.
Datasets
To rigorously evaluate rule editing, the authors introduce RuleEdit-200, an expansion of the previous RuleEdit benchmark.
- Scope: It scales the dataset from 80 geometry rules to 200 fundamental rules across 13 domains in mathematics (e.g., algebra, calculus, probability) and physics (e.g., classical mechanics, electricity).
- Structure: Each rule contains 3 aligned forms (Symbolic Formula, Natural Language Description, and Numerical Instance) along with counterfactual targets generated by Gemini and manually verified by human annotators to ensure strict cross-form consistency.
Key Insights and Ideas
- Rule Knowledge is Distributed, Not Localized: The most critical takeaway is that an LLM does not store a rule in a single "storage site." The abstract, conceptual understanding (formulas/descriptions) is decoupled from the computational execution (instances).
- Cognitive Division of Labor in LLM Layers: The layer separation aligns with broader interpretability theories: early layers handle high-level symbolic and linguistic processing, while middle layers are heavily recruited for numerical reasoning and multi-step computation.
- Joint vs. Separate Updates: Ablation studies showed that simply throwing all rule forms into a single joint optimization across the same layers doesn't work well. Coherent rule editing requires both form-specific layer allocation and a shared update specifically between the formula and description forms.
Key Results
The authors evaluated DMLE against strong baselines (ROME, MEMIT, GRACE, PROMPT) across four popular base models: GPT-J-6B, Qwen2-7B, Qwen2.5-7B, and LLaMA-3-8B.
While DMLE remained highly competitive on standard metrics like reliability and locality, it achieved massive breakthroughs on rule-specific metrics:
- Rule Understanding (RU): Measures if the edited rule is captured consistently across all forms. DMLE improved RU by an average of 50.19 percentage points over the strongest baseline.
- Instance Portability (IP): Measures if the rule can be correctly applied to numerical calculations. DMLE improved IP by an average of 13.91 percentage points.
- On models like Qwen2-7B and Qwen2.5-7B, DMLE achieved over 85% on Rule Understanding, whereas standard MEMIT hovered around 20%.
Limitations and Future Work
- Base Editor Dependency: DMLE is currently implemented on top of MEMIT. On certain models where MEMIT underperforms (like LLaMA-3-8B), DMLE's absolute performance inherits some of those limitations, even though it still beats the baselines.
- Domain Constraints: The current dataset and evaluation focus strictly on mathematics and physics rules. The authors note that future work should explore whether this distributed multi-layer architecture applies to other structured knowledge domains, such as legal statutes, logical reasoning, or programming code syntax.
Summary updated