Rethinking Routing Exploration in Modern Mixture-of-Experts

Summary (Overview)

  • Identifies a fundamental exploration dilemma in modern Mixture-of-Experts (MoE) architectures that combine fine-grained expert segmentation with shared experts: the combinatorially enlarged routing space demands more exploration, while shared experts simultaneously weaken routing exploration by dominating learned token representations.

  • Provides empirical evidence across four model scales (100M to 2.4B parameters) showing that shared-expert MoEs suffer from three concrete inefficiencies: eroded benefits of shared experts as KK increases, diminished expressive gains from larger KK (even negative gains at some scales), and slower routing specialization.

  • Proposes MirrorMoE, a conceptually simple pretraining approach that adaptively shrinks the exploration space through token-adaptive suppression of unnecessary experts via mirror routing (sign negation of routing logits) combined with mirror aggregation using standard routing probabilities.

  • Achieves consistent improvements: On the 2.4B model, MirrorMoE improves pretraining perplexity by 0.67 points and downstream performance by 1.64 points on average across six commonsense reasoning tasks, while restoring the performance gains from increasing KK.

  • Theoretically characterizes adaptivity through sufficient conditions for both expert suppression (Proposition 3.2) and expert preservation (Proposition 3.3), establishing MirrorMoE's token-adaptive behavior.

Introduction and Theoretical Foundation

Background

Mixture-of-experts (MoE) models have become instrumental in scaling large language models (LLMs) to trillions of parameters. MoEs employ sparse conditional computation, where each token activates only a subset of experts. During pretraining, MoEs can outperform dense counterparts under matched total parameter counts, compute, and data budgets; at inference, sparse activation allows computational cost to grow sublinearly with total parameters.

Two Key Architectural Trends

Modern MoE architectures increasingly combine two design choices:

  1. Fine-grained expert segmentation: Using larger numbers of total and activated experts (e.g., (E,K)=(64,8)(E, K) = (64, 8) preferred over (8,1)(8, 1) at the same activation ratio). This yields combinatorially richer routing spaces: the number of expert subsets increases from 8 when (E,K)=(8,1)(E, K) = (8, 1) to (648)≈4.4×109\binom{64}{8} \approx 4.4 \times 10^9 with (64,8)(64, 8).

  2. Shared experts: Activated for every token, these capture common knowledge that would otherwise be learned redundantly by routed experts, allowing routed experts to devote more capacity to specialization.

The Exploration Dilemma

The paper identifies a fundamental tension between these two trends:

  • Fine-grained segmentation demands more exploration: Realizing the expressive potential requires searching a combinatorially larger routing space within each MoE layer.

  • Shared experts weaken exploration: Shared experts dominate learned token representations, leaving routed experts with less influence on layer output. Even activating different routed experts leads to limited variation in learned features, making alternative routes harder to distinguish.

MoE Formulation

For a token representation hln∈Rd\mathbf{h}_l^n \in \mathbb{R}^d entering the ll-th MoE layer, the router produces a probability distribution over routed experts:

pl,e(hln)=exp⁡(Gl[e,:]hln)∑j=1Rexp⁡(Gl[j,:]hln),Al(hln)=TopK−S({pl,e(hln)},e∈[R])p_{l,e}(\mathbf{h}_l^n) = \frac{\exp(\mathbf{G}_l[e,:]\mathbf{h}_l^n)}{\sum_{j=1}^{R} \exp(\mathbf{G}_l[j,:]\mathbf{h}_l^n)}, \quad \mathcal{A}_l(\mathbf{h}_l^n) = \text{Top}_{K-S}\big(\{p_{l,e}(\mathbf{h}_l^n)\}, e \in [R]\big)

The learned token representation combines shared and routed expert outputs:

