Leverage Unlearning to Sanitize LLMs
On the map: LLM safety and security → Machine unlearning
Abstract (arXiv)
Pre-trained large language models (LLMs) are becoming useful for various tasks. To improve their performance on certain tasks, it is necessary to fine-tune them on specific data corpora (e.g., medical reports, business data). These specialized data corpora may contain sensitive data (e.g., personal or confidential data) that will be memorized by the model and likely to be regurgitated during its subsequent use. This memorization of sensitive information by the model poses a significant privacy or confidentiality issue. To remove this memorization and sanitize the model without requiring costly additional fine-tuning on a secured data corpus, we propose SANI. SANI is an unlearning approach to sanitize language models. It relies on both an erasure and repair phases that 1) reset certain neurons in the last layers of the model to disrupt the memorization of fine-grained information, and then 2) fine-tune the model while avoiding memorizing sensitive information. We comprehensively evaluate SANI to sanitize both a model fine-tuned and specialized with medical data by removing directly and indirectly identifiers from the memorization of the model, and a standard pre-trained model by removing specific terms defined as confidential information from the model. Results show that with only few additional epochs of unlearning, the model is sanitized and the number of regurgitations is drastically reduced. This approach can be particularly useful for hospitals or other industries that have already spent significant resources training models on large datasets and wish to sanitize them before sharing.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Machine unlearning, one of 12 directions in LLM safety and security. Builds on 23 of its 46 references that are in the map. First posted on arXiv 24 Oct 2025.
Builds on
23 of 46 references.
Closest ancestors · 4
Same direction, newest first
- 2024Rethinking LLM Memorization through the Lens of Adversarial Compression23 Apr
- 2024Dissecting Language Models: Machine Unlearning via Selective Pruning2 Mar
- 2024Fast Exact Unlearning for In-Context Learning Data for LLMs1 Feb
- 2022Knowledge Unlearning for Mitigating Privacy Risks in Language Models4 Oct
Other references · 19
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2016Deep Learning with Differential Privacycited by 2,682
- 2020Extracting Training Data from Large Language Modelscited by 2,144
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,041
- 2019Machine Unlearningcited by 1,020
- 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 847
- 2021Membership Inference Attacks From First Principlescited by 839
- 2019ClinicalBERT: Modeling Clinical Notes and Predicting Hospital Readmissioncited by 487
- 2023Scalable Extraction of Training Data from (Production) Language Modelscited by 415
- 2020Amnesiac Machine Learningcited by 305
- 2021Enhanced Membership Inference Attacks against Machine Learning Modelscited by 237
- 2021Counterfactual Memorization in Neural Language Modelscited by 155
7 more
- 2021Does BERT Pretrained on Clinical Notes Reveal Sensitive Data?cited by 91
- 2021Membership Inference Attack Susceptibility of Clinical Language Modelscited by 50
- 2022RelaxLoss: Defending Membership Inference Attacks without Losing Utilitycited by 35
- 2024Learnable Privacy Neurons Localization in Language Modelscited by 26
- 2021The NLP Cookbook: Modern Recipes for Transformer based Deep Learning Architecturescited by 16
- 2021Privacy Assessment of Federated Learning using Private Personalized Layerscited by 5
- 2024Unified Neural Backdoor Removal with Only Few Clean Samples through Unlearning and Relearningcited by 4
Built on by
Citing papers per year: 2026: 1.
1 paper.