Skip to main content
QUICK REVIEW

[论文解读] Negative Preference Optimization: From Catastrophic Collapse to Effective Unlearning

Ruiqi Zhang, Licong Lin|arXiv (Cornell University)|Apr 8, 2024
Machine Learning and Data ClassificationComputer Science被引用 3
一句话总结

本文提出了一种名为负向偏好优化(Negative Preference Optimization, NPO)的新颖遗忘方法,用于大语言模型,通过仅使用负样本的偏好优化框架,缓解了基于梯度上升方法中常见的灾难性崩溃问题。NPO在TOFU基准上实现了最先进性能,能够有效遗忘高达50%的训练数据,而此前的方法甚至在10%的遗忘率下即告失败。

ABSTRACT

Large Language Models (LLMs) often memorize sensitive, private, or copyrighted data during pre-training. LLM unlearning aims to eliminate the influence of undesirable data from the pre-trained model while preserving the model's utilities on other tasks. Several practical methods have recently been proposed for LLM unlearning, mostly based on gradient ascent (GA) on the loss of undesirable data. However, on certain unlearning tasks, these methods either fail to effectively unlearn the target data or suffer from catastrophic collapse -- a drastic degradation of the model's utilities. In this paper, we propose Negative Preference Optimization (NPO), a simple alignment-inspired method that could efficiently and effectively unlearn a target dataset. We theoretically show that the progression toward catastrophic collapse by minimizing the NPO loss is exponentially slower than GA. Through experiments on synthetic data and the benchmark TOFU dataset, we demonstrate that NPO-based methods achieve a better balance between unlearning the undesirable data and maintaining the model's utilities. We also observe that NPO-based methods generate more sensible outputs than GA-based methods, whose outputs are often gibberish. Remarkably, on TOFU, NPO-based methods are the first to achieve reasonable unlearning results in forgetting 50% (or more) of the training data, whereas existing methods already struggle with forgetting 10% of training data.

研究动机与目标

  • 解决基于梯度上升的大语言模型遗忘方法中常见的灾难性崩溃问题,即在遗忘过程中模型性能迅速下降。
  • 开发一种更稳定且高效的遗忘目标,以在移除不良训练数据影响的同时保持模型性能。
  • 在具有挑战性的基准上实现有意义的遗忘性能,例如遗忘高达50%的训练数据,而现有方法在该指标下已失效。
  • 为NPO相较于梯度上升及其他基线方法在遗忘质量与模型性能之间的平衡提供理论与实证支持。

提出的方法

  • 提出负向偏好优化(NPO),一种受直接偏好优化(DPO)启发的损失函数,但仅使用负向响应(如“我不知道”)进行遗忘。
  • 将NPO形式化为最小化在遗忘数据集上错误或无知响应的期望负对数似然,同时基于模型置信度进行自适应加权。
  • 理论证明,与梯度上升相比,NPO的灾难性崩溃发散速度呈指数级更慢。
  • 将NPO与保留损失(在剩余数据上的交叉熵损失)相结合,并可选地加入KL散度正则化以保持泛化能力。
  • 采用温度缩放形式,使得在高温极限下NPO退化为梯度上升,确保与先前方法的一致性。
  • 使用标准微调方法实现NPO,采用AdamW优化器、1e-5的学习率和10个训练周期,在A100 GPU上按照TOFU基准设置进行训练。

实验结果

研究问题

  • RQ1为何基于梯度上升的遗忘方法在遗忘过程中会出现灾难性崩溃?
  • RQ2仅使用负样本的基于偏好优化的方法能否在不降低模型性能的前提下有效实现数据遗忘?
  • RQ3在遗忘质量与模型性能方面,NPO相较于梯度上升、IDK-based、DPO和KTO方法表现如何?
  • RQ4当遗忘大量训练数据(如50%)时,NPO能否实现非平凡的遗忘性能?
  • RQ5NPO相较于梯度上升为何具有更慢的灾难性崩溃演化速率?

主要发现

  • 基于NPO的方法是首个在遗忘50%训练数据时于TOFU基准上实现合理遗忘效果的方法,而现有方法在遗忘10%时即已失效。
  • 在Forget10任务中,NPO方法达到0.92的ROUGE召回率遗忘质量,同时保持0.89的性能得分,优于梯度上升方法,后者表现出显著的性能下降。
  • NPO展现出更稳定的训练动态,避免了梯度上升方法中常见的快速性能崩溃。
  • 在高遗忘压力下,NPO生成的输出比梯度上升方法产生的混乱无意义输出更具连贯性与合理性。
  • 理论分析表明,NPO下向灾难性崩溃的发散速率相比梯度上升呈指数级更慢。
  • 基于NPO的方法在TOFU基准上实现了最先进性能,展示了在所有遗忘比例(1%、5%、10%、20%、30%、50%)下,遗忘质量与模型性能之间更优的权衡。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。