谁在为触发器代言?后门混合专家Transformer中的动态专家路由
Who Speaks for the Trigger? Dynamic Expert Routing in Backdoored Mixture-of-Experts Transformers
AI总结:
针对MoE架构大模型,提出BadSwitch后门框架,利用任务耦合动态触发器优化与敏感度引导的专家追踪,将恶意触发器嵌入专家路由路径,实现高达100%攻击成功率并保持高干净准确率,揭示MoE安全漏洞。
摘要:
采用混合专家(Mixture-of-Experts, MoE)架构的大型语言模型(LLMs)通过将输入动态路由到专门的子网络(即专家)来实现令人印象深刻的性能和效率。然而,这种稀疏路由机制由于专家专业化而固有地表现出任务偏好,从而引入了一种新的且未被充分探索的针对后门攻击的脆弱性。在这项工作中,我们研究了通过利用MoE模型固有的专家路由偏好来注入后门的可行性和有效性。为此,我们提出了BadSwitch,一种新颖的后门框架,它集成了任务耦合的动态触发器优化与基于敏感度的Top-S专家追踪机制。我们的方法在预训练期间联合优化触发器嵌入,同时识别S个最敏感的专家,随后将Top-K门控机制约束到这些目标专家上。与依赖表面数据投毒或模型编辑的传统后门攻击不同,BadSwitch主要将恶意触发器嵌入到具有强任务亲和性的专家路由路径中,从而实现精确且隐蔽的模型操纵。通过在三种主流MoE架构(Switch Transformer、QwenMoE和DeepSeekMoE)上的全面评估,我们证明BadSwitch能够高效劫持预训练模型,成功率(ASR)高达100%,同时在所有基线中保持最高的干净准确率(ACC)。此外,BadSwitch对文本级和模型级防御机制均表现出强大的鲁棒性,在AGNews数据集上实现了94.07%的ASR和87.18%的ACC。我们对专家激活模式的分析揭示了MoE脆弱性的基本见解。我们预计这项工作将暴露MoE系统中的安全风险,并有助于推进AI安全。
英文摘要:
Large language models (LLMs) with Mixture-of-Experts (MoE) architectures achieve impressive performance and efficiency by dynamically routing inputs to specialized subnetworks, known as experts. However, this sparse routing mechanism inherently exhibits task preferences due to expert specialization, introducing a new and underexplored vulnerability to backdoor attacks. In this work, we investigate the feasibility and effectiveness of injecting backdoors into MoE-based LLMs by exploiting their inherent expert routing preferences. We thus propose BadSwitch, a novel backdoor framework that integrates task-coupled dynamic trigger optimization with a sensitivity-guided Top-S expert tracing mechanism. Our approach jointly optimizes trigger embeddings during pretraining while identifying S most sensitive experts, subsequently constraining the Top-K gating mechanism to these targeted experts. Unlike traditional backdoor attacks that rely on superficial data poisoning or model editing, BadSwitch primarily embeds malicious triggers into expert routing paths with strong task affinity, enabling precise and stealthy model manipulation. Through comprehensive evaluations across three prominent MoE architectures (Switch Transformer, QwenMoE, and DeepSeekMoE), we demonstrate that BadSwitch can efficiently hijack pre-trained models with up to 100% success rate (ASR) while maintaining the highest clean accuracy (ACC) among all baselines. Furthermore, BadSwitch exhibits strong resilience against both text-level and model-level defense mechanisms, achieving 94.07% ASR and 87.18% ACC on the AGNews dataset. Our analysis of expert activation patterns reveals fundamental insights into MoE vulnerabilities. We anticipate this work will expose security risks in MoE systems and contribute to advancing AI safety.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。