alphaFeedback

WorksComputer Science

Provably Learning Mixtures of Linear Experts

AI contributions
Not recorded for this paper
View details

Abstract

Mixture-of-Experts (MoE) models are widely deployed in modern machine learning. However, few convergence guarantees exist for gradient-based training of MoEs: the objective is nonconvex, and even simple mixtures trap first-order methods in spurious local optima. We analyze a canonical gated mixture featuring linear experts and a gate induced by Gaussian clusters in the input space, and give, to our knowledge, the first global convergence guarantee for jointly training the gate and the experts of such a model by gradient EM on its likelihood. Given a logarithmic overparameterization relative to the true number of experts mm, gradient EM converges from randomly initialized gates and least-squares-initialized experts to any prescribed accuracy in polynomially many iterations, under a separation condition on the gate centers. Our analysis establishes a gradient-dominance inequality for the coupled dynamics by decoupling the loss into per-cluster subproblems. Empirical results validate the predicted mlog⁡mm\log m phase transition and suggest that the least-squares warm start required by our analysis is not needed in practice: randomly initialized experts perform nearly as well. We also find that leaving the mixing weights unconstrained concentrates routing onto the true number of experts, whereas load-balancing penalties spread it, so that the fitted model can be pruned to a fraction of its width without loss of accuracy.

Introduction

Mixture-of-experts (MoE) models decompose a prediction problem across a collection of specialized experts, with a gate (or router) that decides which experts are responsible for each input (Jacobs et al., [10]; Jordan & Jacobs, [12]). The idea is now standard in large models: sparsely gated MoE layers let the parameter count of a network grow by orders of magnitude while the compute per input stays fixed (Shazeer et al., [23]; Fedus et al., [6]). Often, many more experts than are necessary are initialized, the gate is initialized at random, and expert load-balancing penalties are implemented to incentivize broad expert utilization. Each of these choices is motivated by experience rather than theory. Why gradient-based training of a gated mixture should succeed at all is only partly understood.

An MoE can be seen as a latent-variable model whose likelihood is nonconvex. The nonconvexity comes from the coupling of gate and experts: the gate decides which expert sees which data, and the experts’ errors feed back into the gate. The theory of expectation–maximization (EM) has shed considerable light on the specific latent-variable model of a Gaussian mixture model (GMM). When the GMM has exactly as many components as the ground-truth, EM and its gradient variants enjoy global guarantees only for two components (Xu et al., 2016; Daskalakis et al., [3]) or from a good initialization (Balakrishnan et al., [1]; Yan et al., [29]), and for three or more Gaussian components the population likelihood provably has spurious local maxima that trap EM from random initialization with high probability (Jin et al., [11]). A recent line of work has shown that this obstruction disappears when the model is over-parameterized: with n=Ω(mlog⁡m)n = \Omega(m \log m) fitted components, randomly initialized gradient EM recovers an mm-component Gaussian mixture in polynomial time, first for m=1m = 1 (Xu et al., [28]) and then for general well-separated mixtures (Zhou et al., 2020). Recent work on MoEs over-provision of experts so that every latent cluster is covered at initialization is the mechanism behind recent gradient-based analyses (Chen et al., [2]; Kawata et al., [13]; Liao & Kyrillidis, 2026). Whether it carries the joint likelihood dynamics of gate and experts has remained open.

In this paper we give a global convergence guarantee for gradient-based training of a Gaussian-gated mixture of linear experts. Data are generated by drawing a latent expert index ℓ\ell with probability πℓ\pi_\ell, then an input x∼N(μℓ,Id)x \sim\mathcal{N}(\mu_\ell, I_d), and finally a response y=xTθℓ∗+ϵy = x^{\mathsf{T}}\theta_\ell^*+\epsilon with ϵ∼N(0,1)\epsilon\sim\mathcal{N}(0,1), independent of (ℓ,x)(\ell,x). Although this is a generative model, its predictive function is exactly an MoE in the sense used in practice. A quick calculation shows that

