Yellow line = capacity (31.3%). Red bars = overflow → tokens dropped.
Auxiliary Load-Balancing Loss
Aux Loss
1.6542
Expected load/expert
25.0%
Load std dev
45.47%
The auxiliary loss penalizes unequal expert utilization. Without it, the router collapses - routing all tokens to the same few experts (expert collapse). With load balancing, experts are used more evenly.
Controls
Number of Experts
Experts8
464
Top-K
Options
MoE Routing: Each token is routed to only top-K experts out of N total. This gives MoE models more parameters than dense models while keeping compute per token constant. Expert collapse and load imbalance are the key failure modes.
Mixture-of-Experts routing sends each token to only a small subset of experts (top-K out of N), enabling models with vastly more parameters than a dense model while keeping per-token compute constant. The router is a learned linear layer that produces logits, softmax probabilities, and selects top-K experts. Without load balancing, the router collapses to always routing to the same experts - the auxiliary loss penalizes this imbalance.
Router produces logits for each expert, softmax gives selection probabilities
Top-K selection: only K experts process each token, rest are unused
Expert collapse: router learns to always pick same experts without auxiliary loss
Capacity factor controls expert buffer size - tokens overflow if experts are overloaded
Load balancing auxiliary loss encourages uniform utilization across experts
Part of the EngineersOfAI Interactive 3D - free interactive visualizations covering every major concept in machine learning and AI engineering. Hover any element for a plain-English explanation. No code required.