arXiv:2410.13334cs.CLcs.AI2024-10中稿 · AAAI

发现大模型伦理偏见可被利用发动越狱攻击,且效果差异达20%。

BiasJailbreak:Analyzing Ethical Biases and Jailbreak Vulnerabilities in Large Language Models

  • 让模型自动生成偏见关键词以触发越狱
  • 非二元与顺性别词攻击成功率差20%,黑白肤色词差16%
  • 提出轻量级防御方案,无需额外推理开销

尽管大型语言模型在各类任务中表现优异,但仍存在安全风险,如‘越狱’攻击——恶意输入可诱使模型生成有害内容,绕过安全对齐机制。本文深入分析了大模型中的伦理偏见,并揭示这些偏见可能被用于越狱攻击。值得注意的是,在GPT-4o模型中,即使提示词其余部分完全相同,使用非二元与顺性别关键词的越狱成功率相差20%,白人与黑人关键词之间相差16%。我们提出‘BiasJailbreak’概念,展示由安全诱导偏见带来的内在风险。该方法通过让目标模型自身生成偏见关键词,进而生成有害输出。此外,我们提出高效防御方法BiasDefense,通过在生成前注入防御提示来阻止越狱尝试。该方法相较需额外推理成本的防护模型(如Llama-Guard)更具优势。研究强调,伦理偏见可能导致不安全输出,建议从更安全、更无偏的方向改进模型。为促进后续研究,我们开源了BiasJailbreak的代码与工具,供社区理解并缓解大模型中的安全诱导偏见。

原文摘要 · Abstract (English)

Although large language models (LLMs) demonstrate impressive proficiency in various tasks, they present potential safety risks, such as `jailbreaks', where malicious inputs can coerce LLMs into generating harmful content bypassing safety alignments. In this paper, we delve into the ethical biases in LLMs and examine how those biases could be exploited for jailbreaks. Notably, these biases result in a jailbreaking success rate in GPT-4o models that differs by 20\% between non-binary and cisgender keywords and by 16\% between white and black keywords, even when the other parts of the prompts are identical. We introduce the concept of BiasJailbreak, highlighting the inherent risks posed by these safety-induced biases. BiasJailbreak generates biased keywords automatically by asking the target LLM itself, and utilizes the keywords to generate harmful output. Additionally, we propose an efficient defense method BiasDefense, which prevents jailbreak attempts by injecting defense prompts prior to generation. BiasDefense stands as an appealing alternative to Guard Models, such as Llama-Guard, that require additional inference cost after text generation. Our findings emphasize that ethical biases in LLMs can actually lead to generating unsafe output, and suggest a method to make the LLMs more secure and unbiased. To enable further research and improvements, we open-source our code and artifacts of BiasJailbreak, providing the community with tools to better understand and mitigate safety-induced biases in LLMs.

越狱攻击伦理偏见安全防御LLM

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。