Manuscript Offprint
arXiv:2610.15039Sparsity Saves Compute, Not Samples: Oracle Inequalities for Dense and Sparse Mixture of Experts
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Sparsity Saves Compute, Not Samples: Oracle Inequalities for Dense and Sparse Mixture of Experts
Sagar Ghosh Huy Nguyen Alessandro Rinaldo
The University of Texas at Austin
Abstract
Mixture-of-Experts (MoE) models combine specialized experts through an input-dependent routing mechanism, and their sparse variants underpin many modern large-scale systems. Yet the statistical cost of adaptive routing remains only partially understood. We study the estimation error of least-squares MoE estimators when both the experts and the gating network are Lipschitz in their parameters. We represent each MoE as a gate–expert pair in a Gated Hilbert Space, whose norm separates the contributions of routing and expert discrepancies. Using its empirical representation, we derive an oracle inequality with a fast rate of order for dense MoEs with experts. For sparse Top- and Top- routing, the selection map is discontinuous in the gating parameters. We handle this by partitioning the gating class according to the selection patterns it induces on the sample. The resulting bounds match the dense rate up to an additive routing cost governed by the Natarajan dimension of the selector. We show that such a routing-complexity condition cannot be dropped: Lipschitz continuity in the parameters alone does not suffice. For linear softmax gating, the routing cost is of the same order as the gating term. Finally, for linear experts, we establish a matching minimax lower bound of order , showing that the rates are optimal up to logarithmic factors.
1 INTRODUCTION
The Mixture-of-Experts (MoE) framework is a prominent paradigm for modeling heterogeneous input-output relationships. By decomposing complex prediction tasks into specialized subproblems, MoE architectures combine expert functions through a data-dependent gating mechanism that adaptively weights their contributions. Since their introduction by (Jacobs et al., 1991) and (Jordan and Jacobs, 1994), MoE models have been widely studied for adaptive function approximation, local modeling, and conditional computation.
MoE architectures have recently regained prominence through sparse systems such as Switch Transformers (Fedus et al., 2022), GShard (Lepikhin et al., 2021), and architectures employing Top- (Shazeer et al., 2017) and Top- (Huang et al., 2024) routing. These methods activate only a subset of experts per input, enabling substantial capacity gains at manageable computational cost. Despite their empirical success, the statistical theory of adaptive expert selection remains underdeveloped. Existing work has studied approximation (Nguyen et al., 2016), identifiability (Jiang and Tanner, 1999), consistency (Nguyen and Chamroukhi, 2018), and parametric mixtures (Gormley and Frühwirth-Schnatter, 2019), while finite-sample guarantees under weak structural assumptions remain limited.
A key theoretical challenge arises from the interaction between expert and gating complexity. While classical learning theory provides tools such as covering numbers, Rademacher complexities, and empirical process methods (van der Vaart and Wellner, 1996; Bartlett and Mendelson, 2002; Wainwright, 2019) for individual function classes, analyzing adaptive mixtures is more subtle because the routing mechanism depends on the input and jointly determines the effective complexity of the predictor.
In this work, we develop a statistical analysis of parametric MoE models under weak regularity assumptions. For dense MoEs, we assume only that the expert and gating functions belong to Lipschitz-parametrized classes, without further architectural constraints, higher-order smoothness, or sparsity. We represent each MoE predictor as a gate–expert pair in a Gated Hilbert Space, whose norm separates the contributions of routing and expert discrepancies, and use it to derive covering-number bounds and a fast-rate oracle inequality. The resulting rate scales with the total parameter count , quantifying the statistical cost of adaptive specialization. Our main contributions are as follows. Functional framework. We represent MoE predictors as gate–expert pairs in a Gated Hilbert Space, whose norm separates routing and expert discrepancies and yields covering-number bounds for MoE classes. Fast rates for dense MoEs. Assuming only Lipschitz parametrizations, we show via an offset-Rademacher oracle inequality that the estimation error is . Sparse routing. For Top- and Top- routing, whose selection map is discontinuous in the gating parameters, we partition the gating class by the selection patterns it induces on the sample. The rates match the dense rate up to a routing cost governed by the Natarajan dimension of the router: sparsity reduces computation, not worst-case sample complexity. We also show that such a routing-complexity condition is necessary. Lower bounds and simulations. For linear experts, we prove a minimax lower bound of order , so the rates are optimal up to logarithmic factors, and we illustrate the bounds on synthetic data.
Large-Scale Sparse MoE. Modern sparse MoE architectures achieve scalability through conditional computation. GShard (Lepikhin et al., 2021) and Switch Transformers (Fedus et al., 2022) demonstrated that sparse routing enables massive capacity gains at tractable cost. Subsequent routing refinements include Top- expert-choice routing (Zhao et al., 2024) and dynamic Top- routing (Huang et al., 2024), which adapts the number of active experts to input complexity.
Statistical Learning Theory. Our finite-sample analysis builds on classical tools from nonparametric regression (Györfi et al., 2006), VC theory and covering numbers (Haussler, 1992; Anthony and Bartlett, 2009; Bartlett and Mendelson, 2002), and Rademacher complexity (Bartlett and Mendelson, 2002). The empirical process methods employed throughout follow (van der Vaart and Wellner, 1996) (Wainwright, 2019), and (Nguyen et al., 2023; Nguyen et al., 2024a; Nguyen et al., 2024b; Nguyen et al., 2026). Closest to our setting, (Nguyen et al., 2026) study least-squares estimation of a softmax-gated MoE regression function and obtain a parametric rate for the regression function, with emphasis on expert estimation under identifiability conditions, and (Nguyen et al., 2024a) study top- sparse softmax gating in a Gaussian MoE. Zhao et al. (2024) bound the generalization gap of top- MoE at rate through the Natarajan dimension of the router. Our results differ in three respects. (i) We prove an oracle inequality under squared loss that allows misspecification, for general Lipschitz-parametrized experts and gates, without tying the analysis to softmax gating or to identifiability conditions. (ii) We make the dependence on the number of experts explicit, , for dense, Top- and Top- routing. (iii) We prove a matching minimax lower bound showing that sparse routing does not reduce this dependence, and show that a routing-complexity condition cannot be dropped.
3 BACKGROUND
In this section, we introduce a functional framework, which we call Gated Hilbert Space that accommodates both dense and sparse Mixture-of-Experts (MoE) architectures. We represent each MoE predictor as an ordered pair of a gating tuple and an expert tuple, and equip the resulting class with the metric , induced by embedding into . This metric separates the contributions of routing and expert discrepancies, which we use to derive covering-number bounds for the dense class; for the sparse classes, we additionally control the discontinuity of the routing map through selection patterns.
Notation. The input space is pre-compact, equipped with a -finite Borel probability measure . Each function in the MoE class is assumed to be a parametric -Lipschitz function (See Appendix A.1 for a definition), where each function in the Gating Class is parametrized with where , and is pre-compact. Additionally, each function in the Expert Class is parametrized with where and is also pre-compact. Each MoE function consisting of the gating tuple and the expert tuple is then parametrized by and is also pre-compact. To establish a rigorous functional framework for Mixture-of-Experts (MoE) models, we introduce a structured function space that jointly represents the gating and expert components of an MoE architecture. Throughout, we regard each MoE predictor as an ordered pair consisting of a gating tuple and an expert tuple. We denote by the class of -expert models:
The functions () represent the gating weights, while the functions () correspond to the outputs of the () experts. Note that, the function depends on , to keep the notations coherent, we will only write instead of for any . Thus, every element of () uniquely specifies an MoE model through its routing and expert components. Additionally, and denote the subclasses with only top- and top- active experts, respectively. We consider two sparse routing strategies for Mixture-of-Experts (MoE) models, Top- and Top- routing. Given routing probabilities with , Top- routing selects the experts with the largest probabilities and renormalizes their weights, yielding , where [which add up to 1] and are the top-k probabilities corresponding to the input subject to the MoE function , and . In contrast, Top- routing dynamically selects the smallest number of experts whose cumulative routing probability exceeds a prescribed threshold , i.e., , where . Thus, Top- enforces a fixed number of active experts, whereas Top- adapts the number of active experts to the routing confidence of each input.
For two elements , we define the bilinear form
where () denotes the standard inner product on .
The bilinearity and symmetry of () follow immediately from the corresponding properties of the Euclidean inner product. Moreover, the norm induced by (3.2) is given by
with equality if and only if , and for every (). Consequently, after identifying elements that agree almost everywhere, () becomes an inner-product space.
This norm naturally measures the joint contribution of the gating and expert functions, weighting each expert output according to its corresponding routing coefficient. The associated metric on () is therefore
The metric () quantifies discrepancies between two MoE models through the combined effect of differences in both their routing mechanisms and expert outputs. In fact, the space is complete under the definition of this metric [See Proposition A.1 in Appendix A]. This geometric structure will serve as the foundation for the metric entropy and covering number analysis developed in the subsequent sections.
4 ESTIMATION ERROR RATES
In this section, we derive the squared estimation error rates for the general MoE class, as well as for its sparse Top- and Top- variants. Specifically, Section 4.1 presents the estimation error rates for the general MoE class, while Sections 4.2 and 4.3 establish the corresponding rates for the Top- and Top- MoE classes, respectively. Finally, Section 4.4 derives lower bound on the squared estimation error rate and demonstrates that the obtained rates are minimax optimal up to a logarithmic factor, provided the class of experts contain the linear experts.
4.1 General MoE Class
We begin with a covering-number bound for the dense class of Eq. (3.1) in the gated metric . Inserting in (3.3) splits into an expert discrepancy, weighted by the gates, and a routing discrepancy, weighted by the expert magnitudes. Let be the uniform gatng envelope over the gating class and be the uniform expert bound, covering the two parametric families separately gives (Proposition B.1, proof in Appendix B.1)
The bound holds for any probability measure on , including the empirical measure. We use it’s empirical analouge with the offset Rademacher complexity framework of Rakhlin (2020), which requires exactly this empirical cover.
Assumption 4.1 (Data model).
We observe with . The design points are fixed (or we condition on them), and the noise vectors i.e. for all . The experts are bounded by , so every , being a convex combination of expert outputs, satisfies .
Let , let be the least-squares estimator over , fitted using samples, and define the offset complexity
Lemma 4.2 (Oracle inequality).
Under Assumption 4.1,
If (well-specified case), then .
Because is not convex, the constant in front of the approximation error cannot in general be taken equal to one (Liang et al., 2015); the factor is the price of misspecification. The approximation error depends on the unknown , so we focus on the estimation error , which quantifies how accurately recovers the best-in-class predictor.
To bound , write with . Then
that is, times the offset Gaussian complexity of with offset constant . Writing , Rakhlin (2020, Theorem 7) gives
where . For parametric classes, the choice already gives the optimal rate up to logarithmic factors: it removes the entropy integral, leaving a single-scale bound that we optimize over . Throughout, hides multiplicative constants depending only on , and , and Lemma 4.2 and Eq.(4.4) apply verbatim to and . This yields the following bound, expressed in terms of the Lipschitz constant and the expert bound (proof in Appendix B.1.1).
Theorem 4.3.
Suppose the gating and expert classes are parametric -Lipschitz and the experts are uniformly bounded, and defined as before. Then under Assumption 4.1, we have
where .
Remark. The bound decomposes the squared estimation error into an effective parametric term and logarithmic complexity terms. The first term, captures the leading-order contribution associated with the effective number of parameters across the experts and the gate. The second and third terms account for the additional complexity incurred by controlling the gating and expert function classes, respectively, and enter only through logarithmic factors in the sample size and the envelope and Lipschitz constants and . Thus, up to logarithmic factors, the squared estimation error scales as Therefore upto logarithmic factors, the bound exhibits the linear dependence on the number of experts , reflecting the complexity of allowing all experts to participate in the general mixture-of-experts architecture.
4.2 Top-k MoE Class
Top- routing raises two issues absent in the dense case. First, the selection map is discontinuous in the gating parameters, so nearby gates can activate different experts near ties. Second, different inputs activate different -subsets, so all expert parameters must be controlled. Following (Zhao, 2024), we condition on the sample, partition the gating class by the selection pattern it induces, bound the number of patterns via the Natarajan dimension , and cover each piece, on which the model is Lipschitz. The resulting rate (Theorem 4.6, with proof in Appendix B.2.1) matches the dense rate up to a routing cost , which is absorbed into the gating term for linear softmax gates.
Assumption 4.4.
(Bounded experts and routing complexity) (i) The experts are uniformly bounded: . (ii) a fixed measurable rule, and the induced selector class breaks ties in the top- selections
of maps has finite Natarajan dimension (Zhou et al., 2022).
Definition 4.5 (Soft-then-hard Top- routing).
Let with . Define
Theorem 4.6.
Let be the parametric soft-then-hard top- class of Definition 4.5, whose gating and expert classes are parametric -Lipschitz, and suppose Assumptions 4.4& 4.1 holds. Then, for every [with ],
(Zhao et al., 2024) bound the generalization gap of top- MoEs for bounded Lipschitz losses, at rate , through the Rademacher complexity of a single expert class and the Natarajan dimension of the router. We use the same pattern-counting device for the routing cost, but our setting and conclusions differ in four ways. (i) We study the estimation error under squared loss and obtain fast rates via localization. (ii) The expert contribution scales as , and a matching lower bound shows this is unavoidable, because input-dependent routing activates every expert somewhere in the input space. (iii) For linear gating, the routing cost reduces to , without the factor. (iv) We also showed that a finite routing complexity is necessary: Lipschitz continuity in the parameters alone does not suffice. Remark (The Routing Term). The first line of (4.6) matches the dense rate of Theorem 4.3: all experts enter, because different inputs activate different -subsets, so every expert is active somewhere in . Sparse routing does not reduce the worst-case parameter count; it adds the routing cost in the second term because the top- map is discontinuous in the gating parameters. The term enters additively through the number of selection patterns. Remark (Assumption 4.4(ii) cannot be dropped). Lipschitz continuity in the parameters alone does not suffice for top- routing. Let , , , , , , , and constant experts . Since , the gate is Lipschitz, yet the top- output with , is . For this is the -th Rademacher function , and for . Under Gaussian noise, every pairwise KL divergence is at most while the number of hypotheses is unbounded, so Fano’s inequality (Tsybakov, 2009) gives a minimax risk of at least for every . With the same gate, the dense output is Lipschitz in , as it is covered by Theorem 4.3. Remark (Linear softmax gating). For logits (), depends only on the signs of , , which are linear in . By (Lemma 17; (Bartlett et al., 2019)), for the number of selection patterns on the sample is at most , so the routing term in (4.6) can be replaced by , which is of the same order as the gating term. Hence .
4.3 Top-p MoE Class
Unlike top-, top- routing activates an input-dependent number of experts. Writing for the sorted gating weights, with ties broken by a fixed rule, the active set at is
Since the largest of weights carry mass at least , every active set has size at most . The analysis mirrors the top- case, with three modifications: the selector ranges over all subsets of size at most , of which there are at most ; the selected mass is bounded below by rather than ; and routing complexity is measured by the Natarajan dimension of the top- selector class.
Assumption 4.7.
(Top- routing complexity) The selector class has finite Natarajan dimension .
Theorem 4.8.
Let be the top- MoE class with parametric -Lipschitz gating and expert classes, and suppose Assumptions 4.4(i) and 4.7 hold. Then, under the model assumption in 4.1, for every [],
Remark (Interpretation). As in the top- case, all experts enter the bound, because different inputs activate different subsets. The threshold affects the rate only through the routing term, via , and through the factor inside the gating logarithm. Taking gives and , so (4.8) has the same form as (4.6); the only differences are the selector class and the variable size of the active set. Assumption 4.7 cannot be dropped either: for and , top- routing reduces to top-, and the counterexample following Theorem 4.6 applies verbatim.
4.4 Minimax Optimality of Squared Estimation Error Rates for MoE Class
We show that the factor in Theorems 4.3&4.8 cannot be improved, even for sparse routing. The hard instance routes disjoint groups of design points to different experts, so that estimation decouples into separate linear regressions.
Assumption 4.9 (Hard instance).
Let with , and let with .
(i) Design. The design points are split into groups , , of distinct points with and for some . (ii) Routing. contains a gate with for all . (iii) Experts. contains the linear maps with and , where .
For example, with distinct and cycling through satisfies (i) with whenever , and the gate satisfies (ii) for any partition of into intervals with .
Theorem 4.10.
Under Assumption 4.1 with Gaussian noise and Assumption 4.9, let be any of , or . If , then
where is an absolute constant and the infimum is over all estimators.
For linear experts, , so Eq.(4.9) matches the leading term of Theorems 4.3, 4.6 & 4.8 up to logarithmic factors, whenever the gating and routing terms are of no larger order, i.e. (for instance, for linear gating). Because the hard instances are well specified, Lemma 4.2 turns the upper bounds on into risk bounds for these instances, which Eq.(4.9) shows are tight up to logarithmic factors. In particular, sparse routing does not reduce the worst-case sample complexity: every expert is active on its own group of inputs, and all of them must be estimated. The proof is in Appendix B.4.1.
5 EXPERIMENTS

