Introduction
Large Language Models (LLMs) utilizing Mixture-of-Experts (MoE) architectures offer significant efficiency by activating only a subset of specialized sub-networks for any given input. However, adapting these models to multiple diverse domains—such as law, medicine, and coding—simultaneously presents two major challenges: catastrophic forgetting and training inefficiency. Standard fine-tuning often overwrites general knowledge or causes task interference, while existing specialized methods require separate models for each domain, leading to unsustainable storage and deployment costs.
To address these issues, the authors propose DES-MoE, a framework designed to create a single, unified model that excels across multiple specialized domains while retaining its original general-purpose intelligence.
Methodology
DES-MoE introduces three primary innovations to enable stable multi-domain adaptation:
- Adaptive Lightweight Router (ALR): Instead of relying on a frozen pre-trained router, a small, trainable MLP is added. It is trained with a dual objective: a distillation loss to preserve the original model's behavior (general knowledge) and a task loss to optimize expert selection for new domains.
- Domain-Guided Expert Specialization (DGES): This system tracks expert usage per domain in real-time. It applies a gradient mask so that during training on a specific domain (e.g., "Law"), only relevant experts are updated. To prevent "tug-of-war" interference, experts heavily utilized across multiple domains are duplicated.
- Progressive Three-Phase Schedule: The training is divided into three stages to stabilize the mapping between domains and experts.
- Stage I (Warm-up): The router and backbone learn domain signals while experts remain frozen.
- Stage II (Stabilization): The backbone is frozen; the router and domain-relevant experts are updated.
- Stage III (Consolidation): The router is frozen, and final updates are applied only to domain-specific experts to "lock in" specialization.
Experimental Setup
The framework was evaluated using the DeepSeek-V2-Lite backbone (66 experts, 8 active per token) across six domains:
- Math: MetaMathQA (train), GSM8K/MATH (eval).
- Code: CodeAlpaca (train), HumanEval/MBPP (eval).
- Specialized Tasks: Intent recognition, summarization, legal judgment, and translation.
- General Ability: Evaluated via 7 benchmarks (e.g., MMLU, TriviaQA) to monitor forgetting.
Results and Discussion
DES-MoE demonstrates a remarkable ability to scale across domains without degrading general performance.
Key Findings:
- Mitigation of Forgetting: As the number of domains increased from 2 to 6, DES-MoE's general benchmark scores remained nearly constant (0.1-point decline), whereas full fine-tuning (FFT) dropped by 6.2 points.
- Superior Specialization: DES-MoE achieved an average score of 51.6 on specialized tasks, outperforming mixed-domain full fine-tuning (46.6) and matching or exceeding single-domain models.
- Efficiency: The method reached convergence 68% faster than conventional full fine-tuning and proved more efficient than maintaining multiple separate domain-specific models.
Conclusion
DES-MoE effectively solves the "tug-of-war" problem in multi-domain MoE adaptation. By anchoring the model with a distilled router and isolating domain updates through gradient masking, it achieves state-of-the-art performance with minimal forgetting. Future work may explore unsupervised domain labeling and similarity-aware routing to further enhance transfer learning between related tasks.
Summary updated