DIVE into MoE: Diversity-Enhanced Reconstruction of Large Language Models from Dense into Mixture-of-Experts

Yuchen Feng, Bowen Shen, Naibin Gu, Jiaxuan Zhao, Peng Fu, Zheng Lin, Weiping Wang

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities but come with significant computational costs, as every parameter in a dense model is activated for every token. Mixture-of-Experts (MoE) architectures offer a solution by activating only a sparse subset of parameters (experts) per token. However, training MoE models from scratch is computationally expensive and often unstable.

A promising alternative is reconstructing pre-trained dense models into MoE architectures. Current methods often result in "homogeneous experts"—where experts are nearly identical—leading to redundancy and sub-optimal performance. This paper introduces DIVE (Diversity-Enhanced reconstruction), a framework designed to transform dense LLMs into MoE models with highly specialized and diverse experts.

Methodology: The DIVE Framework

The DIVE approach uncovers latent domain-specific expertise within a dense model through a three-phase process.

The DIVE framework workflow, illustrating the three phases: domain affinity mining, pruning-based expert reconstruction, and efficient retraining.

1. Domain Affinity Mining

The researchers discovered that pruning a dense model using different "calibration" datasets (e.g., mathematics vs. linguistics) reveals distinct latent capabilities. By performing hierarchical clustering on 24 diverse datasets, they identified 8 primary "expert domains" that represent the model's internal knowledge structure.

2. Pruning-Based Expert Reconstruction

Instead of simple duplication or random splitting of Feed-Forward Networks (FFNs), DIVE prunes the original dense FFN eight separate times—once for each identified domain cluster. These pruned versions serve as the initial experts, ensuring that the MoE layer starts with specialized components (e.g., a "math expert" and a "linguistics expert") from the outset.

3. Efficient Retraining

To integrate these experts, a two-stage retraining process is employed:

  • Dense Training: Routers are trained using a temperature coefficient to encourage "soft" assignments, preventing the model from prematurely collapsing onto a single expert.
  • Sparse Training: Low-Rank Adaptation (LoRA) is used to fine-tune experts and normalization layers. Notably, the Multi-Head Attention (MHA) modules remain frozen, as they were found to be domain-agnostic, which reduces trainable parameters to less than 1%.

Experimental Setup

The framework was evaluated using TinyLlama-1.1B as the base model.

  • Data: 24 datasets were used for domain mining. Retraining utilized 5B tokens from the SlimPajama dataset.
  • Benchmarks: Evaluation spanned language modeling (WikiText2, LAMBADA) and 11 downstream tasks including SciQ, PIQA, and MathQA.

Results and Key Insights

DIVE significantly outperforms existing MoE reconstruction and pruning baselines.

Comparison of DIVE against LLaMA-MoE and pruning baselines (FLAP, LLM-Pruner) in terms of perplexity and training loss over 5B tokens.

Performance Gains

  • Language Modeling: DIVE 1/8 (1 active expert out of 8) achieved a perplexity of 13.52 on WikiText2, outperforming LLaMA-MoE (19.57) and the pruning method FLAP (14.51).
  • Zero-Shot Tasks: On the LAMBADA dataset, DIVE 1/8 showed an 8.38-point improvement in perplexity over the next best reconstruction method.
  • Downstream Accuracy: DIVE achieved an average accuracy of 42.17% across 11 tasks, surpassing the original dense model's pruned counterparts while maintaining the same active parameter count.

Insights into Model Specialization

The success of DIVE highlights that dense models contain inherent "circuits" of specialized knowledge. Pruning acts as a distillation tool to isolate these circuits. Furthermore, the discovery that MHA layers are domain-agnostic allows for extremely efficient MoE conversion, requiring minimal retraining to recover and exceed base model performance.

Conclusion

DIVE provides a robust and efficient pathway for transitioning dense LLMs to sparse MoE architectures. By prioritizing expert diversity through domain-specific pruning, it avoids the pitfalls of expert homogeneity. Future work will explore the scalability of this approach to models exceeding 70B parameters and the potential for even more granular domain specialization.

Summary updated

BibTeX
@inproceedings{feng2025dive,
  author = {Yuchen Feng and Bowen Shen and Naibin Gu and Jiaxuan Zhao and Peng Fu and Zheng Lin and Weiping Wang},
  title = {{DIVE into MoE: Diversity-Enhanced Reconstruction of Large Language Models from Dense into Mixture-of-Experts}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure