Mixture of Experts

Mixture-of-experts models route each input through a subset of expert modules. The pattern separates model capacity from the amount of computation used per token or example.

A sparse MoE layer can be summarized as:

Here is the router distribution, is the selected expert set, is expert , and is the normalized routing weight for selected experts.

Sparse routing separates total parameters from activated parameters:

This is the main reason MoE is attractive for scaling, but it also makes serving and load balancing harder.

Key Ideas

  • A router selects one or more experts for each token, example, node, or region.
  • Sparse MoE increases parameter count while activating only a subset of parameters per input.
  • Experts are often feed-forward blocks, but the pattern can apply to other modules.
  • Load-balancing losses or routing constraints keep a few experts from receiving all traffic.
  • Routing can create specialization, but specialization should be checked rather than assumed.

Router Checks

FieldWhy It Matters
Granularitytoken, sequence, graph, modality, or task routing changes the claim
Top-kcontrols active compute and redundancy
Capacity factordetermines whether tokens are dropped or rerouted under load
Auxiliary lossprevents expert collapse or severe imbalance
Expert typeusually FFN, but can be modality-specific or task-specific
Serving pathsparse routing can hurt latency even when FLOPs look low

Load Balancing

Sparse routing creates a systems problem: the model can have enough total experts while a few experts receive most tokens. A simple routing utilization for expert is:

Balanced routing wants to be close to for experts, while still sending each token to useful experts. Many MoE papers add an auxiliary loss that penalizes imbalance:

The exact form varies, so paper notes should record router probability, selected expert frequency, capacity factor, and dropped-token policy separately.

Capacity and Dropped Tokens

Each expert often has a capacity limit per batch:

where is tokens, is top-k routing, is number of experts, and is the capacity factor. If too many tokens route to one expert, implementations may drop, reroute, or pad tokens. That detail changes both quality and latency.

MoE Claim Types

ClaimEvidence Needed
more capacitytotal parameters and active parameters reported separately
cheaper computeactivated FLOPs, memory traffic, communication, and wall time
expert specializationrouting distribution and per-task/per-domain behavior
scalable trainingexpert parallelism, all-to-all overhead, load balance
efficient servinglatency at realistic batch size, cache behavior, and routing overhead

Canonical Papers

PaperWhy It Matters
Sparsely-Gated MoEdefines sparse expert routing, noisy top- gates, and load-balancing as part of the layer contract
GShardconnects MoE Transformer architecture to automatic sharding and large-scale distributed training
Switch Transformersimplifies sparse Transformer MoE with top-1 routing
GLaMapplies sparse expert routing to large autoregressive language-model scaling
Jambacombines sparse MoE feed-forward layers with a hybrid Transformer-Mamba language-model backbone

Where MoE Fits

MoE is not a replacement for choosing a base architecture. It is usually a routing layer inserted into a Transformer, MLP block, multimodal system, or task-specific model.

Base contextWhat MoE changes
Transformer FFNincreases parameter capacity per token with sparse FFN activation
multimodal modelroutes by modality, task, or token type
multi-task modelseparates capacity across tasks while sharing interface layers
agent systemshould be distinguished from explicit tool routing or workflow routing

If the router chooses external tools, APIs, or actions, the note belongs closer to tool use than to MoE.

Practical Checks

  • Check routing granularity: token-level, sequence-level, graph-level, modality-level, or task-level.
  • Track top-k choice, capacity limits, dropped tokens, and auxiliary routing losses.
  • Compare parameter count, activated parameter count, memory traffic, and inference latency separately.
  • For agent or tool systems, distinguish MoE routing from explicit tool use.
  • Do not infer interpretability from expert names; measure routing distributions and task behavior.