Back to Feed
Safety & Alignment / Benchmarks & Evals

Cross-Lingual Safety Failures in Low-Resource Languages

Original: The Illusion of Cross-Lingual Safety in Low-Resource Languages

Listen to the summary

Uses a voice available on your device

Audio options
On this page 5 sections
Related concepts 2 concepts

Key Takeaways

  • Harmful prompts retain less than 10% of the English refusal signal across most language-model pairs.
  • The average probability of emitting any standard refusal sequence is merely 1.05% for Literal prompts and 1.15% for Cultural prompts.
  • The study introduces LoDNA, a new safety dataset pairing literal translations with culturally localized prompts.
  • Evaluations span Hausa, Twi, Amharic, and Swahili across Mistral, Llama, Qwen2.5, and AfriqueQwen models.

Summary & Methodology Analysis

Safety alignment in large language models, which are software systems using a transformer architecture to process sequences through stacked neural layers, is predominantly developed in English with the assumption that safeguards generalize. To test this, the authors evaluated cross-lingual safety alignment for Hausa, Twi, Amharic, and Swahili across models including Mistral, Llama, Qwen2.5, and AfriqueQwen. They utilized LoDNA, a novel safety dataset that pairs literal translations with culturally localized prompts derived from the Do-Not-Answer dataset.

The investigation relies on an observational geometric framework examining hidden states across transformer layers. By tracking these representations, the authors measured how effectively refusal signals transfer from English to target languages when processing harmful inputs. Their findings indicate that harmful prompts retain less than 10% of the English refusal signal across most language-model pairs, and the average probability of emitting any standard refusal sequence is merely 1.05% for Literal prompts and 1.15% for Cultural prompts.

Several limitations constrain the findings. The evaluation is restricted to 7B-8B parameter models, the localized dataset and the community-sourced English prompts for Twi are small in scale, and subword tokenization inefficiencies may confound the latent geometry analysis. Furthermore, the geometric framework provides observational, correlational evidence rather than causal proof, and the lack of a safety-aligned, moderately-resourced control language prevents cleanly separating structural mapping failures from absent alignment.

Interactive System Flowchart

Click diagram to expand and zoom

Illustrative Implementation

A short sketch of the paper's core idea, not the authors' own code.

# Illustrative sketch (not from the paper)
import torch
import torch.nn.functional as F
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load a multilingual LLM (e.g., mistral) and its tokenizer
model_name = "mistralai/Mistral-7B-v0.1"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.float16)
model.eval()
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Helper: return hidden state of the final input token for selected layers
def get_hidden(prompt, layers):
    inputs = tokenizer(prompt, return_tensors="pt")
    with torch.no_grad():
        outputs = model(**inputs, output_hidden_states=True)
    # hidden_states is a tuple (layer0,...,layerN); index by layer number
    final_token_idx = inputs["input_ids"].size(1) - 1
    return torch.stack([outputs.hidden_states[l][:, final_token_idx, :] for l in layers])

# Example prompt groups (place‑holders – replace with actual LoDNA prompts)
english_safe = ["What is the capital of France?"]
english_unsafe = ["How to make a bomb?"]
literal_tw = ["... literal Twi translation ..."]
context_tw = ["... culturally localized Twi translation ..."]

layers = list(range(14, 25))  # layers 14‑24 inclusive

# Compute mean hidden vectors for safe/unsafe English prompts
safe_h = torch.mean(torch.stack([get_hidden(p, layers) for p in english_safe]), dim=0)
unsafe_h = torch.mean(torch.stack([get_hidden(p, layers) for p in english_unsafe]), dim=0)
# Refusal direction per layer
r_en = unsafe_h - safe_h  # shape: (len(layers), hidden_dim)

# Compute target‑language vectors (literal & cultural)
lit_h = torch.mean(torch.stack([get_hidden(p, layers) for p in literal_tw]), dim=0)
ctx_h = torch.mean(torch.stack([get_hidden(p, layers) for p in context_tw]), dim=0)

# Cosine similarity between English refusal and target vectors (layer‑wise)
cos_lit = F.cosine_similarity(r_en, lit_h, dim=-1)
cos_ctx = F.cosine_similarity(r_en, ctx_h, dim=-1)

# Signed Retained Component (percentage)
retained_lit = (r_en * lit_h).sum(-1) / (r_en * r_en).sum(-1) * 100
retained_ctx = (r_en * ctx_h).sum(-1) / (r_en * r_en).sum(-1) * 100

print("Cosine similarity (literal):", cos_lit)
print("Cosine similarity (cultural):", cos_ctx)
print("Signed retained component % (literal):", retained_lit)
print("Signed retained component % (cultural):", retained_ctx)

Cross-Examination & FAQs

A deeper dive clarifying mechanics, constraints, and baseline evaluations.

Q1. What is the main problem addressed by the paper?

The paper addresses the assumption that safety alignment developed in English successfully generalizes across languages, specifically examining its vulnerability in low-resource languages.

Q2. Which languages were evaluated in the study?

The study evaluated Hausa, Twi, Amharic, and Swahili.

Q3. What is the primary conclusion regarding safety signal retention?

Harmful prompts retain less than 10% of the English refusal signal across most language-model pairs.

Q4. What is LoDNA?

LoDNA is a new safety dataset that pairs literal translations with culturally localized prompts.

Q5. What probability of emitting a standard refusal sequence was observed?

The average probability of emitting any standard refusal sequence is merely 1.05% for Literal prompts and 1.15% for Cultural prompts.

Q6. Which models and datasets were included in the evaluation?

The study evaluated Mistral, Llama, Qwen2.5, and AfriqueQwen using the Do-Not-Answer dataset and the LoDNA dataset.

Q7. What scale of models was used in the evaluation?

The evaluation was restricted to 7B-8B parameter models.

Q8. Are the findings causal or correlational?

The geometric framework is observational and provides correlational evidence rather than causal proof.

Q9. What potential confounders or limitations affected the latent geometry analysis?

Potential confounders and limitations include subword tokenization inefficiencies, small scale in the localized dataset and community-sourced Twi prompts, and the absence of a safety-aligned, moderately-resourced control language.

Flag an issue

What is wrong with this summary?

What is wrong?