提出两种无需训练的技能消除方法,可精准移除大模型特定能力而不影响其他性能。
Effective Skill Unlearning through Intervention and Abstention
- 通过神经元激活分布和键空间超立方体分离不同技能查询。
- 键空间检测法在多数任务中使目标技能性能下降超80%,其他能力损失小于10%。
- 适用于需要可控删除模型特定技能的研究者或部署场景。
大型语言模型在多个领域展现出卓越能力,理解其能力机制并实现可控调节对提升模型可靠性至关重要。本文聚焦于大模型中的技能去学习问题,旨在移除特定技能的同时保留整体能力。基于观察:前激活状态下各前馈层(FFL)神经元分布随技能变化,且相同技能的查询可在键空间中通过超立方体分离,我们提出两种轻量级、无需训练的去学习方法: exttt{Neuron Adjust}(干预)与 exttt{Key Space Detection}(回避)。我们在七种语言上评估了数学求解、Python 编程和理解能力的去学习效果。结果表明, exttt{Key Space Detection} 在大多数任务中实现目标技能性能相对下降超过80%,而其他技能及通用知识(MMLU)仅下降不足10%。代码已开源。
原文摘要 · Abstract (English)
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
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。