E[y∣x]=∑i=1nsoftmax⁡i(⟨x,μi⟩+bi)xTθi,bi=log⁡πi−12∥μi∥2,(1)\mathbb{E}[y \mid x] = \sum_{i=1}^{n} \operatorname{softmax}_i\left(\langle x,\mu_i\rangle+b_i\right)x^{\mathsf{T}}\theta_i,\qquad b_i=\log\pi_i-\frac{1}{2}\lVert\mu_i\rVert^2, \tag*{(1)}

that is, a softmax router with weights μi\mu_i and biases bib_i with linear experts θi\theta_i. The mixing weights πi\pi_i, which are usually fixed or ignored in MoE analysis, play the role of learnable router biases. We train this model by gradient EM on the population log-likelihood, which we show coincides with gradient descent on the Kullback–Leibler (KL) divergence between the truth and the model.

Our main result (Theorem 4.1) states that when the fitted model has n≳mlog⁡mn \gtrsim m\log m experts, the gates are initialized at random from the data, the experts are initialized by a windowed least-squares fit, and the true gate centers are well separated, gradient EM drives the population KL loss below any target ϵ≥e−cdn\epsilon\ge e^{-cdn} within a polynomial number of steps. Global guarantees for gradient-based MoE training exist for staged algorithms, purpose-built losses and specific teacher models (§ 2); to our knowledge this is the first for joint training of gate and experts on the likelihood itself, and the first in which the mixing weights are free. The proof establishes a gradient-dominance inequality. A central difficulty is controlling the expert parameters: the expert errors (residuals) y−xTθiy-x^{\mathsf{T}}\theta_i have to remain bounded within a shrinking budget throughout training. The least-squares warm start supplies the initial bound on the residuals, and an expert-drift argument ensures the budget is not violated.

Our contributions are as follows.

  • A global guarantee for joint gate–expert training (Theorem 4.1): with n≳mlog⁡mn \gtrsim m\log m experts (for balanced mixing weights), random gates and least-squares experts, population gradient EM reaches any accuracy ϵ≥e−cdn\epsilon\ge e^{-cdn} in polynomially many steps.

  • A proof technique that decouples the loss into per-cluster problems, controls each by a Gaussian log-Sobolev inequality, and keeps the expert residuals inside a shrinking budget along the whole trajectory.

  • Experiments showing (i) a sharp success transition along n∼mlog⁡mn \sim m\log m (Figure 1), (ii) that randomly initialized experts succeed almost as often as least-squares experts once the gates cover the clusters (Figure 2), and (iii) that free mixing weights concentrate routing on about mm experts and make the model prunable, while load-balancing penalties destroy both properties (Figure 3 and Figure 4).

Probability of global convergence across parameterization regimes

Figure 1. Probability of global convergence across parameterization regimes, with the LS warm start (35 trials per cell). The dashed line is the reference curve n=mlog⁡mn = m \log m.

Success probability versus fitted width for LS and random expert initialization

Figure 2. Success probability versus fitted width for LS and random expert initialization. (Left) Weak gate separation. (Right) Strong gate separation. Shaded regions are confidence intervals over the 20 seeds.

Router utilization and recovery performance

Figure 3. Effect of router load-balancing regularization on expert utilization and recovery. (a) Effective number of routed experts, neffn_{\mathrm{eff}}, against the router-KL strength λ\lambda for uniform and skewed ground-truth mixture weights. Dotted lines show the corresponding oracle expert counts. (b) Recovery success against λ\lambda for the same two ground truths. Error bars are 95% confidence intervals.

Global expert pruning

Figure 4. Effect of global expert pruning. Mean held-out conditional KL over all 20 seeds, including unsuccessful training runs, is evaluated after retaining the kk experts with the largest learned mixing weights, renormalized without retraining, for (a) uniform and (b) skewed ground-truth mixture weights. The dotted line at 0.02 is the joint-KL threshold used to define training success.

Related Work