Figure 1: Excess test MSE versus (log–log) for the General, Top and Top- cases for combinations.
We empirically investigate the approximation and generalization properties of a feed-forward MoE model for learning non-linear mappings induced by a fixed Transformer Encoder, examining whether observed test RMSE behaviors are consistent with the theoretical bounds in Eq. (4.5), (4.6), and (4.8). We construct synthetic regression problems with covariates drawn from a standard multivariate Gaussian and targets generated by a fixed Transformer Encoder plus small Gaussian noise, varying input dimensions and output dimensions , yielding input-output configurations per setting. The detailed codebase is available at This Annonymous Repository. Synthetic Data Generation For each configuration, we generate samples with and regression targets , where with . The Transformer encoder is frozen ( heads, hidden dim , layers), defining a fixed non-linear target function. Data are standardized componentwise and split 4:1 into train and test sets. MoE Architecture We use a feed-forward MoE with experts, each a hidden-layer network (hidden dim ), and a -hidden-layer gating network with softmax output. Except for ablations, the value of in top- has been kept fixed at , and the value of in top- has been fixed at . All networks use GELU activations. The model is trained with AdamW (, batch size ) minimizing RMSE over epochs per training-size increment. Evaluation Metrics. To study how generalization error varies with training size, we partition the available data into equally spaced increments for , spanning to of the training data. At each increment, we record the test MSE, which is our primary measure of generalization. Since the theorems bound the estimation error rather than the total test error, we subtract an estimated irreducible floor (noise and approximation error) obtained by fitting to the test MSE, and we study the resulting excess test MSE on a log–log scale. We report the least-squares slope of the excess test MSE and compare it with the slope of the corresponding bound shape, i.e., the right-hand side of the bound with , rescaled to pass through the first data point (so that only its slope is meaningful), evaluated over the same range of . We treat the general case (4.5), the top- case (4.6), and the top- case (4.8) in turn. The floor-fitting procedure, the exact bound shapes, and results for all configurations are given in Appendix C.1. Empirical rate in . Figure 1 plots the excess test MSE against the number of training samples (log–log) for the general, Top- () and Top- () MoE with , for two input–output configurations, and ; the remaining ten configurations are in Appendices C.1.1, C.1.2 & C.1.3. The irreducible part (noise and approximation error) is removed by a fitted floor, and each dashed-curve is the shape of the corresponding bound (Theorems 4.3, 4.6 and 4.8; for Top-, without the routing term), rescaled to the first data point, so that only its slope is meaningful. In all three routing schemes, the excess error decays at a rate close to . For the fitted slopes are , and for the general, Top- and Top- models, against bound-shape slopes of , and . For they are , and , against , and . Thus in the two configurations shown, the measured decay is at least as steep as that of the bound, as expected of an upper bound, although the margins for Top- and Top- are within fitting error. This does not hold in every configuration: over all twelve, the mean fitted slopes are (general), (Top-) and (Top-), and several Top- runs decay more slowly than the bound shape (e.g. for ), which we attribute to optimization error and to the difficulty of identifying the floor and exponent jointly (Appendix C.1). Comparison with Top-. The mean empirical slope is for Top- and for Top-, and the configurations that deviate most are largely shared between the two routing rules. This agrees with the remark following Theorem 4.8: with at most active experts, Top- has the same statistical rate as Top- with , and both scale with the total parameter count rather than with the number of active experts.
Routing Behavior of Top-.
Table 1 reports, for the final models (, , ) evaluated on the test set, the average Shannon entropy of the gate distribution and the average number of active experts , where is the smallest number of experts whose cumulative gate probability reaches . The entropies are small in all configurations (at most , against a maximum of ), and is close to (e.g., for , and for ). Since , the fraction of test inputs with is at most , so the learned router is nearly hard. Figure 2 shows that for , decreases from about at to about at and for the same drops from at to about at , flattening for [See Appendix C.1.4 for all the combinations]. This is far below the worst-case count used in our bound, which is therefore conservative for trained routers. It also means that our experiments exercise multi-expert routing only rarely, so they measure the rate in and do not probe the dependence of the bound on or on the number of active experts. We report the decrease of as an observation and do not attribute it to a specific cause (it may reflect gate sharpening (Chen et al., 2022) or optimization dynamics under a fixed number of epochs). Each point is a single training run.
Table 1: Top- MoE (, ), final models (), test set: Shannon entropy of the gate distribution / average number of active experts .
| / | / | / | |
| / | / | / | |
| / | / | / | |
| / | / | / |

