← Back to homepage

Generalization and Scaling Laws for Mixture-of-Experts Transformers

Paper explained · Mixture-of-Experts · Scaling laws · Generalization theory

MoE Transformers Active parameters Routing overhead Intrinsic dimension Scaling laws
Main idea. Mixture-of-Experts Transformers use only a small subset of experts for each input. This paper explains how to reason about their generalization and scaling by separating the active parameter budget from the additional complexity introduced by routing.

1. What is the problem?

Dense Transformers use nearly all their parameters for each input. In contrast, Mixture-of-Experts (MoE) Transformers contain many experts but activate only a few of them for each token. This makes MoE models attractive because the total model can be large while the per-token computation remains limited.

This creates a theoretical question: should the learning behavior of an MoE model be controlled by its total number of parameters, or by the smaller number of parameters that are active for each input?

2. Why is it difficult?

MoE models do not only add parameters. They also add a router. The router decides which experts are used for each token. This introduces many possible routing patterns, and these patterns can increase statistical complexity.

A clean theory therefore needs to distinguish two effects:

Active capacity

The number of parameters effectively used for a given input.

Routing combinatorics

The number of possible ways tokens can be assigned to experts.

Specialization

The empirical benefit of having many experts learn different regions or patterns.

3. Main theoretical message

The paper derives a generalization bound where the error decomposes into three terms: approximation error, estimation error, and routing overhead.

\[ \mathbb{E}\|\widehat{T}_n - f\|_{L^2(Q)}^2 \;\lesssim\; N_{\mathrm{act}}^{-2\beta/d} + \frac{N_{\mathrm{act}}}{n} + \frac{L_T\,\ell\,k\,\log(eM/k)}{n}. \]

The first term measures how well the target function can be approximated with the active capacity. The second term is the usual statistical estimation term. The third term is specific to MoE models and comes from the number of possible routing patterns.

4. Meaning of the main quantities

5. Scaling laws

When routing overhead is not dominant, the theory recovers dense-network scaling exponents, but measured with respect to active capacity rather than total capacity.

\[ N_{\mathrm{act}}^\star(n) \asymp n^{d/(2\beta+d)} \] \[ \mathbb{E}\|\widehat{T}_n - f\|_{L^2(Q)}^2 \asymp n^{-2\beta/(2\beta+d)}. \]

This means that MoE models can behave like dense models in terms of scaling exponents, provided that the correct notion of capacity is used: the active parameter budget.

6. Routing overhead and specialization

Worst-case theory predicts a routing overhead proportional to \(L_T \ell k \log(eM/k)\). This term says that increasing the number of possible routing choices can make learning harder from a uniform generalization perspective.

However, the empirical results also show a second effect: when the expert pool becomes sufficiently large relative to the number of active experts, performance may improve again. This suggests that expert specialization can provide gains not captured by the worst-case bound.

Routing ablation across expert pool size M and active experts k
Routing ablation across expert pool size \(M\) and active experts \(k\). In the moderate regime, validation loss increases with the routing term \(k\log(eM/k)\). Over the full range, larger expert pools can improve performance, suggesting specialization effects beyond the worst-case theory.

7. Practical interpretation

The result gives a useful way to reason about MoE design. Increasing the total number of experts does not automatically improve the worst-case statistical rate. In the worst-case bound, the main quantity is the number of active parameters, while the total number of experts contributes through a logarithmic routing term.

In practice, larger expert pools can still help when routing is structured and experts specialize. This explains why the theory should be read as a conservative reference point rather than a full description of practical MoE training.

8. What the paper contributes

9. Limitations and future directions

The bound is worst-case and therefore conservative. It does not fully capture optimization dynamics, routing stability, load balancing, or data-dependent specialization. A natural next step is to replace worst-case routing counts with more adaptive measures such as effective routing entropy or data-dependent routing complexity.

Takeaway. MoE scaling is best understood by separating two quantities: the active capacity used for each input and the routing complexity needed to select experts. Dense-style scaling laws reappear when capacity is measured through \(N_{\mathrm{act}}\), while expert routing adds a specific overhead and may also enable specialization gains in practice.