通过共享专家增强大模型安全,抵御恶意攻击
SEAL: Reinforcing Global Safety in Mixture-of-Experts through Shared Expert ALignment

- 利用始终激活的共享专家作为安全锚点,克服路由不确定性
- 在六种攻击下最高降低60%成功率,性能损失小于1.4%
- 参数高效可插拔,适合部署于主流MoE架构
混合专家(MoE)是大规模语言模型的扩展架构,仅激活每令牌少量专家模块,实现参数量大幅增长而计算开销几乎不变。近期混合MoE引入了始终激活的共享专家,以捕捉通用有用表征,进一步提升稳定性和泛化能力。然而,MoE仍易受对抗攻击影响。稀疏路由机制带来结构脆弱性:安全依赖于激活的专家,攻击者可通过越狱提示、恶意微调及关键神经元剪枝操控路由选择。现有防御多聚焦于加固路由器,但因路由过程具有非确定性,攻击者仍可能操纵或绕过路由路径,导致防御失效。本文首次从理论与实证上发现,共享专家中包含少量关键安全神经元,能克服稀疏激活路由的不确定性,作为与路由器无关的安全锚点。基于此,提出SEAL——一种训练时参数高效的防御方法,通过附加适配器至共享专家实现;以及SEAL++,其增加正交约束以保留原有安全子空间。在六种攻击场景下评估,涵盖三种对抗输入(有害提示、越狱、恶意微调)与是否进行神经元剪枝,SEAL最高降低60%攻击成功率,五项基准平均性能损失不超过1.4%。SEAL可无缝集成至路由器级防御。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) is a scaling architecture for large language models that activates only a small subset of expert modules per token, enabling massive parameter growth with nearly constant computation. Recent Hybrid MoE architecture adds \textit{shared experts} to capture consistently useful representations, further improving stability and generalization. MoE now powers many flagship open-source and commercial models, yet remains vulnerable to adversarial attacks. Specifically, sparse routing introduces a structural vulnerability: MoE safety hinges on which experts are activated, and adversaries can subvert this selection through jailbreak prompts, malicious fine-tuning, and weight-level pruning of safety-critical neurons. Existing defenses primarily focus on hardening the router, but an adversary may still manipulate or bypass the routing trajectory due to the routing process's nondeterministic nature, thereby collapsing the defense. To cope with this problem, we first identify theoretically and empirically that shared expert, an always-activated component containing a small proportion of safety-critical neurons, can overcome the uncertainty of sparsely activated routing path and serve as a router-independent anchor to enhance global safety alignment. Based on this insight, we propose SEAL, a training-time parameter-efficient defense that produces a plug-and-play adapter attached to shared expert, and SEAL++, a variant that adds an orthogonal constraint preserving pre-existing safety subspaces during training. We evaluate SEAL and SEAL++ across six attack scenarios that combine three adversarial inputs (harmful prompting, jailbreak, malicious fine-tuning) with and without neuron pruning. SEAL reduces attack success rate (ASR) by up to 60\%, at a capability cost of at most 1.4\% on a five-benchmark average. Additionally, SEAL can seamlessly integrate with router-level ......
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。