# Gating Network

> The part that picks which experts each token goes to.

**Field:** Artificial Intelligence  
**Category:** LLMs  
**Also known as:** MoE Router, Expert Router, Router Network

## Think of it like

It is like the person at a front desk. They send each visitor to the right two rooms.

## Definition

A gating network, or router, is the small part of a mixture of experts that picks the experts. For each token, it gives every expert a score. It keeps the top few, often one or two, and mixes their outputs by those scores. The other experts do no work for that token. In training, an extra rule pushes it to share tokens out evenly, so no expert sits idle.

## Example

In Emma's model, the router sees the token 'loop' and sends it to the two experts that score highest. The other six skip it.

## Why it matters

The router is why a mixture of experts is cheap to run. Only the experts it picks do any work.

## Common mistake

Thinking each expert learns a clear subject, like maths or French. Studies of real routers find the split follows kinds of tokens, not neat topics.

## Three principles

- **Score every expert.** One number each, for every token.
- **Keep the top few.** Often one or two.
- **Share the load.** Training keeps all experts busy.

## Related terms

- [Mixture of Experts (MoE)](https://learn.benibix.com/term/ai/mixture-of-experts)
- [Mixtral](https://learn.benibix.com/term/ai/mixtral)
- [Transformer](https://learn.benibix.com/term/ai/transformer)
- [Model Parameter](https://learn.benibix.com/term/ai/model-parameter)

## Taught in

- [Transformer Architecture](https://learn.benibix.com/learn/ai-llms/transformer-architecture): LLMs, 5/15

![A token goes into a router. The router sends it to two of eight experts, which are lit up. The other six are idle for this token.](https://learn.benibix.com/diagrams/llm-moe.svg)

---

Source: https://learn.benibix.com/term/ai/gating-network
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
