arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.13054cs.CLcs.AIcs.LG
收藏

LLM手术:大型语言模型中的高效知识遗忘与编辑

LLM Surgery: Efficient Knowledge Unlearning and Editing in Large Language Models

New York University(纽约大学);Capital One(第一资本金融公司)

Akshaj Kumar Veldanda, Shi-Xiong Zhang, Anirban Das, Supriyo Chakraborty, Stephen Rawls, Sambit Sahu, Milind Naphade

AI总结:

本文提出LLM Surgery框架,通过三组件目标函数(反向梯度、梯度下降和KL散度最小化)高效实现大型语言模型的知识遗忘与更新,在Llama2-7B上显著遗忘旧知识并提升新知识准确率20%。

摘要:

大型语言模型(LLMs)已经彻底改变了各个领域,然而其效用伴随着预训练期间嵌入的过时或有问题知识所带来的重大挑战。本文解决了修改LLMs以遗忘有问题的和过时的信息,同时高效整合新知识而无需从头重新训练的挑战。在此,我们提出LLM Surgery,一个通过优化三组件目标函数来高效修改LLM行为的框架,该目标函数:(1)在遗忘数据集(有问题的和过时的信息)上执行反向梯度,(2)在更新数据集(新的和更新的信息)上执行梯度下降,以及(3)在保留数据集(未改变文本的小子集)上最小化KL散度,确保预训练和修改后的模型输出之间的一致性。由于缺乏专门为我们的新任务量身定制的公开可用数据集,我们编制了一个新数据集和一个评估基准。使用Llama2-7B,我们证明LLM Surgery能够在遗忘集上实现显著的遗忘,在更新集上实现20%的准确率提升,并保持保留集上的性能。

英文摘要:

Large language models (LLMs) have revolutionized various domains, yet their utility comes with significant challenges related to outdated or problematic knowledge embedded during pretraining. This paper addresses the challenge of modifying LLMs to unlearn problematic and outdated information while efficiently integrating new knowledge without retraining from scratch. Here, we propose LLM Surgery, a framework to efficiently modify LLM behaviour by optimizing a three component objective function that: (1) Performs reverse gradient on unlearning dataset (problematic and outdated information), (2) Performs gradient descent on the update dataset (new and updated information), and (3) Minimizes the KL divergence on the retain dataset (small subset of unchanged text), ensuring alignment between pretrained and modified model outputs. Due to the lack of publicly available datasets specifically tailored for our novel task, we compiled a new dataset and an evaluation benchmark. Using Llama2-7B, we demonstrate that LLM Surgery can achieve significant forgetting on the unlearn set, a 20\% increase in accuracy on the update set, and maintain performance on the retain set.

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

↑