Figure 2: Average number of experts selected by Top- routing (, ) on the test set versus training size, for . Dotted: hard routing (); dashed: worst-case count used in the bound.
6 CONCLUSION
In this work, we studied the estimation error of least-squares Mixture-of-Experts (MoE) estimators whose experts and gating network are parametric Lipschitz. We represented each MoE as a gate-expert pair in the Gated Hilbert Space, whose norm separates both routing and expert discrepancies. We used its empirical representation to derive an oracle inequality with a fast rate of order for dense MoEs with experts.
Our results show that sparsity saves compute but not samples: the Top- and Top- bounds do not improve on the dense rate and instead carry an additive routing cost governed by the Natarajan dimension of the selector. This cost arises because the selection map is discontinuous in the gating parameters, so Lipschitz continuity alone does not control it; we handle it by partitioning the gating class according to the selection patterns it induces on the sample, and we show that a routing-complexity condition cannot be dropped. For linear softmax gating, the routing cost is of the same order as the gating term. For linear experts, a matching minimax lower bound of order shows that the rates are optimal up to logarithmic factors.
Experiments on synthetic regression tasks show that the excess test MSE decays at a rate close to for general, Top- and Top- routing, in line with our bounds. They check the rate in only: they do not test the dependence on , or , and the learned Top- routers are nearly hard (), so multi-expert routing is rarely exercised.
Several questions remain open. The Natarajan dimension of practical gating networks is not computable and is characterized here only for linear softmax gating, and the approximation error under misspecification is not controlled. Experiments varying , and , with routers that use several experts adaptively, would test the dependence of the bounds on these quantities. We hope these results provide a foundation for sharper bounds on adaptive routing in MoE models.
AI use statement
In this work, we used generative AI tools for language editing, structural reorganization, and algebraic cross-checking. We have not used generative AI tools to create research content. Additionally, we used generative AI tools to check the coding experiments described in the paper. We have reviewed all AI-assisted work. We take responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of generative AI.
References
M. Anthony and P. L. Bartlett Neural network learning: theoretical foundations. Cambridge University Press, Cambridge. Cited by: §2.
P. L. Bartlett, N. Harvey, C. Liaw, and A. Mehrabian Nearly-tight VC-dimension and pseudodimension bounds for piecewise linear neural networks. Journal of Machine Learning Research 20 (63), pp. 1–17. Cited by: §4.2.
P. L. Bartlett and S. Mendelson Rademacher and Gaussian complexities: risk bounds and structural results. Journal of Machine Learning Research 3, pp. 463–482. Cited by: §1, §2.
P. L. Bartlett Theoretical statistics, lecture 14. Note: Lecture notes, UC Berkeley Cited by: §B.1, §B.2.1.
Z. Chen, Y. Deng, Y. Wu, Q. Gu, and Y. Li Towards understanding the mixture-of-experts layer in deep learning. In Advances in Neural Information Processing Systems, Vol. 35. Cited by: §5.
W. Fedus, B. Zoph, and N. Shazeer Switch transformers: scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research 23 (120), pp. 1–39. Cited by: §1, §2.
I. C. Gormley and S. Frühwirth-Schnatter Mixture of experts models. In Handbook of Mixture Analysis, pp. 271–307. Cited by: §1, §2.
L. Györfi, M. Kohler, A. Krzyżak, and H. Walk A distribution-free theory of nonparametric regression. Springer, New York. Cited by: §2.
D. Haussler Decision theoretic generalizations of the PAC model for neural net and other learning applications. Information and Computation 100 (1), pp. 78–150. Cited by: §2.
Q. Huang, Z. An, N. Zhuang, M. Tao, C. Zhang, Y. Jin, K. Xu, L. Chen, S. Huang, and Y. Feng Harder task needs more experts: dynamic routing in MoE models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 12883–12895. Cited by: §1, §2.
R. A. Jacobs, M. I. Jordan, S. J. Nowlan, and G. E. Hinton Adaptive mixtures of local experts. Neural Computation 3 (1), pp. 79–87. Cited by: §1, §2.
W. Jiang and M. A. Tanner On the identifiability of mixtures-of-experts. Neural Networks 12 (9), pp. 1253–1258. Cited by: §1, §2.
M. I. Jordan and R. A. Jacobs Hierarchical mixtures of experts and the EM algorithm. Neural Computation 6 (2), pp. 181–214. Cited by: §1, §2.
D. Lepikhin, H. Lee, Y. Xu, D. Chen, O. Firat, Y. Huang, M. Krikun, N. Shazeer, and Z. Chen GShard: scaling giant models with conditional computation and automatic sharding. In International Conference on Learning Representations, Cited by: §1, §2.
T. Liang, A. Rakhlin, and K. Sridharan Learning with square loss: localization through offset Rademacher complexity. In Proceedings of the 28th Conference on Learning Theory, Proceedings of Machine Learning Research, Vol. 40, pp. 1260–1285. Cited by: §4.1.
B. K. Natarajan On learning sets and functions. Machine Learning 4 (1), pp. 67–97. Cited by: §B.2.1.
H. D. Nguyen and F. Chamroukhi Practical and theoretical aspects of mixture-of-experts modeling: an overview. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery 8 (4), pp. e1246. Cited by: §1, §2.
H. D. Nguyen, L. R. Lloyd-Jones, and G. J. McLachlan A universal approximation theorem for mixture-of-experts models. Neural Computation 28 (12), pp. 2585–2593. Cited by: §1, §2.
H. Nguyen, P. Akbarian, F. Yan, and N. Ho Statistical perspective of top-K sparse softmax gating mixture of experts. In International Conference on Learning Representations, Cited by: §2.
H. Nguyen, N. Ho, and A. Rinaldo Sigmoid gating is more sample efficient than softmax gating in mixture of experts. In Advances in Neural Information Processing Systems, Vol. 37, pp. 118357–118388. Cited by: §2.
H. Nguyen, N. Ho, and A. Rinaldo Convergence rates for softmax gating mixture of experts. IEEE Transactions on Information Theory 72 (2), pp. 1276–1304. External Links: Document Cited by: §2.
H. Nguyen, T. Nguyen, and N. Ho Demystifying softmax gating function in Gaussian mixture of experts. In Advances in Neural Information Processing Systems, Cited by: §2.
A. Rakhlin Mathematical statistics: a non-asymptotic approach. Note: Lecture notes Cited by: §4.1, §4.1.
S. Shalev-Shwartz and S. Ben-David Understanding machine learning: from theory to algorithms. Cambridge University Press, Cambridge. Cited by: §B.2.1.
N. Shazeer, A. Mirhoseini, K. Maziarz, A. Davis, Q. Le, G. Hinton, and J. Dean Outrageously large neural networks: the sparsely-gated mixture-of-experts layer. In International Conference on Learning Representations, Cited by: §1.
A. B. Tsybakov Lower bounds on the minimax risk. In Introduction to Nonparametric Estimation, pp. 77–135. Cited by: §B.4.1, §B.4.1, §4.2.
A. W. van der Vaart and J. A. Wellner Weak convergence and empirical processes: with applications to statistics. Springer, New York. Cited by: §1, §2.
M. J. Wainwright High-dimensional statistics: a non-asymptotic viewpoint. Cambridge University Press, Cambridge. Cited by: §1, §2.
A. Zeevi, R. Meir, and R. J. Adler Time series prediction using mixtures of experts. In Advances in Neural Information Processing Systems, Vol. 9. Cited by: §2.
J. Zhao, P. Wang, and Z. Wang Generalization error analysis for sparse mixture-of-experts: a preliminary study. In ICLR 2024 Workshop on Mathematical and Empirical Understanding of Foundation Models, Note: arXiv:2403.17404 Cited by: §2, §2, §4.2.
Y. Zhou, T. Lei, H. Liu, N. Du, Y. Huang, V. Zhao, A. M. Dai, Q. V. Le, and J. Laudon Mixture-of-experts with expert choice routing. In Advances in Neural Information Processing Systems, Vol. 35, pp. 7103–7114. Cited by: Assumption 4.4.
Checklist
The checklist follows the references. For each question, choose your answer from the three possible options: Yes, No, Not Applicable. You are encouraged to include a justification to your answer, either by referencing the appropriate section of your paper or providing a brief inline description (1-2 sentences). Please do not modify the questions. Note that the Checklist section does not count towards the page limit. Not including the checklist in the first submission won’t result in desk rejection, although in such case we will ask you to upload it during the author response period and include it in camera ready (if accepted).
In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below.
- For all models and algorithms presented, check if you include: (a) A clear description of the mathematical setting, assumptions, algorithm, and/or model. [Yes] [Description: Section 3 discusses the mathematical preliminaries of various routing mechanisms and the notations used] (b) An analysis of the properties and complexity (time, space, sample size) of any algorithm. [Yes] [Description: Section 4 talks about all the propositions, lemmas, and theorems claimed to be true in the work; while the proofs are deferred to the Supplementary Document with appropriate pointer.] (c) (Optional) Anonymized source code, with specification of all dependencies, including external libraries. [Yes] [Description: The link to the Annonymized GitHub Repository has been provided in Section 5]
- For any theoretical claim, check if you include: (a) Statements of the full set of assumptions of all theoretical results. [Yes][Description: All such statements have been discussed in detail in Section 4.] (b) Complete proofs of all theoretical results. [Yes] [Description: The proofs have been detailed out in the Supplementary.] (c) Clear explanations of any assumptions. [Yes] [Description: The assumptions have been made explicit in Section 3.]
- For all figures and tables that present empirical results, check if you include: (a) The code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL). [Yes] [Description: The Annonymized GitHub Respository has been linked to Section 5] (b) All the training details (e.g., data splits, hyperparameters, how they were chosen). [Yes] [Description: Sections 2,5,6 & 7 in the Repository discuss about them in detail.] (c) A clear definition of the specific measure or statistics and error bars (e.g., with respect to the random seed after running experiments multiple times). [Yes] [Description: Sections 11 & 14 in the Repository discuss about these points.] (d) A description of the computing infrastructure used. (e.g., type of GPUs, internal cluster, or cloud provider). [Yes] [Description: Sections 12 & 14 lay out the details of the hardware and environments used.]
- If you are using existing assets (e.g., code, data, models) or curating/releasing new assets, check if you include: (a) Citations of the creator If your work uses existing assets. [Not Applicable] (b) The license information of the assets, if applicable. [Not Applicable] (c) New assets either in the supplemental material or as a URL, if applicable. [Not Applicable] (d) Information about consent from data providers/curators. [Not Applicable] (e) Discussion of sensible content if applicable, e.g., personally identifiable information or offensive content. [Not Applicable]
- If you used crowdsourcing or conducted research with human subjects, check if you include: (a) The full text of instructions given to participants and screenshots. [Not Applicable] (b) Descriptions of potential participant risks, with links to Institutional Review Board (IRB) approvals if applicable. [Not Applicable] (c) The estimated hourly wage paid to participants and the total amount spent on participant compensation. [Not Applicable]
Supplementary Materials for: Sparsity Saves Compute, Not Samples: Oracle Inequalities for Dense and Sparse Mixture of Experts
Appendix A Supplementary to Background
Definition A.1.
A parametrized class of real-valued functions
with and pre-compact, is said to be -Lipschitz if, for all and ,
Since is pre-compact, we can uniformly replace with over the closure of (which is compact). Therefore, we have for all and for all ,
Proposition A.1 (Completeness of ).
Let be a measure space and let be the space of gated MoE predictors defined in Eq. 3.1 equipped with the norm induced by the inner product defined in Eq. (3.2), and after identifying elements such that for -almost every and every . Then is complete with respect to the metric . Consequently, is a (gated/modulated) Hilbert space.
Proof.
Let denote the Hilbert space of -tuples of square-integrable -valued functions, equipped with the inner product
Step 1: Construction of a map . Define
where is the equivalence relation identifying whenever -a.e. for all . This map is well defined on the quotient by construction.
Step 2: is a linear isometry. By definition of the bilinear form in (3.2)
so preserves the inner product exactly, and in particular
Linearity of is immediate from linearity of pointwise products in upon fixing representatives, and injectivity on follows directly from the definition of : if then -a.e. for all , i.e. .
Step 3: is surjective. Let be arbitrary. Define
Then with for all , and each is a valid expert map. Hence , and
Thus is onto.
Step 4: is a bijective linear isometry. Combining Steps 2 and 3, is a linear bijection satisfying for all . Hence is an isometric isomorphism of inner-product spaces.
Step 5: Transfer of Completeness through the isometry. By the Riesz–Fischer theorem, is complete, and a finite product of complete inner-product spaces (with the product inner product) is complete; hence is a Hilbert space.
Let be a -Cauchy sequence in . By Step 2,
so is Cauchy in . By completeness of , there exists such that in .
By surjectivity of (Step 3), there exists , e.g.
such that . Then, using the isometry property once more,
Hence in , with .
Every -Cauchy sequence in converges to an element of . Therefore is complete, and being an inner-product space that is complete with respect to the induced metric, is a Hilbert space; in other words, is a (gated/modulated) Hilbert Space. ∎
Appendix B Supplementary to Estimation Error Rates For Various Parametric MoE Classes
B.0.1 Proofs of Lemma 4.2
Proof of Lemma 4.2.
Let attain (otherwise take a near-minimizer and pass to the limit), and let . Since minimizes the empirical squared loss, expanding gives the basic inequality
Write for the supremum in (4.2), so that . Using ,
Rearranging and taking expectations (the design is fixed, so is deterministic) gives (4.3). If , take ; then , so . ∎
B.1 General MoE Class
Proposition B.1.
Suppose the gating and expert classes are parametric -Lipschitz and the experts are uniformly bounded, . Then, for any probability measure on ,
Proof.
Step 1: Expert class. Write with , and for let
Each expert is an -Lipschitz function of its parameters, and the experts have separate parameters. The standard covering estimate for parametric Lipschitz families (Bartlett, 2013), in which hides the diameter of the parameter set, gives
where denotes the class of the -th expert.
Step 2: Gating class. For let . In the same way,
Step 3: MoE class. Let and . Inserting in (3.4) and using together with ,
The first term separates the expert discrepancy, weighted by the gates, and the second the routing discrepancy, weighted by the expert magnitudes. Since for every , and is a probability measure,
Hence whenever and , so the product of a -cover of and a -cover of is an -cover of . By (B.1) and (B.2),
finishing the proof of the proposition. ∎
B.1.1 Proof of Theorem 4.3
Proof.
An element computes . We use the norms and of Proposition B.1, for which , together with the parametric covering estimates (B.6).
Step 1: Pointwise decomposition. Fix and let , so that . For , and any , inserting as in (B.3) separates the expert and routing discrepancies:
using . Hence
Step 2: Entropy. By (B.4), whenever and . The routing map of a dense MoE is continuous in the gating parameters, so no partition of the gating class is needed, and by (B.6), for every sample,
Step 3: Oracle inequality. Taking in (4.4) removes the entropy integral, so
By (B.5), the right-hand side equals up to terms not depending on . Setting its derivative to zero gives . Substituting ,
and absorbing the absolute constant into gives (4.5). ∎
B.2 Top-k MoE Class
B.2.1 Proof of Theorem 4.6
Proof.
Notation. An element computes
For and , let and . Then for every . By the standard covering estimate for parametric Lipschitz families (Bartlett, 2013),
Since the map is discontinuous: two gates that are arbitrarily close in can select different experts near ties, and there the outputs differ by an amount that does not shrink with . We therefore fix the sample, split the gating class according to the selection pattern it induces on the sample, and cover each piece, on which selection is constant.
Fix and define . Since ,
Step 1: Partition by selection patterns. For , let , and let . Since takes values and has Natarajan dimension , Natarajan’s lemma (Natarajan, 1989); (Shalev-Shwartz and Ben-David, 2014, Lemma 29.4) gives
using . For , let and . Then , so
Step 2: Perturbation bound inside one pattern. Fix , , , and . Both models select the same set at , so no expert outside of the index set is selected by any one of them. Write , and let and . Using and Assumption 4.4(i),
At , we have . Since and ,
where the last step uses : the largest of nonnegative weights summing to one have total at least . Substituting (B.11) into (B.10) and maximizing over ,
Step 3: Covering one pattern class. By (B.12), whenever and , provided . All experts must be covered, since different sample points may activate different -subsets. For the gates, the cover centers must lie in . An internal -cover of a subset costs at most an external -cover of the whole set, so by (B.6)
uniformly in .
Step 4: Entropy of . Combining (B.7)–(B.9) and (B.13), for every sample ,
Step 5: Oracle inequality. Taking in (4.4) removes the entropy integral, so
Let . By (B.14), the -dependent part of the right-hand side is plus terms not depending on , which is minimized at . Substituting ,
which is exactly (4.6), completing the proof. ∎
B.3 Top-p MoE Class
B.3.1 Proof of Theorem 4.8
Proof.
We use the notation of the proof of Theorem 4.6, with replaced by the top- active set and
Step 0: Size and mass of the active set. Let denote the sorted weights. The largest of weights summing to one have total at least . Hence the active set has size at most , i.e. . Moreover, by definition of top- routing, for every .
Step 1: Partition by selection patterns. takes values in , a set of size . Defining , , and as in Step 1 of the proof of Theorem 4.6, Natarajan’s lemma gives
Step 2: Perturbation bound inside one pattern. Fix , , , and . Both models select the same set at , with . Exactly as in (B.10)–(B.11), with in place of and (Step 0) in place of ,
and therefore
Step 3: Covering one pattern class. By (B.16), it suffices to take and with centers in . As before, all experts must be covered, and an internal cover of costs at most an external cover of at half the radius. By (B.6),
Steps 4–5: Entropy and oracle inequality. Combining with (B.7) and (B.15),
The optimization over is identical to Step 5 of the proof of Theorem 4.6, again with and , and yields (4.8). ∎
B.4 Minimax Optimality of Squared Estimation Error Rates for MoE Class
B.4.1 Proof of Theorem 4.10
Proof.
Throughout, denotes the group of a design point , and .
Step 1: A subclass common to all three routing schemes. For with , let on the design. We claim that for each of the three classes, using the gate of Assumption 4.9(ii) and the linear experts of Assumption 4.9(iii). On a design point with , we have and for . Hence:
- dense: ;
- top-: the selected set contains , its total weight is , so the renormalized weights are and for ;
- top-: , so the active set is and .
In all three cases the MoE output equals . Moreover , so Assumption 4.1 holds. Since , it suffices to lower-bound the minimax risk over .
Step 2: Packing. By the Varshamov–Gilbert bound (Tsybakov, 2009, Lemma 2.9), since there exist with and pairwise Hamming distance at least . Index the coordinates of by , fix , and set
Then , so whenever . For , write . Each entry of is or , and , where is the Hamming distance, so
Step 3: Separation and KL divergence. Since each group has points,
By Assumption 4.9(i), , and therefore, by Step 2,
Under Gaussian noise, the observations are independent with , so the Kullback–Leibler divergence between the laws and of the sample is
Step 4: Fano’s method. Choose
Then for every . The condition holds because . By (B.17), the hypotheses are -separated in with . Theorem 2.5 of Tsybakov (2009), applied with and , gives
By Markov’s inequality, , so
which is (4.9) with . ∎
Appendix C Supplementary To Experiments
C.1 Detailed Experiments on the Theoretical Upper Bounds obtained in Theorems 4.3, 4.6 & 4.8
C.1.1 General MoE Experiments: Details across All Configurations
Excess risk.
Since The theorem 4.3 bounds the estimation error rather than the total test error, so we remove the irreducible part (noise and approximation error) before plotting. We fit to the test MSE by profile least squares: for each candidate floor below the smallest observed MSE, come from a straight-line fit in log-log scale, and we keep the with the smallest squared residual. We plot the excess test MSE and report the slope of its least-squares line in log-log scale.
Bound shape.
The dashed curves show
which is the bound of Theorem 4.3. Unlike the Top- case, there is no routing term, since all experts are active. We set and take to be the largest recorded expert norm, which enters only inside a logarithm. Because the bound holds only up to absolute constants, is rescaled to pass through the first data point, so only its slope is meaningful. Over a finite range, the local log-log slope of is , so the bound shape is flatter than for moderate and approaches only as .
Results.
Figure 3 shows all twelve configurations, and Table 2 compares the fitted slopes with the slope of over the same range of . The bound shape has slope between and in every configuration. The empirical slopes lie between and , with mean and standard deviation . In every configuration the empirical decay is at least as steep as that of (up to the borderline case ), which is consistent with Theorem 4.3 being an upper bound: the measured excess risk decays at least as fast as the bound predicts. Ten of the twelve fitted slopes are within of the parametric slope .
Two configurations deviate from :
- For the slope is , steeper than the parametric rate. We attribute this to the floor estimate: if is slightly overestimated, the excess MSE is biased downward at large , which steepens the fitted slope. The floor and the exponent are only weakly identified jointly, and this is the configuration with the smallest excess MSE ( at ).
- For and the slopes are and , flatter than . As in the Top- experiments, this is plausibly due to a nonvanishing optimization error from a fixed number of AdamW epochs and to the fact that the target is a Transformer, not an MoE, so the best-in-class floor is only approximately reached.
At the largest sample sizes the excess MSE is of order –, comparable to the fluctuations of the test MSE, which explains the scatter at the right end of several panels.
Table 2: General MoE (, dense routing): parameter count , the ratio with , the fitted log-log slope of the excess test MSE, and the slope of the bound shape over the same range of .
| empirical slope | bound-shape slope | ||||
|---|---|---|---|---|---|
| 4 | 8 | 1988 | 402 | ||
| 4 | 16 | 3044 | 263 | ||
| 4 | 32 | 5156 | 155 | ||
| 8 | 8 | 2628 | 304 | ||
| 8 | 16 | 3684 | 217 | ||
| 8 | 32 | 5796 | 138 | ||
| 16 | 8 | 3908 | 205 | ||
| 16 | 16 | 4964 | 161 | ||
| 16 | 32 | 7076 | 113 | ||
| 32 | 8 | 6468 | 124 | ||
| 32 | 16 | 7524 | 106 | ||
| 32 | 32 | 9636 | 83 | ||
| mean (std.) |

