arXiv:2611.09252cs.LGNov 2026

Manuscript Offprint

arXiv:2611.09252

Rethinking MoE Load Balancing as Feedback Control

Yikun Hou, Alp Yurtsever

Abstract

Mixture-of-Experts (MoE) training is often not stationary: the data mixture changes at curriculum boundaries, when a model is continually pretrained into a new domain, or when the corpus is refreshed. Routing is learned against the current mixture, so each such change disrupts the per-expert load the router had converged to, and existing balancing methods have only been evaluated on stationary data. We rethink load balancing as a feedback control problem, in which the deviation of each expert's load from its fair share is the control error and the per-expert routing bias is the control input, and define a family of controllers, the PID-Balancer, from the proportional, integral, and derivative terms of classical PID control. Two widely used methods belong to this family: the auxiliary balancing loss behaves like a proportional controller, and the loss-free bias update is an integral controller acting on the sign of the error. Reading the router as a static map with a one-step delay, we show that the integral term is the only one that both removes persistent imbalance and averages out the step-to-step fluctuation of the measured load, whereas the proportional and derivative terms pass or amplify that fluctuation into the routing bias. We therefore adopt PID (I), the pure-integral member of the family with a single gain. Two settings are evaluated: (i) training an OLMoE backbone from scratch with 16 to 64 experts per layer, through a mid-run mixture switch, and (ii) continual pretraining of the released OLMoE-1B-7B on a new corpus. PID (I) holds balance before the shift and restores it more tightly afterwards than either the auxiliary loss or loss-free balancing, at comparable perplexity.

1 Introduction

Mixture-of-Experts (MoE) architectures decouple model capacity from per-token compute by replacing dense feed-forward layers with sparsely-activated expert sub-networks (Fedus et al., 2022; Dai et al., 2024; Liu et al., 2024). Realizing this promise depends critically on one constraint: tokens must be distributed across experts rather than collapsing onto a small subset. Without active intervention, MoE routers exhibit a rich-get-richer dynamic. Early-trained experts attract more routing than others, gradient signal concentrates on them, and the remaining experts receive less training and become weaker (Eigen et al., 2013; Shazeer et al., 2017).

Load balancing is the mechanism that prevents this collapse, and existing methods fall into two families. The first adds an auxiliary loss that penalizes uneven expert usage, weighted by a tunable coefficient. This balancing pressure enters the router through the same backward pass as the language-modeling objective, and the two combine into a single gradient update to the router weights. The second, introduced by Wang et al. (2024) and popularized through its deployment in DeepSeek-V3 (Liu et al., 2024), moves that pressure out of the gradient. A per-expert bias, updated at each step in proportion to the sign of the load deviation, shifts which experts are selected while leaving the router weights to the language-modeling objective alone. Han and Zhong (2025) formalize this update as a single-shot primal-dual step for an assignment problem, in which the per-expert bias is identified with the dual variable of the load constraint.

Both families were largely developed and evaluated under a stationary training distribution, in which the per-expert loads tend to drift slowly and a balancing mechanism can settle and then hold. However, training is not always stationary. The distribution changes at a curriculum stage boundary, when continual pretraining extends a model into a new domain, or when the corpus itself is refreshed, and each such change disrupts the routing the model had converged to. We study load balancing in this setting along three axes, which are whether a mechanism maintains balance before the change, whether it restores balance after the change, and how much task performance it sacrifices.

We formulate load balancing as a feedback control loop. The imbalance of each expert, defined as its deviation from an equal share of the batch, is the control error, and a per-expert bias added to the router scores at selection time is the control input. Based on this formulation, we propose PID-Balancer, a discrete-time controller whose output combines the current error, its accumulated history, and its most recent change through three gains (KP,KI,KD)(K_P, K_I, K_D). By analyzing and ablating all three terms, we find that the integral term is the only one that both drives persistent imbalance to zero and prevents per-step fluctuations in the measured load from entering the bias. We therefore deploy PID (I), a linear integral controller with a single gain KIK_I, as our balancer. It achieves better load balance than all compared baselines in both the pretraining and continual pretraining settings.

Contributions are summarized as follows:

A unified control framework for MoE load balancing. We formulate the routing as a feedback loop, with the per-expert imbalance as the error and the bias added to the router scores as the control input. Within this formulation, we define PID-Balancer and provide a unified view of two widely used methods. ALF-LB (Wang et al., 2024) is exactly a relay integrator, and the auxiliary loss (Fedus et al., 2022) acts as a proportional mechanism.

A principled integral balancer. Under the control formulation, the map from bias to load is static and monotone, with a one-step delay, and it forms a feedback loop. For such a loop, only the integral term removes persistent imbalance and averages out per-step load fluctuations through its memory of past errors. We therefore adopt the integral-only PID (I) as our default balancer.

A drop-in balancer for pretrained models. PID (I) modifies neither the model weights nor the training objective, and it can be inserted directly into an existing pretrained model. We evaluate it on OLMoE-based models in both pretraining and continual pretraining, where PID (I) achieves the best load balance in every setting while maintaining comparable perplexity.

References (80)