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

指令微调过程中的语言模型投毒攻击

Poisoning Language Models During Instruction Tuning

UC Berkeley(加州大学伯克利分校)

Alexander Wan, Eric Wallace, Sheng Shen, Dan Klein

AI总结:

本研究揭示指令微调语言模型存在投毒攻击漏洞,攻击者通过少量投毒示例即可触发模型异常输出,且大模型更脆弱,现有防御措施效果有限。

摘要:

经过指令微调的语言模型(如ChatGPT、FLAN和InstructGPT)是在包含用户提交示例的数据集上进行微调的,例如FLAN聚合了大量开源数据集,OpenAI则利用用户在浏览器游乐场提交的示例。本研究表明,攻击者可以向这些数据集投送投毒示例,从而在输入中出现目标触发短语时操控模型的预测结果。例如,当下游用户输入提及“Joe Biden”时,被投毒的语言模型将难以对该输入完成分类、摘要、编辑或翻译任务。为构造这些投毒示例,我们使用词袋近似法对语言模型的输入和输出进行优化。我们在开源指令微调语言模型上评估了该方法:仅需100个投毒示例,就能让任意短语产生一致的负面极性,或在数百个留出任务中引发退化输出。令人担忧的是,我们还发现更大的语言模型对投毒攻击的脆弱性更高,而基于数据过滤或降低模型容量的防御措施仅能提供中等程度的保护,同时还会降低测试准确率。

英文摘要:

Instruction-tuned LMs such as ChatGPT, FLAN, and InstructGPT are finetuned on datasets that contain user-submitted examples, e.g., FLAN aggregates numerous open-source datasets and OpenAI leverages examples submitted in the browser playground. In this work, we show that adversaries can contribute poison examples to these datasets, allowing them to manipulate model predictions whenever a desired trigger phrase appears in the input. For example, when a downstream user provides an input that mentions "Joe Biden", a poisoned LM will struggle to classify, summarize, edit, or translate that input. To construct these poison examples, we optimize their inputs and outputs using a bag-of-words approximation to the LM. We evaluate our method on open-source instruction-tuned LMs. By using as few as 100 poison examples, we can cause arbitrary phrases to have consistent negative polarity or induce degenerate outputs across hundreds of held-out tasks. Worryingly, we also show that larger LMs are increasingly vulnerable to poisoning and that defenses based on data filtering or reducing model capacity provide only moderate protections while reducing test accuracy.

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

↑