This one took me a second to organize because there's genuinely a lot to say.
Start by explaining why argmax is non-differentiable and the need for a differentiable relaxation. Then present two concrete approaches: (1) softmax with temperature annealing and (2) Gumbel-Softmax (or Concrete) relaxation. Compare them across the requested dimensions and discuss load balancing and expert collapse mitigation.
Pro tip: Emphasize that the choice depends on whether you need hard routing at inference; Gumbel-Softmax allows straight-through estimation for hard decisions while keeping gradients, but temperature annealing is critical for stability.
Argmax is non-differentiable, so gradients cannot flow to the router. We need a differentiable approximation that still yields near-hard routing.
Replace argmax with softmax over router logits, optionally with a temperature parameter that is annealed to sharpen the distribution. This makes routing fully differentiable.
Use Gumbel-Softmax to sample a differentiable approximation of a one-hot vector. With straight-through, you can use hard routing in the forward pass and soft gradients in the backward pass.
Discuss training stability, output quality, compute cost, and implementation complexity for each. Softmax is simpler but may produce soft mixtures; Gumbel-Softmax is more complex but enables hard routing.
Introduce auxiliary losses: load balancing loss to encourage equal expert usage, and importance loss to prevent collapse. Also consider noise injection or capacity constraints.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.