EM for exactly parameterized mixtures. The convergence of EM for Gaussian mixtures was studied early by Xu & Jordan [27]. Modern convergence theory begins with Balakrishnan et al. [1], who showed that population EM converges locally at a geometric rate, and verified this for two-component Gaussian mixtures and two-component mixed linear regression. Subsequent work extended these guarantees to mixtures of many linear regressions, to two-component mixed linear regression from random initialization, and to well-separated Gaussian mixtures ([15, 16, 14]). For three or more components the picture changes: Jin et al. [11] showed that the population log-likelihood has spurious local maxima to which EM from random initialization converges with high probability.

Over-parameterized mixtures. Fitting more components than the data contain changes the picture. Dwivedi et al. [5] showed that over-specification creates singularities in the Fisher information and slows the local rate of EM from geometric to polynomial, and Xu et al. [28] then proved the first global result in this regime: gradient EM fitting an nn-component mixture to a single Gaussian converges from random initialization at rate O(1/t)O(1/\sqrt{t}). Zhou et al. [30] extended this to a general mm-component, well-separated Gaussian mixture, showing that n=Ω(mlog⁡m)n=\Omega(m\log m) components suffice for randomly initialized gradient EM to converge globally in polynomial time and with polynomially many samples. Our analysis builds on their framework; the experts add a second parameter set whose errors enter the gate through the regression residuals, and controlling that coupling is the main new difficulty.

Theory of mixtures of experts. Mixtures of experts were introduced by Jacobs et al. [10] and Jordan & Jacobs [12], who already proposed EM for training them. A recent body of work analyzes the statistical properties of MoE estimators: convergence rates of the maximum-likelihood estimator for Gaussian MoEs (Ho et al., [9]) along with the effect of the softmax gate on identifiability and rates (Nguyen et al., [20, 21]). The Gaussian-gated model of Nguyen et al. [22] is closest to ours; however, these results concern the estimator rather than the algorithm that computes it. On the algorithmic side, Fruytier et al. [7] cast EM for mixtures of experts as mirror descent and obtain local guarantees. Makkuva et al. [18] recover the experts by a moment method and then the gate by EM, and Makkuva et al. [19] obtain global guarantees for gradient descent by designing separate losses for the gate and the experts. Closest to us are analyses of gradient-based training under a latent cluster structure: Chen et al. [2] (top-1 routing and classification, where the nonlinearity of the experts is essential), Kawata et al. [13] (Gaussian clusters with single-index targets, trained by a multi-phase SGD schedule that updates the router and the experts separately), and Liao & Kyrillidis [17] (joint gradient flow on the population squared error for a normalized sigmoid router with Hermite experts, an orthonormal teacher and d≥poly⁡(m)d \ge\operatorname{poly}(m), followed by pruning). All three provision Ω(mlog⁡m)\Omega(m \log m) experts so that every cluster is covered at initialization, as we do. We differ in analyzing the likelihood objective directly, with gate, experts and mixing weights trained jointly by one gradient method, for arbitrary well-separated centers and mixing weights and without a high-dimensional regime.

Routing and load balancing in practice. Sparsely gated MoE layers (Shazeer et al., [23]) and their simplifications (Fedus et al., [6]) route each input to a few experts and add an auxiliary loss that penalizes imbalanced expert utilization, since imbalanced routing wastes capacity and complicates parallel execution. In the idealized case where the fraction of inputs dispatched to expert ii equals its average routing probability ρˉi\bar{\rho}_i, the Switch auxiliary loss (Fedus et al., [6]) equals n∑i=1nρˉi2=n/neffn \sum_{i=1}^{n} \bar{\rho}_i^2 = n/n_{\mathrm{eff}}, where neff:=(∑i=1nρˉi2)−1n_{\mathrm{eff}} := \left(\sum_{i=1}^{n} \bar{\rho}_i^2\right)^{-1} is the effective number of experts the router uses; minimizing the penalty therefore pushes utilization toward the full fitted width nn. More recently, balancing has also been pursued through per-expert bias terms that are added to the routing scores used for expert selection and adjusted by a rule during training, instead of through an auxiliary loss (Wang et al., [25]; DeepSeek-AI [4]). These biases still aim at balanced load, but they leave the gradient objective untouched.

