NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Retraining-Free Merging of Sparse Mixture-of-Experts via Hierarchical Clustering

I-Chun Chen, Hsu-Shen Liu, Wei-Fang Sun, Chen-Hao Chao, Yen-Chang Hsu, Chun-Yi Lee · DOI

Introduction

Sparse Mixture-of-Experts (SMoE) architectures, such as Mixtral and Qwen MoE, have revolutionized large language model (LLM) efficiency by activating only a small subset of parameters for each token. While this approach maintains low inference latency, it introduces a significant memory bottleneck: the entire model, including all experts, must be stored in memory. This poses a major challenge for deployment on consumer-grade hardware or resource-constrained environments.

Recent research indicates substantial redundancy among experts in these models. Existing compression techniques typically involve pruning—which discards learned information—or merging, which often necessitates expensive retraining to recover performance. Furthermore, many retraining-free methods rely on "router logits" for grouping, leading to dataset-specific biases that hinder generalization. This paper presents HC-SMoE (Hierarchical Clustering for SMoE), a retraining-free framework that merges redundant experts based on functional output similarities, preserving performance across diverse tasks.

Methodology: HC-SMoE

The HC-SMoE framework addresses the limitations of previous methods through a task-agnostic approach centered on three technical pillars.

1. Functional Similarity via Expert Outputs

Instead of relying on raw weights or router assignment probabilities, HC-SMoE measures the functional equivalence of experts by comparing their actual outputs. By passing a calibration dataset through the model and averaging the outputs of each expert, the method identifies experts that perform similar mathematical transformations, regardless of the input tokens that triggered them.

2. Hierarchical Clustering (HC)

To determine which experts to merge, the framework employs bottom-up hierarchical clustering with average linkage. This deterministic process starts with each expert as an individual cluster and iteratively merges the most similar pairs until the desired model size is reached. Unlike K-means, which can be unstable in high-dimensional spaces, hierarchical clustering provides a robust and consistent grouping strategy.

3. Frequency-Weighted Merging

Once clusters are formed, experts within each group are merged into a single entity by averaging their weights. This average is weighted by the activation frequency of each expert to ensure that more "dominant" experts contribute more to the final parameters. Crucially, the original router is preserved; any token assigned to an expert within a cluster is simply redirected to the new merged expert.

Experimental Results

The authors evaluated HC-SMoE on two prominent SMoE models: Qwen1.5-MoE-A2.7B (60 experts) and Mixtral 8x7B (8 experts), using a suite of zero-shot language benchmarks.

Performance on Qwen and Mixtral

For the Qwen model, reducing the expert count by 25% (from 60 to 45) resulted in an average accuracy of 57.16%, remarkably close to the original 60.08% and significantly higher than pruning-based baselines. In the case of Mixtral, a 25% reduction (8 to 6 experts) saved approximately 21GB of memory while maintaining 64.25% accuracy (compared to 67.48% for the unpruned model).

Robustness and Efficiency

HC-SMoE demonstrates exceptional resilience under extreme compression. When removing 50% of experts from Mixtral, HC-SMoE maintained an accuracy of 57.29%, whereas competing merging methods like M-SMoE saw performance drop to 32.51%. Additionally, the "Fixed-Dominant" variant of the method is highly efficient, completing the merging process in minutes—over 100x faster than traditional feature-alignment techniques.

Discussion and Limitations

While HC-SMoE significantly reduces memory requirements without retraining, it does not currently reduce the computational overhead of the router. The model still calculates routing scores for the original number of experts before redirection. Future work may explore optimizing router weights to further improve inference speed. Additionally, experiments with soft clustering (e.g., Fuzzy C-Means) showed performance degradation, suggesting that maintaining the hard-routing mechanism of SMoEs is vital for preserving specialized knowledge.

In conclusion, HC-SMoE provides a powerful, retraining-free solution for compressing SMoE models, enabling the deployment of high-performance LLMs on hardware with limited memory capacity while maintaining broad task generalization.

Summary updated

BibTeX
@inproceedings{chen2025retraining,
  author = {I-Chun Chen and Hsu-Shen Liu and Wei-Fang Sun and Chen-Hao Chao and Yen-Chang Hsu and Chun-Yi Lee},
  title = {{Retraining-Free Merging of Sparse Mixture-of-Experts via Hierarchical Clustering}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=hslOzRxzXL},
}
Figure