Sparsely-Gated Mixture-of-Experts

The paper made conditional computation practical by routing each example or token through a sparse subset of expert networks.

Metadata

FieldValue
PaperOutrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layer
AuthorsNoam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, Jeff Dean
Year2017
VenueICLR 2017
arXiv1701.06538
OpenReviewB1ckMDqlg
Statusfull note started

Question

Dense neural networks tie capacity and computation together. If a layer has many parameters, every input usually pays for most of those parameters.

The paper asks:

The proposed answer is conditional computation: keep many expert modules available, but activate only a small subset for each input.

Main Claim

A sparsely-gated Mixture of Experts layer can increase total parameter capacity while keeping active computation relatively small.

The durable architecture claim is:

This paper is the canonical predecessor to later sparse Transformer MoE models such as Switch Transformer.

Architecture Contract

ComponentInputOutputRole
input representationrouter inputdecide which experts should run
gating networksparse gate vector choose and weight experts
expert networks routed to selected expertsexpert outputsprovide large conditional capacity
dispatcherbatch of inputsper-expert mini-batchesgroup inputs by selected experts
combinerexpert outputs and gateslayer outputmerge selected expert outputs
load lossesrouter statisticsauxiliary lossprevent expert collapse

The key contract is:

MoE Layer

Let there be expert networks:

For an input , a gating network produces expert scores:

The dense mixture form would be:

That is expensive when is large. The sparsely-gated version selects only the top- experts:

The output is:

where is nonzero only for selected experts.

Noisy Top-k Routing

Pure top- routing can become brittle: small score changes can switch experts, and the router may collapse to a small subset of experts.

The paper uses noisy gating:

where is noise and controls noise scale.

The sparse gate is then computed over the selected experts:

and:

The output becomes:

Why Load Balancing Is Part of the Architecture

Sparse MoE is not just a mathematical layer. It creates a routing system. If most inputs choose the same expert, capacity is wasted and computation becomes imbalanced.

For a batch , define expert load:

Balanced routing wants each to be close to:

The paper adds auxiliary losses to encourage:

This became a lasting design principle for sparse MoE papers: routing quality and systems balance are part of the model, not an implementation detail.

Conditional Compute Scaling

Dense scaling roughly follows:

Sparse MoE tries to change the scaling relationship:

The important distinction is:

QuantityMeaning
total parametersall expert parameters plus shared model parameters
active parametersparameters used by selected experts for a given input
routing costgate computation and dispatch/combination overhead
communication costmoving token/expert batches across devices

A paper that reports only total parameters can make sparse models look larger than the computation each token uses. A paper that reports only FLOPs can hide routing and communication costs.

Relation to Switch Transformer

AxisSparsely-Gated MoESwitch Transformer
base model in paperLSTM/convolutional sequence modelsTransformer
routernoisy top- gatesimplified top-1 router
expert typefeed-forward expert sub-networksTransformer FFN experts
central problemmake conditional compute practicalsimplify sparse Transformer scaling
lasting conceptsparse expert routingtop-1 expert routing at Transformer scale

The lineage is:

Evidence

Evidence TypeWhat It Supports
large expert-count experimentssparse routing can support much larger parameter counts than dense active compute
language modeling and machine translation resultsconditional capacity can improve sequence modeling tasks
efficiency analysisactive compute and total capacity can be partially decoupled
routing/load analysisauxiliary balancing is needed for practical expert utilization

Evaluation Risks

  • Total parameter count does not equal active compute.
  • Sparse MoE may improve quality because of extra capacity, not because experts are interpretable.
  • Load balancing losses can change task loss and specialization behavior.
  • Wall-clock speed depends on dispatch, batching, device placement, and communication.
  • Expert specialization should be measured from routing behavior, not inferred from expert IDs.

Why It Belongs in Architecture Papers

The paper defines a reusable layer contract:

That contract is now central to sparse LLMs, multimodal routing, large-capacity Transformers, and systems-aware model design.

Concepts