Figure 3: Excess test MSE versus (log-log) for the general (dense) MoE () in all twelve configurations. Points: excess test MSE ; solid: least-squares fit (slope in legend); dashed: bound shape of Theorem 4.3, rescaled to the first point; dotted: reference slope .
C.1.2 Top- Experiments: Details across All Configurations
Excess risk.
The Theorem 4.6 bound the estimation error, not the total test error, so we remove the irreducible part (noise and approximation error) before plotting. We fit to the test MSE by profile least squares. For each candidate floor below the smallest observed MSE, are obtained from a straight-line fit in log–log scale, and we keep the with the smallest squared residual. We then plot the excess test MSE, , and report the slope of its least-squares line in log–log scale. Squared errors are used throughout, matching the squared loss in Theorem 4.6; averaging over the output coordinates changes the MSE only by a constant factor, which does not affect slopes.
Bound shape.
The dashed curves show
which is the bound of Theorem 4.6 without its routing term . The routing term is omitted because the Natarajan dimension of a GELU gate is not computable. We set and take to be the largest recorded expert norm; enters only inside a logarithm, and varying it between and changes the slopes in Table 3 by at most . Because the bound holds only up to absolute constants, is rescaled to pass through the first data point, so only its slope is meaningful. Over a finite range, the local log–log slope of is ; the bound shape is therefore flatter than for moderate , and approaches only as .
Results.
Figure 4 shows all twelve configurations, and Table 3 compares the fitted slopes with the slope of over the same range of . The bound shape has slope between and in every configuration. The empirical slopes lie between and , with mean and standard deviation , so on average the empirical and theoretical rates agree closely. In six of the twelve configurations the empirical slope is steeper than that of . This is consistent with Theorem 4.6, which is an upper bound and need not be tight for a particular target. In the remaining configurations the decay is flatter, most visibly for and . Over a finite range of this does not contradict an upper bound that holds up to constants, and we attribute it to three effects that the theory does not model:
- The floor and the exponent are only weakly identified jointly. A slightly underestimated floor leaves a constant offset in the excess MSE, which flattens the fitted slope at large .
- The networks are trained by a fixed number of AdamW epochs rather than solved to global optimality, so the measured error includes an optimization error that need not decay as .
- The target is not an MoE, so the best-in-class predictor, and hence the floor, is itself only approximately reached.
At the largest sample sizes the excess MSE is of order –, comparable to the fluctuations of the test MSE, which explains the increased scatter at the right end of several panels.
Table 3: Top- MoE (, ): parameter count , the ratio with , the fitted log–log slope of the excess test MSE, and the slope of the bound shape over the same range of .
| empirical slope | bound-shape slope | ||||
|---|---|---|---|---|---|
| 4 | 8 | 1988 | 402 | ||
| 4 | 16 | 3044 | 263 | ||
| 4 | 32 | 5156 | 155 | ||
| 8 | 8 | 2628 | 304 | ||
| 8 | 16 | 3684 | 217 | ||
| 8 | 32 | 5796 | 138 | ||
| 16 | 8 | 3908 | 205 | ||
| 16 | 16 | 4964 | 161 | ||
| 16 | 32 | 7076 | 113 | ||
| 32 | 8 | 6468 | 124 | ||
| 32 | 16 | 7524 | 106 | ||
| 32 | 32 | 9636 | 83 | ||
| mean (std.) |