hl+1n=∑s=1SSEl,s(hln)+∑e∈Al(hln)pl,e(hln)Z(hln)⋅REl,e(hln)\mathbf{h}_{l+1}^n = \sum_{s=1}^{S} \mathcal{SE}_{l,s}(\mathbf{h}_l^n) + \sum_{e \in \mathcal{A}_l(\mathbf{h}_l^n)} \frac{p_{l,e}(\mathbf{h}_l^n)}{Z(\mathbf{h}_l^n)} \cdot \mathcal{RE}_{l,e}(\mathbf{h}_l^n)

where Z(hln)=∑j∈Al(hln)pl,j(hln)Z(\mathbf{h}_l^n) = \sum_{j \in \mathcal{A}_l(\mathbf{h}_l^n)} p_{l,j}(\mathbf{h}_l^n) renormalizes weights (or Z=1Z = 1 as in DeepSeek-MoE and Qwen1.5-MoE).

Methodology

Diagnostic Analysis of the Exploration Dilemma

The paper employs three complementary metrics to diagnose the exploration dilemma:

1. Expert ablation: Zeroing out each expert's output and measuring perplexity change ΔPPL=PPLafter−PPLbase\Delta \text{PPL} = \text{PPL}_{\text{after}} - \text{PPL}_{\text{base}}. Shared experts show substantially larger perplexity increases when ablated, demonstrating their disproportionate importance.

2. Routing criticality: Replacing the learned router with uniform random routing and measuring relative perplexity increase PPLafter−PPLbasePPLbase\frac{\text{PPL}_{\text{after}} - \text{PPL}_{\text{base}}}{\text{PPL}_{\text{base}}}. Shared-expert MoEs show much smaller increases, indicating less dependence on learned routing.

3. Variance metrics:

  • Expert variance: Measures how much the layer output varies when different experts are activated:
ExpertVarl=1R∑e=1R∥h~l+1,e−hl+1∥2∥hl+1∥2\text{ExpertVar}_l = \frac{1}{R} \sum_{e=1}^{R} \frac{\|\tilde{\mathbf{h}}_{l+1,e} - \mathbf{h}_{l+1}\|^2}{\|\mathbf{h}_{l+1}\|^2}
  • Router variance: Measures output variability when routing decisions are sampled from the learned distribution:
RouterVarl=1M∑m∥h^l+1(m)−hˉl+1∥2∥hˉl+1∥2\text{RouterVar}_l = \frac{1}{M} \sum_{m} \frac{\|\hat{\mathbf{h}}_{l+1}(m) - \bar{\mathbf{h}}_{l+1}\|^2}{\|\bar{\mathbf{h}}_{l+1}\|^2}

MirrorMoE Algorithm

Mirror routing: Activates experts according to a modified routing probability:

pl,e=(1−ρ)exp⁡(Gl[e,:]hl)∑j=1Rexp⁡(Gl[j,:]hl)⏟:=ξl,e+ρexp⁡(−Gl[e,:]hl)∑j=1Rexp⁡(−Gl[j,:]hl)⏟:=ζl,ep_{l,e} = (1-\rho) \underbrace{\frac{\exp(\mathbf{G}_l[e,:]\mathbf{h}_l)}{\sum_{j=1}^{R} \exp(\mathbf{G}_l[j,:]\mathbf{h}_l)}}_{:=\xi_{l,e}} + \rho \underbrace{\frac{\exp(-\mathbf{G}_l[e,:]\mathbf{h}_l)}{\sum_{j=1}^{R} \exp(-\mathbf{G}_l[j,:]\mathbf{h}_l)}}_{:=\zeta_{l,e}}

The second term ζl,e\zeta_{l,e} is obtained by negating the sign of Gl\mathbf{G}_l, favoring experts with smaller logits.

Mirror aggregation: Aggregates selected experts using standard routing probabilities ξl,e\xi_{l,e} instead of pl,ep_{l,e}:

hl+1=∑s=1SSEl,s(hl)+∑e∈Alξl,eZ(hl)REl,e(hl)\mathbf{h}_{l+1} = \sum_{s=1}^{S} \mathcal{SE}_{l,s}(\mathbf{h}_l) + \sum_{e \in \mathcal{A}_l} \frac{\xi_{l,e}}{Z(\mathbf{h}_l)} \mathcal{RE}_{l,e}(\mathbf{h}_l)

