What is the role of a gating network in a Mixture of Experts architecture?

Quick Overview

Asks what the gating network does in a Mixture of Experts model, in both dense and sparse top-k forms. Tests understanding of input-dependent routing, joint training of gate and experts, conditional computation, expert collapse and load balancing, and how gating differs from stacking.

What is the role of a gating network in a Mixture of Experts architecture?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What is the role of a gating network in a Mixture of Experts architecture? Cover both the classic dense formulation and the sparse version used in large Transformer models. ```hint Write the output down Express the layer's output in terms of the input, the experts and the gate, then ask which parts of that expression change from one input to the next. ``` ```hint Think about early training Suppose one expert happens to receive slightly more inputs than the others in the first few steps. Follow what that does to its quality and to the gate's later choices. ``` ### What a Strong Answer Covers - What the gate computes for each input, and how its output combines the experts - How the gate and the experts are trained, and how specialization arises - What sparse top-k gating changes about compute and parameter count - The routing failure modes and the standard countermeasures - How gating differs from a fixed ensemble or stacking ### Follow-up Questions - How does a load-balancing auxiliary loss work, and what happens if its weight is set too high? - What happens to tokens that exceed an expert's capacity, and how does the capacity factor trade quality against cost? - With top-1 routing, how does the gate still receive a gradient? - Why does a sparse MoE model with the same compute per token as a dense model still need more memory to serve?

Overview: Asks what the gating network does in a Mixture of Experts model, in both dense and sparse top-k forms. Tests understanding of input-dependent routing, joint training of gate and experts, conditional computation, expert collapse and load balancing, and how gating differs from stacking.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

What is the role of a gating network in a Mixture of Experts architecture? Cover both the classic dense formulation and the sparse version used in large Transformer models.

What a Strong Answer Covers Guidance

  • What the gate computes for each input, and how its output combines the experts
  • How the gate and the experts are trained, and how specialization arises
  • What sparse top-k gating changes about compute and parameter count
  • The routing failure modes and the standard countermeasures
  • How gating differs from a fixed ensemble or stacking

Follow-up Questions Guidance

  • How does a load-balancing auxiliary loss work, and what happens if its weight is set too high?
  • What happens to tokens that exceed an expert's capacity, and how does the capacity factor trade quality against cost?
  • With top-1 routing, how does the gate still receive a gradient?
  • Why does a sparse MoE model with the same compute per token as a dense model still need more memory to serve?