arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.26686cs.AIcs.CL
收藏

安全护栏需要推理吗?LeanGuard:一种快速轻量的鲁棒审核方法

Do Safety Guardrails Need to Reason? LeanGuard: A Fast and Light Approach for Robust Moderation

POSTECH(POSTECH大学)

Dongbin Na

AI总结:

提出LeanGuard,一种轻量级双向编码器,无需链式推理即可实现与大型推理护栏相当的审核性能,推理计算量减少约100倍。

摘要:

为了筛选提示或响应,最近的护栏方法在做出判断之前会生成思维链(CoT)。这种设计遵循一个普遍信念,即逐步推理能改善决策。然而,CoT也使得护栏变得沉重和缓慢,因为模型在决定之前必须生成许多token。这可能不符合护栏实际部署的方式。护栏有时不应沉重和缓慢,并且它经常在设备上运行,例如在具身机器人上。在本文中,我们提出一个问题:安全护栏是否真的需要推理。为了回答这个问题,我们在同一语料库上训练了一个轻量级双向编码器和一个推理护栏,然后仅移除推理部分,同时保持其他一切不变。通过这种受控的相同基础比较,我们表明思维链并不能提高审核准确性。我们将得到的护栏命名为LeanGuard。一个395M的仅标签编码器在公开基准测试上达到了平均F1为82.90±0.26。它与基于更大解码器构建的推理护栏性能相当,同时仅需对最多512个token的输入进行一次前向传播。这大约减少了100倍的推理计算量。我们进一步表明,这种仅标签编码器在训练标签噪声下保持鲁棒,并且在严格的假阳性率下保留了比推理护栏多得多的召回率,因此更重的推理护栏也不是更鲁棒的选择。我们的发现表明,当前的护栏基准测试可能不够难,不足以奖励推理,并且CoT对于审核的必要性尚未得到证明。我们在以下网址发布所有源代码和模型,包括LeanGuard:此https URL。

英文摘要:

In order to screen a prompt or a response, the recent guardrail methods generate a chain-of-thought (CoT) before they issue a verdict. This design follows a common belief that step-by-step reasoning improves a decision. However, CoT also makes the guard heavy and slow, because the model must generate many tokens before it decides. This may not match how guardrails are actually deployed. A guardrail sometimes should not be heavy and slow, and it often runs on-device, for example on an embodied robot. In this paper, we pose a question whether a safety guardrail really needs to reason. To answer this question, we train a lightweight bidirectional encoder and a reasoning guard on the same corpus, and we then remove only the reasoning while we keep everything else fixed. With this controlled same-base comparison, we show that the chain does not improve moderation accuracy. We name the resulting guard LeanGuard. A 395M label-only encoder reaches an average F1 of 82.90 $\pm$ 0.26 over public benchmarks. It matches a reasoning guard that is built on a much larger decoder, while it uses only a single forward pass over an input of at most 512 tokens. This is about a ~100x reduction in inference compute. We further show that this label-only encoder stays robust under training-label noise and retains far more recall at a strict false-positive rate than the reasoning guard, so a heavier reasoning guard is not the more robust choice either. Our finding suggests that the current guardrail benchmarks may not be hard enough to reward reasoning, and that the necessity of CoT for moderation is still not proven. We release all source codes and models including LeanGuard at https://github.com/ndb796/LeanGuard.

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

↑