Table of Contents
Fetching ...

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. Pan

TL;DR

This work tackles the challenge of removing all knowledge about a target entity from large language models without retraining. It introduces Consistency-Aware Editing (CAE), a two-stage method that (i) identifies a diverse, compact set of prompts about the entity via SVD-based key selection and (ii) jointly optimizes low-rank MLP updates with a consistency regularizer to align editing directions across prompts. Empirical results on RWKU and ToFU show CAE delivers superior forgetting while preserving neighbor facts and overall utility, and analyses reveal coherent edit directions and data-efficient requirements. The approach is robust across entities, question types, and architectures, suggesting a practical, scalable path for secure and controllable knowledge unlearning in LLMs.

Abstract

Large language models (LLMs) risk retaining sensitive, copyrighted, or harmful information from their training data. Entity-level unlearning addresses this issue by removing all knowledge of a specific entity while preserving the model's overall capabilities. Existing approaches typically rely on full-model fine-tuning or prompt-based interventions, which can be computationally expensive or brittle when handling paraphrased queries. Recently, model editing has emerged as an efficient alternative for updating knowledge in LLMs, offering a promising direction for unlearning. However, existing editing techniques are typically designed for instance-level updates, modifying responses to specific attributes of an entity rather than eliminating all knowledge associated with the entity. In this paper, we investigate how editing techniques can be adapted for effective and efficient entity-level unlearning. To this end, we introduce a novel consistency-aware editing (CAE) framework. CAE aggregates a diverse set of prompts related to a target entity, including its attributes, relations, and adversarial paraphrases. It then jointly learns a low-rank update guided by a consistency regularizer that aligns the editing directions across prompts. This promotes robust and comprehensive forgetting while minimizing interference with unrelated knowledge. We further examine where different entities are stored within the model and how many diverse prompts are needed for successful unlearning. We evaluate CAE on two challenging benchmarks, RWKU and ToFU, and demonstrate that it (i) provides insights into how entity-level knowledge is internally represented and deleted in LLMs, (ii) significantly improves forgetting accuracy and robustness over traditional unlearning and editing baselines, and (iii) enables scalable entity removal using only tens of carefully selected prompts.

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

TL;DR

This work tackles the challenge of removing all knowledge about a target entity from large language models without retraining. It introduces Consistency-Aware Editing (CAE), a two-stage method that (i) identifies a diverse, compact set of prompts about the entity via SVD-based key selection and (ii) jointly optimizes low-rank MLP updates with a consistency regularizer to align editing directions across prompts. Empirical results on RWKU and ToFU show CAE delivers superior forgetting while preserving neighbor facts and overall utility, and analyses reveal coherent edit directions and data-efficient requirements. The approach is robust across entities, question types, and architectures, suggesting a practical, scalable path for secure and controllable knowledge unlearning in LLMs.

Abstract

Large language models (LLMs) risk retaining sensitive, copyrighted, or harmful information from their training data. Entity-level unlearning addresses this issue by removing all knowledge of a specific entity while preserving the model's overall capabilities. Existing approaches typically rely on full-model fine-tuning or prompt-based interventions, which can be computationally expensive or brittle when handling paraphrased queries. Recently, model editing has emerged as an efficient alternative for updating knowledge in LLMs, offering a promising direction for unlearning. However, existing editing techniques are typically designed for instance-level updates, modifying responses to specific attributes of an entity rather than eliminating all knowledge associated with the entity. In this paper, we investigate how editing techniques can be adapted for effective and efficient entity-level unlearning. To this end, we introduce a novel consistency-aware editing (CAE) framework. CAE aggregates a diverse set of prompts related to a target entity, including its attributes, relations, and adversarial paraphrases. It then jointly learns a low-rank update guided by a consistency regularizer that aligns the editing directions across prompts. This promotes robust and comprehensive forgetting while minimizing interference with unrelated knowledge. We further examine where different entities are stored within the model and how many diverse prompts are needed for successful unlearning. We evaluate CAE on two challenging benchmarks, RWKU and ToFU, and demonstrate that it (i) provides insights into how entity-level knowledge is internally represented and deleted in LLMs, (ii) significantly improves forgetting accuracy and robustness over traditional unlearning and editing baselines, and (iii) enables scalable entity removal using only tens of carefully selected prompts.
Paper Structure (32 sections, 11 equations, 8 figures, 10 tables)

This paper contains 32 sections, 11 equations, 8 figures, 10 tables.

Figures (8)

  • Figure 1: We compare two editing strategies on unlearning the entity of Jackie Chan. (a) Editing each prompt independently leads to inconsistent editing directions ($z_i$) and partial forgetting. (b) Joint optimization with a consistency constraint aligns $z_i$ vectors, resulting in a shared update $\Delta W$ that generalizes across all facts.
  • Figure 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 components (red), indicating that MLP pathways are the primary carriers of entity-level knowledge.
  • Figure 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 $T_e$, followed by rephrasing into $T_g$. The union of $T_e$ and $T_g$ is the input of CAE. (b) For each prompt, we extract key vectors and optimize a residual $\delta$ at layer $\ell$. 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^\ell$ across subsequent layers.
  • Figure 4: Entities in RWKU on Llama3.1-Instruct. CAE demonstrates optimal balance between neighbor preservation and target knowledge unlearning.
  • Figure 5: Results on the Number of Edits. w/o means we random select the edits.
  • ...and 3 more figures