Skip to main content
LLM Security Database
Skip to research details
Back to research findings
LMVD-ID: 30473367
Paper published June 1, 2024
Entry analyzed December 28, 2024
Paper-reported evidence
Confidence: Source-linked

The LMVD-ID is an internal research identifier, not an official CVE identifier.

Code-Switching LLM Jailbreak

Large Language Models (LLMs) exhibit increased vulnerability to adversarial prompts employing code-switching techniques, where multiple languages are interwoven within a single query. This vulnerability stems from an…

BibTeX citation

Paper-evaluated models

No paper-evaluated models are recorded for this entry.

Description

Large Language Models (LLMs) exhibit increased vulnerability to adversarial prompts employing code-switching techniques, where multiple languages are interwoven within a single query. This vulnerability stems from an unintended correlation between the resource availability of the languages used in the prompt and the LLM's safety alignment. LLMs trained on imbalanced multilingual data are more susceptible to attacks leveraging low-resource languages, resulting in a higher rate of unsafe or undesirable responses compared to monolingual prompts. Intra-sentence code-switching is particularly effective.

Examples

See the paper for specific examples of code-switching prompts eliciting undesirable behaviors from various LLMs. The paper includes examples using prompts containing multiple languages including English, Chinese, Italian, Vietnamese, Arabic, Korean, Thai, Bengali, Swahili, and Javanese, demonstrating varying degrees of vulnerability based on language resource availability.

Impact

Successful exploitation of this vulnerability can lead to LLMs generating harmful, biased, or otherwise undesirable outputs, including hate speech, unsafe instructions, and the disclosure of private information. The severity of the impact depends on the specific LLM and the nature of the elicited response.

Affected Systems

Multiple state-of-the-art LLMs are affected, including (but not limited to) GPT-3.5-turbo, GPT-4, Claude-3, Llama-3, Mistral, and Qwen-1.5.

Mitigation Steps

  • Improve the robustness of LLMs to code-switching attacks through enhanced safety training data that includes diverse code-switched examples and addresses resource imbalances.
  • Develop and implement more sophisticated detection mechanisms to identify and mitigate code-switching attempts in user inputs.
  • Implement input sanitization or filtering techniques to reduce the effectiveness of code-switching attacks.
  • Use LLMs with higher parameter counts as they exhibit improved ability to resist this vulnerability, but this is not a complete solution.

Research context and confidence

Evidence and verification
Paper-reported; independent reproduction is not documented.
Primary research source linked.
Severity
Not rated by this catalog.
Source and publication type
arXiv · Research preprint.
Peer-review status is not provided by this source.
Author and publication status
Author metadata is not stored; see the primary paper.
Threat model and attacker access
Black-box model, service, or application access.
Related deployment categories
No related deployment category is classified.
Taxonomy labels only; paper-specific deployment prerequisites are not inferred.
Affected systems
Multiple state-of-the-art LLMs are affected, including (but not limited to) GPT-3.5-turbo, GPT-4, Claude-3, Llama-3, Mistral, and Qwen-1.5.

Research Paper

Code-Switching Red-Teaming: LLM Evaluation for Safety and Multilingual Understanding

Primary source: arXiv. Findings are reported by the cited research and have not been independently verified.

View Paper

Evidence

This entry is based on a primary research source. Its findings are paper-reported; independent reproduction and verification are not claimed.

https://arxiv.org/abs/2406.15481