工作日早上 7 点读 AI,周日早上 8 点读周报订阅邮件

METAL LAB

No One Model Catches Every Harm: Benchmarking Content Moderation Across Safety Scenarios

arXiv:2608.217752026-08-25

把53个AI安全过滤模型放一起测试后发现:没有哪个模型能通吃所有类型的有害内容

研究团队对53个内容审核模型进行了基准测试,既包括GPT等通用大语言模型,也包括Llama Guard等专用安全模型,覆盖11个数据集和四类风险场景。测试分两种设置:只看用户提问,或者同时看提问和模型的实际回答。结果显示,在某一类风险上领先的大模型,到了另一类风险上往往被更小的专用模型甩在后面,而针对真实对话场景的有害内容检测,所有模型家族都没能真正解决。

METAL LAB 解读图

53个模型在11个数据集和4类风险场景下的评测结构

证据状态已报告实测结果

  1. 输入模式:Q对比QAQ模式只给审核模型用户提问,QA模式同时给出提问和模型的实际回答再做安全判断
  2. 四类风险场景C1至C4C1对抗性越狱攻击,C2标准政策违规,C3对无害提问的过度拒绝,C4真实对话场景中的安全问题
  3. 模型家族对比专用安全模型(Llama Guard、WildGuard、BingoGuard、PolyGuard)使用各自原生输入格式,通用大模型(GPT、Gemini、Command-A等)使用研究团队优化的14类别安全提示词
  4. 评分方式对安全/不安全的离散判定用macro F1统计,并用配对自举置信区间检验排名差异是否真实
  5. 结果模式不同类别的赢家不同:Q模式下大型商用模型领先,QA模式下小型专用模型领先,而C4真实对话场景所有模型都表现不佳
这是 METAL LAB 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 研究团队在11个安全数据集上、以两种模式(只给提问的Q模式,和提问加模型实际回答的QA模式)评测了53个模型,其中31个是开源模型,其余为商用模型。
  2. 把有害内容分成四类:C1对抗性越狱攻击,C2标准政策执行(仇恨言论、骚扰等),C3对无害提问的过度拒绝,C4真实对话场景中的安全问题。
  3. 由于每个模型只输出安全或不安全的离散判定而非概率分数,研究用macro F1(各类别精确率和召回率的平均值)衡量表现,配对自举法(bootstrap)置信区间检验发现,18组第一名与第二名的比较中只有4组存在统计显著差异。
  4. 团队为通用大模型设计了一套优化过的安全提示词(包含14个违规类别及边界情形处理指引),在Q和QA两种模式下都比原始Llama Guard提示词高出4%到15%的macro F1,比简单的安全/不安全指令高出18%到28%。
Figure 1: Average F1 over datasets for Q setting.
Figure 1: Average F1 over datasets for Q setting.
Table 2: Prompt template ablation: average macro F1 (%) across three prompt designs.
SimpleLlamaGuardOurs
ModelQQAQQAQQA
Gemma-3-4B42.852.760.960.964.767.5
Llama-3.2-3B37.131.057.462.564.869.9
Phi-4-mini46.458.951.952.866.466.2
Figure 2: Average F1 over datasets for QA setting.
Figure 2: Average F1 over datasets for QA setting.
Table 4: Significance summary per dataset and mode (Q/QA). Δ1​-​2: paired-bootstrap difference in macro F1 between rank-1 and rank-2 over shared samples, with 95% CI (1,000 resamples). Sig.: Yes if the 95% CI excludes zero (4/18 cases). Tie-tier: number of models whose macro-F1 point estimate falls inside the rank-1 95% CI, i.e. statistically indistinguishable from the leader.
DatasetSet.Δ1​-​2 [95% CI] (%)Sig.Tie-tier
harmaugQ+2.3 [+0.3, +4.4]Yes2
harmbenchQ+0.6 [−2.4, +3.8]10
xrtestQ+1.0 [−4.1, +5.7]14
aegisQ+0.8 [−3.0, +4.4]8
oaiQ+0.2 [−2.0, +2.4]11
toxicchatQ+0.0 [−4.2, +4.1]6
wildguardQ+0.2 [−0.9, +1.4]5
simplesafetyQ+0.0 [+0.0, +0.0]28
xstestQ+0.7 [−0.7, +2.0]3
beavertailsQ+0.3 [−2.6, +3.6]16
bingoQ+0.6 [+0.3, +0.9]Yes1
harmaugQA+9.2 [+6.8, +11.6]Yes1
harmbenchQA+1.3 [−1.1, +3.7]6
xrtestQA+0.5 [−2.3, +3.6]2
wildguardQA+1.5 [−0.7, +3.9]3
xstestQA+0.4 [−1.4, +2.2]4
beavertailsQA+0.7 [−1.4, +2.7]3
bingoQA+1.5 [+1.0, +2.0]Yes1
Figure 3: Our framework: 11 benchmarks in four challenge categories (C1–C4), evaluated on 53 models under Q and QA.
Figure 3: Our framework: 11 benchmarks in four challenge categories (C1–C4), evaluated on 53 models under Q and QA.

