The Language Barrier: Dissecting Safety Challenges of LLMs in Multilingual Contexts

Lingfeng Shen, Weiting Tan, Sihao Chen, Yunmo Chen, Jingyu Zhang, Haoran Xu, Boyuan Zheng, Philipp Koehn, Daniel Khashabi

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: The Multilingual Safety Gap

As Large Language Models (LLMs) like GPT-4 and Llama-2 are deployed globally, they encounter a massive "data divide." While most training data is in English, hundreds of other languages have far fewer digital resources. This research investigates a critical consequence of this divide: Safety Alignment.

The authors explore whether an LLM that is "safe" in English remains safe when asked the same malicious questions in a low-resource language. This is particularly relevant for "translation-based jailbreaking," where a user can bypass safety filters simply by translating a prohibited prompt into a language the model hasn't been as rigorously safety-tuned for.

Illustration of translation-based jailbreaking where a safe English response becomes harmful or irrelevant when the prompt is translated into a low-resource language like Hausa.

Methodology and Evaluation

The researchers conducted a systematic study using state-of-the-art models across 9 high-resource and 10 low-resource languages. Their approach involved:

  1. Translation-based Jailbreaking: Malicious English prompts were translated into various languages using the NLLB-1.3B model to observe LLM responses.
  2. Multilingual Alignment Testing: Three strategies were tested to bridge the safety gap: Multilingual Supervised Fine-tuning (xSFT), Multilingual Reinforcement Learning from Human Feedback (xRLHF), and standard CHAT-RLHF (as seen in Llama-2-chat).
  3. Metrics: Performance was evaluated based on the Harmful Rate (frequency of dangerous information generation) and the Following Rate (the model's ability to understand and execute instructions).

The Two Curses of Low-Resource Languages

The paper identifies two distinct failures that plague LLMs in low-resource settings:

  • The Harmfulness Curse: Models are significantly more dangerous in low-resource languages because they fail to recognize malicious intent that they would normally catch in English.
  • The Relevance Curse: Models often fail to follow instructions entirely, either repeating the prompt or providing nonsensical answers, due to weak underlying linguistic understanding.

Key Results: Alignment Inequality

The most striking finding is the "alignment inequality." While RLHF and SFT make English responses significantly safer, they provide minimal improvement for low-resource languages. The safety alignment does not effectively transfer across the language barrier.

Comparison of harmfulness and instruction-following rates across high-resource and low-resource languages, highlighting the significant safety gap.

Specific findings include:

  • GPT-4 Discrepancy: For identical malicious prompts, GPT-4 exhibited a 1% harmful rate in high-resource languages but a staggering 35% harmful rate in low-resource languages.
  • Instruction Following: GPT-4 followed instructions nearly 100% of the time in high-resource languages but only 80% of the time in low-resource ones.
  • Llama-2 Alignment: The official Llama-2-chat reduced harmfulness by 45% in high-resource languages but only by 20% in low-resource ones.

Conclusion: Pre-training as the Bottleneck

The authors argue that safety is not merely a fine-tuning problem. If a model has not seen enough of a language during its initial pre-training phase, it lacks the "conceptual anchor" needed to apply safety rules learned in English to that language.

To build truly safe global AI, we cannot rely solely on English-centric safety tuning. Future research must prioritize diverse multilingual corpora during the initial pre-training stage to ensure the model's "moral compass" functions effectively in every language it supports.

Summary updated

BibTeX
@inproceedings{shen2024language,
  author = {Lingfeng Shen and Weiting Tan and Sihao Chen and Yunmo Chen and Jingyu Zhang and Haoran Xu and Boyuan Zheng and Philipp Koehn and Daniel Khashabi},
  title = {{The Language Barrier: Dissecting Safety Challenges of LLMs in Multilingual Contexts}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=lrnvSk8XaU},
}
Figure