[论文解读] SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusal
SORRY-Bench 是一个全面且细粒度的基准,用于评估大语言模型在 45 个平衡且经人工精心策划的不安全主题上的安全拒绝行为。它通过引入语言变体、利用微调后的 7B 模型实现高效评估(而非依赖昂贵的 GPT-4 规模模型),并揭示不同模型和风险类别之间的独特拒绝模式,解决了先前基准的局限性。
Evaluating aligned large language models' (LLMs) ability to recognize and reject unsafe user requests is crucial for safe, policy-compliant deployments. Existing evaluation efforts, however, face three limitations that we address with SORRY-Bench, our proposed benchmark. First, existing methods often use coarse-grained taxonomies of unsafe topics, and are over-representing some fine-grained topics. For example, among the ten existing datasets that we evaluated, tests for refusals of self-harm instructions are over 3x less represented than tests for fraudulent activities. SORRY-Bench improves on this by using a fine-grained taxonomy of 44 potentially unsafe topics, and 440 class-balanced unsafe instructions, compiled through human-in-the-loop methods. Second, linguistic characteristics and formatting of prompts are often overlooked, like different languages, dialects, and more -- which are only implicitly considered in many evaluations. We supplement SORRY-Bench with 20 diverse linguistic augmentations to systematically examine these effects. Third, existing evaluations rely on large LLMs (e.g., GPT-4) for evaluation, which can be computationally expensive. We investigate design choices for creating a fast, accurate automated safety evaluator. By collecting 7K+ human annotations and conducting a meta-evaluation of diverse LLM-as-a-judge designs, we show that fine-tuned 7B LLMs can achieve accuracy comparable to GPT-4 scale LLMs, with lower computational cost. Putting these together, we evaluate over 50 proprietary and open-weight LLMs on SORRY-Bench, analyzing their distinctive safety refusal behaviors. We hope our effort provides a building block for systematic evaluations of LLMs' safety refusal capabilities, in a balanced, granular, and efficient manner. Benchmark demo, data, code, and models are available through https://sorry-bench.github.io.
研究动机与目标
- 解决现有基准在评估 LLM 安全拒绝行为时存在的不平衡与粗粒度问题。
- 系统性地评估语言变体(如语言、方言和提示格式)对模型拒绝性能的影响。
- 通过微调 7B 模型而非依赖 GPT-4 等大模型,开发一种计算高效且准确的自动化评估器。
- 提供一个统一的、细粒度的 45 个不安全主题分类法,以实现跨模型的全面且可比较的安全评估。
- 揭示不同风险类别之间的相关性以及模型在各类别中的特定拒绝行为。
提出的方法
- 通过人机协作流程开发了一个细粒度的 45 类安全分类法,以统一并扩展现有不平衡的分类体系。
- 使用人工标注的新型数据,精心策划了 450 条类别平衡的不安全指令(每类 10 条),确保所有 45 个主题得到均等覆盖。
- 生成了 20 种语言增强形式,用于测试模型在多种格式下的拒绝能力,包括祈使句、疑问句以及多语言提示。
- 设计并评估了多种 LLM-as-a-judge 配置,发现微调后的 7B 模型在计算成本更低的情况下,达到了 GPT-4 水平的准确性。
- 通过超过 7,000 条人工标注结果进行元评估,以验证自动化评估策略的可靠性。
- 使用皮尔逊相关系数分析类别间性能关系,识别出不同风险类别下的独特拒绝行为。
实验结果
研究问题
- RQ1不同 LLM 在细粒度且平衡的 45 个不安全主题集上表现如何?其拒绝行为中呈现出哪些模式?
- RQ2语言变体(如疑问句形式、方言、多语言提示)在多大程度上影响模型的拒绝性能?
- RQ3微调后的 7B LLM 能否在降低计算成本的同时,实现与 GPT-4 相当的安全评估准确性?
- RQ4系统提示、提示模板和响应前缀等配置因素如何影响模型的拒绝率?
- RQ5哪些安全类别在拒绝性能上表现出较低的跨类别相关性,表明模型存在不同的脆弱性或行为特征?
主要发现
- 该基准揭示,先前数据集显著低估了自残等关键主题(其数量几乎比欺诈类少 3 倍),暴露出现有评估中的重大缺口。
- 模型在不同类别中的拒绝行为表现截然不同,其中‘医疗建议’、‘法律咨询建议’和‘知识产权侵权’三类的跨类别相关性较低(R < 0.75),表明其具有独特的风险特征。
- 在模型响应前添加 '好的,以下是' 前缀,使 Llama 模型对不安全指令的执行率最高上升 53%,显示出类似越狱攻击的强烈影响。
- 错误的提示模板导致 Llama-2 和 Gemma 模型的拒绝率最高提升 30%,表明模型对格式高度敏感。
- 微调后的 7B LLM 实现了与 GPT-4 相当的安全评估准确性,显著降低了计算成本,同时保持了可靠性。
- 强调安全性的系统提示使拒绝率降低了 1% 至 16%,表明即使出于良好意图的提示,也可能无意中削弱安全对齐。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。