Figure 4: Excess test MSE versus (log–log) for the Top- MoE (, ) in all twelve configurations . Points: excess test MSE ; solid: least-squares fit (slope in legend); dashed: bound shape of Theorem 4.6, rescaled to the first point; dotted: reference slope .
C.1.3 Top- Experiments: Details across All Configurations
As before, our MoE has experts and Top- routing with threshold : at each input, the smallest set of largest gating weights whose cumulative mass reaches is activated, and the selected weights are renormalized. By Step 0 of the proof of Theorem 4.8, at most experts are active at any input. Each expert and the gate have one hidden layer of width with GELU activations. The parameter counts , and are computed as in Table 4 with .
Bound shape.
The dashed curves show the bound of Theorem 4.8 without its routing term :
As in the Top-k experiments, we set , take to be the largest recorded expert norm, and rescale to pass through the first data point, so as to make its slope meaningful. Varying between and changes the slopes in Table 4 by at most . Compared with the Top- bound, the threshold enters only through the factor inside the gating logarithm, and through the routing term.
Results.
Figure 5 shows all twelve configurations, and Table 4 compares the fitted slopes with the slope of over the same range of . The bound shape has a slope between and . The empirical slopes lie between and , with mean and standard deviation . As for Top-, the empirical and theoretical rates therefore agree on average:
- in six configurations the empirical decay is steeper than , and in the two slopes coincide, which is consistent with Theorem 4.8 being an upper bound;
- in the remaining five the decay is flatter.
The clearest flat case is , with slope . This configuration is also the flattest in the Top- experiments (slope , Table 3). Since it is the same configuration under both routing rules, the deviation is most likely due to the target and to optimization rather than to the routing mechanism. The same three caveats apply as in Appendix C.1.2: the floor and the exponent are only weakly identified jointly, the networks are trained by a fixed number of AdamW epochs rather than solved to optimality, and the Transformer target is not an MoE.
Table 4: Top- MoE (, , , ): parameter count , the ratio with , the fitted log–log slope of the excess test MSE, and the slope of the bound shape over the same range of .
| empirical slope | bound-shape slope | ||||
|---|---|---|---|---|---|
| 4 | 8 | 1988 | 402 | ||
| 4 | 16 | 3044 | 263 | ||
| 4 | 32 | 5156 | 155 | ||
| 8 | 8 | 2628 | 304 | ||
| 8 | 16 | 3684 | 217 | ||
| 8 | 32 | 5796 | 138 | ||
| 16 | 8 | 3908 | 205 | ||
| 16 | 16 | 4964 | 161 | ||
| 16 | 32 | 7076 | 113 | ||
| 32 | 8 | 6468 | 124 | ||
| 32 | 16 | 7524 | 106 | ||
| 32 | 32 | 9636 | 83 | ||
| mean (std.) |

