让大模型安全能力分散到多个专家,防攻击又不伤性能。
MESA: Improving MoE Safety Alignment via Decentralized Expertise

- 用最优传输理论分配安全责任,选成本最低的专家承担
- 在多个有害任务上防御效果提升,同时保持有用性不下降
- 适合做安全对齐的MoE架构,特别关注模型鲁棒性
混合专家(MoE)架构能高效扩展大语言模型,通过动态路由将输入分发给相关专家,实现更高容量且计算成本更低。然而,其存在关键缺陷:安全能力集中在少数专家中,易被对抗性绕过。传统对齐方法统一调整所有参数,忽视功能差异,反而损害性能。为此,我们提出MESA(MoE安全对齐)框架,针对MoE模型设计定向对齐策略,通过分散安全职责最大化覆盖范围,同时最小化对实用性的干扰。基于最优传输(OT)理论,MESA采用两种机制:(1) 专家容量重分配,利用传输代价矩阵将安全任务分配给最高效的专家;(2) 动态路由优化,约束路由器精准激活这些分散的安全模块。实验表明,MESA在多种有害基准测试中表现出强防御能力,同时维持模型助人性能。代码已开源:https://github.com/lorraine021/MESA。
原文摘要 · Abstract (English)
Mixture-of-Experts (MoE) architectures scale Large Language Models (LLMs) efficiently, enabling greater capacity with reduced computational cost by dynamically routing inputs to relevant experts, yet introduce a critical vulnerability: Safety Sparsity, where safety capabilities concentrate in few experts, making them susceptible to adversarial bypassing. Meanwhile, conventional alignment methods uniformly adapt all parameters, ignoring their functional differences and inadvertently degrading performances. To address these challenges, we propose MESA (MoE Safety Alignment), a targeted alignment framework for MoE-based LLMs that strategically decentralizes safety responsibility to maximize coverage while minimizing interference with utility. Based on Optimal Transport (OT) theory, MESA operates through two mechanisms: (1) Expert Capacity Reallocation uses a transport cost matrix to distribute safety duties to the most cost-effective experts, and (2) Dynamic Routing Refinement constrains the router to precisely activate these decentralized modules. Experiments show that MESA achieves robust defensive performance against varied harmful benchmarks while preserving helpfulness. Code is available at https://github.com/lorraine021/MESA.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。