Learning Mixtures of Experts with EM: A Mirror Descent Perspective

Quentin Fruytier, Aryan Mokhtari, Sujay Sanghavi

TL;DR

This paper provides a rigorous theoretical foundation for training Mixtures of Experts (MoE) using the Expectation-Maximization (EM) algorithm. By proving that EM is mathematically equivalent to Projected Mirror Descent with a unit step size, the authors derive new convergence guarantees and demonstrate—both theoretically and empirically—that EM consistently outperforms standard Gradient Descent in speed and accuracy.

What Problem Does This Paper Address?

Mixtures of Experts (MoE) have become a cornerstone of modern deep learning (e.g., in Sparse MoE models like Switch Transformers) because they allow for massive model capacity with manageable computational costs. However, most modern MoEs are trained using Gradient Descent (GD) or its variants.

While the Expectation-Maximization (EM) algorithm is a classic tool for latent variable models, its application to MoE has lacked strong theoretical guarantees. Specifically, researchers didn't fully understand the conditions under which EM converges to the "true" parameters of an MoE model or how its convergence rate compares to GD. This paper fills that gap by unifying EM with modern optimization theory.

Methods

The authors' primary contribution is a theoretical bridge between two worlds:

  1. The Equivalence Proof: They show that for a general class of MoE models (where the conditional distribution belongs to an exponential family), the EM update is exactly equivalent to a Projected Mirror Descent (MD) step. In this MD step, the "distance" being minimized isn't standard Euclidean distance (as in GD), but rather the Kullback-Leibler (KL) divergence, with a fixed step size of one.
  2. Convergence Analysis: Leveraging this MD perspective, they identify sufficient conditions for EM to achieve:
  3. Sub-linear convergence to a stationary point.
  4. Local linear convergence to the true parameters, particularly in cases with a high Signal-to-Noise Ratio (SNR).
  5. Symmetric Case Studies: They provide deep dives into "Symmetric Mixtures of 2-Experts" (both Linear and Logistic), deriving explicit mirror maps and proving that the objective functions are "relatively smooth," which justifies the unit step size used in EM.

Datasets

The authors validated their theory using three types of experiments:

  • Synthetic Dataset: 1,000 data points generated from a Symmetric Mixture of Linear Experts (SymMoLinE) with Gaussian noise to test parameter recovery.
  • Modified Fashion MNIST: To simulate a mixture problem, they randomly inverted images (black-to-white and vice versa). A single expert fails on this task (~10% accuracy), but a 2-expert MoE can learn to "route" inverted vs. non-inverted images.
  • Grayscale CIFAR-10: A 5-component MoE using small Multi-Layer Perceptrons (MLPs) as experts to test the algorithm on a more complex, non-linear task.

Key Insights and Ideas

  • Geometry Matters: Standard Gradient Descent assumes a "flat" Euclidean geometry. EM, through the Mirror Descent lens, respects the "curved" geometry of probability distributions (KL divergence). This makes EM more robust for latent variable models where small changes in parameters can cause massive shifts in how data is routed to experts.
  • Hyperparameter-Free (Mostly): One of EM's biggest practical advantages is that it doesn't require tuning a learning rate for its primary updates. Because it is equivalent to MD with a unit step size, it "just works" as long as the relative smoothness conditions are met.
  • The SNR Connection: The authors link convergence speed to the Missing Information Matrix (MIM). Essentially, if the data clearly indicates which expert should handle which input (high SNR), EM converges exponentially fast (linearly). If the experts are "confused" or the data is too noisy, convergence slows down.

Key Results

  • Superior Convergence: In synthetic tests, EM recovered the true parameters significantly faster than both standard GD and "Gradient EM" (a hybrid approach).
Log-likelihood Error vs Iteration Number
Recovery of Parameters vs Iteration Number
  • Higher Accuracy: On the modified Fashion MNIST task, EM achieved 78.5% accuracy, vastly outperforming Gradient Descent, which plateaued at 62.4%.
  • Statistical Significance: Using paired t-tests, the authors showed that EM's performance gains were statistically significant (p-values ~ 0.000) across all benchmarks.
  • Linear Rate: The experiments confirmed the theoretical prediction that EM exhibits a linear convergence rate in high-SNR scenarios, whereas GD often struggles with the non-convex landscape of the MoE log-likelihood.

Limitations and Future Work

  • Scalability of the M-Step: In the "Maximization" step of EM, one must solve an optimization problem. For complex experts (like deep neural networks), this sub-problem doesn't have a closed-form solution and requires its own inner-loop of gradient descent, which can be computationally expensive.
  • Mini-batching Challenges: While the paper discusses mini-batching, the theoretical equivalence to MD with a step size of 1 is strictly for full-batch settings. Extending these guarantees to the stochastic (mini-batch) regime remains an open challenge.
  • Deep/Sparse MoE: The authors propose a way to apply EM to deep, multi-layer MoEs, but they acknowledge that evaluating the full EM surrogate becomes combinatorially difficult as the number of layers increases, necessitating greedy approximations.

Summary updated

BibTeX
@inproceedings{fruytier2025learning,
  author = {Quentin Fruytier and Aryan Mokhtari and Sujay Sanghavi},
  title = {{Learning Mixtures of Experts with EM: A Mirror Descent Perspective}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=wjZcCbTvrU},
}
Figure