NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Wisdom is Knowing What not to Say: Hallucination-Free LLMs Unlearning via Attention Shifting

Chenchen Tan, Youyang Qu, Xinghao Li, Hui Zhang, Shujie Cui, Cunjian Chen, Longxiang Gao · DOI

Abstract

Large Language Models (LLMs) inevitably memorize sensitive information during training, posing significant privacy risks and legal challenges under regulations like the GDPR. While "machine unlearning" aims to remove this data, existing techniques often suffer from a "reliability dilemma," causing either catastrophic performance collapse or factual hallucinations. This paper introduces Attention-Shifting (AS), a novel framework that utilizes lightweight adapters to surgically suppress attention to fact-bearing tokens while reinforcing focus on retained knowledge. Our results demonstrate that AS effectively "forgets" sensitive data while maintaining general intelligence and remaining hallucination-free.

Introduction

As LLMs become central to decision-making, their tendency to memorize training data conflicts with privacy mandates like the "Right to be Forgotten." Traditional unlearning methods face a critical trade-off. Aggressive methods, such as Gradient Ascent, forcibly erase knowledge but often lead to "catastrophic collapse," where the model loses its general reasoning capabilities. Conversely, conservative methods like logit manipulation try to steer the model away from specific answers but often result in hallucinations. Instead of admitting ignorance, the model generates fabricated, factually incorrect information because the underlying memory remains partially accessible.

Methodology

The proposed Attention-Shifting (AS) framework addresses these issues by intervening at the attention level rather than modifying final outputs or core weights. AS employs lightweight adapters (~12M parameters) to implement a dual-loss objective.

Conceptual overview of Attention Suppression (ASP) within the AS framework.

The framework consists of two primary components:

  1. Attention Suppression (ASP): This identifies "fact-bearing" tokens (e.g., names, specific nouns) in the target data and "downweights" the model's attention to them. This effectively blocks the retrieval of memorized knowledge.
  2. Attention Reinforcement (AKL): This identifies essential tokens in the retained dataset and reinforces the model's focus on them, ensuring stability and preserving general performance.
Architecture of the AS framework using Adapter Modules for Attention Weights Shifting.

By shifting focus away from "forget" targets and toward "retain" targets, the model learns to forget through omission rather than substitution. When queried about unlearned content, the model provides neutral responses (e.g., "I don't know") instead of fabricating lies.

Experimental Evaluation

The authors evaluated AS on several benchmarks:

  • ToFU (Task of Fictitious Unlearning): Measuring the forgetting of specific fictitious author facts.
  • TDEC (Training Data Extraction Challenge): Evaluating resistance to data extraction attacks on large-scale corpora.
  • General Knowledge: Testing on Wikitext, LAMBADA, and PubMedQA to ensure no degradation in general reasoning.

Results and Key Insights

AS achieved significant improvements over state-of-the-art baselines, including a 15% higher accuracy on ToFU and 10% on TDEC. Crucially, AS was the only method to remain "hallucination-free" in qualitative tests. While other methods fabricated elaborate stories when asked about unlearned authors, AS consistently responded with neutral "unknown" markers.

The effectiveness of AS stems from treating attention as an "anchor" for factual memories. By breaking the model's ability to attend to these anchors, the memory becomes inaccessible without destroying the surrounding network structure. This approach leverages the "representation superposition" of LLMs, where attention-level intervention is more granular and localized than dense layer modification.

Conclusion

While AS provides a robust behavioral suppression of sensitive data, the authors note that "latent traces" might still exist in the weights, potentially vulnerable to adversarial probing. Future work will explore combining attention-shifting with representation-level editing to ensure more thorough data removal and extending the method to detoxification and multilingual contexts.

Summary updated

BibTeX
@inproceedings{tan2025wisdom,
  author = {Chenchen Tan and Youyang Qu and Xinghao Li and Hui Zhang and Shujie Cui and Cunjian Chen and Longxiang Gao},
  title = {{Wisdom is Knowing What not to Say: Hallucination-Free LLMs Unlearning via Attention Shifting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=LNWyf2RR1V},
}
Figure