+++ Meet us at SCCON in Berlin, 13–15 October +++ Experience Kolibri, our new sovereign model, live in action for the public sector +++ Hall 26C, Booth 126 +++

Aleph Alpha
Grainy coral gradient with scattered pixel blocks on the left that settle into evenly spaced vertical bars on the right
Research

Jiaze LiPit Neitemeier

Balancing Experts at Two Scales: Exact Quantile Balancing and Load-Error Injection

Background

It=TopK⁡(Zt,:+β⊤,K),St,e=sigmoid⁡(Zt,e).\begin{aligned} \mathcal I_t&=\operatorname{TopK}(Z_{t,:}+\beta^\top,K),\\ S_{t,e}&=\operatorname{sigmoid}(Z_{t,e}). \end{aligned}
ytrouted=∑e∈ItSt,eFe(xt).y_t^{\mathrm{routed}}=\sum_{e\in\mathcal I_t}S_{t,e}F_e(x_t).
fe(B)=ce(B)K∣B∣/E,f_e(\mathcal B)=\frac{c_e(\mathcal B)}{K|\mathcal B|/E},
ρe(B)=fe(B)−1.\rho_e(\mathcal B)=f_e(\mathcal B)-1.
MaxVio⁡(B)=max⁡eρe(B).\operatorname{MaxVio}(\mathcal B)=\max_e\rho_e(\mathcal B).
Throughput (tokens/s)16.0k16.1k16.2k16.3k16.4k16.5k2345678Local imbalance (Local MaxVio)
Figure 1. Local imbalance and training throughput. Each point summarizes ten training steps. The axes show local imbalance (Local MaxVio) and training throughput in tokens per second. Within this run, higher local imbalance is associated with lower throughput, consistent with devices waiting for overloaded experts. Hover or tap a point to read its values.

Quantile Balancing

