[论文解读] SafetyBench: Evaluating the Safety of Large Language Models
SafetyBench 引入了一个全面的、多语言的安全基准,涵盖 11,435 道多项选择题,分布在 7 个安全类别,用以评估 LLMs,揭示 GPT-4 的领先安全性能但仍存在显著缺口。
With the rapid development of Large Language Models (LLMs), increasing attention has been paid to their safety concerns. Consequently, evaluating the safety of LLMs has become an essential task for facilitating the broad applications of LLMs. Nevertheless, the absence of comprehensive safety evaluation benchmarks poses a significant impediment to effectively assess and enhance the safety of LLMs. In this work, we present SafetyBench, a comprehensive benchmark for evaluating the safety of LLMs, which comprises 11,435 diverse multiple choice questions spanning across 7 distinct categories of safety concerns. Notably, SafetyBench also incorporates both Chinese and English data, facilitating the evaluation in both languages. Our extensive tests over 25 popular Chinese and English LLMs in both zero-shot and few-shot settings reveal a substantial performance advantage for GPT-4 over its counterparts, and there is still significant room for improving the safety of current LLMs. We also demonstrate that the measured safety understanding abilities in SafetyBench are correlated with safety generation abilities. Data and evaluation guidelines are available at \url{https://github.com/thu-coai/SafetyBench}{https://github.com/thu-coai/SafetyBench}. Submission entrance and leaderboard are available at \url{https://llmbench.ai/safety}{https://llmbench.ai/safety}.
研究动机与目标
- 激发了在多样化安全关注点下为 LLMs 构建一个全面、可扩展的安全评测基准的需求。
- 提出一种多语言(中文和英文)基于多项选择题的评估方法,以实现自动化、成本效益高的安全评估。
- 汇集来自多样化来源的数据(数据集、考试、扩增),并实施严格的质量控制以提高可靠性。
- 在零-shot 和少量-shot 设置下评估 25 个 LLM,以基准化安全性能并识别差距。
- 提供数据、指导方针和排行榜访问,以促进 LLM 的快速安全改进。
提出的方法
- 收集来自多种来源的 11,435 道覆盖 7 个安全类别的 MCQ。
- 排除敏感话题类别,以确保跨语言的一致性。
- 使用商业翻译 API 在中文和英文之间翻译数据,以实现统一的双语评估。
- 使用来自现有数据集、安全相关考试的资料,以及通过人类验证的 LLM 辅助扩增数据。
- 在零-shot 和五-shot 设置下评估模型,使用固定温度采样和答案提取规则。
- 提供公开的排行榜和评估协议(本版本不包含基于 Chain-of-Thought 的评估)。
实验结果
研究问题
- RQ1在中文和英文数据中,需要评估的关键安全维度有哪些?
- RQ2在零-shot 和少量-shot 条件下,主流 LLM 的安全性能对比如何?
- RQ3当前 LLMs 最具挑战性的安全类别是哪些,哪些方面仍存在差距?
- RQ4双语数据如何影响安全评估和跨语言泛化?
- RQ5哪些数据来源和质量控制对于构建可扩展的安全基准是有效的?
主要发现
- GPT-4 在受评估的 LLM 中获得最高的安全准确率,在零-shot 结果中领先于次优模型约 10 个百分点。
- 在零-shot 测试中,GPT-4 领先明显,但在 Physical Health(身体健康)和 Ethics/Morality(伦理/道德)类别存在显著差距。
- 许多 LLM 的平均准确率低于 80%,某些类别如 Unfairness 和 Bias 的分数低于 70%,表明仍有改进空间。
- 五-shot 结果在不同模型间呈现不同的增益,一些模型显著提升,另一些则表现出对齐相关的权衡。
- 以中文为起源的 LLM 在中文数据上往往表现更好,而 OpenAI GPT 系列在双语表现上更为均衡。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。