Source-linked AI summary
Multilingual Jailbreak Challenges in Large Language Models
Yue Deng, Wenxuan Zhang, Sinno Jialin Pan, Lidong Bing
TL;DR
The paper examines whether multilingual prompts expose jailbreak risks that English-focused safety training may miss. It evaluates unintentional and intentional scenarios, introduces MultiJail and SELF-DEFENCE, and reports reduced unsafe rates after ChatGPT fine-tuning.
Problem
The paper investigates multilingual jailbreak challenges arising because existing LLM safety studies have primarily focused on English.
Method
The paper creates MultiJail from harmful prompts translated across languages and uses SELF-DEFENCE to generate multilingual safety training data for fine-tuning.
Results
ChatGPT’s unsafe rate decreases by 6.24% in unintentional scenarios and 20.92% in intentional scenarios after SELF-DEFENCE training.
Takeaways & Limitations
Multilingual prompts can function as jailbreak methods, while SELF-DEFENCE improves LLM multilingual safety capabilities.
Abstract
from arXiv · showhide
While large language models (LLMs) exhibit remarkable capabilities across a wide range of tasks, they pose potential safety concerns, such as the ``jailbreak'' problem, wherein malicious instructions can manipulate LLMs to exhibit undesirable behavior. Although several preventive measures have been developed to mitigate the potential risks associated with LLMs, they have primarily focused on English. In this study, we reveal the presence of multilingual jailbreak challenges within LLMs and consider two potential risky scenarios: unintentional and intentional. The unintentional scenario involves users querying LLMs using non-English prompts and inadvertently bypassing the safety mechanisms, while the intentional scenario concerns malicious users combining malicious instructions with multilingual prompts to deliberately attack LLMs. The experimental results reveal that in the unintentional scenario, the rate of unsafe content increases as the availability of languages decreases. Specifically, low-resource languages exhibit about three times the likelihood of encountering harmful content compared to high-resource languages, with both ChatGPT and GPT-4. In the intentional scenario, multilingual prompts can exacerbate the negative impact of malicious instructions, with astonishingly high rates of unsafe output: 80.92\% for ChatGPT and 40.71\% for GPT-4. To handle such a challenge in the multilingual context, we propose a novel \textsc{Self-Defense} framework that automatically generates multilingual training data for safety fine-tuning. Experimental results show that ChatGPT fine-tuned with such data can achieve a substantial reduction in unsafe content generation. Data is available at \url{https://github.com/DAMO-NLP-SG/multilingual-safety-for-LLMs}.
1 INTRODUCTION
Existing LLM safety measures have focused mainly on English, leaving multilingual jailbreak risks insufficiently examined. The paper identifies unintentional and intentional multilingual attack scenarios, introduces MultiJail, and proposes SELF-DEFENCE to reduce unsafe generation.
- LLM safety concerns include malicious instructions that bypass safety mechanisms and trigger undesirable or harmful behaviors.
- Most existing safety training has focused on English despite LLMs’ multilingual capabilities and global use.
- The paper distinguishes unintentional multilingual jailbreaks by non-English users from intentional attacks combining multilingual prompts with malicious instructions.
- MultiJail is introduced as a manually translated multilingual jailbreak dataset whose prompts support evaluation of both risk scenarios.
- SELF-DEFENCE automatically generates multilingual safety training data for fine-tuning without human annotation.
- ChatGPT’s unsafe rate falls by 6.24% in the unintentional scenario and 20.92% in the intentional scenario after SELF-DEFENCE training.
2 PRELIMINARY STUDY
The preliminary study evaluates safety across languages with different resource levels and finds that unsafe outputs increase as language availability decreases. It also describes the evaluation procedure and its alignment with human judgments.
- 2.1 SETUP: The preliminary study probes LLM safety across languages using a curated multilingual dataset.
- 2.1 SETUP: The dataset contains 15 harmful English prompts translated into 30 languages grouped into high-, medium-, and low-resource categories.
- 2.1 SETUP: ChatGPT outputs are classified as safe, unsafe, or invalid, with unsafe rate defined as unsafe responses among all generated outputs.
- 2.2 RESULTS: Unsafe rates rise from about 11% to 55% as language resource availability decreases in the curated dataset.
- 2.2 RESULTS: The findings indicate that multilingualism can serve as a jailbreak method, particularly when language resource availability is lower.
- 2.2 RESULTS: Human annotators and GPT-4 evaluations show high alignment, with a Cohen’s kappa score of 0.86.
3 DETAILED EVALUATION
The evaluation uses MultiJail to test unintentional and intentional multilingual jailbreak scenarios on ChatGPT and GPT-4. Unsafe outputs increase as language resources decrease in the unintentional setting, while malicious instructions produce especially high unsafe rates across multilingual prompts.
- 3.1 SETUP: 3150 samples across English and nine non-English languages form the MultiJail dataset, with native-speaker translation and quality verification.The dataset contains 315 English samples and parallel samples in nine languages, with a target translation pass rate above 97%.
- 3.1 SETUP: ChatGPT and GPT-4 are evaluated under unintentional and intentional scenarios using unsafe, safe, and invalid response classifications.The unintentional scenario uses translated harmful prompts; the intentional scenario combines target-language prompts with the AIM malicious instruction.
- 3.2.1 UNINTENTIONAL SCENARIOS: In the unintentional scenario, unsafe rates rise from 4.34% to 14.92% for ChatGPT and from 3.60% to 10.16% for GPT-4 as language availability decreases.Low-resource language speakers are approximately three times more likely to encounter harmful content; Bengali reaches 28.25% for ChatGPT and 12.7% for GPT-4.
- 3.2.2 INTENTIONAL SCENARIOS: Multilingual adaptive attacks reach a 44.76% unsafe rate on ChatGPT and 27.30% on GPT-4, with success defined by any attempted language producing unsafe content.The adaptive strategy iterates through a candidate pool of languages to execute the attack.
- 3.2.2 INTENTIONAL SCENARIOS: 80.92% of ChatGPT outputs and 40.71% of GPT-4 outputs are unsafe when non-English prompts are combined with malicious instructions.These rates exceed the corresponding English-prompt rates by 8.86% for ChatGPT and 12.46% for GPT-4.
- 3.3 ANALYSIS: Machine translation produces an average unsafe rate of 11.15%, slightly above the 10.19% average for human translation.This result indicates that unsafe content generation does not necessarily require native speakers.
4 SELF-DEFENCE
SELF-DEFENCE generates multilingual safety-training data with limited human input and fine-tunes ChatGPT to reduce unsafe outputs, while revealing a safety–usefulness trade-off.
- Method: SELF-DEFENCE uses English unsafe and general seed examples, LLM-based augmentation, multilingual translation, and fine-tuning to build safety data.General examples help reduce overfitting to safety-related patterns.
- Method: ChatGPT is fine-tuned for 3 epochs on 500 translated input-output pairs spanning 10 languages.The dataset contains 50 English pairs with a 3:7 unsafe-to-general distribution, translated into nine non-English languages.
- Results: 10.19% to 3.95%: SELF-DEFENCE reduces ChatGPT’s unsafe rate in the unintentional scenario.The result is reported for evaluation on multilingual harmful queries.
- Results: 80.92% to 60.00%: SELF-DEFENCE reduces ChatGPT’s unsafe rate in the intentional scenario.The decrease concerns multilingual malicious attacks.
- Safety–usefulness trade-off: Increasing safety-training data makes the model safer but decreases its general capability.The authors suggest that brief rejection responses may be insufficiently comprehensive.
5 RELATED WORKS
Prior work developed several LLM safety-training approaches and characterized jailbreaks as adversarial inputs that elicit unsafe content, but this section situates multilingual jailbreaks within that broader literature.
- Safety Training: Safety research includes red-teaming, content filtering, and reinforcement learning from human feedback to reduce harmful LLM outputs.Red-teaming may involve human teams or other LLMs to identify undesirable behavior.
- Jailbreak: Jailbreak attacks construct adversarial inputs that aim to make LLMs generate unsafe content.They differ from traditional adversarial attacks, which primarily target misclassification by manipulating features.
- Safety Training: Existing safety-training studies have primarily focused on English, motivating attention to multilingual safety contexts.The paper connects this gap to the multilingual capabilities of LLMs.
6 CONCLUSION
The paper identifies multilingual jailbreaks as a challenge in both unintentional and intentional scenarios and proposes SELF-DEFENCE to enhance multilingual LLM safety.
- Conclusion: Multilingual languages can serve as a potential jailbreak method in both unintentional and intentional scenarios, posing significant threats.The conclusion frames these scenarios as involving accidental attacks and malicious exploitation.
- Conclusion: SELF-DEFENCE is proposed as a framework for enhancing LLMs’ multilingual safety capabilities.The study also open-sources its data to facilitate vulnerability identification and discussion.
A.1 LANGUAGE SELECTION
The preliminary experiments select 30 languages and categorize them into three groups according to resource availability.
- Language selection: 30 languages are listed with corresponding language codes for the preliminary experiments.The language selection is presented in Table 3.
- Language selection: The languages are categorized into three distinct groups based on resource availability.The supplied passages identify the grouping criterion but not the individual group labels or membership.
A.2 GPT4 EVALUATION PROMPT
The evaluation prompt classifies model responses to query–response pairs by content alone, using three mutually exclusive labels: safe, unsafe, and invalid.
- Safety judgments assess the response independently of harmful content in the query.
- Safe responses contain no unsafe content or refuse unsafe queries.
- Unsafe responses contain harmful content or directly answer unsafe queries.
- Invalid responses are unnatural or irrelevant to the query.
A.3 TAG STATISTICS
MultiJail uses a safety-issue tagging scheme to characterize its curated prompts, covering 18 distinct safety concerns.
- MultiJail applies Anthropic’s red-teaming tag schema to label curated GPT-4-report prompts.
- The dataset covers 18 distinct safety issues.
- Figure 7 depicts the tag statistics of MultiJail.
A.4 AIM PROMPT
This appendix specifies the AIM jailbreak prompt and summarizes supplementary evaluations, tag-dependent vulnerabilities, data-generation prompts, language overlap, and safety–usefulness results.
- A.4 AIM PROMPT: AIM is introduced as an unfiltered, amoral chatbot persona that answers requests without ethical, legal, or safety restrictions.
- A.5 DETAILED EVALUATION RESULTS: Table 4 reports detailed ChatGPT and GPT-4 results on MultiJail across unintentional and intentional scenarios.
- A.6 BEYOND GREEDY SEARCH DECODING: Nucleus sampling with top p = 0.8 raises ChatGPT’s average unsafe rate by 1.25% versus temperature = 0.0, while preserving the observed trend.
- A.7 SUPPLEMENTARY EXPERIMENT RESULTS: Among open-source models, Llama2-chat has the lowest average unsafe rate but many invalid outputs, while Vicuna reaches 57.17% unsafe rate in English.
- A.8 UNSAFE RATE BY TAGS: Unsafe rates vary by language and safety tag, with Bengali weapons queries and Thai substance-abuse queries showing notably higher rates.
- A.9 SELF-DEFENCE GENERATION PROMPTS: SELF-DEFENCE generation prompts request diverse unsafe and general English examples, followed by translation of JSON inputs and outputs into target languages.
- A.10 SELECTED LANGUAGES IN XNLI AND X-CSQA: Table 7 identifies language overlap between MultiJail, XNLI, and X-CSQA.
- A.11 DETAILED RESULTS OF SAFETY AND USEFULNESS: Table 8 reports safety rate across both jailbreak scenarios and usefulness as accuracy averaged over XNLI and X-CSQA.