arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.00905cs.CLcs.AI
收藏

所有语言都重要:论大语言模型的多语言安全性

All Languages Matter: On the Multilingual Safety of Large Language Models

The Chinese University of Hong Kong(香港中文大学);Tencent AI Lab(腾讯AI实验室)

Wenxuan Wang, Zhaopeng Tu, Chang Chen, Youliang Yuan, Jen-tse Huang, Wenxiang Jiao, Michael R. Lyu

AI总结:

本研究构建了首个覆盖10种语言、14类安全问题的多语言安全基准XSafety,发现主流大语言模型非英语查询的不安全响应率显著更高,还提出提示方法将ChatGPT非英语不安全响应率从19.1%降至9.7%。

摘要:

安全性是大语言模型(LLMs)开发与部署的核心问题。然而,以往的安全基准仅关注单一语言的安全性,例如预训练数据中的主流语言如英语。在本研究中,我们针对大语言模型实际全球部署的需求,构建了首个面向大语言模型的多语言安全基准XSafety。XSafety覆盖10种跨多个语系的语言,包含14类常见安全问题。我们利用XSafety对4款广泛使用的大语言模型(包括闭源API模型和开源模型)的多语言安全性进行了实证研究。实验结果表明,所有大语言模型对非英语查询生成不安全响应的比例显著高于英语查询,这说明针对非英语语言开展安全对齐十分必要。此外,我们提出了几种简单有效的提示方法,通过唤起安全知识、提升安全对齐的跨语言泛化能力,来改善ChatGPT的多语言安全性。我们的提示方法可将非英语查询的不安全响应比例从19.1%显著降至9.7%。我们已在https://github.com/Jarviswang94/Multilingual_safety_benchmark 发布相关数据。

英文摘要:

Safety lies at the core of developing and deploying large language models (LLMs). However, previous safety benchmarks only concern the safety in one language, e.g. the majority language in the pretraining data such as English. In this work, we build the first multilingual safety benchmark for LLMs, XSafety, in response to the global deployment of LLMs in practice. XSafety covers 14 kinds of commonly used safety issues across 10 languages that span several language families. We utilize XSafety to empirically study the multilingual safety for 4 widely-used LLMs, including both close-API and open-source models. Experimental results show that all LLMs produce significantly more unsafe responses for non-English queries than English ones, indicating the necessity of developing safety alignment for non-English languages. In addition, we propose several simple and effective prompting methods to improve the multilingual safety of ChatGPT by evoking safety knowledge and improving cross-lingual generalization of safety alignment. Our prompting method can significantly reduce the ratio of unsafe responses from 19.1% to 9.7% for non-English queries. We release our data at https://github.com/Jarviswang94/Multilingual_safety_benchmark.

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

↑