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

面向大语言模型遗忘的软提示方法

Soft Prompting for Unlearning in Large Language Models

University of Arkansas(阿肯色大学)

Karuna Bhaila, Minh-Hao Van, Xintao Wu

AI总结:

本文提出SPUL框架,通过学习可附加到查询的软提示令牌,在不更新LLM参数的情况下实现训练数据子集遗忘,并在文本分类与问答中改善效用与遗忘的权衡。

摘要:

大语言模型(LLM)的广泛普及,部分源于其执行上下文学习的独特能力,但这也揭示了在部署这些预训练模型时伦理与安全考量的重要性。在本研究中,受数据保护法规推动,我们专注于研究面向LLM的机器遗忘。与日益增多的通过微调方法实现遗忘的文献不同,我们聚焦于一种相对轻量的替代方案,即软提示,用以实现对训练数据子集的遗忘。借助旨在强制遗忘并保留效用的损失函数,我们的框架SPUL(Soft Prompting for Unlearning,面向遗忘的软提示)学习可附加到任意查询之后的提示令牌,从而在推理时诱导模型遗忘特定样本,而无需更新LLM参数。我们对所提方法进行了严格评估,结果表明,在使用LLM进行文本分类和问答的场景中,SPUL能够显著改善效用与遗忘之间的权衡。我们进一步使用多个LLM验证了该方法,以凸显框架的可扩展性,并就超参数选择以及遗忘数据规模的影响提供了详细洞见。我们的实现可在https://github.com/karuna-bhaila/llm_unlearning获取。

英文摘要:

The widespread popularity of Large Language Models (LLMs), partly due to their unique ability to perform in-context learning, has also brought to light the importance of ethical and safety considerations when deploying these pre-trained models. In this work, we focus on investigating machine unlearning for LLMs motivated by data protection regulations. In contrast to the growing literature on fine-tuning methods to achieve unlearning, we focus on a comparatively lightweight alternative called soft prompting to realize the unlearning of a subset of training data. With losses designed to enforce forgetting as well as utility preservation, our framework \textbf{S}oft \textbf{P}rompting for \textbf{U}n\textbf{l}earning (SPUL) learns prompt tokens that can be appended to an arbitrary query to induce unlearning of specific examples at inference time without updating LLM parameters. We conduct a rigorous evaluation of the proposed method and our results indicate that SPUL can significantly improve the trade-off between utility and forgetting in the context of text classification and question answering with LLMs. We further validate our method using multiple LLMs to highlight the scalability of our framework and provide detailed insights into the choice of hyperparameters and the influence of the size of unlearning data. Our implementation is available at \url{https://github.com/karuna-bhaila/llm_unlearning}.

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

↑