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

大型语言模型中对不安全示例的学习与遗忘

Learning and Forgetting Unsafe Examples in Large Language Models

University of Massachusetts Amherst(马萨诸塞大学阿默斯特分校);Columbia University(哥伦比亚大学);Google(谷歌公司);Stanford University(斯坦福大学);New York University(纽约大学)

Jiachen Zhao, Zhun Deng, David Madras, James Zou, Mengye Ren

AI总结:

本文研究LLM在含不安全内容的第三方微调数据中的学习与遗忘行为,提出基于遗忘信号强度的ForgetFilter过滤算法,在保证下游任务性能的同时有效抑制不安全内容吸收,优于重放和道德自我纠正策略。

摘要:

随着公开发布的大型语言模型(LLMs)数量不断增加,迫切需要理解这些模型从第三方自定义微调数据中学习所带来的安全影响。我们探索了在包含不安全内容的噪声自定义数据上微调的LLMs的行为,这些数据以包含偏见、毒性和有害性的数据集为代表,发现虽然对齐后的LLMs能够轻易学习这些不安全内容,但随后在更安全的内容上进行微调时,它们也倾向于比其他示例更显著地遗忘这些内容。受遗忘差异的启发,我们引入了“ForgetFilter”算法,该算法根据模型对数据的遗忘信号强度来过滤不安全数据。我们证明,与顺序安全微调不同,ForgetFilter算法在自定义微调中确保安全性,同时不损害下游任务性能。在抑制LLMs在自定义微调期间吸收不安全内容的能力方面,ForgetFilter优于重放和道德自我纠正等替代策略,例如在毒性评分上比不应用任何安全措施低75%,比使用自我纠正低62%。

英文摘要:

As the number of large language models (LLMs) released to the public grows, there is a pressing need to understand the safety implications associated with these models learning from third-party custom finetuning data. We explore the behavior of LLMs finetuned on noisy custom data containing unsafe content, represented by datasets that contain biases, toxicity, and harmfulness, finding that while aligned LLMs can readily learn this unsafe content, they also tend to forget it more significantly than other examples when subsequently finetuned on safer content. Drawing inspiration from the discrepancies in forgetting, we introduce the "ForgetFilter" algorithm, which filters unsafe data based on how strong the model's forgetting signal is for that data. We demonstrate that the ForgetFilter algorithm ensures safety in customized finetuning without compromising downstream task performance, unlike sequential safety finetuning. ForgetFilter outperforms alternative strategies like replay and moral self-correction in curbing LLMs' ability to assimilate unsafe content during custom finetuning, e.g. 75% lower than not applying any safety measures and 62% lower than using self-correction in toxicity score.

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

↑