Skip to main content
QUICK REVIEW

[论文解读] XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Models

Paul Röttger, Hannah Rose Kirk|arXiv (Cornell University)|Aug 2, 2023
Software Engineering Research被引用 6
一句话总结

XSTest 是一个包含 250 个安全提示和 200 个不安全提示的诊断测试套件,旨在检测大型语言模型中过度安全行为的问题——即模型因与有害提示在词汇上相似而拒绝无害查询。研究发现,Llama2 表现出严重的过度安全行为,而 GPT-4 在帮助性与无害性之间保持了最佳平衡,凸显了对安全触发词过度拟合的风险。

ABSTRACT

Without proper safeguards, large language models will readily follow malicious instructions and generate toxic content. This risk motivates safety efforts such as red-teaming and large-scale feedback learning, which aim to make models both helpful and harmless. However, there is a tension between these two objectives, since harmlessness requires models to refuse to comply with unsafe prompts, and thus not be helpful. Recent anecdotal evidence suggests that some models may have struck a poor balance, so that even clearly safe prompts are refused if they use similar language to unsafe prompts or mention sensitive topics. In this paper, we introduce a new test suite called XSTest to identify such eXaggerated Safety behaviours in a systematic way. XSTest comprises 250 safe prompts across ten prompt types that well-calibrated models should not refuse to comply with, and 200 unsafe prompts as contrasts that models, for most applications, should refuse. We describe XSTest's creation and composition, and then use the test suite to highlight systematic failure modes in state-of-the-art language models as well as more general challenges in building safer language models.

研究动机与目标

  • 识别大型语言模型中系统性失败的问题,即安全提示因与有害提示在词汇上相似而被错误拒绝。
  • 解决过度安全这一未被充分探索的问题,即模型为应对安全触发词而过度反应,导致帮助性受损。
  • 开发一个标准化的手动构建的测试套件,用于诊断最先进 LLM 中的此类行为。
  • 评估系统提示和防护机制对模型安全行为的影响,揭示其不一致且出乎意料的副作用。

提出的方法

  • XSTest 包含 250 个安全提示,涵盖十种不同类型的提示,每种均设计为明确安全,不应触发拒绝行为。
  • 同时包含一个对比用的 200 个不安全提示集合,以验证模型是否能正确拒绝有害请求。
  • 该测试套件用于评估三种最先进 LLM:Llama2(带与不带系统提示)、Mistral 7B(带与不带防护提示)以及 GPT-4。
  • 对模型在安全提示上的拒绝行为进行分析,拒绝被定义为对明显合法查询的不合规响应。
  • 评估重点在于检测词汇过度拟合现象,即模型对与不安全内容相关的特定词语或短语产生反应。
  • 标注人员评估响应是否拒绝,结果在不同模型之间进行比较,以识别系统性失败模式。
Figure 1: An example of exaggerated safety behaviour by the original llama-2-70b-chat-hf (Touvron et al., 2023 ) , in response to a safe prompt from XSTest .
Figure 1: An example of exaggerated safety behaviour by the original llama-2-70b-chat-hf (Touvron et al., 2023 ) , in response to a safe prompt from XSTest .

实验结果

研究问题

  • RQ1最先进 LLM 在多大程度上会拒绝与不安全提示在语言上相似的安全提示,从而表明存在过度安全行为?
  • RQ2系统提示和防护机制如何影响 LLM 帮助性与无害性之间的平衡?
  • RQ3像 XSTest 这样的标准化测试套件能否可靠地检测并量化不同模型中的过度安全行为?
  • RQ4为何某些模型(如 Llama2)尽管整体校准良好,仍会严重拒绝安全提示?
  • RQ5包含与隐私相关的提示如何影响模型的拒绝行为?这揭示了模型对个人数据的何种敏感性?

主要发现

  • Llama2 表现出严重的过度安全行为,拒绝了 28% 的安全提示,尤其在涉及敏感话题或与有害内容词汇相似的提示上。
  • 移除 Llama2 原始系统提示可降低拒绝率,但无法消除过度安全行为,表明其存在持续的过度拟合。
  • Mistral 7B 在原始状态下不会出现过度安全行为,但也未能拒绝高度不安全的提示,表明其无害性不足。
  • 为 Mistral 添加防护提示可减少不安全响应,但同时增加了对安全提示的拒绝,表明安全目标之间存在权衡。
  • GPT-4 实现了最佳平衡,仅拒绝了一例不安全提示,几乎全部安全提示均被遵守,仅在与隐私相关的提示上有所例外。
  • 本研究将词汇过度拟合确定为过度安全的核心原因,即模型对特定关键词产生反应,而非基于上下文意图。
Figure 2: Type of response (%) on safe prompts (left) and unsafe prompts (right) for the models described in § 4.1 . We differentiate between full refusal and partial refusal and full compliance , as explained in § 4.2 . Well-calibrated models should comply with safe prompts and, for most practical
Figure 2: Type of response (%) on safe prompts (left) and unsafe prompts (right) for the models described in § 4.1 . We differentiate between full refusal and partial refusal and full compliance , as explained in § 4.2 . Well-calibrated models should comply with safe prompts and, for most practical

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。