ResMoE: Space-efficient Compression of Mixture of Experts LLMs via Residual Restoration

Mengting Ai, Tianxin Wei, Yifan Chen, Zhichen Zeng, Ritchie Zhao, Girish Varatkar, Bita Darvish Rouhani, Xianfeng Tang, Hanghang Tong, Jingrui He2025 · DOI

TL;DR

Large Mixture-of-Experts (MoE) language models are powerful but memory-hungry. This paper introduces ResMoE, a novel compression technique that significantly reduces the memory footprint of MoE models by approximating expert parameters with a "barycenter" expert and their residuals. This approach achieves up to 75% parameter reduction per expert with minimal performance loss, making large MoE models more accessible.

What Problem Does This Paper Address?

Modern Large Language Models (LLMs) often employ a Mixture-of-Experts (MoE) architecture to scale their capabilities. While MoE models activate only a fraction of their parameters per input, requiring similar computational cost to dense models, they still necessitate loading all parameters into memory during inference. This leads to significant memory inefficiency, hindering the deployment of these powerful models on resource-constrained hardware. Existing compression methods like expert merging or pruning often lead to substantial performance degradation or require extensive retraining. This paper aims to address this memory bottleneck by proposing a method to compress MoE models efficiently and without retraining, while preserving performance.

Methods

The core of ResMoE lies in approximating the original experts using a Wasserstein barycenter and residual restoration.

  1. Wasserstein Barycenter Expert: The authors first compute a "barycenter expert" by treating each original expert's parameters as a distribution and finding their Wasserstein barycenter. This barycenter expert captures the common characteristics shared across all original experts.
  2. Residual Approximation: Instead of directly compressing the original experts, ResMoE focuses on compressing the residuals between each original expert and the barycenter expert. These residuals represent the unique information of each expert.
  3. Compression: The authors then apply standard compression techniques (like unstructured pruning or Singular Value Decomposition - SVD) to these residual matrices.
  4. Restoration: During inference, the original expert can be reconstructed by adding the compressed residual back to the barycenter expert. This allows for dynamic restoration of experts as needed.

This approach is designed to be data-agnostic and can be applied in a one-shot manner without requiring further fine-tuning.

Datasets

The paper evaluates ResMoE on several standard datasets for both Natural Language Understanding (NLU) and Natural Language Generation (NLG) tasks:

  • NLU: SST-2, MRPC, COLA, MNLI
  • NLG: WikiText (perplexity), LAMBADA, PIQA, WinoGrande

The models used for evaluation include Switch Transformer and Mixtral, and DeepSeekMoE.

Key Insights and Ideas

  • Compressing Residuals is Key: The paper's central insight is that compressing the differences (residuals) between experts and a common barycenter expert is more effective than directly compressing the experts themselves. This preserves the unique knowledge of each expert while leveraging shared information.
  • Wasserstein Barycenter for Expert Alignment: Using Wasserstein barycenter provides a principled way to find a representative "average" expert that captures the common essence of multiple experts, facilitating the residual approximation.
  • One-Shot, Data-Agnostic Compression: The method's ability to compress MoE models without retraining or task-specific data is a significant advantage for practical deployment.
  • Trade-off Between Pruning and SVD: The study shows that while unstructured pruning often yields slightly better performance, SVD can achieve greater parameter reduction, offering flexibility based on specific needs.

Key Results

  • Significant Memory Reduction: ResMoE can reduce the number of parameters in an expert by up to 75% while maintaining comparable performance.
  • State-of-the-Art Performance: ResMoE consistently outperforms existing compression methods (like vanilla pruning, SVD, expert merging, and model fusion) on various NLU and NLG tasks, often achieving the lowest approximation error.
  • Minimal Performance Loss: For example, on Switch Transformer, ResMoE (UP) achieves an accuracy of 93.58% on SST-2, very close to the original model's 93.92%, while significantly reducing parameters. For Mixtral, ResMoE (UP) achieves 5.38 perplexity on WikiText, outperforming many baselines.
  • Scalability: The method demonstrates effectiveness across different model sizes and expert configurations, including Switch Transformer (8 experts), Mixtral (8 experts), and DeepSeekMoE (64 experts).

Limitations and Future Work

  • Sparse Matrix Storage: While ResMoE effectively compresses parameters, the storage of sparse matrices resulting from unstructured pruning can still be a memory overhead, especially for very large models. The authors suggest exploring more efficient sparse matrix formats.
  • Inference-Stage Application: Currently, ResMoE is applied during the inference stage. Its effectiveness when applied during fine-tuning is an open question.
  • Further Compression Exploration: Future work could involve exploring different compression rates for each layer or even each expert, and combining ResMoE with hardware quantization methods for even greater efficiency.

Summary updated

BibTeX
@misc{ai2025resmoe,
  author = {Mengting Ai and Tianxin Wei and Yifan Chen and Zhichen Zeng and Ritchie Zhao and Girish Varatkar and Bita Darvish Rouhani and Xianfeng Tang and Hanghang Tong and Jingrui He},
  title = {{ResMoE: Space-efficient Compression of Mixture of Experts LLMs via Residual Restoration}},
  year = {2025},
  eprint = {2503.06881},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.06881},
}
Figure