LLM-Eraser: Optimizing Large Language Model Unlearning through Selective Pruning
Shengming Zhang, Le Zhang, Jingbo Zhou, Zhi Zheng, Hui Xiong
Abstract
We focus on unlearning unwanted knowledge in autoregressive large language models (LLMs) through pruning. Our goal is to selectively remove undesirable information (e.g., harmful responses, privacy-sensitive data) while ensuring the preservation of desirable knowledge (e.g., positive responses and objective facts). Previous approaches use gradient ascent (GA) over undesired knowledge to inversely optimize LLMs, which compromises the model's performance on desired knowledge. To address this limitation, we introduce a novel two-stage approach, named LLM-Eraser, for selectively identifying and editing parameters specifically associated with undesirable knowledge. LLM-Eraser operates in two stages: localization and unlearning. During the localization stage, we utilize neuron scores and trainable soft masks to identify parameters crucial to the undesired knowledge. In the unlearning stage, we prune these identified parameters and apply a selective post-training process to enhance the model's selectiveness. Our experiments, conducted across five task datasets, demonstrate that LLM-Eraser effectively unlearns undesirable knowledge-evidenced by the model's near-random performance on multiple-choice questions related to the erased knowledge-while maintaining high proficiency in desirable knowledge, with an average performance deficit of only 2.5%.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Locating and Editing Factual Associations in GPT cites Language Models are Few-Shot Learners
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Language Models are Few-Shot Learners
- Think and Recall: Layer-Level Prompting for Lifelong Model Editing cites Locating and Editing Factual Associations in GPT
- Think and Recall: Layer-Level Prompting for Lifelong Model Editing cites Language Models are Few-Shot Learners
Cited by top-tier papers3
- Think and Recall: Layer-Level Prompting for Lifelong Model EditingJinke Wang, Zenan Ying, Qi Liu, Wei Chen et al.EMNLP 2025
- DIAA: A Decoding-Efficient Inference Acceleration Approach for On-Device Large Language ModelsHao Tian, Sheng Lu, Fuwen Tian, Guangming Cui et al.AAAI 2026
- EPTS: Elastic Post-Training Sparsity for Efficient Large Language Model CompressionKe Xu, Jiaqi Wan, Wenhao Hu, Han Pu et al.KDD 2026
Builds on33
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
Related papers
- Towards Safer Large Language Models through Machine UnlearningZheyuan Liu, Guangyao Dou, Zhaoxuan Tan, Yijun Tian et al.ACL Findings 2024 · 22 citations
- UIPE: Enhancing LLM Unlearning by Removing Knowledge Related to Forgetting TargetsWenyu Wang, Mengqi Zhang, Xiaotian Ye, Zhaochun Ren et al.EMNLP Findings 2025 · 1 citation
- Not Every Token Needs Forgetting: Selective Unlearning Balancing Forgetting and Utility in Large Language ModelsYixin Wan, Anil Ramakrishna, Kai-Wei Chang, Volkan Cevher et al.EMNLP Findings 2025
- Large Scale Knowledge WashingYu Wang, Ruihan Wu, Zexue He, Xiusi Chen et al.ICLR 2025
- VL-Eraser: Vacuum Distillation for Machine Unlearning in Vision-Language ModelsYili Wang, Lu Dai, Tairan Huang, Yijie Xu et al.CVPR 2026
