Mixture-of-Experts (MoE) architectures have emerged as a powerful paradigm for scaling neural networks while maintaining computational efficiency. However, standard MoE implementations rely on two rigid design assumptions: (1) fixed Top-K routing where exactly K experts are activated per token, and (2) uniform expert allocation across all layers. This paper introduces DynaMoE, a novel MoE framework that relaxes both constraints through dynamic token-level expert activation and layer-wise adaptive capacity allocation. DynaMoE introduces a principled routing mechanism where the number of active experts per token varies based on input complexity. Concurrently, the framework implements six distinct scheduling strategies for distributing expert capacity across network depth, including descending, ascending, pyramid, and wave patterns. We theoretically analyze the expressivity gains of dynamic routing and derive bounds on computational efficiency. Through extensive experiments on MNIST, Fashion-MNIST, CIFAR-10 (image classification), and Recycling-the-Web (language modeling) across multiple model scales, we demonstrate that DynaMoE achieves superior parameter efficiency compared to static baselines. Our key finding is that optimal expert schedules are task- and scale-dependent: descending schedules (concentrating capacity in early layers) outperform uniform baselines on image classification. For language modeling, optimal schedules vary by model size, descending for Tiny, ascending for Small, and uniform for Medium. Furthermore, dynamic routing reduces gradient variance during training, leading to improved convergence stability. DynaMoE establishes a new framework for adaptive computation in neural networks, providing principled guidance for MoE architecture design.
Figures & tables
Figure 1: Comparison of expert scheduling strategies showing how expert capacity is distributed across 12 network layers. Descending concentrates capacity in early layers, ascending in later layers, while pyramid and uniform strategies show intermediate patterns. Nmax=16 , Nmin=1 .
Figure 2: DynaMoE architecture with descending expert schedule. Expert capacity decreases from 8 experts in Layer 1 to 1 expert in Layer 4, concentrating computational resources in early feature extraction layers.
Size
Layers
Hidden Dim
Parameters
Tiny
2
64
∼ 85K
Small
4
128
∼ 340K
Medium
6
256
∼ 1.4M
Large
8
512
∼ 5.6M
Table 1: Model size configurations
Schedule
Accuracy (%)
Parameters
Epochs to 95%
Time (s)
MLP Baseline
89.42
340K
8
145
Uniform
91.35
380K
7
168
Descending
92.68
380K
6
162
Ascending
90.12
380K
9
175
Pyramid-Up
91.08
380K
7
170
Pyramid-Down
90.85
380K
8
173
Table 2: Expert schedule comparison on MNIST (Small model, 4 layers, 8 max experts)
Figure 3: Expert activation probability heatmaps across 6 layers for three scheduling strategies. Brighter colors indicate higher activation probability. Descending schedule shows strong activation in early layers (L1-L2), uniform maintains consistent patterns, while ascending concentrates activation in deeper layers.
Figure 4: Performance comparison across model sizes (Tiny, Small, Medium) for language modeling. Left: Best validation perplexity (lower is better). Right: Best validation accuracy (higher is better). Results show the descending schedule achieving the best validation perplexity across all model sizes, consistent with image classification findings.
Figure 5: Scaling analysis on MNIST across model sizes
Table 5: Next token prediction performance (validation perplexity and accuracy)
Figure 6: Best validation perplexity across model sizes for language modeling
Figure 7: Training dynamics for next token prediction across model sizes. Top row: Validation perplexity over epochs (log scale). Bottom row: Validation accuracy progression. The plots reveal different convergence patterns for each schedule, with ascending and pyramid schedules showing more stable training for larger models.
Figure 8: Performance heatmap showing best validation perplexity across model sizes and configurations. Colors indicate normalized performance scores (green = better). Numbers show actual perplexity values. The heatmap clearly illustrates task-dependent optimal schedules.
Figure 9: Average active experts per token by layer
Figure 10: Training loss convergence analysis across model sizes (log scale). DynaMoE configurations show smooth convergence with different schedules exhibiting distinct convergence rates. Descending schedules achieve fastest initial convergence for Tiny and Small models, while ascending schedules show more stable convergence for Medium models.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 11: Training convergence comparison
Layer
Experts
Avg Active
Utilization (%)
Entropy
1
8
2.4
30.0
2.12
2
6
2.1
35.0
1.98
3
3
1.5
50.0
1.45
4
1
1.0
100.0
0.00
Appendix
Table 6: Expert distribution by layer (descending schedule, Nmax=8 , Nmin=1 )