arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2503.21730cs.CLcs.LG
收藏

通过干预与弃权实现有效的技能遗忘

Effective Skill Unlearning through Intervention and Abstention

Yongce Li, Chung-En Sun, Tsui-Wei Weng

AI总结:

本文提出两种轻量级免训练的LLM技能遗忘方法Neuron Adjust和Key Space Detection,通过干预与弃权机制在保留模型整体能力的同时实现特定技能的精准遗忘。

摘要:

大型语言模型(LLMs)在各个领域展现出了卓越的技能。理解这些能力背后的机制并对其进行控制,对于开发更好的模型变得越来越重要。在本文中,我们聚焦于LLMs中的技能遗忘,具体而言,即在遗忘特定技能的同时保留其整体能力。我们为LLMs引入了两种轻量级、免训练的机器技能遗忘技术。首先,我们观察到,当模型展现不同技能时,每个前馈层(FFL)中神经元的激活前分布会有所不同。此外,我们发现触发相同技能的查询会在FFL键空间内聚集,并且可以使用超立方体将其与其他查询分离。基于这些观察,我们分别通过干预和弃权(不执行)提出了两种轻量级、免训练的技能遗忘方法:Neuron Adjust和Key Space Detection。我们在七种不同语言上评估了遗忘数学解题、Python编程和理解技能的方法。结果表明,它们对指定技能具有强大的遗忘能力。具体而言,Key Space Detection在大多数遗忘任务中,对被遗忘技能实现了超过80%的相对性能下降,而对其他技能和模型通用知识(MMLU)的相对性能下降不到10%。我们的代码可在https://github.com/Trustworthy-ML-Lab/effective_skill_unlearning获取。

英文摘要:

Large language Models (LLMs) have demonstrated remarkable skills across various domains. Understanding the mechanisms behind their abilities and implementing controls over them is becoming increasingly important for developing better models. In this paper, we focus on skill unlearning in LLMs, specifically unlearning a particular skill while retaining their overall capabilities. We introduce two lightweight, training-free machine skill unlearning techniques for LLMs. First, we observe that the pre-activation distribution of neurons in each Feed-Forward Layer (FFL) differs when the model demonstrates different skills. Additionally, we find that queries triggering the same skill cluster within the FFL key space and can be separated from other queries using a hypercube. Based on these observations, we propose two lightweight, training-free skill unlearning methods via \textit{intervention} and \textit{abstention} respectively: \texttt{Neuron Adjust} and \texttt{Key Space Detection}. We evaluate our methods on unlearning math-solving, Python-coding, and comprehension skills across seven different languages. The results demonstrate their strong unlearning capabilities for the designated skills. Specifically, \texttt{Key Space Detection} achieves over 80\% relative performance drop on the forgetting skill and less than 10\% relative performance drop on other skills and the model's general knowledge (MMLU) for most unlearning tasks. Our code is available at https://github.com/Trustworthy-ML-Lab/effective_skill_unlearning

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