# Dynamic Mixture of Experts: An Auto-Tuning Approach for Efficient Transformer Models

- **ID:** 523
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2405.14297
- **Authors:** Yongxin Guo, Zhenglin Cheng, Xiaoying Tang, Zhaopeng Tu, Tao Lin
- **Venue:** arXiv / CUHK-Shenzhen / Westlake University / Tencent AI Lab
- **Published:** 2024
- **Tags:** dynmoe, moe, top-any, adaptive-experts, moe-llava, glue, domainbed, iclr, westlake, tencent
- **Topics:** mixture of experts, adaptive computation, transformers
- **Added:** 2026-10-01
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/523

## Summary

DynMoE replaces fixed top-k with top-any gating (cosine similarity vs a trainable per-expert threshold) so tokens activate a variable number of experts, plus an adaptive add/remove process when tokens activate none or experts go unused. A diversity+simplicity auxiliary loss encourages sparse orthogonal expert representations. Competitive with tuned GMoE on DomainBed and MoE-LLaVA on VQA-style benches while activating fewer params (StableLM-1.6B: avg k=1.25 / 1.75B vs k=2 / 2.06B). Visualizations suggest bottom layers need MoE more than top layers and a shared easy-to-activate expert per layer. Code https://github.com/LINs-lab/DynMoE.

## Attributes

- **Purpose:** Auto-tune expert count and per-token top-k during MoE training
- **Scale:** BERT-large GLUE; ViT-S/16 DomainBed (max 8 experts); MoE-LLaVA StableLM-1.6B/Qwen-1.8B/Phi-2-2.7B, max 4 experts, 8×A100 ~2 days
- **Time period:** 2024-05-23 (arXiv 2405.14297 v1); last revised 2025-03-10 (v4). ICLR 2025. HF paper publishedAt 2024-05-23.

## From the source (fetched 2026-10-03)

- **Published:** May 23, 2024 (arXiv)
- **Last revised:** Mar 10, 2025 (arXiv)
- **arXiv categories:** cs.LG, cs.AI (arXiv)
- **Author comment:** ICLR 2025 (arXiv)
- **Citations:** 66 (9 influential) (Semantic Scholar)
- **References:** 69 (Semantic Scholar)
- **Published in:** International Conference on Learning Representations (Semantic Scholar)

## Abstract

The Sparse Mixture of Experts (SMoE) has been widely employed to enhance the efficiency of training and inference for Transformer-based foundational models, yielding promising results.However, the performance of SMoE heavily depends on the choice of hyper-parameters, such as the number of experts and the number of experts to be activated (referred to as top-k), resulting in significant computational overhead due to the extensive model training by searching over various hyper-parameter configurations. As a remedy, we introduce the Dynamic Mixture of Experts (DynMoE) technique. DynMoE incorporates (1) a novel gating method that enables each token to automatically determine the number of experts to activate. (2) An adaptive process automatically adjusts the number of experts during training. Extensive numerical results across Vision, Language, and Vision-Language tasks demonstrate the effectiveness of our approach to achieve competitive performance compared to GMoE for vision and language tasks, and MoE-LLaVA for vision-language tasks, while maintaining efficiency by activating fewer parameters. Our code is available at https://github.com/LINs-lab/DynMoE.

## Research notes

- Primary: arxiv abs (cs.LG; also cs.AI). CC BY 4.0 on HTML. ICLR 2025. Guo/Cheng equal contrib; Tang/Lin corresponding. CUHK-Shenzhen / AIRS / Westlake / SII / Tencent AI Lab. Code Apache-2.0 https://github.com/LINs-lab/DynMoE (161 stars at check). HF paper page 3 upvotes; official models LINs-lab/DynMoE-{Phi-2-2.7B,StableLM-1.6B,Qwen-1.8B} not copied into hf_* fields. Discord posted PDF. Uses public GLUE/DomainBed/LLaVA-Finetuning; no new corpus, so no datasets_local row. License field left blank per catalog convention.

## Cited by, within this collection

- [PithTrain: A Compact and Agent-Native MoE Training System](https://papers.projxon.ai/entries/481) (paper 2026, #481)

## Related entries

- Discussed in: [Mixture-of-experts language models: where the work is (overview)](https://papers.projxon.ai/entries/1206) (note, #1206)

## Similar entries

- [Looping Beyond Twice: A Scalable Recipe for Looped Mixture-of-Experts](https://papers.projxon.ai/entries/1258) (paper, #1258)
- [LatentMoE: Toward Optimal Accuracy per FLOP and Parameter in Mixture of Experts](https://papers.projxon.ai/entries/1096) (paper, #1096)
- [EMO: Pretraining Mixture of Experts for Emergent Modularity](https://papers.projxon.ai/entries/1105) (paper, #1105)
- [MoonEP: A Perfectly Balanced Expert Parallelism Library via Dynamic Redundant Experts](https://papers.projxon.ai/entries/649) (code, #649)
- [Training-Free Looped Transformers](https://papers.projxon.ai/entries/510) (paper, #510)
- [ID Balancing: Stable Training of Extremely Sparse MoE via PID-Based Load Control](https://papers.projxon.ai/entries/833) (paper, #833)