Figure 5: Excess test MSE versus (log–log) for the Top- MoE (, ) in all twelve configurations . Points: excess test MSE ; solid: least-squares fit (slope in legend); dashed: bound shape of Theorem 4.8, rescaled to the first point; dotted: reference slope .
C.1.4 Top- Routing: Average Number of Expert Selections across All Combinations
Quantity.
For each training size , the Top- MoE (, ) is evaluated on the test set. For a test input , the gate probabilities are sorted in decreasing order and is the smallest number of experts whose cumulative probability reaches . Figure 6 shows the test-set average against for all twelve configurations. The dotted line marks hard routing () and the dashed line marks , the worst-case number of active experts used in Theorem 4.8. Since for every input, the fraction of test inputs with is at most .
Results.
In all twelve configurations decreases with , mostly before , and then stays roughly flat. At the smallest training size () it lies between about and , and at it lies between and (Table 1). Hence at the largest sample size at most to of test inputs use more than one expert, depending on the configuration. The curves never come close to the worst-case count , so this count is conservative for trained routers. The final values tend to be larger for larger and (about for and for ), but the ordering is not strict. The curves are also noisier at large for , where fluctuates by about between neighboring training sizes. The entries of Table 1 are single-point values at and share this fluctuation.
Interpretation.
In all configurations the learned Top- router is close to hard routing, so the rate in reported in Section 5 is measured in a regime where multi-expert routing is used on a small fraction of inputs. These runs therefore do not probe the dependence of the bound on or on the number of active experts. We report the decrease of as an observation and do not attribute it to a specific cause. It may reflect the gate becoming sharper with more data, or optimization dynamics under a fixed number of epochs. Each curve comes from a single training run per training size.

Figure 6: Average number of experts selected by Top- routing (, ) on the test set versus training size , for all twelve configurations . Dotted: hard routing (); dashed: worst-case count used in the bound.