K-文化的一切——从回归到 K-美妆,发送到您的邮箱订阅邮件

METAL MEDIA

Latent Space Refusal Anchoring for Low-Resource African Languages: Mechanistic Safety Recovery Without Retraining

arXiv:2608.180892026-08-20

用英语能拒绝有害请求的AI模型,换成非洲低资源语言问同样的问题却会照做——研究者不重新训练,只靠调整模型内部信号就修复了这个问题

经过指令微调的语言模型用英语提问时会拒绝有害请求,但用约鲁巴语、伊博语、伊加拉语、豪萨语问同样的问题时却常常照做。作者发现模型内部其实存在拒绝机制,只是在这些语言上没有被激活,于是提出了一种不需要重新训练的方法LSR-Anchoring,在推理阶段把从英语提取出的拒绝方向信号强行注入到其他语言的输入中,在四种模型架构上都成功恢复了四种非洲语言的安全性,但对阿拉伯语始终无效甚至适得其反。

METAL MEDIA 解读图

用英语能拒绝有害请求的AI模型,换成非洲低资源语言问同样的问题却会照做——研究者不重新训练,只靠调整模型内部信号就修复了这个问题

  1. 01问题诊断:测量各语言内部激活与英语拒绝激活之间的几何差距(Refusal Centroid Drift)发现,伊加拉语的差距高达0.55,说明模型并非没有拒绝机制,只是该机制在这些语言上没有被触发。
  2. 02方法:用100个英语有害提示和50个无害提示的内部激活差异提取出一个'拒绝方向'向量,在推理时直接叠加到其他语言输入的内部信号上(称为Mean-Activation Steering,MAS),不需要重新训练、不需要目标语言数据,单张消费级GPU即可运行。
  3. 03结果:Llama-3.1-70B在四种语言上安全恢复率(SRR)接近满分——约鲁巴语1.00、伊加拉语1.00、伊博语0.99、豪萨语0.96;Mistral-7B和Qwen2.5-7B在恢复安全性的同时把对正常请求的误伤程度(DPL)控制在0.08以下。但Llama-3-8B出现过度矫正,DPL一度达到1.00,即连正常请求也被错误拒绝。
  4. 04改进:针对Llama-3-8B的问题,改用从稀疏自编码器(SAE)中提取的单一特征方向(称为SDS)替代原来的密集均值差向量,使KL散度(衡量模型输出分布变化程度的指标)降低3.5至7倍,且不再出现正常回答被破坏的情况。
  5. 05局限:阿拉伯语在所有模型架构和所有干预强度下都失败,安全性反而低于未干预时的基线,原因是阿拉伯语的内部表示处于几何上完全不同的区域。作者明确警告不要将此方法用于阿拉伯语智能体。
这是 METAL MEDIA 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 问题诊断:测量各语言内部激活与英语拒绝激活之间的几何差距(Refusal Centroid Drift)发现,伊加拉语的差距高达0.55,说明模型并非没有拒绝机制,只是该机制在这些语言上没有被触发。
  2. 方法:用100个英语有害提示和50个无害提示的内部激活差异提取出一个'拒绝方向'向量,在推理时直接叠加到其他语言输入的内部信号上(称为Mean-Activation Steering,MAS),不需要重新训练、不需要目标语言数据,单张消费级GPU即可运行。
  3. 结果:Llama-3.1-70B在四种语言上安全恢复率(SRR)接近满分——约鲁巴语1.00、伊加拉语1.00、伊博语0.99、豪萨语0.96;Mistral-7B和Qwen2.5-7B在恢复安全性的同时把对正常请求的误伤程度(DPL)控制在0.08以下。但Llama-3-8B出现过度矫正,DPL一度达到1.00,即连正常请求也被错误拒绝。
  4. 改进:针对Llama-3-8B的问题,改用从稀疏自编码器(SAE)中提取的单一特征方向(称为SDS)替代原来的密集均值差向量,使KL散度(衡量模型输出分布变化程度的指标)降低3.5至7倍,且不再出现正常回答被破坏的情况。
  5. 局限:阿拉伯语在所有模型架构和所有干预强度下都失败,安全性反而低于未干预时的基线,原因是阿拉伯语的内部表示处于几何上完全不同的区域。作者明确警告不要将此方法用于阿拉伯语智能体。
