跳转至

上游决策,滞后执行:定位并评估多语言混合专家模型(MoE)的跨语言拒绝回路

文章背景与核心概要

多语言大模型在安全性对齐方面常表现出显著的不均衡性:模型往往能拒绝英语中的有害请求,却对低资源语言中的相同提示词表现出顺从。本文以印度语多语言混合专家模型(MoE)——Sarvam为研究对象,深入探讨了这一现象背后的机制。

研究发现,有害信息的检测在模型内部是语言无关的,且位于网络中层;而拒绝行为的执行则发生在生成过程的后期,由特定的MoE组件与注意力抑制机制共同完成。通过对该“拒绝回路”的定位,作者评估了不同干预手段的成本与有效性,为多语言模型的安全修复提供了量化蓝图。


摘要总结

多语言模型通常表现出不均衡的安全对齐——在英语中频繁拒绝有害请求,但在低资源语言中却对完全相同的提示词予以配合。本文在 Sarvam(一个印度语多语言混合专家模型,MoE)中从机制层面研究了这一现象。

Multilingual models often exhibit uneven safety alignment—frequently refusing harmful requests in English while complying with the exact same prompts in lower-resource languages. This paper investigates this phenomenon mechanistically within Sarvam, an Indic-multilingual Mixture-of-Experts (MoE) reasoning model.

主要发现包括: * 危害检测具有语言不变性: 危害被编码为网络中层的一个内部方向,该方向在不同语言间几乎保持不变(在第 L11 层,英语与印度语的余弦相似度 \(\approx 0.9\))。对该方向进行上游引导可因果性地控制拒绝行为。 * 滞后且渐进的拒绝生成: 检测方向与实际执行拒绝写入的机制是正交的。拒绝文本的写入发生在生成过程的后期,且是随时间推移逐步组装的,而非在单次前向传播中直接读取。 * 回路定位: 写入动作被追踪到一个特定的、可定位的回路——即一个受注意力抑制机制(attention opposer)制约的混合专家写入器(Mixture-of-Experts writer)。 * 干预成本评估: * 抑制注意力对立面(attention opposer)成本低且效果显著。 * 放大写入器(writer)则会面临高昂的成本壁垒。 * 对相关的注意力头进行外科手术式的编辑无效。 * 通用性: 该回路的组织结构以及用于揭示它的梯度方法在另一个无关的 MoE 模型中同样适用,尽管杠杆强度仍取决于具体的架构。

Key findings include: * Harm Detection is Language-Invariant: Harm is encoded as an internal direction in the mid-network that remains nearly language-invariant (English-vs-Indic cosine \(\approx 0.9\) at layer \(L11\)). Upstream steering of this direction causally controls refusal. * Late and Assembled Refusal Generation: The detection direction is orthogonal to the mechanism that actually writes the refusal. Refusal writing occurs late in generation and is assembled over time rather than read off during a single forward pass. * Circuit Localization: The write action is traced to a specific, localizable circuit—a Mixture-of-Experts writer held in check by an attention opposer. * Intervention Pricing: * Damping the attention opposer is cheap and effective. * Amplifying the writer hits a steep cost wall. * Surgical edits to responsible attention heads have no effect. * Generalizability: The circuit's organization and the gradient method used to expose it recur in a second, unrelated MoE model, though lever strength remains architecture-specific.

最终,这项工作提供了一份经过成本衡量的蓝图,映射了多语言安全修复的应用位置及其所涉及的权衡。

Ultimately, this work provides a cost-measured blueprint mapping where multilingual safety repairs can be applied and what trade-offs they entail.


链接与资源

  • 代码与数据(辅助文件): 查看文件摘要(包含 JSONL 日志、JSON 配置、评估脚本以及 CSV 轨迹文件,如 dla.jsonlgrad_heads.jsonnormalize.pyrefusal_trajectory.csv)。
  • Code & Data (Ancillary Files): View Files Summary (Includes JSONL logs, JSON configurations, evaluation scripts, and CSV trajectories such as dla.jsonl, grad_heads.json, normalize.py, and refusal_trajectory.csv).