arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.10668cs.CRcs.AI
收藏

通过不安全解码路径生成探测大型语言模型的安全响应边界

Probing the Safety Response Boundary of Large Language Models via Unsafe Decoding Path Generation

Tsinghua University(清华大学)

Haoyu Wang, Bingzhe Wu, Yatao Bian, Yongzhe Chang, Xueqian Wang, Peilin Zhao

AI总结:

本文提出使用代价价值模型作为检测器和攻击器,通过影响LLM解码过程生成有害内容,揭示看似安全的LLM仍存在可被利用的隐藏漏洞,并命名此策略为越狱价值解码(JVD)。

摘要:

大型语言模型(LLMs)是隐性的麻烦制造者。尽管它们能提供有价值的见解并协助解决问题,但也可能成为恶意活动的资源。实施安全对齐可以降低LLMs生成有害响应的风险。我们认为:即使LLM看似成功拦截了有害查询,仍可能存在如同定时炸弹般的隐藏漏洞。为识别这些潜在弱点,我们提出将代价价值模型同时用作检测器和攻击器。通过在外部或自生成的有害数据集上训练,代价价值模型能在解码过程中成功影响原始安全的LLM输出有毒内容。例如,LLaMA-2-chat 7B输出了39.18%的具体有毒内容,且仅有22.16%的拒绝(不带任何有害后缀)。这些潜在弱点随后可通过提示优化(如图像上的软提示)被利用。我们将此解码策略命名为:越狱价值解码(JVD),强调看似安全的LLMs可能并不如我们最初认为的那样安全。它们可被用于收集有害数据或发动隐蔽攻击。

英文摘要:

Large Language Models (LLMs) are implicit troublemakers. While they provide valuable insights and assist in problem-solving, they can also potentially serve as a resource for malicious activities. Implementing safety alignment could mitigate the risk of LLMs generating harmful responses. We argue that: even when an LLM appears to successfully block harmful queries, there may still be hidden vulnerabilities that could act as ticking time bombs. To identify these underlying weaknesses, we propose to use a cost value model as both a detector and an attacker. Trained on external or self-generated harmful datasets, the cost value model could successfully influence the original safe LLM to output toxic content in decoding process. For instance, LLaMA-2-chat 7B outputs 39.18% concrete toxic content, along with only 22.16% refusals without any harmful suffixes. These potential weaknesses can then be exploited via prompt optimization such as soft prompts on images. We name this decoding strategy: Jailbreak Value Decoding (JVD), emphasizing that seemingly secure LLMs may not be as safe as we initially believe. They could be used to gather harmful data or launch covert attacks.

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

↑