Unveiling Entity-Level Unlearning for Large Language Models: A Comprehensive Analysis

Weitao Ma, Xiaocheng Feng, Weihong Zhong, Lei Huang, Yangfan Ye, Xiachong Feng, Bing Qin

Abstract

Large language model unlearning has garnered increasing attention due to its potential to address security and privacy concerns, leading to extensive research in the field. However, existing studies have predominantly focused on instance-level unlearning, specifically targeting the removal of predefined instances containing sensitive content. This focus has left a gap in the exploration of removing an entire entity, which is critical in real-world scenarios such as copyright protection. To close this gap, we propose a novel task named Entity-level unlearning, which aims to erase entity-related knowledge from the target model completely. To investigate this task, we systematically evaluate popular unlearning algorithms, revealing that current methods struggle to achieve effective entity-level unlearning. Then, we further explore the factors that influence the performance of unlearning algorithms, identifying that the knowledge coverage of the forget set and its size play pivotal roles. Notably, our analysis also uncovers that entities introduced through fine-tuning are more vulnerable than pre-trained entities during unlearning. We hope these findings can inspire future improvements in entity-level unlearning for LLMs.

Introduction

As Large Language Models (LLMs) are trained on vast swaths of the internet, they inevitably ingest toxic content, private data, and copyrighted material. "Machine Unlearning" has emerged as a vital post-training technique to "patch" these models without the prohibitive cost of retraining from scratch.

However, most current research focuses on instance-level unlearning—the deletion of specific, predefined sentences (e.g., "John Doe lives at 123 Main St"). This approach is insufficient for complex real-world needs like copyright protection. For instance, removing the concept of "Harry Potter" to avoid legal infringement requires erasing an entire web of interconnected knowledge, not just a few specific sentences. This paper defines this broader challenge as Entity-Level Unlearning and investigates why current methods struggle to achieve it.

The Entity-Level Unlearning Framework

To address the limitations of instance-level approaches, the authors propose a two-stage framework for entity-level unlearning:

  1. Forget Set Construction: Because a model's internal knowledge of an entity is often opaque, the researchers use a "knowledge-probing" method. The model is prompted to self-generate questions about an entity and provide its own answers. A self-verification process then ensures these Q&A pairs accurately represent the model's internal knowledge.
  2. Unlearning Execution: Five popular algorithms are evaluated on this constructed "forget set": Gradient Ascent (GA), Gradient Difference (GD), KL Minimization, Preference Optimization (PO/DPO), and Negative Preference Optimization (NPO).
Figure 1: Comparison between Instance-Level and Entity-Level unlearning frameworks, highlighting the construction of a forget set from entity-related knowledge.

Experimental Setup and Datasets

The study primarily utilizes the TOFU (Task of Fictitious Unlearning) benchmark, which contains 200 synthetically generated biographies of fictitious authors. This controlled environment allows researchers to measure exactly what the model was taught and what it has successfully forgotten. For the "retain set" (knowledge the model should preserve), TriviaQA was used to ensure general world knowledge remains intact. Experiments were conducted on Llama2-7B and Phi-1.5 architectures.

Key Insights and Results

The Generalization Gap and Coverage

Current algorithms often suffer from a "generalization gap." While they can be trained to "memorize" which specific facts to forget, the model often retains related knowledge about the entity that wasn't explicitly in the forget set. The research indicates that Knowledge Coverage—ensuring the forget set touches on diverse facets of an entity—is more critical than the sheer volume of data in the forget set.

Fine-Tuning Fragility

A significant finding is that entities introduced during post-training fine-tuning are much easier to erase than those learned during initial pre-training. Pre-trained knowledge appears deeply "baked in," suggesting that current unlearning methods may be "masking" outputs rather than truly erasing core model weights.

The Utility Trade-off

Aggressive unlearning often leads to "catastrophic collapse" in model utility. As the model is forced to scrub an entity, its performance on unrelated tasks, such as basic logic or general trivia, begins to degrade.

Figure 5: Performance metrics (ROUGE-L, Probability, and Accuracy) across different knowledge sets during the unlearning process. The Target Set drops rapidly, but the Retain and World Facts sets also eventually decline, illustrating the utility trade-off.

The researchers found that NPO-GD (Negative Preference Optimization with Gradient Difference) provided the best balance between unlearning effectiveness and model stability. However, even with optimal methods, a significant performance gap remains between using an ideal target set and a realistically constructed forget set.

Conclusion and Future Work

The study highlights that entity-level unlearning is a far more complex task than simple instance removal. Future research must address the "masking" problem—determining if knowledge is truly gone or just hidden—and develop more robust probing techniques to map out an LLM's internal knowledge before attempting to erase it. Additionally, moving from single-entity to batch unlearning remains a critical hurdle for real-world deployment.

Summary updated

BibTeX
@inproceedings{ma2025unveiling,
  author = {Weitao Ma and Xiaocheng Feng and Weihong Zhong and Lei Huang and Yangfan Ye and Xiachong Feng and Bing Qin},
  title = {{Unveiling Entity-Level Unlearning for Large Language Models: A Comprehensive Analysis}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=VqyJpa21wI},
}
Figure