研究结果

  • 在Q模式下,GPT-4o-mini、GPT-4.1、GPT-4.1-mini、GPT-5、Gemini-2.5-pro和Command-A等大型商用模型取得最高平均F1,分数在75%到77%之间。
  • 在QA模式下,由于能看到模型的实际回答,判断变得更容易,Llama-Guard-3-8B以78.6%的F1领先,BingoGuard-Llama-8b和Gemma-2-27b-it紧随其后。
  • C1(对抗性越狱攻击)在Q模式下最难,平均F1只有52.7%到61.2%,Llama-Guard-3-8B、Llama-Guard-4-12B、Phi-4-reasoning和GPT-4.1达到约67%位居前列。
  • 在C2(标准政策执行)上,BingoGuard-Llama-8B(87.1%)和BingoGuard-Phi3-3B(82.2%)在Q和QA两种模式下都持续超过其他模型。
  • C3(过度拒绝检测)最容易,Q模式下有15个模型F1超过95%(GPT-4.1最高达98.4%,GPT-5为98.2%);而C4(真实对话场景安全)始终是最难的类别,Q和QA模式下平均F1都只有约52%。
Figure 4: Macro F1 (averaged across all datasets) vs. per-sample latency for the 31 open-source models, under prompt-only (Q) and prompt-with-response (QA) settings. Marker shape encodes model family; color identifies individual models (see legend). The gold star marks the best macro F1 in each setting; the green diamond marks the “fast & accurate” pick (within 2% of the best F1 at the lowest latency). Gemma-2-27B-it, Gemma-3-27B-it, and Phi-3.5-MoE-instruct were evaluated on 4× A100 40GB; all other models on 1× A100 40GB.
Figure 4: Macro F1 (averaged across all datasets) vs. per-sample latency for the 31 open-source models, under prompt-only (Q) and prompt-with-response (QA) settings. Marker shape encodes model family; color identifies individual models (see legend). The gold star marks the best macro F1 in each setting; the green diamond marks the “fast & accurate” pick (within 2% of the best F1 at the lowest latency). Gemma-2-27B-it, Gemma-3-27B-it, and Phi-3.5-MoE-instruct were evaluated on 4× A100 40GB; all other models on 1× A100 40GB.

可应用场景

  • 需要拦截越狱式攻击提示的服务,可以优先考虑在该类别上领先的大型通用大语言模型。
  • 如果部署环境允许同时检查模型的实际输出,Llama Guard、BingoGuard这类较小的专用安全模型在QA模式下表现更强,可作为性价比更高的选择。
  • 担心模型对无害问题过度拒绝的团队,可以参考XSTest、SimpleSafetyTests这类数据集作为部署前的基本合格线检查。
  • 对延迟敏感的实时系统,可以关注BingoGuard-Phi3-3B、BingoGuard-Llama-8B这类体量小、且在速度与准确率上表现均衡的模型。

局限与待验证事项

  • 评测只覆盖英语、单轮对话和二元安全/不安全标签,是否能推广到多语言、多轮对话或分级风险场景尚未验证。
  • 每个数据集最多采样1000条记录,可能无法完全反映真实部署中长尾分布的有害内容模式。
  • QA评测使用的回答来自原始数据集中有限的几个来源模型生成,在类似分布上训练过的审核模型可能因此占优。
  • 优化提示词的效果只在三个开源模型上验证过,是否能迁移到闭源大模型上仍待未来的实证检验。
  • 18组第一名与第二名的比较中只有4组具有统计显著性,意味着很多排名差异可能只是样本噪声而非真实性能差距。

为什么重要

对于要部署AI安全审核层的团队来说,这项研究提供的证据是:选“最好的一个模型”这个思路本身可能不成立,应该根据风险类型和是否能看到模型的实际回答来分别选模型。它也动摇了“模型越大就越安全”这一常见假设,对模型选型标准提出了新的参考。

本文术语

  • Q / QA 设置 · Q是审核模型只看用户提问做判断,QA是审核模型同时看提问和模型的实际回答再做判断
  • macro F1 · 综合精确率和召回率的评分指标,按类别分别计算后取平均,用于评估只输出离散判定的模型
  • 过度拒绝(over-refusal) · 模型把实际上无害的请求误判为危险并拒绝回答的现象
  • 专用安全模型(Llama Guard、WildGuard、BingoGuard、PolyGuard) · 专门为判断内容是否安全而训练的模型,评测时按其原生输入格式使用
  • 配对自举置信区间 · 一种统计重采样方法,用来检验两个模型之间的性能差距是真实差异还是样本噪声

论文原文摘要(英文)

Large Language Models (LLMs) are increasingly deployed in real-world applications, yet they remain vulnerable to generating harmful content. From adversarial jailbreaks that bypass safety filters to implicit hate that evades detection, the range of risks these models pose continues to grow. While both specialized content moderators and general-purpose LLMs are being used as safety layers, the question of which model is best suited for which type of harmful content remains unanswered. We present the most comprehensive evaluation of LLM safety capabilities to date, systematically testing \textbf{53} models across \textbf{11} datasets that we organize into four distinct categories. Our evaluation under both prompt-only and prompt-response settings uncovers critical blind spots: large frontier models that lead on one category fall significantly behind smaller, specialized alternatives on others, and real-world conversational safety remains largely unsolved across all model families. These findings challenge the assumption that scale alone ensures safety, and provide the community with a structured framework for informed model selection.

作者 · Afshin Orojlooyjadid, Hitesh Patel

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Afshin Orojlooyjadid et al., arXiv:2608.21775, cc-by-nc-sa-4.0