arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2405.12604cs.CLcs.AI
收藏

微小改进激发韧性:面向高效前缀模型的大语言模型红队对抗防御

Tiny Refinements Elicit Resilience: Toward Efficient Prefix-Model Against LLM Red-Teaming

University of Liverpool(利物浦大学);University of Manchester(曼彻斯特大学);Southeast University(东南大学)

Jiaxu Liu, Xiangyu Yin, Sihao Wu, Jianhong Wang, Meng Fang, Xinping Yi, Xiaowei Huang

AI总结:

针对大语言模型红队攻击下的安全防御问题,提出即插即用的前缀哨兵模型,通过PPO交错训练和价值头共享机制优化,仅用少量额外token即可有效降低多类大模型的毒性输出。

摘要:

随着针对大语言模型(LLM)的红队策略不断涌现,现有文献在提升LLM防御策略的安全性与鲁棒性方面的不足日益凸显。本文提出一种基于LLM的sentinel(哨兵)模型,作为即插即用的前缀模块,仅需添加不到30个额外token即可重构输入提示,有效降低目标LLM响应的毒性。该哨兵模型天然解决了大目标模型微调存在的参数效率低下、模型可访问性有限的问题。我们采用近端策略优化(PPO)的交错训练方案,动态优化红队模型与哨兵模型,同时引入受多智能体集中式评论家启发的价值头共享机制,以处理智能体间的复杂相互作用。我们在文本到文本、文本到图像任务上开展了大量实验,结果表明该方法能有效缓解毒性输出,即便面对Llama-2、GPT-3.5和Stable-Diffusion这类更大规模的模型也同样有效,凸显了该框架在各类应用中提升安全性与鲁棒性的潜力。

英文摘要:

With the proliferation of red-teaming strategies for Large Language Models (LLMs), the deficiency in the literature about improving the safety and robustness of LLM defense strategies is becoming increasingly pronounced. This paper introduces the LLM-based \textbf{sentinel} model as a plug-and-play prefix module designed to reconstruct the input prompt with just a few ($<30$) additional tokens, effectively reducing toxicity in responses from target LLMs. The sentinel model naturally overcomes the \textit{parameter inefficiency} and \textit{limited model accessibility} for fine-tuning large target models. We employ an interleaved training regimen using Proximal Policy Optimization (PPO) to optimize both red team and sentinel models dynamically, incorporating a value head-sharing mechanism inspired by the multi-agent centralized critic to manage the complex interplay between agents. Our extensive experiments across text-to-text and text-to-image demonstrate the effectiveness of our approach in mitigating toxic outputs, even when dealing with larger models like \texttt{Llama-2}, \texttt{GPT-3.5} and \texttt{Stable-Diffusion}, highlighting the potential of our framework in enhancing safety and robustness in various applications.

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

↑