Dynamic Expert Specialization: Towards Catastrophic Forgetting-Free Multi-Domain MoE Adaptation

Junzhuo Li, Bo Wang, Xiuze Zhou, Xuming Hu · DOI

Introduction

Mixture-of-Experts (MoE) architectures have emerged as a dominant strategy for scaling Large Language Models (LLMs) efficiently. By activating only a sparse subset of parameters for any given input token, MoE models achieve high capacity with manageable computational costs. However, adapting these pre-trained models to diverse downstream domains—such as mathematics, programming, and law—presents a significant challenge.

Standard adaptation techniques, such as Full Fine-Tuning (FFT) on mixed-domain datasets, often suffer from cross-domain interference. Gradient updates intended for one domain can inadvertently overwrite weights critical for another, leading to "catastrophic forgetting" of both general knowledge and previously learned specialized skills. While parameter-efficient methods like LoRA or static Expert-Specialized Fine-Tuning (ESFT) offer some relief, they either struggle with conflicting gradients or require maintaining separate model instances for every new task. This paper introduces Dynamic Expert Specialization (DES-MoE), a framework designed to enable efficient multi-domain adaptation within a single MoE model while virtually eliminating catastrophic forgetting.

Methodology: Dynamic Expert Specialization

DES-MoE addresses the limitations of existing fine-tuning strategies through three integrated components: an adaptive router, a dynamic gradient isolation mechanism, and a phased training schedule.

1. Adaptive Lightweight Router (ALR)

The routing mechanism is the heart of an MoE model. DES-MoE replaces the original frozen or fully-trainable router with a shallow, trainable Multi-Layer Perceptron (MLP). To balance the acquisition of new domain-specific routing patterns with the preservation of pre-trained knowledge, the ALR is trained using a dual-loss objective. It minimizes a standard task-specific loss alongside a knowledge distillation loss that encourages the new router to mimic the behavior of the original pre-trained router.

2. Domain-Guided Expert Specialization (DGES)

To prevent cross-domain interference, DES-MoE implements a dynamic masking strategy. During training, the system monitors which experts are most frequently activated for specific domains. It constructs a binary mask that restricts gradient updates to only those experts highly correlated with the current training batch's domain. In cases where an expert is heavily utilized by multiple domains (e.g., both Math and Code), the framework can duplicate the expert, allowing each domain to develop its own specialized version without interference.

3. Progressive Parameter Specialization Schedule

The training process is structured into three distinct phases to ensure stability and convergence:

  • Stage I: Warm-up: All parameters except the experts are trainable, allowing the model to quickly adapt its internal representations to the new domain signals.
  • Stage II: Stabilization: The transformer backbone is frozen. Only the ALR and the domain-relevant experts identified by the DGES are updated.
  • Stage III: Consolidation: Both the backbone and the router are frozen. Updates are restricted solely to the final domain-specific experts, "locking in" the specialized knowledge.
Overview of the DES-MoE architecture and its three-stage training schedule.

Experimental Evaluation

The authors evaluated DES-MoE using the DeepSeek-V2-Lite backbone across a diverse set of specialized tasks, including MetaMathQA (Math), CodeAlpaca (Code), Cherokee-English Translation, and various intent recognition and summarization benchmarks. To measure catastrophic forgetting, the model was also tested on general benchmarks like MMLU, TriviaQA, and HellaSwag.

Key Results and Insights

The experimental results demonstrate that DES-MoE successfully bridges the gap between single-domain specialization and multi-domain versatility.

Performance and Stability

In mixed-domain settings, DES-MoE achieved an average score of 51.6 across specialized tasks, significantly outperforming Full Fine-Tuning (46.6) and matching the performance of multiple separate ESFT models. Crucially, as the number of training domains increased, DES-MoE maintained remarkably stable performance on general benchmarks. While FFT saw a 6.2-point drop in general ability when scaling from 2 to 6 domains, DES-MoE experienced a negligible decrease of only 0.1 points.

Performance comparison on general tasks as the number of domains increases, showing DES-MoE's resistance to catastrophic forgetting.

Efficiency Gains

By dynamically pruning irrelevant experts from the backpropagation step, DES-MoE reduces the number of parameters updated per iteration. This led to a 68% reduction in training time compared to FFT, with DES-MoE converging in 54 minutes versus 171.8 minutes for FFT.

Conclusion and Future Directions

DES-MoE provides a robust framework for multi-domain MoE adaptation by combining dynamic routing with physical gradient isolation. It proves that a single model can master diverse specialized skills without sacrificing its foundational general knowledge.

Current limitations include the requirement for explicit domain labels during training and the introduction of new hyperparameters. Future research could explore unsupervised domain discovery to handle unlabeled data and similarity-aware routing to optimize expert sharing between closely related domains.

Summary updated

BibTeX
@misc{li2025dynamic,
  author = {Junzhuo Li and Bo Wang and Xiuze Zhou and Xuming Hu},
  title = {{Dynamic Expert Specialization: Towards Catastrophic Forgetting-Free Multi-Domain MoE Adaptation}},
  year = {2025},
  eprint = {2509.16882},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.16882},
}
Figure