This ensures that even when low-logit experts are activated, they contribute minimally and are functionally suppressed.

Practical modifications:

  1. Cosine annealing of ρ\rho to 0 over training (temporal exploration strategy)
  2. Modified load-balancing loss:
Lbal=R∑l=1L∑e=1Rfl,eqˉl,e,withfl,e=cl,eN(K−S),qˉl,e=1N∑n=1Nξl,e(hln)\mathcal{L}_{\text{bal}} = R \sum_{l=1}^{L} \sum_{e=1}^{R} f_{l,e} \bar{q}_{l,e}, \quad \text{with} \quad f_{l,e} = \frac{c_{l,e}}{N(K-S)}, \quad \bar{q}_{l,e} = \frac{1}{N} \sum_{n=1}^{N} \xi_{l,e}(\mathbf{h}_l^n)

Effective Experts Definition

Keff(hln)=exp⁡(−∑e∈Al(hln)ξˉl,e(hln)log⁡ξˉl,e(hln)),whereξˉl,e(hln)=ξl,e(hln)∑j∈Al(hln)ξl,j(hln)K_{\text{eff}}(\mathbf{h}_l^n) = \exp\Big(-\sum_{e \in \mathcal{A}_l(\mathbf{h}_l^n)} \bar{\xi}_{l,e}(\mathbf{h}_l^n) \log \bar{\xi}_{l,e}(\mathbf{h}_l^n)\Big), \quad \text{where} \quad \bar{\xi}_{l,e}(\mathbf{h}_l^n) = \frac{\xi_{l,e}(\mathbf{h}_l^n)}{\sum_{j \in \mathcal{A}_l(\mathbf{h}_l^n)} \xi_{l,j}(\mathbf{h}_l^n)}

This measures how many activated experts contribute substantially to the aggregated representation.

Empirical Validation / Results

Pretraining Performance

Model (Total-Activated params.)Experts K/R/SDepthVanilla PPL (↓)MirrorMoE PPL (↓)Vanilla iter time (ms)MirrorMoE iter time (ms)
MoE-100M-A38M8/64/21D + 8S54.7851.777871.3 ± 65.97844.4 ± 85.6
MoE-498M-A121M8/64/21D + 12S28.3127.3613550.0 ± 63.013426.7 ± 83.3
MoE-625M-A100M8/128/21D + 8S28.4627.849527.5 ± 45.49462.5 ± 61.2
MoE-2.4B-A270M8/128/21D + 15S21.1720.5025711.1 ± 176.225635.4 ± 109.4

MirrorMoE consistently achieves lower perplexity across all model scales. Notably, MoE-498M-A121M has a larger routing space (more layers with sparse routing), and MirrorMoE yields a larger performance gain on this model, confirming that shrinking the routing space is particularly beneficial when the exploration dilemma is more pronounced.

Downstream Performance

ModelMethodARC-EOBQAHellaSwagPIQABoolQSIQAAvg (↑)
MoE-100M-A38MVanilla32.1126.4026.6257.5642.6634.2936.61
MirrorMoE34.2226.0025.7658.0042.4834.4936.82
MoE-498M-A121MVanilla39.4426.8029.8761.4358.6536.6942.15
MirrorMoE41.0427.8030.3364.3159.2036.9543.27
MoE-625M-A100MVanilla41.1228.2029.9761.1061.4737.3643.20
MirrorMoE41.3729.8030.2362.0861.1636.5943.53
MoE-2.4B-A270MVanilla45.3730.0036.6366.5954.5038.3345.23
MirrorMoE46.6332.4037.4067.9558.5338.2846.87

For the 2.4B model, MirrorMoE improves average downstream performance by 1.64 points.

Key Findings Under Enlarged Routing Space

