Consistency-Aware Editing for Entity-level Unlearning in Language Models

Xiaoqi Han, Víctor Gutiérrez-Basulto, Ru Li, Xiaoli Li, Jiye Liang, Jeff Z. PanarXiv 2025

TL;DR

To prevent Large Language Models (LLMs) from leaking sensitive, copyrighted, or harmful data, researchers need ways to make them completely "forget" specific topics. This paper introduces Consistency-Aware Editing (CAE), a highly efficient framework that groups diverse prompts about a target entity and applies a unified parameter update. By enforcing a global consistency constraint, CAE cleanly erases an entire entity across various paraphrases while leaving unrelated knowledge completely intact.

What Problem Does This Paper Address?

Most current unlearning methods operate at the instance level—they train a model to forget a specific sentence or a single isolated fact. However, real-world privacy and copyright requests usually demand entity-level unlearning: erasing everything associated with a subject (e.g., a specific person, fictional character, or company) regardless of how a user phrases the question.

While localized model editing techniques (like ROME or MEMIT) can modify facts quickly without full retraining, simply applying them to entity-level unlearning fails. Because standard editing methods optimize each prompt independently, they generate conflicting parameter updates. This results in incomplete forgetting, where the model might refuse to answer one direct question but happily leak the forbidden knowledge when asked via an adversarial paraphrase.

Fig. 1: We compare two editing strategies on unlearning the entity of Jackie Chan. (a) Editing each prompt independently leads to inconsistent editing directions (zi) and partial forget- ting. (b) Joint optimization with a consistency constraint aligns zi vectors, resulting in a shared update ∆W that generalizes across all facts.

Methods

The authors frame entity unlearning as a targeted model editing problem where the objective is to induce uncertainty (e.g., forcing the model to respond with "I don't know") for any query regarding the target entity.

The CAE framework consists of four main steps:

  1. Knowledge Localization: Through causal tracing, the authors confirm that entity-level knowledge is primarily stored within the Multi-Layer Perceptron (MLP) weights of specific transformer layers rather than the attention modules.
  2. Fact Selection via SVD: CAE retrieves a broad set of facts about the target entity from Wikidata and generates diverse paraphrases. To avoid redundancy and conflicting updates, it applies Singular Value Decomposition (SVD) to the hidden-state key vectors, keeping only a compact, highly informative subset.
  3. Consistency-Aware Joint Optimization: Instead of calculating parameter shifts independently for each prompt, CAE jointly optimizes the residual vectors across all selected prompts. It introduces a global consistency regularizer that minimizes the variance among these updates, forcing them into a unified, coherent direction.
  4. Residual Distribution: This aligned parameter update is then distributed across subsequent layers to ensure robust suppression throughout the network.
Fig. 3: Overview of our method (a) Given an entity e (e.g., Jackie Chan), we retrieve facts from Wikidata and convert them into natural language Te, followed by rephrasing into Tg. The union of Te and Tg is the input of CAE. (b) For each prompt, we extract key vectors and optimize a residual δ at layer ℓ. The key vectors are selected via SVD-based ranking, while the residuals are regularized using a consistency loss to ensure aligned updates across prompts. We then distribute the residuals Rℓacross subsequent layers.

Datasets

The framework was evaluated on two prominent entity-level unlearning benchmarks:

  • RWKU: A benchmark containing 100 real-world subjects designed to evaluate knowledge unlearning across multiple probe types, including fill-in-the-blank, question-answering, and adversarial attacks.
  • ToFU (Task of Fictitious Unlearning): A dataset featuring 20 fictitious author profiles used to evaluate entity-level forgetting alongside the retention of general world facts.

Key Insights and Ideas

  • MLPs are the Core Storage: Causal tracing experiments show that disabling MLP pathways reduces the model's causal effect on factual recall far more than disabling attention modules, making MLPs the ideal target for entity erasure.
Fig. 2: Causal effects to the probability (P) of model’output. (a) Strong causality at a ‘late site’ in the last layers at the last token and strongly causal states at an ‘early site’ in middle layers at the last subject token. (b) MLP contributions dominate the early site. (c) Attention is important at the late site. (d) Average indirect causal effect of hidden states on output probability. Disabling MLP components (green) results in a greater reduction in influence compared to attention com- ponents (red), indicating that MLP pathways are the primary carriers of entity-level knowledge.
  • The Danger of Isolated Edits: Independent edits create scattered, divergent update directions. CAE's core "aha moment" is that forcing these updates to align via a consistency constraint creates a clean, unified "forgetting subspace" that generalizes across paraphrases.
  • Extreme Data Efficiency: Comprehensive entity-level forgetting doesn't require massive retraining datasets. Carefully selecting around 70 diverse prompts via SVD is enough to cleanly wipe an entity from an 8B parameter model.

Key Results

  • State-of-the-Art Balance: On the RWKU benchmark using LLaMA3-Instruct (8B), CAE achieved the lowest forget-set scores (15.9 overall) while maintaining high neighbor-set retention (72.2) and overall model utility, outperforming baselines like MEMIT, AlphaEdit, and Direct Preference Optimization (DPO).
Fig. 4: Entities in RWKU on Llama3.1-Instruct. CAE demon- strates optimal balance between neighbor preservation and target knowledge unlearning.
  • Robustness to Paraphrases: Unlike baseline editing methods which suffer from knowledge leakage under adversarial phrasing, CAE consistently induces uncertainty across all prompt variations (e.g., roleplay, cloze tasks, and cross-lingual queries).
  • Compute Efficiency: CAE executes on a single 40GB GPU, bypassing the massive multi-GPU requirements of full-model gradient ascent fine-tuning while achieving superior precision.

Limitations and Future Work

  • Indirect Semantic Cues: CAE struggles when the entity name is omitted or heavily obscured (e.g., via complex synonym manipulation), as the model relies on direct semantic hooks to trigger the unlearning subspace.
  • Scaling to Batches: The current work focuses primarily on single-subject unlearning. Scaling consistency-aware constraints to handle large batches or sequential streams of distinct entities simultaneously remains an open challenge.

Summary updated

BibTeX
@misc{han2025consistency,
  author = {Xiaoqi Han and Víctor Gutiérrez-Basulto and Ru Li and Xiaoli Li and Jiye Liang and Jeff Z. Pan},
  title = {{Consistency-Aware Editing for Entity-level Unlearning in Language Models}},
  year = {2025},
  eprint = {2601.08840},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.08840},
}
Figure