Learning a Mixture of Experts

Problem Statement

Our data model is an mm-component mixed linear regression in which each regression vector has its own Gaussian covariate cluster. A sample z=(x,y)∈Rd×Rz=(x,y)\in\mathbb{R}^{d}\times\mathbb{R} is generated by

ℓ∼Cat⁡(π1⋆,…,πm⋆),x∣ℓ∼N(μℓ⋆,Id),y∣x,ℓ∼N(xTθℓ⋆,1).\ell\sim\operatorname{Cat}(\pi_1^\star,\ldots,\pi_m^\star), \qquad x \mid\ell\sim\mathcal{N}(\mu_\ell^\star,I_d), \qquad y \mid x,\ell\sim\mathcal{N}(x^\mathsf{T}\theta_\ell^\star,1).

We can now define the mixture distribution p⋆p_\star over zz. Let φ(x;α):=(2π)−d/2e−∥x−α∥2/2\varphi(x;\alpha):=(2\pi)^{-d/2}e^{-\|x-\alpha\|^2/2} denote the p.d.f. of a Gaussian with mean α∈Rd\alpha\in\mathbb{R}^d and unit covariance and write the one dimensional case as φ1(y;α)\varphi_1(y;\alpha). Also, let Pk⊂Rk+1\mathcal{P}^k\subset\mathbb{R}^{k+1} denote the probability simplex. For μ∈Rd\mu\in\mathbb{R}^d and θ∈Rd\theta\in\mathbb{R}^d the joint density of one component is φ(z;μ,θ):=φ(x;μ)φ1(y;xTθ)\varphi(z;\mu,\theta):=\varphi(x;\mu)\varphi_1(y;x^\mathsf{T}\theta). The ground truth is then the mm-component joint density

p⋆(z)=∑ℓ=1mπℓ⋆φ(z;μℓ⋆,θℓ⋆),π⋆∈Pm−1(2)p_\star(z)=\sum_{\ell=1}^{m}\pi_\ell^\star\varphi(z;\mu_\ell^\star,\theta_\ell^\star), \qquad\pi^\star\in\mathcal{P}^{m-1} \tag*{(2)}

and the over-parameterized model has n≥mn\ge m experts,

p(z)=p(z;π,μ,θ)=∑i=1nπiφ(z;μi,θi),π∈Pn−1.(3)p(z)=p(z;\pi,\mu,\theta)=\sum_{i=1}^{n}\pi_i\varphi(z;\mu_i,\theta_i), \qquad\pi\in\mathcal{P}^{n-1}. \tag*{(3)}

We write φi(z):=φ(z;μi,θi)\varphi_i(z) := \varphi(z; \boldsymbol{\mu}_i, \boldsymbol{\theta}_i) and φℓ∗(z):=φ(z;μℓ∗,θℓ∗)\varphi_\ell^*(z) := \varphi(z; \boldsymbol{\mu}_\ell^*, \boldsymbol{\theta}_\ell^*), and drop parameter arguments when they are clear from context. Define πmin⁡:=min⁡ℓπℓ∗\pi_{\min} := \min_\ell\pi_\ell^*. We write Eℓ:=Ez∼φℓ∗\mathbb{E}_\ell:= \mathbb{E}_{z \sim\varphi_\ell^*} for expectation under the ℓ\ellth true component, i.e., x∣ℓ∼N(μℓ∗,Id)x \mid\ell\sim\mathcal{N}(\boldsymbol{\mu}_\ell^*, I_d) and then y∣x,ℓ∼N(x⊤θℓ∗,1)y \mid x,\ell\sim\mathcal{N}(x^\top\boldsymbol{\theta}_\ell^*, 1), so that Ep∗=∑ℓπℓ∗Eℓ\mathbb{E}_{p_*} = \sum_\ell\pi_\ell^* \mathbb{E}_\ell.

