arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2405.18822cs.CL
收藏

免费毒性检测

Toxicity Detection for Free

University of California, Berkeley(加州大学伯克利分校)

Zhanhao Hu, Julien Piet, Geng Zhao, Jiantao Jiao, David Wagner

AI总结:

本文提出MULI方法,利用LLM首个响应令牌的logits分布构建稀疏逻辑回归检测器,以低成本高效检测有毒提示,优于现有最先进检测器。

摘要:

当前的LLM通常被对齐以遵循安全要求,并倾向于拒绝有毒提示。然而,LLM可能无法拒绝有毒提示,或者过于谨慎而拒绝良性示例。此外,最先进的毒性检测器在低假阳性率(FPR)下具有较低的真阳性率(TPR),在现实应用中,有毒示例罕见,这导致高昂的成本。在本文中,我们介绍了使用LLM内省进行审核(MULI),该方法利用直接从LLM自身提取的信息来检测有毒提示。我们发现,可以从第一个响应令牌的logits分布中区分良性提示和有毒提示。利用这一想法,我们使用第一个响应令牌logits上的稀疏逻辑回归模型构建了一个稳健的有毒提示检测器。我们的方案在多个指标上优于最先进的检测器。

英文摘要:

Current LLMs are generally aligned to follow safety requirements and tend to refuse toxic prompts. However, LLMs can fail to refuse toxic prompts or be overcautious and refuse benign examples. In addition, state-of-the-art toxicity detectors have low TPRs at low FPR, incurring high costs in real-world applications where toxic examples are rare. In this paper, we introduce Moderation Using LLM Introspection (MULI), which detects toxic prompts using the information extracted directly from LLMs themselves. We found we can distinguish between benign and toxic prompts from the distribution of the first response token's logits. Using this idea, we build a robust detector of toxic prompts using a sparse logistic regression model on the first response token logits. Our scheme outperforms SOTA detectors under multiple metrics.

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

↑