On Bayesian Softmax-Gated Mixture-of-Experts Models

Nicola Bariletto, Huy Nguyen, Nhat Ho, Alessandro RinaldoarXiv 2026

TL;DR

This paper provides one of the first systematic theoretical analyses of Bayesian Softmax-gated Mixture-of-Experts (MoE) models. The authors establish optimal posterior contraction rates for both density and parameter estimation, proving that choosing "strongly identifiable" expert functions drastically improves sample efficiency. Furthermore, they demonstrate that the Evidence Lower Bound (ELBO) from variational inference serves as a mathematically robust and computationally practical tool for selecting the correct number of experts.

What Problem Does This Paper Address?

Mixture-of-Experts (MoE) models are a cornerstone of modern deep learning, powering massive sparse-routed language models like Mixtral and DeepSeek-V3. By using an input-dependent gating mechanism to route data to specialized "expert" submodels, MoEs efficiently capture complex, non-linear relationships.

Despite their massive empirical success, MoEs are notoriously difficult to analyze theoretically. They are typically trained using Maximum Likelihood Estimation (MLE) via the Expectation-Maximization (EM) algorithm, which is prone to overfitting and fails to provide reliable uncertainty quantification. A Bayesian approach naturally solves these issues, but until now, we lacked theoretical guarantees for Bayesian MoEs with softmax gating.

The core challenge lies in identifiability: different parameter configurations can yield identical data distributions (e.g., swapping the labels of two experts, or having redundant experts when the model is over-specified). This paper resolves these complexities to determine exactly how fast a Bayesian MoE model learns as more data becomes available.

Methods

The authors focus on a parametric formulation called Softmax-gated Mixture of Gaussian Experts (SMoGE) for regression tasks. To study the asymptotic behavior of the posterior distribution, they deploy several sophisticated mathematical tools:

  • Voronoi-Cell-Based Losses: To bypass the permutation invariance and over-specification issues, the authors use tailored Voronoi losses ($\mathcal{L}_1$ and $\mathcal{L}_2$) to partition the parameter space and measure discrepancies against the ground truth.
  • Strong Identifiability Conditions: They introduce first-order and second-order strong identifiability conditions for the expert functions. These conditions mathematically guarantee that the derivatives of the expert functions are linearly independent, preventing adverse algebraic interactions between the gating and expert parameters.
  • Doob's Consistency Theorem & BBVI: For model selection (finding the right number of experts), they prove asymptotic consistency using Doob's theorem for an unbounded random-a-priori number of experts. For practical scaling, they analyze Black-Box Variational Inference (BBVI) to optimize the Evidence Lower Bound (ELBO).

Datasets

The paper relies entirely on stylized synthetic datasets to validate its theoretical insights, as is standard for foundational statistical theory papers.

  • They simulate covariates uniformly in 2D and 6D spaces.
  • Data-generating processes use deterministic and logit-based gating mechanisms with known numbers of true experts ($K^* = 1, 2, 3, 4$) to evaluate how effectively the variational framework recovers the true model complexity.

Key Insights and Ideas

  • The Cost of Over-Specification: If you know the exact number of true experts ($K^*$), the parameters converge at the optimal parametric rate of $\sqrt{\log(n)/n}$. However, if you over-specify the model ($K > K^*$), the redundant experts slow down the parameter convergence rate to $(\log(n)/n)^{1/4}$.
  • Linear Experts are Suboptimal: Surprisingly, standard linear experts violate the second-order strong identifiability condition due to a partial differential equation (PDE) interaction with the softmax gate.
  • Architecture Dictates Sample Efficiency: By switching from linear experts to non-linear expert functions that satisfy second-order strong identifiability (e.g., certain sigmoid or softmax shapes), you avoid ultra-slow parameter convergence rates (which can degrade to $n^{-1/8}$ or $n^{-1/12}$ for linear experts) and achieve significantly better sample efficiency.
  • VI is a Valid Shortcut for Model Selection: While putting a prior on an infinite number of experts is theoretically sound, it requires computationally punishing transdimensional MCMC algorithms. The authors show that maximizing the ELBO via variational inference acts as a reliable, highly scalable proxy that naturally penalizes overly complex models.

Key Results

  • Density Estimation: The posterior distribution achieves a near-parametric contraction rate of $\sqrt{\log(n)/n}$ for density estimation, regardless of whether the number of experts is fixed or random.
  • Parameter Estimation: Exactly-specified parameters converge at the rate of $\sqrt{\log(n)/n}$, while over-specified parameters converge at $(\log(n)/n)^{1/4}$.
  • Model Selection Consistency: In synthetic experiments, as the sample size $n$ scales from 10 to 2000, the proportion of simulations where ELBO maximization correctly identifies the true number of experts approaches 100%. Higher gating sharpness (clearer separation between expert regimes) further accelerates this accuracy.

Limitations and Future Work

  • Densely vs. Sparsely Activated MoEs: This work assumes a dense MoE framework where every expert is active for every data point. Modern LLMs use sparse routing (e.g., top-k experts), which introduces discontinuities that this theory does not yet account for.
  • Well-Specified Assumption: The proofs assume the true data-generating process actually belongs to the SMoGE family. Investigating model behavior under misspecification (e.g., when the true process cannot be perfectly captured by the chosen experts) remains an open challenge.
  • Nonparametric Extensions: Extending these finite-mixture insights to infinite-dimensional Bayesian nonparametric models with covariate dependence is highlighted as a promising future direction.

Summary updated

Abstract

Mixture-of-experts models provide a flexible framework for learning complex probabilistic input-output relationships by combining multiple expert models through an input-dependent gating mechanism. These models have become increasingly prominent in modern machine learning, yet their theoretical properties in the Bayesian framework remain largely unexplored. In this paper, we study Bayesian mixture-of-experts models, focusing on the ubiquitous softmax-based gating mechanism. Specifically, we investigate the asymptotic behavior of the posterior distribution for three fundamental statistical tasks: density estimation, parameter estimation, and model selection. First, we establish posterior contraction rates for density estimation, both in the regimes with a fixed, known number of experts and with a random learnable number of experts. We then analyze parameter estimation and derive convergence guarantees based on tailored Voronoi-type losses, which account for the complex identifiability structure of mixture-of-experts models. Finally, we propose and analyze two complementary strategies for selecting the number of experts. Taken together, these results provide one of the first systematic theoretical analyses of Bayesian mixture-of-experts models with softmax gating, and yield several theory-grounded insights for practical model design.
BibTeX
@misc{bariletto2026bayesian,
  author = {Nicola Bariletto and Huy Nguyen and Nhat Ho and Alessandro Rinaldo},
  title = {{On Bayesian Softmax-Gated Mixture-of-Experts Models}},
  year = {2026},
  eprint = {2604.20551},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.20551},
}

Loading related content...

Figure