With the rapid development of Large language models (LLMs), understanding the capabilities of LLMs in identifying unsafe content has become increasingly important. While previous works have introduced several benchmarks to evaluate the safety risk of LLMs, the community still has a limited understanding of current LLMs' capability to recognize illegal and unsafe content in Chinese contexts. In this work, we present a Chinese safety benchmark (ChineseSafe) to facilitate research on the content safety of large language models. To align with the regulations for Chinese Internet content moderation, our ChineseSafe contains 205,034 examples across 4 classes and 10 sub-classes of safety issues. For Chinese contexts, we add several special types of illegal content: political sensitivity, pornography, and variant/homophonic words. Moreover, we employ two methods to evaluate the legal risks of popular LLMs, including open-sourced models and APIs. The results reveal that many LLMs exhibit vulnerability to certain types of safety issues, leading to legal risks in China. Our work provides a guideline for developers and researchers to facilitate the safety of LLMs. Our results are also available at https://huggingface.co/spaces/SUSTech/ChineseSafe-Benchmark.
翻译:随着大语言模型(LLMs)的快速发展,理解LLMs识别不安全内容的能力变得日益重要。尽管先前的研究已引入多个基准来评估LLMs的安全风险,学术界对当前LLMs在中文语境下识别非法及不安全内容的能力仍认知有限。本研究提出一个中文安全基准(ChineseSafe),以促进大语言模型内容安全性的研究。为契合中国互联网内容审核规范,ChineseSafe包含205,034个样本,涵盖4大类、10个子类的安全问题。针对中文语境,我们特别添加了若干特殊类型的非法内容:政治敏感性内容、色情内容以及变体/谐音词汇。此外,我们采用两种方法评估主流LLMs(包括开源模型与API)的法律风险。结果表明,许多LLMs对特定类型的安全问题存在脆弱性,可能在中国境内引发法律风险。本研究为开发者和研究者提供了促进LLMs安全性的指导准则。相关结果可通过 https://huggingface.co/spaces/SUSTech/ChineseSafe-Benchmark 获取。