Let Sℓ:={i∈[n]:∥μi−μℓ∗∥≤∥μi−μj∗∥ ∀j}S_\ell:= \{i \in[n] : \|\boldsymbol{\mu}_i - \boldsymbol{\mu}_\ell^*\| \le\|\boldsymbol{\mu}_i - \boldsymbol{\mu}_j^*\| \ \forall j\} (ties broken by a fixed rule) be the Voronoi group of μℓ∗\boldsymbol{\mu}_\ell^*, ℓ(i)\ell(i) the group of ii, π^ℓ:=∑i∈Sℓπi\hat{\pi}_\ell:= \sum_{i \in S_\ell} \pi_i and

Uμ(μ):=∑ℓ∑i∈Sℓ∥μi−μℓ∗∥2,Uθ(μ,θ):=∑ℓ∑i∈Sℓ∥θi−θℓ∗∥2,U:=Uμ+Uθ(4)U_\mu(\boldsymbol{\mu}) := \sum_\ell\sum_{i \in S_\ell} \|\boldsymbol{\mu}_i - \boldsymbol{\mu}_\ell^*\|^2,\qquad U_\theta(\boldsymbol{\mu},\boldsymbol{\theta}) := \sum_\ell\sum_{i \in S_\ell} \|\boldsymbol{\theta}_i - \boldsymbol{\theta}_\ell^*\|^2,\qquad U := U_\mu+ U_\theta \tag*{(4)}

measure how far the fitted components sit from the truth of their group.

EM Algorithm