When varying K∈{6,8,10}K \in \{6, 8, 10\}:

  • Standard shared-expert MoEs are outperformed by non-shared counterparts at large KK
  • Increasing KK from 6 to 10 yields perplexity gains of {2.23, 1.32, 1.08, 0.87} for MoEs without shared experts, but only {0.29, -0.03, 0.58, -0.03} with shared experts (negative at two scales)
  • MirrorMoE enables shared-expert models to consistently outperform non-shared MoEs and restores performance gains from increasing KK

Ablation Studies

MethodTest PPL (↓)
MoE (baseline)54.78
Linear scheduled K~t\tilde{K}_t54.91
Cosine scheduled K~t\tilde{K}_t54.19
MirrorMoE51.77

Non-adaptive schedules (linear/cosine increase of activated experts) fail to match MirrorMoE's performance, demonstrating the importance of token/layer adaptivity.

Theoretical and Practical Implications

Theoretical Results

Proposition 3.2 (Sufficient condition for expert suppression): For a given token, let ξemin⁡=ϵ\xi_{e_{\min}} = \epsilon (the smallest routing probability) and ξj=c/R\xi_j = c/R (the smallest probability among standard top-KK experts). As ϵ→0\epsilon \to 0, ρ>c/(1+c)\rho > c/(1+c) is sufficient for emin⁡∈Ap∖Aξe_{\min} \in \mathcal{A}^p \setminus \mathcal{A}^\xi, meaning MirrorMoE activates this expert while functionally suppressing its contribution during aggregation.

Proposition 3.3 (Sufficient condition for expert preservation): Let κ:=(1−ρ)/ρ\kappa := \sqrt{(1-\rho)/\rho}. If ξmax⁡/ξmin⁡≤κ\xi_{\max}/\xi_{\min} \leq \kappa, then Ap=Aξ\mathcal{A}^p = \mathcal{A}^\xi (the same experts are activated as standard routing). Moreover, ξˉe≥1/((K−S)κ)\bar{\xi}_e \geq 1/((K-S)\kappa) for all e∈Ape \in \mathcal{A}^p, meaning no selected expert is functionally suppressed.

These results establish that MirrorMoE's suppression is token-adaptive: experts are suppressed only when the router is confident (large logit ratios), while uncertain routing regimes preserve all experts.

Practical Implications

  1. Alternative interpretation: MirrorMoE can be viewed as tokens adaptively determining their effective number of activated experts—if a token can be learned well with fewer experts, the capacity of remaining experts can be devoted to other tokens.

  2. Computational efficiency: MirrorMoE slightly reduces per-iteration training time despite adding a softmax operation, suggesting improved load balance.

  3. Architecture guidance: The findings suggest that shared-expert MoEs should either limit KK or employ exploration-aware training strategies like MirrorMoE to realize the full benefits of fine-grained expert segmentation.

  4. Generality: MirrorMoE performs comparably to vanilla training when applied to MoEs without shared experts, confirming that the approach specifically addresses the exploration dilemma induced by shared experts.

Conclusion

This work identifies a critical exploration dilemma in modern MoE architectures that combine fine-grained expert segmentation with shared experts: the enlarged routing space demands greater exploration, while shared experts simultaneously weaken routing exploration by dominating learned representations. This tension prevents the additional expressiveness enabled by fine-grained segmentation from being fully realized and diminishes the benefits of shared experts.

MirrorMoE addresses this dilemma by adaptively shrinking the exploration space to better match the model's exploration capability. Through mirror routing (sign negation of logits) and mirror aggregation (using standard probabilities for weighting), MirrorMoE functionally suppresses unnecessary experts in a token-adaptive manner. The approach consistently improves performance across model scales from 100M to 2.4B parameters, restores the benefits of shared experts, and realizes the expressive gains from larger KK.

Future direction: The current approach addresses the exploration dilemma by shrinking the exploration space. A promising direction is to improve the routing strategy itself for more efficient exploration, potentially enabling even better utilization of fine-grained expert segmentation in shared-expert MoEs.

Related papers