arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.02238cs.CLcs.AI
收藏

《谁是哈利·波特?大语言模型中的近似遗忘》

Who's Harry Potter? Approximate Unlearning in LLMs

Microsoft(微软)

Ronen Eldan, Mark Russinovich

AI总结:

针对大语言模型训练语料含版权内容的问题,提出含三模块的近似遗忘技术,仅1GPU小时微调即可让Llama2-7b遗忘哈利·波特相关内容且通用性能几乎不受影响,为生成式LLM遗忘研究提供首个有效方案。

摘要:

大语言模型(LLM)基于海量互联网语料训练,而这些语料往往包含受版权保护的内容,这给模型的开发者、使用者以及原作者和出版方都带来了法律与伦理层面的挑战。本文提出了一种全新的技术,无需从头重新训练,即可让大语言模型遗忘训练数据中的某一子集内容。\n我们以从Llama2-7b模型(Meta近期开源的生成式语言模型)中遗忘《哈利·波特》系列书籍内容为任务,对所提技术进行了评估。该模型的预训练耗时超过18.4万GPU小时,而实验结果显示,仅需约1GPU小时的微调,我们就能有效消除模型生成或回忆与哈利·波特相关内容的能力,同时其在Winogrande、Hellaswag、arc、boolq和piqa等通用基准测试上的性能几乎不受影响。我们已将微调后的模型在HuggingFace上公开,供社区评估。据我们所知,这是首篇提出有效生成式语言模型遗忘技术的论文。\n我们的技术包含三个核心组成部分:第一,使用一个在目标数据上进一步训练得到的增强模型,通过将其logits与基线模型的logits进行对比,识别出与遗忘目标关联度最高的token。第二,将目标数据中的特有表达替换为通用对应表达,并利用模型自身的预测为每个token生成替代标签,这些标签旨在近似未在目标数据上训练过的模型的下一个token预测结果。第三,基于这些替代标签对模型进行微调,当模型接收到对应原文的上下文提示时,就能有效将原文内容从模型记忆中清除。

英文摘要:

Large language models (LLMs) are trained on massive internet corpora that often contain copyrighted content. This poses legal and ethical challenges for the developers and users of these models, as well as the original authors and publishers. In this paper, we propose a novel technique for unlearning a subset of the training data from a LLM, without having to retrain it from scratch. We evaluate our technique on the task of unlearning the Harry Potter books from the Llama2-7b model (a generative language model recently open-sourced by Meta). While the model took over 184K GPU-hours to pretrain, we show that in about 1 GPU hour of finetuning, we effectively erase the model's ability to generate or recall Harry Potter-related content, while its performance on common benchmarks (such as Winogrande, Hellaswag, arc, boolq and piqa) remains almost unaffected. We make our fine-tuned model publicly available on HuggingFace for community evaluation. To the best of our knowledge, this is the first paper to present an effective technique for unlearning in generative language models. Our technique consists of three main components: First, we use a reinforced model that is further trained on the target data to identify the tokens that are most related to the unlearning target, by comparing its logits with those of a baseline model. Second, we replace idiosyncratic expressions in the target data with generic counterparts, and leverage the model's own predictions to generate alternative labels for every token. These labels aim to approximate the next-token predictions of a model that has not been trained on the target data. Third, we finetune the model on these alternative labels, which effectively erases the original text from the model's memory whenever it is prompted with its context.

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

↑