arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.03299cs.LGcs.CLcs.CV
收藏

GUARD:通过角色扮演生成自然语言越狱提示以测试大语言模型的准则遵循性

GUARD: Role-playing to Generate Natural-language Jailbreakings to Test Guideline Adherence of Large Language Models

School of Information Sciences University of Illinois at Urbana-Champaign(信息科学学院伊利诺伊大学厄巴纳-香槟分校);Independent Researcher, Starc Institute(Starc研究所独立研究者);Computer Science and Engineering HKUST(HKUST计算机科学与工程学院);Computer Science Lapis Labs University of Illinois Urbana-Champaign(计算机科学Lapis Labs伊利诺伊大学厄巴纳-香槟分校);School of Information Sciences University of Illinois Urbana-Champaign(信息科学学院伊利诺伊大学厄巴纳-香槟分校)

Haibo Jin, Ruoxi Chen, Peiyan Zhang, Andy Zhou, Haohan Wang

AI总结:

本文提出GUARD角色扮演系统,通过知识图谱组织越狱特征并生成自然语言越狱提示,以测试大语言模型对安全准则的遵循性,并在多个开源和商业LLM及视觉语言模型上验证了有效性。

摘要:

发现能够绕过大型语言模型(LLMs)安全过滤器的“越狱”以及有害响应,促使社区实施安全措施。一项主要的安全措施是在发布前主动使用越狱提示测试LLMs。因此,此类测试需要一种能够大规模且高效地生成越狱提示的方法。在本文中,我们遵循一种新颖而直观的策略,以人类生成的方式生成越狱提示。我们提出了一种角色扮演系统,为用户LLMs分配四种不同的角色,以协作生成新的越狱提示。此外,我们收集现有的越狱提示,并利用聚类频率和逐句的语义模式将其拆分为不同的独立特征。我们将这些特征组织成一个知识图谱,使其更易于访问和检索。我们的不同角色系统将利用该知识图谱生成新的越狱提示,这些提示已被证明能有效诱导LLMs生成不道德或违反准则的响应。此外,我们还在系统中开创了一种设置,能够自动遵循政府发布的准则来生成越狱提示,以测试LLMs是否相应遵循这些准则。我们将该系统称为GUARD(通过自适应角色扮演诊断维护准则)。我们已在三个前沿的开源LLMs(Vicuna-13B、LongChat-7B和Llama-2-7B)以及一个广泛使用的商业LLM(ChatGPT)上实证验证了GUARD的有效性。此外,我们的工作还扩展到视觉语言模型领域(MiniGPT-v2和Gemini Vision Pro),展示了GUARD的通用性,并为跨多种模态开发更安全、更可靠的基于LLM的应用提供了有价值的见解。

英文摘要:

The discovery of "jailbreaks" to bypass safety filters of Large Language Models (LLMs) and harmful responses have encouraged the community to implement safety measures. One major safety measure is to proactively test the LLMs with jailbreaks prior to the release. Therefore, such testing will require a method that can generate jailbreaks massively and efficiently. In this paper, we follow a novel yet intuitive strategy to generate jailbreaks in the style of the human generation. We propose a role-playing system that assigns four different roles to the user LLMs to collaborate on new jailbreaks. Furthermore, we collect existing jailbreaks and split them into different independent characteristics using clustering frequency and semantic patterns sentence by sentence. We organize these characteristics into a knowledge graph, making them more accessible and easier to retrieve. Our system of different roles will leverage this knowledge graph to generate new jailbreaks, which have proved effective in inducing LLMs to generate unethical or guideline-violating responses. In addition, we also pioneer a setting in our system that will automatically follow the government-issued guidelines to generate jailbreaks to test whether LLMs follow the guidelines accordingly. We refer to our system as GUARD (Guideline Upholding through Adaptive Role-play Diagnostics). We have empirically validated the effectiveness of GUARD on three cutting-edge open-sourced LLMs (Vicuna-13B, LongChat-7B, and Llama-2-7B), as well as a widely-utilized commercial LLM (ChatGPT). Moreover, our work extends to the realm of vision language models (MiniGPT-v2 and Gemini Vision Pro), showcasing GUARD's versatility and contributing valuable insights for the development of safer, more reliable LLM-based applications across diverse modalities.

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

↑