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

ShieldLM:将大语言模型赋能为对齐的、可定制的且可解释的安全检测器

ShieldLM: Empowering LLMs as Aligned, Customizable and Explainable Safety Detectors

Tsinghua University(清华大学);Peking University(北京大学);Beihang University(北京航空航天大学);Zhongguancun Laboratory(中关村实验室)

Zhexin Zhang, Yida Lu, Jingyuan Ma, Di Zhang, Rui Li, Pei Ke, Hao Sun, Lei Sha, Zhifang Sui, Hongning Wang, Minlie Huang

AI总结:

本文提出ShieldLM,一种基于大语言模型的安全检测器,通过对齐安全标准、支持定制规则并提供决策解释,在四个测试集上超越强基线,兼具可定制性与可解释性。

摘要:

近年来,大语言模型(LLMs)的安全性日益受到关注,但仍缺乏一种以对齐的、可定制的且可解释的方式检测LLMs响应中安全问题的综合方法。在本文中,我们提出ShieldLM,一种基于LLM的安全检测器,它与常见安全标准对齐,支持可定制的检测规则,并为其决策提供解释。为了训练ShieldLM,我们构建了一个大型双语数据集,包含14,387个查询-响应对,基于各种安全标准对响应的安全性进行标注。通过大量实验,我们证明ShieldLM在四个测试集上超越了强基线,展现出卓越的可定制性和可解释性。除了在标准检测数据集上表现良好外,ShieldLM还被证明可作为先进LLM的安全评估器。ShieldLM已在\tt{https://github.com/thu-coai/ShieldLM}发布,以支持在各种安全标准下进行准确且可解释的安全检测。

英文摘要:

The safety of Large Language Models (LLMs) has gained increasing attention in recent years, but there still lacks a comprehensive approach for detecting safety issues within LLMs' responses in an aligned, customizable and explainable manner. In this paper, we propose ShieldLM, an LLM-based safety detector, which aligns with common safety standards, supports customizable detection rules, and provides explanations for its decisions. To train ShieldLM, we compile a large bilingual dataset comprising 14,387 query-response pairs, annotating the safety of responses based on various safety standards. Through extensive experiments, we demonstrate that ShieldLM surpasses strong baselines across four test sets, showcasing remarkable customizability and explainability. Besides performing well on standard detection datasets, ShieldLM has also been shown to be effective as a safety evaluator for advanced LLMs. ShieldLM is released at \url{https://github.com/thu-coai/ShieldLM} to support accurate and explainable safety detection under various safety standards.

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

↑