The Language Barrier: Dissecting Safety Challenges of LLM s in Multilingual Contexts (2024)

Abstract: As the influence of large language models (LLMs) spans across global communities, their safety challenges in multilingual settings become paramount for alignment research. This paper examines the variations in safety challenges faced by LLMs across different languages and discusses approaches to alleviating such concerns. By comparing how state-of-the-art LLMs respond to the same set of malicious prompts written in higher- vs. lower-resource languages,we observe that (1) LLMs tend to generate unsafe responses much more often when a malicious prompt is written in a lower-resource language, and (2) LLMs tend to generate more irrelevant responses to malicious prompts in lower-resource languages. To understand where the discrepancy can be attributed, we study the effect of instruction tuning with reinforcement learning from human feedback (RLHF) or supervised finetuning (SFT) on the HH-RLHF dataset. Surprisingly, while training with high-resource languages improves model alignment, training in lower-resource languages yields minimal improvement. This suggests that the bottleneck of cross-lingual alignment is rooted in the pretraining stage. Our findings highlight the challenges in cross-lingual LLM safety, and we hope they inform future research in this direction.

## introduction large language models (llms) are trained with the aim of generating proper responses conditioned on user instructions @xcite @xcite @xcite . while llms have demonstrated promising empirical success as general-purpose language generators and task solvers @xcite @xcite , safety concerns around the potential misuse of llms emerge. recent studies show that malicious prompt instructions could solicit objectionable content from llms. @xcite @xcite . safeguarding llms against such attacks and aligning llms with human values become a priority in llm research and development @xcite . as the influence of llms spans across global communities, understanding the capabilities of llms from a multilingual perspective becomes important @xcite . due to the discrepancy in the textual resources available for different languages during training, llms typically exhibit different capabilities across languages @xcite . our study starts with the observation that llms are prone to generate unsafe or irrelevant content when prompted with lower-resource languages compared to higher-resource ones. when comparing llms responses to the same set of malicious prompts translated into high-vs. lowresource languages, we observe two key curses (weaknesses) that present safety challenges for llms: (1) llms tend to generate harmful responses more often to malicious prompts in lowerresource languages compared to higher-resource languages. e.g., with gpt-4, we find that 35% of the responses to malicious prompts in lowresource languages contain harmful content, compared to 1% in high-resource languages. (2) llms tend to generate less relevant responses, as llm's instruction-following ability is still limited in lowresource languages. e.g., gpt-4 recognizes the instruction and produces relevant responses in only 80% cases with low-resource languages, compared to almost 100% in high-resource languages. to understand what the discrepancy between low-vs. high-resource language can be attributed figure 1 : with a set of malicious prompts written in high-resource languages like english, we translate the prompt into low-resource languages (e.g. hausa), compared to the high-resource case, we observe two clear outcomes: to, we study the effect of aligning llms with instruction-tuning datasets in different languages. specifically, we train llm on the hh-rlhf dataset @xcite translated in different languages. we compare supervised finetuning (sft) or reinforcement learning from human feedback (rlhf) under mono-or multilingual training. surprisingly, while rlhf and sft training in high-resource language lowers the model's harmful rate and improves models' instruction following capability, we see little to no improvement with training on low-resource language. these results indicate that aligning the model for safety in low-resource languages requires more than instruction tuning. we trace back the origin of these two curses (see §4) and attribute their occurrence to the limited low-resource data that llms have been pretrained on. our findings show the difficulties and challenges of tackling the low-resource curse through alignment. our main contributions in the paper are: ## two safety curses of llms with lower-resource languages we begin our study by demonstrating that gpt-4 is vulnerable to attacks with malicious prompts in low-resource languages @xcite . we observe and highlight two curses with respect to llms' responses in lower-resource languages compared to higher-resource ones (harmfulness curse and relevance curse). curse 1. (harmfulness curse) llms tend to generate more harmful responses when prompted with malicious instructions written in low-resource languages compared to highresource languages, curse 2. (relevance curse) with malicious prompts in low-resource languages, llm tends to generate less relevant responses as llm's instruction-following ability is still limited in low-resource languages. ## does alignment training lift the curses of low-resource languages? to trace the root cause for the two curses, we study the effect of alignment training with human preference data for the safety and helpfulness of responses, and observe how the resulting language models' behavior changes to malicious prompts in low-vs. high-resource languages. specifically, we conduct experiments on the hh-rlhf dataset @xcite . we compare different instruction tuning strategies, such as supervised fine-tuning (sft) and reinforcement learning from human feedback (rlhf) @xcite . we additionally explore the effect of sft and rlhf training in multilingual settings, where the instruction tuning data is translated from english into the target languages for sft or reward model training respectively. ## conclusion this paper comprehensively analyzes the crosslingual capabilities of llms along two key dimensions: harmful rate and following rate. our investigation has unveiled that llms, primarily trained in english-centric contexts, exhibit two curses when prompted by low-resource languages. this vulnerability raises significant safety concerns and hinders their utility in linguistic contexts. building upon these findings, we adapted commonly accepted alignment methods with monolingual and multilingual settings. we find that the two curses still exist after being applied with our methods, which show the challenges and difficulties of resolving the two curses through alignment methods. then, we present empirical analysis and discussions towards the origin of two curses. our work highlights the multilingual vulnerability of llms and the challenges of resolving such a vulnerability through the alignment process. we hope our work can shed light on future works on enhancing the cross-lingual ability of llms.