Mt,e={1,e∈It,0,otherwise.M_{t,e} = \begin{cases} 1, & e \in \mathcal I_t,\\ 0, & \text{otherwise}. \end{cases}
At,e=Zt,e+βe+αt.A_{t,e}=Z_{t,e}+\beta_e+\alpha_t.
Mt,e=1  ⟺  At,e>0.M_{t,e}=1 \iff A_{t,e}>0.

+0.00
Figure 2. Changing one expert's bias under two routing rules. Eight tokens select among four experts, with a target of two assignments per expert. Bar height represents the bias-adjusted router logit, red marks selected entries, and planes mark selection cutoffs. Raise A's bias with the slider and compare the load counts: top-1 takes assignments from other experts, while a fixed zero threshold changes only A's load. Fixed thresholds separate expert loads but do not enforce one expert per token.
∑eMt,e=K,∑tMt,e=r.\sum_e M_{t,e}=K,\qquad \sum_t M_{t,e}=r.
αt←−QK ⁣(Zt,:+β⊤),βe←−Qr ⁣(Z:,e+α).\begin{aligned} \alpha_t&\leftarrow-Q_K\!\left(Z_{t,:}+\beta^\top\right),\\[5pt] \beta_e&\leftarrow-Q_r\!\left(Z_{:,e}+\alpha\right). \end{aligned}

One threshold at zero

With one threshold, the experts select very different shares of their tokens. Each cutoff qₑ leaves 25% to its right.

e1q17%e2q273%e3q311%e4q458%0Adjusted logit →selected
0%
Figure 3. Meeting expert quotas by shifting logits. Each row shows one expert’s distribution of token-adjusted logits across tokens: horizontal position is the logit and curve height is density. Shading marks logits above zero, which are selected. The cutoff qₑ leaves 25% of tokens to its right. Press Play or drag the slider to add the bias βₑ = −qₑ: each distribution shifts until its cutoff lands at zero, and all experts then select 25%, despite their different distributions. Arrows show the remaining shifts.

Token shift αₜ Expert shift βₑ

Figure 4. Token and expert bias updates, step by step. The floor axes index eight tokens and four experts; bars represent router logits, red marks selected entries, and planes mark cutoffs. Token bias αₜ shifts a row to select one expert per token; expert bias βₑ shifts a column to target two tokens per expert. Play follows both updates and the return to top-1 routing. Loads change from (4, 3, 1, 0) to (2, 2, 2, 2) in this example. Vertical display offsets preserve logits relative to the cutoff planes.

Biases in Training and Inference

Exact Quantile Balancing

Locate the global quota cutoff

For a quota of 12 among 24 values, the cutoff is the 12th-smallest value, leaving 12 values above it. The first histogram pass locates its tens bin; the second resolves its ones digit within that bin.

Two-digit radix selection across two ranks Two ranks each hold 12 two-digit values. A quota of 12 requires the 12th-smallest value as the global cutoff. Each rank counts tens digits locally; an all-reduce sums matching bins. The global cumulative counts, divided by 24, cross the target 12/24 at tens bin 5. Seven values precede that bin, so the target is its fifth-smallest value. The second pass counts ones digits only for the nine values in that bin. After another all-reduce, cumulative counts are divided by nine and compared with target 5/9. The crossing selects ones digit 5. Combining the selected digits gives cutoff 55, leaving 12 values above it.
1 / 8

Figure 5. Finding a global quota cutoff with two histogram passes. Tens and ones illustrate the high and low bytes of BF16 sortable keys. Global counts first locate the cutoff's tens bin, then resolve its ones digit within that bin, yielding 55 with 12 values above it. The example uses 10 bins per digit. In the real case, EQB uses 256 bins per byte and communicates only histogram counts.
2×E×256×4 bytes2\times E\times256\times4\text{ bytes}
=2,048E bytes.{}=2{,}048E\text{ bytes}.

Load-Error Injection

Microbatch 112345678MaxVio 1.00Microbatch 212345678MaxVio 1.00Combined12345678MaxVio 0.00

Microbatch 1Microbatch 2Above target

Hover or tap an expert to follow it across the panels.

Figure 6. Local imbalance can cancel globally. Bar positions identify the same eight experts in each panel; heights count token assignments. Dashed lines mark the uniform target, and red marks excess load. Each microbatch has 24 assignments, with its busiest experts receiving twice the target of three (MaxVio = 1). Stacked, the two microbatches give every expert six assignments (MaxVio = 0). Balanced totals over a training step therefore do not guarantee balanced microbatches.

Injecting the Local Load Error

Gt,e←Gt,e+λρe,t∈Bl,G_{t,e}\leftarrow G_{t,e}+\lambda\rho_e,\qquad t\in\mathcal B_{\mathrm l},

GShard and LEI as Straight-Through Estimators

Derivation

Experiments

Results at 100B tokens on the 7.5B-parameter proxy model. MaxVio is the worst MoE layer per step and, like Max LSE, averaged over the final 1,000 steps. Bold marks the best value per metric; Max LSE is a stability check, not a score.
Method MaxVio ↓ Mean BPB ↓ Max LSE
Global Local
Rank-avg. QB 0.92 5.96 0.6782 25.8
EQB 0.74 5.38 0.6570 28.0
EQB + GShard loss 0.71 4.71 0.6853 31,500
EQB + LEI 0.60 3.49 0.6758 33,400
EQB + bounded GShard loss 0.74 4.30 0.6758 29.3
EQB + bounded LEI 0.60 3.52 0.6720 27.5

Dashed lines: unbounded score-side correction. Select a run to highlight it.

Global MaxViolower is better0.40.81.21.6Local MaxViolower is better2468Max SWA attention LSEstability check101001k10k100kunbounded correctionbounded correction, and both baselines12040608098tokens seen (billions)
Figure 7. Balance and stability across six 100B-token runs. The horizontal axis is tokens seen. Global and Local MaxVio measure expert overload over an optimizer step and within microbatches; lower is better. The bottom panel shows sliding-window attention log-sum-exp (LSE) on a logarithmic scale. EQB computes exact global quantiles; GShard and LEI add local balancing corrections. Dashed lines mark unbounded corrections. LEI improves local balance, but unbounded corrections produce large LSE growth; bounding them retains the balance gains while keeping LSE near the baselines. Hover to read every run at one point in training, or select a run in the legend to highlight it.

Takeaways

Citation

@misc{neitemeier2026eqb,
  title         = {Exact Quantile Balancing and Load-Error Injection for Mixture-of-Experts},
  author        = {Pit Neitemeier and Jiaze Li and Alessio Serra and Philipp Scholl and Sohir Maskey},
  year          = {2026},
  eprint        = {2609.28053},
  archivePrefix = {arXiv},
  primaryClass  = {cs.LG},
  url           = {https://arxiv.org/abs/2609.28053}
}

Acknowledgements

References