BASE Layers (Balanced Assignment of Sparse Experts) is an MoE layer that solves the problem of assigning tokens to experts as a constrained optimization (a linear assignment problem) in which every expert receives exactly the same number of tokens. It was proposed by Lewis et al. at Facebook AI Research in 2021. Because the load is always balanced, it needs neither the auxiliary loss nor the capacity factor that earlier MoE methods required, and it can be added to a language model with no new hyperparameters.
Sparsely-Gated MoE, GShard, and Switch Transformer train a gate (router) to decide where each token goes. However, the gate tends to keep choosing the same few experts. This made several workarounds necessary: adding an auxiliary loss to balance the load and tuning its weight, and setting a capacity (an upper limit on the tokens one expert can receive) so that overflowing tokens are not computed. The auxiliary loss does not guarantee a balanced load, and tokens that overflow the capacity do not get processed by that layer.
BASE Layers instead uses an algorithm to decide the training-time assignment directly, so that the "total affinity between tokens and experts" is maximized under the constraint that balances the load. In hospital terms, it is like a reception desk that distributes patients so that the overall fit between patients and departments is as good as possible, under the rule that "every department takes the same number of patients so that popular departments are not overwhelmed". Each token uses only one expert.