References

  1. [1]Sivaraman Balakrishnan, Martin J. Wainwright, and Bin Yu. Statistical guarantees for the EM algorithm: From population to sample-based analysis. The Annals of Statistics, 45(1):77–120, 2017.arxiv.org/abs/1408.2156
  2. [2]Zixiang Chen, Yihe Deng, Yue Wu, Quanquan Gu, and Yuanzhi Li. Towards understanding the Mixture-of-Experts layer in deep learning. In Advances in Neural Information Processing Systems, 2022.DOI
  3. [3]Constantinos Daskalakis, Christos Tzamos, and Manolis Zampetakis. Ten steps of EM suffice for mixtures of two Gaussians. In Conference on Learning Theory, 2017.
  4. [4]DeepSeek-AI. DeepSeek-V3 technical report. arXiv preprint arXiv:2412.19437, 2024.arxiv.org/abs/2412.19437
  5. [5]Raaz Dwivedi, Nhat Ho, Koulik Khamaru, Martin J. Wainwright, Michael I. Jordan, and Bin Yu. Singularity, misspecification and the convergence rate of EM. The Annals of Statistics, 48(6):3161–3182, 2020.arxiv.org/abs/1810.00828
  6. [6]William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1–39, 2022.
  7. [7]Quentin Fruytier, Aryan Mokhtari, and Sujay Sanghavi. Learning mixtures of experts with EM: A mirror descent perspective. In International Conference on Machine Learning, 2025.arxiv.org/abs/2411.06056
  8. [8]Leonard Gross. Logarithmic Sobolev inequalities. American Journal of Mathematics, 97(4):1061–1083, 1975.
  9. [9]Nhat Ho, Chiao-Yu Yang, and Michael I. Jordan. Convergence rates for Gaussian mixtures of experts. Journal of Machine Learning Research, 23(323):1–81, 2022.
  10. [10]Robert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. Adaptive mixtures of local experts. Neural Computation, 3(1):79–87, 1991.DOI
  11. [11]Chi Jin, Yuchen Zhang, Sivaraman Balakrishnan, Martin J. Wainwright, and Michael I. Jordan. Local maxima in the likelihood of Gaussian mixture models: Structural results and algorithmic consequences. In Advances in Neural Information Processing Systems, 2016.arxiv.org/abs/1609.00978
  12. [12]Michael I. Jordan and Robert A. Jacobs. Hierarchical mixtures of experts and the EM algorithm. Neural Computation, 6(2):181–214, 1994.
  13. [13]Ryotaro Kawata, Kohsei Matsutani, Yuri Kinoshita, Naoki Nishikawa, and Taiji Suzuki. Mixture of experts probably detect and learn the latent cluster structure in gradient-based learning. In International Conference on Machine Learning, 2025.
  14. [14]Jeongyeol Kwon and Constantine Caramanis. The EM algorithm gives sample-optimality for learning mixtures of well-separated Gaussians. In Conference on Learning Theory, 2020a.arxiv.org/abs/2002.00329
  15. [15]Jeongyeol Kwon and Constantine Caramanis. EM converges for a mixture of many linear regressions. In International Conference on Artificial Intelligence and Statistics, 2020b.arxiv.org/abs/1905.12106
  16. [16]Jeongyeol Kwon, Wei Qian, Yudong Chen, Constantine Caramanis, Damek Davis, and Nhat Ho. Global optimality of the EM algorithm for mixtures of two-component linear regressions. IEEE Transactions on Information Theory, 70(9):6519–6546, 2024.DOI
  17. [17]Fangshuo Liao and Anastasios Kyrillidis. Guided by the experts: Provable feature learning dynamic of soft-routed Mixture-of-Experts. In International Conference on Artificial Intelligence and Statistics, 2026.arxiv.org/abs/2510.07205
  18. [18]Ashok Vardhan Makkuva, Pramod Viswanath, Sreeram Kannan, and Sewoong Oh. Breaking the gridlock in Mixture-of-Experts: Consistent and efficient algorithms. In International Conference on Machine Learning, 2019.arxiv.org/abs/1802.07417
  19. [19]Ashok Vardhan Makkuva, Sewoong Oh, Sreeram Kannan, and Pramod Viswanath. Learning in gated neural networks. In International Conference on Artificial Intelligence and Statistics, 2020.arxiv.org/abs/1906.02777
  20. [20]Huy Nguyen, TrungTin Nguyen, and Nhat Ho. Demystifying softmax gating function in Gaussian mixture of experts. In Advances in Neural Information Processing Systems, 2023.arxiv.org/abs/2305.03288
  21. [21]Huy Nguyen, Pedram Akbarian, TrungTin Nguyen, and Nhat Ho. A general theory for softmax gating multinomial logistic mixture of experts. In International Conference on Machine Learning, 2024a.arxiv.org/abs/2310.14188
  22. [22]Huy Nguyen, TrungTin Nguyen, Khai Nguyen, and Nhat Ho. Towards convergence rates for parameter estimation in Gaussian-gated mixture of experts. In International Conference on Artificial Intelligence and Statistics, 2024b.arxiv.org/abs/2305.07572
  23. [23]Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc V. Le, Geoffrey E. Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated Mixture-of-Experts layer. In International Conference on Learning Representations, 2017.arxiv.org/abs/1701.06538
  24. [24]Charles M. Stein. Estimation of the mean of a multivariate normal distribution. The Annals of Statistics, 9(6):1135–1151, 1981.DOI
  25. [25]Lean Wang, Huazuo Gao, Chenggang Zhao, Xu Sun, and Damai Dai. Auxiliary-loss-free load balancing strategy for Mixture-of-Experts. arXiv preprint arXiv:2408.15664, 2024.arxiv.org/abs/2408.15664
  26. [27]Lei Xu and Michael I. Jordan. On convergence properties of the EM algorithm for Gaussian mixtures. Neural Computation, 8(1):129–151, 1996.
  27. [28]Weihang Xu, Maryam Fazel, and Simon S. Du. Toward global convergence of gradient EM for over-parameterized Gaussian mixture models. In Advances in Neural Information Processing Systems, 2024.arxiv.org/abs/2407.00490
  28. [29]Bowei Yan, Mingzhang Yin, and Purnamrita Sarkar. Convergence of gradient EM on multi-component mixture of Gaussians. In Advances in Neural Information Processing Systems, 2017.
  29. [30]Mo Zhou, Weihang Xu, Maryam Fazel, and Simon S. Du. Global convergence of gradient EM for over-parameterized Gaussian mixtures. arXiv preprint arXiv:2506.06584, 2026.arxiv.org/abs/2506.06584

Paper details

vlnc:W_djx74j47
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 1

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

Not recorded for this paper · View statement →

Looking for related papers…
Contents