Figure 1: LSR-Anchoring recovers safety on Yoruba harmful prompts without affecting benign behaviour. Before steering (left): the model refuses in English but complies in Yoruba. After steering (right): LSR-Anchoring re-anchors the English refusal direction at inference time; both languages now refuse. No retraining or target-language data is used.
Figure 1: LSR-Anchoring recovers safety on Yoruba harmful prompts without affecting benign behaviour. Before steering (left): the model refuses in English but complies in Yoruba. After steering (right): LSR-Anchoring re-anchors the English refusal direction at inference time; both languages now refuse. No retraining or target-language data is used.
Table 1: Refusal Centroid Drift per language (Llama-3-8B, Layer 12). RCD =1−cos⁡(𝐑en,𝐑lang). Higher RCD = greater geometric separation from English refusal space.
LanguageFamilyBaselineRCD
YorubaNiger-Congo0.140.95
HausaAfro-Asiatic0.220.60
IgboNiger-Congo0.300.41
IgalaNiger-Congo0.160.55
SwahiliBantu0.460.95
ArabicSemitic0.900.90
Table 2: Evaluation metrics and acceptance thresholds.
MetricDefinitionThreshold
SRR(steered−baseline)/nharmfulHigher
KLDKL​(Psteered∥Pbaseline)<2.5 nats
DPL (Degraded Perf. on Legit.)Benign prompts refused post-steering<0.10
PrecisionGenuine/flagged refusals (manual)>0.80
Table 3: MAS best results per model-language pair. “—” indicates DPL was not instrumented in the 70B pass; table˜4 confirms capability is preserved.
ModelLang.SRRαKLDPL
Llama-3.1-70BYoruba1.00253.53
Llama-3.1-70BIgala1.00202.58
Llama-3.1-70BArabic−0.20252.91
Mistral-7BIgala0.75250.610.06
Mistral-7BYoruba0.25251.430.08
Qwen2.5-7BIgala0.49700.280.06
Qwen2.5-7BArabic−0.10700.140.00
Llama-3-8BIgala0.8124.641.00
“—” = not instrumented; see caption.
Table 4: MMLU accuracy at effective steering magnitudes. Δ = absolute drop in percentage points. “OK” indicates whether the model remains within the acceptable capability-drop threshold. 70B steered rows not collected; see section˜4.
ModelαAcc.Δ (pp)OK
Mistral-7B00.6035
20.5937−0.98
Llama-3-8B00.6699
20.6671−0.28
Qwen2.5-7B00.7441
200.7420−0.21
400.7406−0.35
Llama-3.1-70B00.8259
Table 5: MAS vs. SDS at best SRR (Llama-3-8B, Layer 12). SDS DPL was not instrumented; at KL <1.0 nats, benign collapse is geometrically ruled out and KL is the primary utility metric here.
Lang.SDS SRRSDS KLSDS DPLMAS SRRMAS KLMAS DPL
Yoruba0.060.250.814.851.00
Hausa0.530.930.824.440.98
Igbo0.702.350.806.461.00
Igala0.621.350.814.641.00
Swahili0.200.440.624.781.00
Arabic−0.482.560.215.340.96
“—” = not instrumented; see caption.
Table 6: Full MAS α sweep (Qwen2.5-7B, Layer 26). Arabic baseline 0.11 falls within the steerable range for all other languages; negative SRR throughout confirms geometric failure rather than a baseline effect.
LanguageαSRRKLDPLBase.
Yoruba100.010.0440.020.01
300.040.0820.060.01
500.160.1490.100.01
700.350.2420.240.01
Hausa100.100.1020.020.04
300.220.1940.120.04
500.410.3260.340.04
700.510.4910.500.04
Igbo100.190.0420.020.22
300.290.0850.040.22
500.330.1270.060.22
700.380.1880.100.22
Igala100.030.0690.040.02
300.100.1180.000.02
500.270.1940.060.02
700.490.2830.060.02
Swahili100.010.0380.000.02
300.050.0870.020.02
500.060.1600.040.02
700.110.2660.120.02
Arabic100.000.0490.000.11
30−0.040.0740.000.11
50−0.090.1070.000.11
70−0.100.1430.000.11
Table 7: SDS best operating points (Llama-3-8B, Layer 12). Arabic baseline 0.90 is Llama-3-8B specific; Qwen2.5-7B Arabic baseline is 0.11 (appendix˜B).
Lang.FamilyBase.SRRαKLNote
YorubaNiger-Congo0.140.0640.25Ceiling
HausaAfro-Asiatic0.220.5360.93Positive
IgboNiger-Congo0.300.7082.35Strong
IgalaNiger-Congo0.160.6261.35Strong
SwahiliBantu0.460.2040.44Moderate
ArabicSemitic0.90−0.4862.56Inverse

