Disentangling Knowledge Representations for Large Language Model Editing

Mengqi Zhang, Zisheng Zhou, Xiaotian Ye, Qiang Liu, Zhaochun Ren, Zhumin Chen, Pengjie Ren

TL;DR

The paper introduces DiKE (Disentangling Knowledge representations for LLM Editing), a novel framework that prevents "collateral damage" during model updates by separating a subject's representation into target-specific and target-unrelated components. By updating only the relevant portion of the representation using a closed-form rank-one update, DiKE significantly improves the preservation of facts sharing the same subject (fine-grained irrelevant knowledge) without sacrificing editing efficiency or general performance.

What Problem Does This Paper Address?

Large Language Models (LLMs) act as massive knowledge bases, but they frequently require updates to correct inaccuracies or reflect new information. Current "locate-then-edit" methods (like ROME or MEMIT) are effective at injecting new facts, but they struggle with fine-grained irrelevant knowledge.

Current editing methods struggle to preserve fine-grained irrelevant knowledge while successfully updating target facts.

The authors identify a specific failure mode: when you edit a fact about a subject (e.g., changing "The President of the USA is Biden" to "Trump"), the model often accidentally corrupts other unrelated facts about that same subject (e.g., "The capital of the USA is Washington" becomes "Miami"). This happens because LLMs store multiple attributes of a subject in an "entangled" representation space. Modifying the parameters to change one attribute inadvertently shifts the others. While existing methods use coarse constraints (like preserving random Wikipedia text) to maintain general model stability, they lack the precision to protect these closely related, fine-grained facts.

Methods

DiKE tackles this entanglement through a two-phase approach:

1. Knowledge Representation Disentanglement (KRD)

The authors design a lightweight module (a "Disentangler" and a "Recomposer") that decomposes a subject's hidden state into two distinct vectors:

  • Target-knowledge-related ($z^r_e$): Captures the specific attribute being edited.
  • Target-knowledge-unrelated ($z^u_e$): Captures all other attributes of the subject.

This module is trained using a combination of Contrastive Loss (to ensure the two components are distinct), Constraint Loss (to ensure each component predicts the correct object), and Reconstruction Loss (to ensure the original representation can be recovered).

2. Disentanglement-based Knowledge Edit (DKE)

During the actual editing phase, the pre-trained Disentangler is frozen. The authors derive a closed-form, rank-one parameter update based on matrix theory. This update is mathematically designed to inject the new knowledge into the "target-related" component while explicitly enforcing an invariance constraint on the "unrelated" component. This ensures that the parameters governing other facts about the subject remain unchanged.

Datasets

The authors evaluate DiKE across three LLMs: GPT2-XL (1.5B), GPT-J (6B), and LLaMA-3 (8B). They utilize the following benchmarks:

  • FINE-KED (New): A benchmark specifically designed to test the preservation of fine-grained irrelevant knowledge. It contains 3,085 instances categorized into three difficulty levels (Easy, Middle, Hard) based on how semantically similar the "irrelevant" relation is to the "edited" relation.
  • COUNTERFACT: A standard benchmark for evaluating counterfactual knowledge insertion and neighborhood preservation.
  • MQUAKE-3K: A dataset for testing multi-hop reasoning after knowledge edits.

Key Insights and Ideas

  • The "Subject as Anchor" Insight: LLMs retrieve knowledge by recalling facts associated with specific subjects. Because subject representations are attribute-dense, editing is a "surgical" problem that requires separating the specific "nerve" (attribute) from the rest of the "organ" (subject representation).
  • Disentanglement vs. Constraints: Simply adding more constraint samples (like ROME-C) is insufficient. The paper shows that explicitly separating the representation space is more effective than trying to "regularize" the update using more data.
  • Generalization of the KRD: Surprisingly, the KRD module—once trained on a small set of subjects—generalizes well to entirely unseen subjects and relations. This suggests that the "logic" of how LLMs entangle attributes is consistent across the model's vocabulary.

Key Results

  • Superior Relational Locality: On the FINE-KED benchmark, DiKE outperformed baselines (ROME, MEMIT, AlphaEdit) in preserving fine-grained facts, especially on the "Hard" level. For LLaMA-3, DiKE improved the Relational Locality score by up to 6.5% over the best baseline.
  • Competitive Efficacy: DiKE maintains a near-perfect success rate (Efficacy) for the edits themselves, matching or exceeding the performance of MEMIT and ROME.
  • Robustness in Batch Editing: In "subject-consistent" batch editing (where multiple edits share the same subject), DiKE showed much higher stability than ROME, which suffers sharp performance degradation as batch size increases.
  • Efficiency: The KRD module is lightweight. The average processing time per edit for LLaMA-3 is approximately 11.34 seconds, which is only a small constant overhead compared to standard methods.

Limitations and Future Work

  • Structured Knowledge Focus: DiKE is currently optimized for structured knowledge represented as $(subject, relation, object)$ triples. Its performance on unstructured or semi-structured text updates is not yet explored.
  • Scope of Irrelevant Knowledge: The study focuses primarily on fine-grained knowledge sharing the same subject. Future work could expand this to other types of "entangled" knowledge, such as facts sharing the same object or relation.
  • Benchmark Breadth: While FINE-KED is a valuable addition, the authors acknowledge that a truly comprehensive evaluation would need to integrate more diverse real-world scenarios, including robustness to distribution shifts and more complex reasoning chains.

Summary updated

BibTeX
@inproceedings{zhang2026disentangling,
  author = {Mengqi Zhang and Zisheng Zhou and Xiaotian Ye and Qiang Liu and Zhaochun Ren and Zhumin Chen and Pengjie Ren},
  title = {{Disentangling Knowledge Representations for Large Language Model Editing}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=PmRBeF2umZ},
}
Figure