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

Legilimens:面向大语言模型服务的实用且统一的内容审核方法

Legilimens: Practical and Unified Content Moderation for Large Language Model Services

Zhejiang University(浙江大学)

Jialin Wu, Jiangyi Deng, Shengyuan Pang, Yanjiao Chen, Jiayang Xu, Xinfeng Li, Wenyuan Xu

AI总结:

本文提出面向LLM服务的统一内容审核框架Legilimens,通过从聊天型LLM提取概念特征并结合红队数据增强,在效果、效率与抗越狱鲁棒性上优于现有方法。

摘要:

鉴于大语言模型(LLMs)生成的不安全内容所产生的社会影响,确保 LLM 服务符合安全标准是 LLM 服务提供商的一个关键关切。常见的内容审核方法受限于效果与效率之间的两难困境:简单模型脆弱,而复杂模型消耗过多的计算资源。在本文中,我们首次揭示,通过从面向聊天的 LLMs 中提取概念特征,可以实现有效且高效的内容审核,尽管这些模型最初是针对对话而非内容审核进行微调的。我们提出了一种面向 LLM 服务的实用且统一的内容审核框架,名为 Legilimens,其兼具效果与效率。我们基于红队模型的数据增强增强了 Legilimens 对最先进越狱攻击的鲁棒性。此外,我们开发了一个框架,用于从理论上分析 Legilimens 与其他方法相比的成本效益。我们在五个宿主 LLM、十七个数据集和九种越狱方法上进行了大量实验,以验证 Legilimens 在正常和自适应对手面前的有效性、效率和鲁棒性。将 Legilimens 与商业和学术基线进行比较,证明了 Legilimens 的卓越性能。此外,我们确认 Legilimens 可以应用于少样本场景,并扩展到多标签分类任务。

英文摘要:

Given the societal impact of unsafe content generated by large language models (LLMs), ensuring that LLM services comply with safety standards is a crucial concern for LLM service providers. Common content moderation methods are limited by an effectiveness-and-efficiency dilemma, where simple models are fragile while sophisticated models consume excessive computational resources. In this paper, we reveal for the first time that effective and efficient content moderation can be achieved by extracting conceptual features from chat-oriented LLMs, despite their initial fine-tuning for conversation rather than content moderation. We propose a practical and unified content moderation framework for LLM services, named Legilimens, which features both effectiveness and efficiency. Our red-team model-based data augmentation enhances the robustness of Legilimens against state-of-the-art jailbreaking. Additionally, we develop a framework to theoretically analyze the cost-effectiveness of Legilimens compared to other methods. We have conducted extensive experiments on five host LLMs, seventeen datasets, and nine jailbreaking methods to verify the effectiveness, efficiency, and robustness of Legilimens against normal and adaptive adversaries. A comparison of Legilimens with both commercial and academic baselines demonstrates the superior performance of Legilimens. Furthermore, we confirm that Legilimens can be applied to few-shot scenarios and extended to multi-label classification tasks.

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

↑