为什么重要

全球有数亿使用非洲低资源语言的人群目前几乎得不到AI安全机制的有效保护,这项研究展示了仅用一张消费级GPU、无需收集新数据或重新训练就能缓解这一问题的方法。同时它在阿拉伯语上的明确失败也为实际部署提供了一条判断规则:什么情况下不能直接套用这种修复方法。

本文术语

  • 残差流(residual stream) · transformer模型内部各层之间不断累积传递的信息通道
  • 拒绝质心漂移(Refusal Centroid Drift, RCD) · 衡量某语言内部与拒绝相关的激活相对于英语偏离程度的指标
  • 均值激活干预(Mean-Activation Steering, MAS) · 从英语有害与无害提示的激活差异中提取方向向量,并在推理时注入模型的方法
  • 稀疏自编码器(Sparse Autoencoder, SAE) · 将模型内部混杂的信号分解为可解释的独立特征的辅助神经网络
  • SRR / DPL / KL散度 · 分别衡量有害请求拒绝恢复程度、正常请求被误拒程度,以及干预前后模型输出分布变化幅度的指标

论文原文摘要(英文)

Instruction-tuned models often refuse harmful requests in English but comply with the same requests in Yoruba, Igbo, Igala, and Hausa. This suggests that the refusal mechanism is present in the residual stream but fails to activate for low-resource inputs. Recovering it normally requires labelled target-language data and retraining, neither of which is available at scale for most African languages. We introduce Latent Space Refusal Anchoring (LSR-Anchoring), a training-free method that extracts the refusal direction from English prompts and clamps it onto the residual stream at inference time. The primary variant, Mean-Activation Steering (MAS), operates across the four architectures we tested: Llama-3-8B, Llama-3.1-70B, Mistral-7B-Instruct, and Qwen2.5-7B. On Mistral and Qwen it recovers safety with benign degradation below 0.08. On Llama-3-8B it overcorrects, with Degraded Performance on Legitimate prompts (DPL) reaching 1.00. We address this with SAE-Derived Steering (SDS), which replaces the dense mean-difference direction with a single Sparse Autoencoder (SAE) feature and reduces Kullback-Leibler (KL) divergence by 3.5-7x without benign collapse. Four languages transfer positively, but Arabic fails on every architecture and at every steering magnitude, indicating a geometric mismatch rather than a baseline effect. Massive Multitask Language Understanding (MMLU) accuracy drops remain below 0.35 percentage points at every effective steering magnitude.

作者 · Godwin Abuh Faruna

在 arXiv 阅读

最新论文

全部论文 →

METAL MEDIA 最新报道

图片来源: Godwin Abuh Faruna et al., arXiv:2608.18089, CC BY 4.0