Aligning Large Language Models for Safety in African Languages: A Case Study of Hausa
Organizations: African Institute for Mathematical Sciences (AIMS), Cameroon · Bayero University Kano · University of Hamburg · Imperial College London
Abstract
Safety alignment research for large language models (LLMs) remains concentrated on high-resource languages, leaving open how existing alignment methods perform in low-resource, culturally distinct settings. We study this question for Hausa, a language spoken by more than 200 million people across West Africa. We introduce HausaSafeLM, one of the first Hausa safety preference dataset, built from 10,000 prompts derived from PKU-SafeRLHF: 3,000 human-corrected (gold) and 7,000 machine-translated (silver) examples spanning six harm macro-categories. Using Qwen2.5-7B-Instruct, we compare supervised fine-tuning (SFT) and SFT followed by Direct Preference Optimization (DPO) under both data regimes, evaluating on 500 harmful and 200 benign Hausa prompts.We find that the untuned base model appears highly safe by refusal-rate metrics alone, but this reflects limited Hausa generation ability rather than genuine alignment: its refusals are almost uniformly low quality. SFT improves both refusal fluency and precision and benefits substantially from the larger, noisier silver-tier data, while DPO sharpens refusal precision but comes at a steep, largely data-invariant cost to linguistic quality. No single configuration jointly maximizes safety, helpfulness, and fluency. Our results suggest that current alignment techniques teach models when to refuse more readily than how to do so fluently in underrepresented languages, and that refusal-rate metrics alone are an unreliable signal of safety in low-resource settings.
Figures & tables
| Macro-category | PKU-SafeRLHF sources |
|---|---|
| Violence & physical harm | Violence, Physical Harm, Disrupting Public Order |
| Hate speech & discrimination | Insulting Behavior, Discriminatory Behavior |
| Sexual content | Sexual Content |
| Criminal activity | Economic Crime, Cybercrime, Endangering National Security, Human Trafficking |
| Health & public safety | Endangering Public Health, Drugs, Environmental Damage |
| Psychological manipulation | Psychological Harm, Mental Manipulation |
| Tier | Method | Quality | Size |
| Gold | MT + human edit | High | 3,000 |
| Silver | MT only | Mixed | 7,000 |
| Master dataset | 10,000 | ||
| Variant | RR | FRR | HR | SafeQ | AyaQ |
|---|---|---|---|---|---|
| Base | 1.000 | 0.096 | 0.256 | 0.021 | 0.165 |
| SFT-G | 1.000 | 0.405 | 0.180 | 0.238 | 0.2025 |
| DPO-G | 1.000 | 0.110 | 0.255 | 0.023 | 0.1425 |
| SFT-GS | 1.000 | 0.245 | 0.260 | 0.350 | 0.2675 |
| DPO-GS | 1.000 | 0.110 | 0.235 | 0.036 | 0.1325 |
LLM Safety Alignment
Large language model safety alignment trains and evaluates systems to follow human policies while resisting harmful requests and misuse.
See all 344 papers