Saved in:
Bibliographic Details
Main Authors: Wu, Jialin, Deng, Jiangyi, Pang, Shengyuan, Chen, Yanjiao, Xu, Jiayang, Li, Xinfeng, Xu, Wenyuan
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2408.15488
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916383318605824
author Wu, Jialin
Deng, Jiangyi
Pang, Shengyuan
Chen, Yanjiao
Xu, Jiayang
Li, Xinfeng
Xu, Wenyuan
author_facet Wu, Jialin
Deng, Jiangyi
Pang, Shengyuan
Chen, Yanjiao
Xu, Jiayang
Li, Xinfeng
Xu, Wenyuan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2408_15488
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Legilimens: Practical and Unified Content Moderation for Large Language Model Services
Wu, Jialin
Deng, Jiangyi
Pang, Shengyuan
Chen, Yanjiao
Xu, Jiayang
Li, Xinfeng
Xu, Wenyuan
Computation and Language
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.
title Legilimens: Practical and Unified Content Moderation for Large Language Model Services
topic Computation and Language
url https://arxiv.org/abs/2408.15488