# Hallucination-Guided Unlearning: Using Hallucination Traces to Reveal Overfitted Memories

*Jiayu Zhang, Ziqi Zhong, Yuliang Gai, Canran Xiao*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/152918) · [OpenReview](https://openreview.net/forum?id=PR255SIdSp) · [Open on the map](../papers.html#p152918)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Machine Unlearning](../pgroup/350.md) · Type: new method · Keywords: hallucination detection, selective unlearning, neuron editing, KL constraint, LLM safety

Areas: [Safety & Security](../areas/safety.md) › Language Model Security › Hallucination Detection

## Summary
Hallucination-Guided Unlearning (HGU) uses model hallucinations as diagnostic signals to selectively unlearn harmful content while preserving utility.

## Explained to a 5-year-old
Sometimes big computer brains learn bad things they should not say. We look at when they make mistakes (hallucinate) to see what they might have memorized. We find special tiny parts inside the brain that are responsible for those mistakes. We change those parts so the brain forgets the bad stuff but still knows good things. This helps the brain stay useful while being safer.

## Explained to a 5-year-old, longer
Big computer brains, like the ones that answer questions, can learn a lot of information. Sometimes they remember things that are not good or even dangerous to share. It is hard to tell exactly which things they should forget because they hide the bad memories inside. Researchers noticed that when these brains make mistakes (they call them hallucinations), they often reveal what they shouldn't know. They use those mistakes as clues to find the parts of the brain that hold the unwanted memories. Inside the brain there are many small pieces called neurons that help store information. The scientists look for the neurons that are most responsible for the mistakes. They then change only those special neurons so the bad memories become weaker. They do this carefully so the brain still works well for good questions. The changes are made using a special rule that keeps the brain’s overall knowledge intact. After the changes, the brain can forget the harmful stuff while still answering useful questions. This way, the brain becomes safer to use without having to completely rebuild it.

## For a technical reader
The paper presents a technique that leverages a language model’s own hallucination errors to locate and modify the specific neurons that store unwanted memorized information. By analyzing evidence and internal consensus, it identifies unsupported text spans and traces back the high-responsibility MLP neurons responsible for those spans. These neurons are then edited with compact gating mechanisms while applying a KL-divergence constraint to preserve the model’s overall performance. Experiments on standard unlearning benchmarks (TOFU and WMDP) show that this method achieves better trade-offs between forgetting harmful content and retaining general knowledge compared to prior approaches. The result is a more practical way to safely unlearn data without having to retrain the entire model from scratch.

## Problem
Selective unlearning in large language models is needed for safety, yet harmful or memorized content is often latent and hard to specify as a clean forget set.

## Method
The approach first identifies unsupported spans by examining evidence and internal consensus, then traces a sparse set of high-responsibility MLP neurons, and finally edits these neurons with compact gates while preserving utility via a KL constraint.

## Results
The approach achieves best MU-FE trade-off with Avg 0.7221 (forget05) and 0.7699 (forget10), top SepS H-Avg (0.4382/0.4715) on mixed prompts, and strongest forgetting on WMDP (e.g., 14.2 on Economics) while improving Retain (52.7) and MMLU (57.2).

## Contributions
It introduces a new way to use model hallucinations as diagnostic signals for selective unlearning, localizing unsupported spans, tracing high-responsibility neurons, and editing them with compact gates under a utility-preserving constraint.

## Research questions this paper is counted under

- [How can we remove specific knowledge from large language models while preserving their overall performance?](../q/51.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/152918)
