Defending MoE LLMs against Harmful Fine-Tuning via Safety Routing Alignment
On the map: Mixture-of-experts → Expert routing strategies
Abstract (arXiv)
Recent large language models (LLMs) have increasingly adopted the Mixture-of-Experts (MoE) architecture for efficiency. MoE-based LLMs heavily depend on a superficial safety mechanism in which harmful inputs are routed safety-critical experts. However, our analysis reveals that routing decisions for harmful inputs drift significantly after fine-tuning, exposing a critical vulnerability to harmful fine-tuning (HFT) attacks. Existing defenses, primarily designed for monolithic LLMs, are less effective for MoE LLMs as they fail to prevent drift in harmful input routing. To address this limitation, we propose SafeMoE, a safe fine-tuning method tailored to MoE LLMs. SafeMoE directly mitigates routing drift by penalizing the gap between the routing weights of a fine-tuned model and those of the initial safety-aligned model, thereby preserving the safety-aligned routing of harmful inputs to safety-critical experts. Experiments on open-source MoE LLMs ranging from 7B to 141B parameters demonstrate that SafeMoE effectively mitigates HFT attacks, reducing the harmfulness score of OLMoE from 62.0 to 5.0, for example, while maintaining task utility within 1% degradation and incurring only 2% overhead. It significantly outperforms state-of-the-art defense methods for safeguarding LLM fine-tuning and remains effective in recent large-scale MoE LLMs such as gpt-oss and Llama 4. Our implementation is available at https://anonymous.4open.science/r/SafeMoE.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Expert routing strategies, one of 12 directions in Mixture-of-experts. Builds on 36 of its 43 references that are in the map. First posted on arXiv 26 Sep 2025.
Builds on
36 of 43 references.
Closest ancestors · 3
Same direction, newest first
- 2025Steering MoE LLMs via Expert (De)Activation11 Sep
- 2025SAFEx: Analyzing Vulnerabilities of MoE-Based LLMs via Stable Safety-critical Expert Identification20 Jun
- 2021Switch Transformers: Scaling to Trillion Parameter Models with Simple and Efficient Sparsity11 Jan
Other references · 33
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,413
- 2020GShard: Scaling Giant Models with Conditional Computation and Automatic Shardingcited by 1,601
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,093
- 2021GLaM: Efficient Scaling of Language Models with Mixture-of-Expertscited by 890
- 2023BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Datasetcited by 828
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 530
- 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 494
- 2023Safety-Tuned LLaMAs: Lessons From Improving the Safety of Large Language Models that Follow Instructionscited by 377
21 more
- 2024OLMoE: Open Mixture-of-Experts Language Modelscited by 291
- 2023Shadow Alignment: The Ease of Subverting Safely-Aligned Language Modelscited by 284
- 2022Sparse Upcycling: Training Mixture-of-Experts from Dense Checkpointscited by 207
- 2024Are We Done with MMLU?cited by 178
- 2023Removing RLHF Protections in GPT-4 via Fine-Tuningcited by 165
- 2024Safety Fine-Tuning at (Almost) No Cost: A Baseline for Vision Large Language Modelscited by 160
- 2024Safety Layers in Aligned Large Language Models: The Key to LLM Securitycited by 126
- 2024Safe LoRA: the Silver Lining of Reducing Safety Risks when Fine-tuning Large Language Modelscited by 122
- 2024Vaccine: Perturbation-aware Alignment for Large Language Models against Harmful Fine-tuning Attackcited by 113
- 2024Language Models are Homer Simpson! Safety Re-Alignment of Fine-tuned Language Models through Task Arithmeticcited by 105
- 2024Representation Noising: A Defence Mechanism Against Harmful Finetuningcited by 93
- 2024Booster: Tackling Harmful Fine-tuning for Large Language Models via Attenuating Harmful Perturbationcited by 92
- 2024Lisa: Lazy Safety Alignment for Large Language Models against Harmful Fine-tuning Attackcited by 89
- 2024Antidote: Post-fine-tuning Safety Alignment for Large Language Models against Harmful Fine-tuningcited by 71
- 2024SEAL: Safety-enhanced Aligned LLM Fine-tuning via Bilevel Data Selectioncited by 64
- 2025SaLoRA: Safety-Alignment Preserved Low-Rank Adaptationcited by 39
- 2024Safety-Aware Fine-Tuning of Large Language Modelscited by 33
- 2025Safe Delta: Consistently Preserving Safety when Fine-Tuning LLMs on Diverse Datasetscited by 17
- 2025Vulnerability-Aware Alignment: Mitigating Uneven Forgetting in Harmful Fine-Tuningcited by 17
- 2025Secure LLM Fine-Tuning via Safety-Aware Probingcited by 10
- 2025Alleviating the Fear of Losing Alignment in LLM Fine-tuningcited by 8
Built on by
Citing papers per year: 2026: 8.
8 papers.
- 2026When Are Experts Misrouted? Counterfactual Routing Analysis in Mixture-of-Experts Language Modelscited by 8
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influencecited by 6
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sinkcited by 3
- 2026Preventing Safety Drift in Large Language Models via Coupled Weight and Activation Constraintscited by 2
- 2026RUBAS: Rubric-Based Reinforcement Learning for Agent Safetycited by 2
- 2026PR2: Predictive Routing Replay for MoE-Based LLM Reinforcement Learningcited by 1
- 2026Application-Driven Pedagogical Knowledge Optimization of Open-Source LLMs via Reinforcement Learning and Supervised Fine-Tuningcited by 0
- 2026Backdoor Containment via Expert Quarantine and Shutdown in LLMscited by 0
- 2026Backdoor Containment via Expert Quarantine and Shutdown in LLMs30 Sep 2026
- 2026RUBAS: Rubric-Based Reinforcement Learning for Agent Safety2 Jun 2026
- 2026PR2: Predictive Routing Replay for MoE-Based LLM Reinforcement Learning29 May 2026
- 2026When Are Experts Misrouted? Counterfactual Routing Analysis in Mixture-of-Experts Language Models8 May 2026
- 2026Preventing Safety Drift in Large Language Models via Coupled Weight and Activation Constraints14 Apr 2026
- 2026Application-Driven Pedagogical Knowledge Optimization of Open-Source LLMs via Reinforcement Learning and Supervised Fine-Tuning7 Apr 2026
- 2026Antibody: Strengthening Defense Against Harmful Fine-Tuning for Large Language Models via Attenuating Harmful Gradient Influence28 Feb 2026
- 2026Surgery: Mitigating Harmful Fine-Tuning for Large Language Models via Attention Sink5 Feb 2026
Similar, not cited
Close in wording, no citation either way
- 2025GateBreaker: Gate-Guided Attacks on Mixture-of-Expert LLMs
- 2026Sparse Models, Sparse Safety: Unsafe Routes in Mixture-of-Experts LLMs
- 2026Understanding and Preserving Safety in Fine-Tuned LLMs
- 2026Misrouter: Exploiting Routing Mechanisms for Input-Only Attacks on Mixture-of-Experts LLMs
- 2025Fine-Tuning Lowers Safety and Disrupts Evaluation Consistency
- 2026RouteHijack: Routing-Aware Attack on Mixture-of-Experts LLMs
- 2026MESA: Improving MoE Safety Alignment via Decentralized Expertise
- 2026RASA: Routing-Aware Safety Alignment for Mixture-of-Experts Models