arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.10058cs.CL
收藏

通过机器遗忘实现更安全的大语言模型

Towards Safer Large Language Models through Machine Unlearning

University of Notre Dame(圣母大学);University of Pennsylvania(宾夕法尼亚大学)

Zheyuan Liu, Guangyao Dou, Zhaoxuan Tan, Yijun Tian, Meng Jiang

AI总结:

本文提出选择性知识否定遗忘框架 SKU,通过先获取再否定有害知识的两阶段方法,在消除大语言模型有害输出的同时保持其在正常提示上的效用。

摘要:

大语言模型(LLMs)的快速发展展示了其在各个领域的巨大潜力,这归因于其广泛的预训练知识和卓越的泛化能力。然而,当面对有问题的提示时,LLMs 在生成有害内容方面常常遇到挑战。为了解决这一问题,现有工作尝试实现一种基于梯度上升的方法来防止 LLMs 产生有害输出。虽然这些方法可能有效,但它们经常影响模型在响应正常提示时的效用。为了弥补这一差距,我们引入了选择性知识否定遗忘(Selective Knowledge negation Unlearning,SKU),这是一种新颖的 LLM 遗忘框架,旨在消除有害知识,同时保留在正常提示上的效用。具体而言,SKU 由两个阶段组成:有害知识获取阶段和知识否定阶段。第一阶段旨在识别和获取模型内部的有害知识,而第二阶段专门用于移除这些知识。SKU 选择性地隔离并移除模型参数中的有害知识,确保模型在正常提示上的性能保持稳健。我们在各种 LLM 架构上进行的实验表明,SKU 在移除有害信息和保留效用之间找到了一个良好的平衡点。

英文摘要:

The rapid advancement of Large Language Models (LLMs) has demonstrated their vast potential across various domains, attributed to their extensive pretraining knowledge and exceptional generalizability. However, LLMs often encounter challenges in generating harmful content when faced with problematic prompts. To address this problem, existing work attempted to implement a gradient ascent based approach to prevent LLMs from producing harmful output. While these methods can be effective, they frequently impact the model utility in responding to normal prompts. To address this gap, we introduce Selective Knowledge negation Unlearning (SKU), a novel unlearning framework for LLMs, designed to eliminate harmful knowledge while preserving utility on normal prompts. Specifically, SKU is consisted of two stages: harmful knowledge acquisition stage and knowledge negation stage. The first stage aims to identify and acquire harmful knowledge within the model, whereas the second is dedicated to remove this knowledge. SKU selectively isolates and removes harmful knowledge in model parameters, ensuring the model's performance remains robust on normal prompts. Our experiments conducted across various LLM architectures demonstrate that SKU identifies a good balance point between removing harmful information and preserving utility.

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

↑