用牛顿法优化思路,高效删去大模型不良记忆而不伤原有能力
Gauss-Newton Unlearning for the LLM Era
- 基于K-FAC近似海森矩阵,仅用少量上坡牛顿步实现精准删忆
- 在保留集上输出变化小于现有方法,接近重新训练效果
- 更新可复用,支持后续训练中低成本持续维护删忆
标准的大语言模型训练可能生成部署时不可接受的输出。可通过大模型删忆方法降低此类输出概率。然而,删除特定数据(遗忘集)可能导致模型在其他需保留分布上的性能下降。为改善这一权衡,我们展示仅用遗忘集计算少量上坡高斯-牛顿步即可实现针对大语言模型的先进删忆方法。虽然高斯-牛顿步能适应非线性模型,但对大语言模型高效准确计算仍具挑战。因此,本方法关键依赖参数化海森矩阵近似,如克罗内克分解近似曲率(K-FAC)。我们将该组合方法称为K-FADE(K-FAC用于分布擦除)。在WMDP和ToFU基准上的评估表明,K-FADE有效抑制遗忘集输出,并在输出空间上逼近移除遗忘集后的重训练结果。关键在于,该方法对保留集输出的影响远小于此前方法。这是因为K-FADE将整个保留集上的输出约束转化为权重约束,使每一步对保留行为的改变最小化。此外,K-FADE计算的删忆更新可后续复用,支持模型后续训练中低成本维护删忆。
原文摘要 · Abstract (English)
Standard large language model training can create models that produce outputs their trainer deems unacceptable in deployment. The probability of these outputs can be reduced using methods such as LLM unlearning. However, unlearning a set of data (called the forget set) can degrade model performance on other distributions where the trainer wants to retain the model's behavior. To improve this trade-off, we demonstrate that using the forget set to compute only a few uphill Gauss-Newton steps provides a conceptually simple, state-of-the-art unlearning approach for LLMs. While Gauss-Newton steps adapt Newton's method to non-linear models, it is non-trivial to efficiently and accurately compute such steps for LLMs. Hence, our approach crucially relies on parametric Hessian approximations such as Kronecker-Factored Approximate Curvature (K-FAC). We call this combined approach K-FADE (K-FAC for Distribution Erasure). Our evaluation on the WMDP and ToFU benchmarks demonstrates that K-FADE suppresses outputs from the forget set and approximates, in output space, the results of retraining without the forget set. Critically, our method does this while altering the outputs on the retain set less than previous methods. This is because K-FADE transforms a constraint on the model's outputs across the entire retain set into a constraint on the model's weights, allowing the algorithm to minimally change the model's behavior on the retain set at each step. Moreover, the unlearning updates computed by K-FADE can be reapplied later if the model undergoes further training, allowing unlearning to be cheaply maintained.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。