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

面向大语言模型的好奇心驱动红队测试

Curiosity-driven Red-teaming for Large Language Models

Massachusetts Institute of Technology(麻省理工学院);MIT-IBM Watson AI Lab(麻省理工学院-IBM沃森人工智能实验室)

Zhang-Wei Hong, Idan Shenfeld, Tsun-Hsuan Wang, Yung-Sung Chuang, Aldo Pareja, James Glass, Akash Srivastava, Pulkit Agrawal

AI总结:

针对强化学习红队方法生成有效攻击提示覆盖不足的问题,本文引入好奇心驱动探索,提出 CRT,在保持或提升攻击有效性的同时扩大测试用例覆盖,并成功诱发经人类偏好微调的 LLaMA2 产生有毒回复。

摘要:

大语言模型(LLM)在许多自然语言应用中具有巨大潜力,但存在生成不正确或有毒内容的风险。为了探究 LLM 何时会生成不良内容,当前范式是招募由人类测试人员组成的红队,设计输入提示(即测试用例),以诱发 LLM 产生不受欢迎的回复。然而,仅依赖人类测试人员成本高昂且耗时。近期工作通过用强化学习(RL)训练一个独立的红队 LLM 来自动化红队测试,使其生成测试用例,以最大化诱发目标 LLM 不良回复的概率。但是,当前 RL 方法只能生成少量有效测试用例,导致对可诱发目标 LLM 不良回复的提示范围覆盖较低。为克服这一局限,我们将提高生成测试用例覆盖率的问题,与经过充分研究、以新颖性为优化目标的好奇心驱动探索方法联系起来。我们提出的好奇心驱动红队测试(curiosity-driven red teaming,CRT)方法实现了更高的测试用例覆盖率,同时与现有方法相比保持或提高了其有效性。我们的方法 CRT 成功诱发了 LLaMA2 模型的有毒回复,而该模型已经过大量人类偏好微调以避免有毒输出。代码可在 https://github.com/Improbable-AI/curiosity_redteam 获取。

英文摘要:

Large language models (LLMs) hold great potential for many natural language applications but risk generating incorrect or toxic content. To probe when an LLM generates unwanted content, the current paradigm is to recruit a \textit{red team} of human testers to design input prompts (i.e., test cases) that elicit undesirable responses from LLMs. However, relying solely on human testers is expensive and time-consuming. Recent works automate red teaming by training a separate red team LLM with reinforcement learning (RL) to generate test cases that maximize the chance of eliciting undesirable responses from the target LLM. However, current RL methods are only able to generate a small number of effective test cases resulting in a low coverage of the span of prompts that elicit undesirable responses from the target LLM. To overcome this limitation, we draw a connection between the problem of increasing the coverage of generated test cases and the well-studied approach of curiosity-driven exploration that optimizes for novelty. Our method of curiosity-driven red teaming (CRT) achieves greater coverage of test cases while mantaining or increasing their effectiveness compared to existing methods. Our method, CRT successfully provokes toxic responses from LLaMA2 model that has been heavily fine-tuned using human preferences to avoid toxic outputs. Code is available at \url{https://github.com/Improbable-AI/curiosity_redteam}

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

↑