Statistical Advantages of Perturbing Cosine Router in Mixture of Experts

## Abstract

Abstract The cosine router in sparse Mixture of Experts (MoE) has recently emerged as an attractive alternative to the conventional linear router. Indeed, the cosine router demonstrates favorable performance in image and language tasks and exhibits better ability to mitigate the representation collapse issue, which often leads to parameter redundancy and limited representation potentials. Despite its empirical success, a comprehensive analysis of the cosine router in sparse MoE has been lacking. Considering the least square estimation of the cosine routing sparse MoE, we demonstrate that due to the intrinsic interaction of the model parameters in the cosine router via some partial differential equations, regardless of the structures of the experts, the estimation rates of experts and model parameters can be as slow as 𝒪 ⁢ ( 1 / log τ ⁡ ( n ) ) 𝒪 1 superscript 𝜏 𝑛 \mathcal{O}(1/\log^{\tau}(n)) caligraphic_O ( 1 / roman_log start_POSTSUPERSCRIPT italic_τ end_POSTSUPERSCRIPT ( italic_n ) ) where τ > 0 𝜏 0 \tau>0 italic_τ > 0 is some constant and n 𝑛 n italic_n is the sample size. Surprisingly, these pessimistic non-polynomial convergence rates can be circumvented by the widely used technique in practice to stabilize the cosine router — simply adding noises to the 𝕃 2 subscript 𝕃 2 \mathbb{L}_{2} blackboard_L start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT norms in the cosine router, which we refer to as perturbed cosine router . Under the strongly identifiable settings of the expert functions, we prove that the estimation rates for both the experts and model parameters under the perturbed cosine routing sparse MoE are significantly improved to polynomial rates. Finally, we conduct extensive simulation studies in both synthetic and real data settings to empirically validate our theoretical results.

## 1 Introduction

Proposed by Jacobs et. al. [] and Jordan et. al. [], a mixture of experts (MoE) has been known as an effective statistical method to incorporate the capabilities of various specialized models called experts. Different from conventional mixture models [] in which the mixture weights are scalars, the MoE rather utilizes a routing mechanism to determine a set of weights depending on an input token. In particular, the router first computes the similarity scores between each token and experts, and then assign more weights to the more relevant experts determined based on those scores. To further improve the scalability of the MoE, Shazeer et. al. [] have recently introduced a sparse variant of this model, which routes each input to only a subset of experts. This sparse MoE model allows us to increase the number of learnable parameters with a nearly constant computational overhead. As a consequence, the sparse MoE has been leveraged in several applications, including large language models [, , , , , , ], computer vision [, , ], speech recognition [, , ], multi-task learning [], and other applications [, ].

In the above applications, practitioners often use a linear router which calculates the similarity score by taking the inner product of a token hidden representation and an expert embedding. Nevertheless, Chi et. al. [] discovered that utilizing the linear router might induce the representation collapse issue. This phenomenon takes place when a fraction of experts govern the decision-making process, leading to the redundancy of other experts. In response, Chi et. al. [] proposed an alternative known as a cosine router. In particular, this router begins with projecting the token hidden representation into a low-dimensional space, followed by applying $\mathbb{L}_{2}$ normalization to both the token representations and expert embeddings. By doing so, the similarity scores become more stable, circumventing the dominance of certain experts. The efficacy of the cosine routing MoE has been experimentally demonstrated in language modeling [], and domain generalization []. On the other hand, a comprehensive theoretical study of the cosine router has remained lacking.

In the literature, there are some attempts to understand the MoE models with different types of gating functions whose outputs are the composition of some functions and the routing scores. First of all, considering the classification problem with cluster structures, Chen et. al. [] demonstrated that the router operated by a neural network could learn the cluster-center features, which helped divide a complex problem into simpler classification sub-problems that individual experts could handle. Next, Ho et. al. [] studied the expert estimation under an input-free gating Gaussian MoE model, showing that the rates for estimating experts depend on the algebraic structures among experts. Subsequently, the Gaussian MoE models with softmax gating [], Gaussian gating [], Top-K sparse softmax gating [], and dense-to-sparse gating functions [] were continuously explored. Those works pointed out that interactions among model parameters via some partial differential equations (PDE) did harm the expert estimation rates, and advocated using Top-1 sparse gating function to eliminate such interactions. Saying that the setting of Gaussian MoE was far from practice, Nguyen et. al. [] rather took into account a regression framework with the regression function being a deterministic MoE model. They verified the benefits of formulating experts as feed-forward networks with popular activation functions like $\mathrm{ReLU}$ and $\mathrm{sigmoid}$ from the perspective of the expert estimation problem.

In this paper, our main objective is to investigate the effects of the cosine router on the convergence of expert and parameter estimations since this problem allows us to have useful insights into the design of MoE models as in prior works. For that sake, let us now present the problem setting formally.

Problem setting. We assume that $(X_{1},Y_{1}),(X_{2},Y_{2}),\ldots,(X_{n},Y_{n})\in\mathbb{R}^{d_{1}}\times
\mathbb{R}$ is an i.i.d sample of size $n$ generated according to the following model

$$ $\displaystyle Y_{i}=f_{G_{*}}(X_{i})+\varepsilon_{i},\quad i=1,\ldots,n,$ (1) $$

where regression function $f_{G_{*}}(\cdot)$ takes the following form:

$$ $\displaystyle f_{G_{*}}(x):=\sum_{i=1}^{k_{*}}\mathrm{Softmax}\left(\mathrm{ Top}_{K}\left(\frac{(\beta_{1i}^{*})^{\top}x}{\|\beta_{1i}^{*}\|\cdot\|x\|}, \beta_{0i}^{*}\right)\right)\cdot h(x,\eta^{*}_{i}).$ (2) $$

Here, the function $h(x,\eta)$ is known as the expert function, which we assumed to be of parametric form. Meanwhile, $(\beta^{*}_{0i},\beta^{*}_{1i},\eta^{*}_{i})_{i=1}^{k_{*}}$ are true yet unknown parameters in $\mathbb{R}\times\mathbb{R}^{d_{1}}\times\mathbb{R}^{d_{2}}$ and $G_{*}:=\sum_{i=1}^{k_{*}}\exp(\beta^{*}_{0i})\delta_{(\beta_{1i}^{*},\eta^{*}_
{i})}$ denotes the associated *mixing measure,* i.e. a weighted sum of Dirac measures $\delta$. Additionally, we define for any vectors $v=(v_{1},v_{2},\ldots,v_{k_{*}})$ and $u=(u_{1},u_{2},\ldots,u_{k_{*}})$ in $\mathbb{R}^{k_{*}}$ that $\mathrm{Softmax}(v_{i}):={\exp(v_{i})}/{\sum_{j=1}^{k_{*}}\exp(v_{j})}$ and

$$ $\displaystyle\mathrm{Top}_{K}(v_{i},u_{i}):=\begin{cases}v_{i}+u_{i},\hskip 23 .33147pt\text{if }v_{i}\text{ is in the top }K\text{ elements of }v;\\ -\infty,\hskip 34.14322pt\text{otherwise}.\end{cases}$ $$

In the cosine router in equation (2), we omit the step of reducing the dimension of the input token $x$, and assume that it has already been in a low-dimensional space for simplicity. Furthermore, we assume that $X_{1},X_{2},\ldots,X_{n}$ are i.i.d. samples from some probability distribution $\mu$. Lastly, $\varepsilon_{1},\varepsilon_{2},\ldots,\varepsilon_{n}$ are independent Gaussian noise variables such that $\mathbb{E}[{\varepsilon_{i}}|X_{i}]=0$ and $\mathrm{Var}(\varepsilon_{i}|X_{i})=\sigma^{2}$ for all $1\leq i\leq n$. Notably, the Gaussian assumption is just for the simplicity of proof argument.

Least squares estimation (LSE). To estimate the true parameters $(\beta^{*}_{0i},\beta^{*}_{1i},\eta^{*}_{i})_{i=1}^{k_{*}}$, we leverage the popular least squares method []. Formally, the mixing measure $G_{*}$ is approximated by

$$ $\displaystyle\widehat{G}_{n}:=\operatorname*{arg\,min}_{G}\sum_{i=1}^{n}\Big{( }Y_{i}-f_{G}(X_{i})\Big{)}^{2}.$ (3) $$

Under the exact-specified setting, i.e., when the true number of expert $k_{*}$ is known, the minimum in the above equation is subject to the set of all mixing measures with $k_{*}$ atoms, denoted by $\mathcal{E}_{k_{*}}(\Theta):=\{G=\sum_{i=1}^{k_{*}}\exp(\beta_{0i})\delta_{(
\beta_{1i},\eta_{i})}:(\beta_{0i},\beta_{1i},\eta_{i})\in\Theta\}$.
On the other hand, under the over-specified setting, i.e., when $k_{*}$ is unknown and the true model (2) is over-specified by a mixture of $k$ experts where $k>k_{*}$, the minimum is subject to the set of all mixing measures with at most $k$ atoms, i.e., $\mathcal{G}_{k}(\Theta):=\{G=\sum_{i=1}^{k^{\prime}}\exp(\beta_{0i})\delta_{(
\beta_{1i},\eta_{i})}:1\leq k^{\prime}\leq k,\ (\beta_{0i},\beta_{1i},\eta_{i}
)\in\Theta\}$.

Universal assumptions. In the sequel, we implicitly impose four following mild assumptions on the model parameters, which were widely used in previous works [, ], unless stating otherwise:

(A.1) Convergence of LSE: The parameter space $\Theta\subseteq\mathbb{R}\times\mathbb{R}^{d_{1}}\times\mathbb{R}^{d_{2}}$ is compact, while the input space $\mathcal{X}\subseteq\mathbb{R}^{d_{1}}$ is bounded. This helps ensure the convergence of least squares estimation.

(A.2) Distinct experts: The true parameters $\eta^{*}_{1},\ldots,\eta^{*}_{k_{*}}$ are pair-wise distinct so that the experts $h(\cdot,\eta^{*}_{1}),\ldots,h(\cdot,\eta^{*}_{k_{*}})$ are different from each other. Furthermore, the expert function $h(\cdot,\eta)$ is Lipschitz continuous w.r.t its parameters and bounded.

(A.3) Identifiability of the MoE: In order that the cosine routing MoE is identifiable, i.e., $f_{G}(x)=f_{G_{*}}(x)$ for almost every $x$ implies that $G\equiv G_{*}$, we let $\beta^{*}_{0k_{*}}=0$.

(A.4) Input-dependent router: To ensure that the router is input-dependent, we assume that at least one among the parameters $\beta^{*}_{11},\ldots,\beta^{*}_{1k_{*}}$ is non-zero.

Technical challenges. The normalization of parameters in the cosine router leads to a fundamental challenge in theory. In particular, to establish parameter and expert estimation rates based on the convergence rate of regression function estimation, we rely on the decomposition of the regression function discrepancy $f_{\widehat{G}_{n}}(x)-f_{G_{*}}(x)$ into a combination of linearly independent terms via Taylor expansions to the product of the softmax’s numerator and the expert function, i.e. $H(x,\beta_{1},\eta):=\exp(\frac{\beta_{1}^{\top}x}{\|\beta_{1}\|\cdot\|x\|})h(
x,\eta)$. However, the normalization of $\beta_{1}$ in the cosine router leads to an intrinsic interaction inside this router via the following PDE:

$$ $\displaystyle\beta_{1}^{\top}\frac{\partial H}{\partial\beta_{1}}(x,\beta_{1},\eta)$ $\displaystyle=0.$ (4) $$

This PDE leads to a complex combination of terms in the Taylor expansions of the regression function discrepancy $f_{\widehat{G}_{n}}(x)-f_{G_{*}}(x)$, thereby creating several linearly dependent terms. We later demonstrate in Section 2 that these complicated interactions lead to very slow rates of estimating experts and parameters. In particular, these rates could be as slow as $1/\log^{\tau}(n)$ for some $\tau>0$, where $n$ denotes the sample size. To the best of our knowledge, such a phenomenon with the cosine router has never been observed in previous works.

Main contributions. In this work, we develop a comprehensive theoretical analysis
of regression function estimation as well as parameter and expert estimations under the cosine router MoE model (1). Our contributions are two-fold and can be summarized as follows:

1. Cosine router: Equipped with the cosine router, we demonstrate that under both the exact-specified and the over-specified settings, the rates for estimating ground-truth parameters $\beta^{*}_{0i},\beta^{*}_{1i}$ and $\eta^{*}_{i}$ are slower than any polynomial rates and, therefore, could be as slow as $\mathcal{O}_{P}(1/\log^{\tau}(n))$, where $\tau>0$ is some constant. These slow rates are attributed to the internal interaction among router parameters expressed by the PDE in equation (4). As a result, the estimation rates for experts $h(\cdot,\eta^{*}_{i})$ are also negative affected, and could be of order $\mathcal{O}_{P}(1/\log^{\tau}(n))$.

2. Perturbed cosine router: In response, we propose a novel router called *perturbed cosine router* in which we add noises to the $\mathbb{L}_{2}$ norms of the token representations and the expert embeddings. This not only helps stabilize the router but also eliminates the intrinsic interaction in equation (4). Additionally, we also establish identifiability conditions to characterize expert functions that have faster estimation rates than others under the exact-specified and over-specified settings, respectively. Those conditions indicate that the rates for estimating experts, which are formulated as feed-forward networks with widely used activation functions such as $\mathrm{ReLU}$ and $\mathrm{GeLU}$, are significantly improved, ranging from $\mathcal{O}_{P}(\sqrt[4]{\log(n)/n})$ to $\mathcal{O}_{P}(\sqrt{\log(n)/n})$.

Outline. In Section 2, we establish the convergence rates of parameter and expert estimations under both the exact-specified and over-specified settings of the cosine router MoE. Then, we derive these rates when the cosine router is replaced by the perturbed cosine router in Section 3. Based on these theoretical results, we derive a few practical implications in Section 4. We empirically verify the (theoretical) benefits of the perturbed cosine router over the cosine router under both the synthetic and real data settings in Section 5 before concluding the paper in Section 6. Finally, proofs and additional details of the experiments are deferred to the Appendices.

Notations. We let $[n]$ stand for the set $\{1,2,\ldots,n\}$ for any $n\in\mathbb{N}$. Next, for any set $S$, we denote $|S|$ as its cardinality. For any vector $v\in\mathbb{R}^{d}$ and $\alpha:=(\alpha_{1},\alpha_{2},\ldots,\alpha_{d})\in\mathbb{N}^{d}$, we let $v^{\alpha}=v_{1}^{\alpha_{1}}v_{2}^{\alpha_{2}}\ldots v_{d}^{\alpha_{d}}$, $|v|:=v_{1}+v_{2}+\ldots+v_{d}$ and $\alpha!:=\alpha_{1}!\alpha_{2}!\ldots\alpha_{d}!$, while $\|v\|$ stands for its $\mathbb{L}_{2}$-norm value. Lastly, for any two positive sequences $\{a_{n}\}_{n\geq 1}$ and $\{b_{n}\}_{n\geq 1}$, we write $a_{n}=\mathcal{O}(b_{n})$ or $a_{n}\lesssim b_{n}$ if $a_{n}\leq Cb_{n}$ for all $n\in\mathbb{N}$, where $C>0$ is some universal constant. The notation $a_{n}=\mathcal{O}_{P}(b_{n})$ indicates that $a_{n}/b_{n}$ is stochastically bounded.

## 2 Cosine Router Mixture of Experts

In this section, we characterize the parameter and expert estimation rates under over-specified setting of the cosine router MoE. We first start with the convergence rate of the regression function estimation $f_{\widehat{G}_{n}}$ to the true regression function $f_{G_{*}}$ under the $\mathbb{L}_{2}(\mu)$ norm in the following theorem:

###### Theorem 1 .

Given the least-square estimator $\widehat{G}_{n}$ defined in equation (3), the regression estimator $f_{\widehat{G}_{n}}(.)$ converges to the true regression function $f_{G_{*}}(.)$ at the following rate:

$$ $\displaystyle\|f_{\widehat{G}_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}=\mathcal{ O}_{P}(\sqrt{\log(n)/n}).$ $$

The proof of Theorem 1 is in Appendix B.1. The result of Theorem 1 indicates that the regression estimation rate is parametric. Therefore, as long as we can establish the lower bound $\|f_{\widehat{G}_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}\gtrsim\mathcal{L}(
\widehat{G}_{n},G_{*})$ where $\mathcal{L}$ is some loss function among parameters, we arrive at the parameter estimation rate $\mathcal{L}(\widehat{G}_{n},G_{*})=\mathcal{O}_{P}(\sqrt{\log(n)/n})$. This approach is the key component of the convergence rates of parameter and expert estimations under the exact-specified and over-specified settings of the cosine router MoE that we are going to discuss in Section 2.1 and Section 2.2.

###### Theorem 1 .

### 2.1 Exact-specified Setting

Recall that under the exact-specified setting, the true number of experts $k_{*}$ is known. Then, based on the notion of Voronoi cells [], we will construct a Voronoi loss function among parameters tailored to this setting.

Voronoi loss. Let $G$ be a mixing measure with $k^{\prime}$ atoms $\omega_{i}:=(\beta_{1i},\eta_{i})$. Then, we distribute these atoms to the Voronoi cells generated by the atoms $\omega^{*}_{j}:=(\beta^{*}_{1j},\eta^{*}_{j})$ of $G_{*}$, which are defined as

$$ $\displaystyle\mathcal{A}_{j}\equiv\mathcal{A}_{j}(G):=\{i\in[k^{\prime}]:\| \omega_{i}-\omega^{*}_{j}\|\leq\|\omega_{i}-\omega^{*}_{\ell}\|,\forall\ell \neq j\}.$ (5) $$

Since $\widehat{G}_{n}$ has $k_{*}$ atoms under this setting, each Voronoi cell $\mathcal{A}_{j}(\widehat{G}_{n})$ has exactly one element when the sample size $n$ is sufficiently large. Then, the Voronoi loss of interest, $\mathcal{L}_{1,r}(G,G_{*})$, is given by

$$ $\displaystyle\max_{\{\ell_{1},\ldots,\ell_{K}\}\subset[k_{*}]}\left\{\sum_{j=1 }^{K}\Big{|}\sum_{i\in\mathcal{A}_{\ell_{j}}}\exp(\beta_{0i})-\exp(\beta^{*}_{ 0{\ell_{j}}})\Big{|}+\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{\ell_{j}}}\exp(\beta _{0i})\Big{[}\|\Delta\beta_{1i\ell_{j}}\|^{r}+\|\Delta\eta_{i\ell_{j}}\|^{r} \Big{]}\right\},$ $$

where $r\geq 1$ is some constant, $\Delta\beta_{1i\ell_{j}}:=\beta_{1i}-\beta^{*}_{1\ell_{j}}$ and $\Delta\eta_{i\ell_{j}}:=\eta_{i}-\eta^{*}_{\ell_{j}}$. Compared to the Voronoi loss in [], the maximum operator is included in the above loss to deal with the $\mathrm{Top}_{K}$ function.

Note that, due to the parameter interaction inside the cosine router captured by the PDE (4), the lower bound $\|f_{\widehat{G}_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}\gtrsim\mathcal{L}_{1,r
}(\widehat{G}_{n},G_{*})$ does not hold true, and thus, we cannot achieve the desired bound $\mathcal{L}_{1,r}(\widehat{G}_{n},G_{*})=\mathcal{O}_{P}(\sqrt{\log(n)/n})$ mentioned in Section 2. By contrast, we show in Appendix B.2 an opposed result to the previous lower bound, saying that

$$ $\displaystyle\lim_{\varepsilon\to 0}\inf_{G\in\mathcal{E}_{k_{*}}(\Theta): \mathcal{L}_{1,r}(G,G_{*})\leq\varepsilon}\frac{\|f_{G}-f_{G_{*}}\|_{\mathbb{L }_{2}(\mu)}}{\mathcal{L}_{1,r}(G,G_{*})}=0,$ $$

for any $r\geq 1$. This result implies the following minimax lower bound of parameter estimation:

###### Theorem 2 .

Under the exact-specified setting, the following minimax lower bound of estimating $G_{*}$

$$ $\displaystyle\inf_{\overline{G}_{n}\in\mathcal{E}_{k_{*}}(\Theta)}\sup_{G\in \mathcal{E}_{k_{*}}(\Theta)}\mathbb{E}_{f_{G}}[\mathcal{L}_{1,r}(\overline{G}_ {n},G)]\gtrsim n^{-1/2},$ $$

holds true for any $r\geq 1$, where $\mathbb{E}_{f_{G}}$ indicates the expectation taken w.r.t the product measure with $f^{n}_{G}$ and the infimum is over all estimators taking values in $\mathcal{E}_{k_{*}}(\Theta)$.

See Appendix B.2 for the proof of Theorem 2. There are two main implications of the above result:

(i) Parameter estimation rates. The above minimax lower bound together with the formulation of $\mathcal{L}_{1,r}$ indicate that the rates for estimating parameters $\beta^{*}_{1j}$, $\eta^{*}_{j}$ are slower than any polynomial rates $\mathcal{O}_{P}(n^{-1/2r})$ and, thus, could be of order $\mathcal{O}_{P}(1/\log^{\tau}(n))$, where $\tau>0$ is some constant.

(ii) Expert estimation rates. Assume that $\widehat{G}_{n}:=\sum_{i=1}^{k_{*}}\exp(\widehat{\beta}_{0i})\delta_{(\widehat
{\beta}^{n}_{1i},\widehat{\eta}^{n}_{i})}$. Since the expert $h(\cdot,\eta)$ is Lipschitz continuous, it follows that

$$ $\displaystyle\sup_{x}|h(x,\widehat{\eta}^{n}_{i})-h(x,\eta^{*}_{j})|\lesssim\| \widehat{\eta}^{n}_{i}-\eta^{*}_{j}\|.$ (6) $$

As a consequence, the estimation rates for the experts $h(\cdot,\eta^{*}_{j})$ are no better than those for parameters $\eta^{*}_{j}$. Therefore, they could also be as slow as $\mathcal{O}_{P}(1/\log^{\tau}(n))$ regardless of their structures, including feed-forward networks as suggested in Nguyen et. al. [].

###### Theorem 2 .

### 2.2 Over-specified Setting

Under the over-specified setting, the true number of experts $k_{*}$ becomes unknown. Then, we seek the LSE $\widehat{G}_{n}$ within the set of all mixing measures with at most $k$ atoms $\mathcal{G}_{k}(\Theta)$, where $k>k_{*}$. Thus, there exists some atom $(\beta^{*}_{1j},\eta^{*}_{j})$ of $G_{*}$ approximated by at least two atoms $(\widehat{\beta}^{n}_{1i},\widehat{\eta}^{n}_{i})$ of $\widehat{G}_{n}$. Equivalently, the expert $h(\cdot,\eta^{*}_{j})$ is fitted by at least two experts $h(\cdot,\widehat{\eta}^{n}_{i})$. As a result, it is necessary to activate more than $K$ experts in the formulation of the regression estimator $f_{\widehat{G}_{n}}(\cdot)$ to ensure its convergence to the true regression function $f_{G_{*}}(\cdot)$. To this end, we consider a new regression function

$$ $\displaystyle\bar{f}_{G}(x):=\sum_{i=1}^{k}\mathrm{Softmax}\left(\mathrm{Top}_ {\overline{K}}\left(\frac{(\beta_{1i})^{\top}x}{\|\beta_{1i}\|\cdot\|x\|}, \beta_{0i}\right)\right)\cdot h(x,\eta_{i}),$ (7) $$

in which we turn on $\overline{K}$ experts per input, where $\overline{K}>K$. Moreover, we also provide in Proposition 1 the minimum value of $\overline{K}$ such that this new regression function can be used for estimating $f_{G_{*}}(\cdot)$.

###### Proposition 1 .

The following inequality holds true only if $\overline{K}\geq\max_{\{\ell_{1},\ldots,\ell_{K}\}\subset[k_{*}]}\sum_{j=1}^{K
}|\mathcal{A}_{\ell_{j}}|$:

$$ $\displaystyle\inf_{G\in\mathcal{G}_{k}(\Theta)}\|\bar{f}_{G}-f_{G_{*}}\|_{ \mathbb{L}_{2}(\mu)}=0.$ $$

Similar to the exact-specified setting, the effects of the parameter interaction (4) on the convergence of least squares estimation under the over-specified setting is also illustrated by minimax lower bound for estimating $G_{*}$ in Theorem 3, whose proof is deferred to Appendix B.3.

###### Theorem 3 .

Under the over-specified setting, the following minimax lower bound of estimating $G_{*}$

$$ $\displaystyle\inf_{\overline{G}_{n}\in\mathcal{G}_{k}(\Theta)}\sup_{G\in \mathcal{G}_{k}(\Theta)\setminus\mathcal{G}_{k_{*}-1}(\Theta)}\mathbb{E}_{f_{G }}[\mathcal{L}_{1,r}(\overline{G}_{n},G)]\gtrsim n^{-1/2},$ $$

holds true for any $r\geq 1$, where $\mathbb{E}_{f_{G}}$ indicates the expectation taken w.r.t the product measure with $f^{n}_{G}$ and the infimum is over all estimators taking values in $\mathcal{G}_{k}$.

It can be seen that the convergence behavior of parameter estimation under the over-specified setting is analogous to that under the exact-specified setting. That is, the rates for estimating parameters $\beta^{*}_{1j}$ and $\eta^{*}_{j}$ as well as experts $h(\cdot,\eta^{*}_{j})$ could be as slow as $\mathcal{O}_{P}(1/\log^{\tau}(n))$. This result indicates that the cosine router is not sample efficient for the sparse MoE model, which motivates us to enhance the performance of this router in Section 3.

###### Proposition 1 .

###### Theorem 3 .

## 3 Perturbed Cosine Router Mixture of Experts

In this section, we demonstrate that the pessimistic non-polynomial convergence rates of parameter and expert estimation under the cosine router can be easily circumvented by the widely used technique in practice to stabilize the cosine router: adding noises to the $\mathbb{L}_{2}$ norm in the cosine router. We name this new router as *perturbed cosine router*. We now present the formulation of a MoE with the perturbed cosine router under the regression setting.

Problem setup for the perturbed cosine router MoE model.
We assume that an i.i.d. sample of size $n$: $(X_{1},Y_{1}),(X_{2},Y_{2}),\ldots,(X_{n},Y_{n})\in\mathbb{R}^{d_{1}}\times
\mathbb{R}$ is generated according to the model

$$ $\displaystyle Y_{i}=g_{G_{*}}(X_{i})+\varepsilon_{i},\quad i=1,\ldots,n,$ (8) $$

where regression function $g_{G_{*}}(\cdot)$ takes the following form:

$$ $\displaystyle g_{G_{*}}(x):=\sum_{i=1}^{k_{*}}\mathrm{Softmax}\left(\mathrm{ Top}_{K}\left(\frac{(\beta_{1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1}) \cdot(\|x\|+\tau_{2})},\beta_{0i}^{*}\right)\right)\cdot h(x,\eta^{*}_{i}).$ (9) $$

Here, $\tau_{1},\tau_{2}>0$ are two noise hyper-parameters. The main difference between the two regression functions $f_{G_{*}}$ and $g_{G_{*}}$ is the noise hyper-parameters $\tau_{1},\tau_{2}$ that we add to the norms of the expert embeddings $\beta_{1i}^{*}$ and the token input $x$, which leads to the perturbed cosine router. By doing so, the parameter interaction inside the router as in equation (4) does not occur. More specifically, let us denote $\widetilde{H}(x,\beta_{1},\eta):=\exp(\frac{\beta_{1}^{\top}x}{(\|\beta_{1}\|+
\tau_{1})\cdot(\|x\|+\tau_{2})})h(x,\eta)$, then it can be verified that $\beta_{1}^{\top}\frac{\partial\widetilde{H}}{\partial\beta_{1}}(x,\beta_{1},
\eta)\neq 0$.

Least squares estimation. Similar to the cosine router setting, we can estimate the unknown ground-truth parameters $(\beta^{*}_{0i},\beta^{*}_{1i},\eta^{*}_{i})_{i=1}^{k_{*}}$ using the least-square estimator, which is given by:

$$ $\displaystyle\widetilde{G}_{n}:=\operatorname*{arg\,min}_{G}\sum_{i=1}^{n}\Big {(}Y_{i}-g_{G}(X_{i})\Big{)}^{2}.$ (10) $$

In the following theory, we provide a convergence rate of regression function estimation under the perturbed cosine router MoE model.

###### Theorem 4 .

Given a least squares estimator $\widetilde{G}_{n}$ defined in equation (10), the regression function estimation $g_{\widetilde{G}_{n}}(\cdot)$ admits the following convergence rate:

$$ $\displaystyle\|g_{\widetilde{G}_{n}}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}= \mathcal{O}_{P}(\sqrt{\log(n)/n}).$ (11) $$

Proof of Theorem 4 is in Appendix C.1. The result of Theorem 4 proves that the regression function estimation rate ${\mathcal{O}}_{P}(\sqrt{\log(n)/n})$ under the perturbed cosine router MoE is of the same order as that with the vanilla cosine router in Theorem 1. Following the similar proof strategy in the cosine router MoE in Section 2 for capturing the convergence rates of parameter and expert estimations under the perturbed cosine router MoE model, it is sufficient to establish the lower bound between the difference of regression functions and the difference of parameters under both the exact-specified and over-specified settings.

In this section, we study the over-specified setting of the perturbed cosine router. The results for the exact-specified setting of the perturbed cosine router is in Appendix A. As explained in Section 2.2, to estimate the regression function $f_{G_{*}}(\cdot)$ under this setting, we use the following regression function in which we turn on $\overline{K}$ experts rather than $K$ experts per input:

$$ $\displaystyle\bar{g}_{G}(x):=\sum_{i=1}^{k}\mathrm{Softmax}\left(\mathrm{Top}_ {\overline{K}}\left(\frac{(\beta_{1i})^{\top}x}{(\|\beta_{1i}\|+\tau_{1})\cdot (\|x\|+\tau_{2})},\beta_{0i}\right)\right)\cdot h(x,\eta_{i}),$ (12) $$

where $\overline{K}\geq\max_{\{\ell_{1},\ldots,\ell_{K}\}\subset[k_{*}]}\sum_{j=1}^{K
}|\mathcal{A}_{\ell_{j}}|$. We now derive a condition called *strong identifiability* on the expert function $h(\cdot,\eta)$ to identify which experts exhibit faster estimation rates than others under the over-specified setting.

###### Definition 1 (Strong identifiability) .

An expert function $x\mapsto h(x,\eta)$ is called strongly identifiable if it is twice differentiable with respect to its parameter $\eta$, and the set of functions in $x$

$$ $\displaystyle\left\{\frac{\partial^{|\alpha_{1}|+|\alpha_{2}|}\widetilde{H}}{ \partial\beta_{1}^{\alpha_{1}}\partial\eta^{\alpha_{2}}}(x,\beta_{1i},\eta_{i} ):\alpha_{1}\in\mathbb{N}^{d_{1}},\alpha_{2}\in\mathbb{N}^{d_{2}},0\leq|\alpha _{1}|+|\alpha_{2}|\leq 2\right\},$ $$

is linearly independent for almost every $x$ for any $k\geq 1$ and pair-wise distinct parameters $\eta_{1},\ldots,\eta_{k}$, where we denote $\widetilde{H}(x,\beta_{1},\eta):=\exp(\frac{\beta_{1}^{\top}x}{(\|\beta_{1}\|+
\tau_{1})\cdot(\|x\|+\tau_{2})})h(x,\eta)$.

Example. For experts formulated as neural networks, i.e. $h(x,(a,b))=\phi(a^{\top}x+b)$, if the activation $\phi(\cdot)$ is selected as $\mathrm{ReLU}(\cdot)$ or $\tanh(\cdot)$, then they are strongly identifiable. Conversely, a linear expert $h(x,(a,b))=a^{\top}x+b$ does not meet the strong identifiability the condition.

To capture the convergence behavior of expert estimation rate under the over-specified setting in Theorem 5, we will use the Voronoi loss $\mathcal{L}_{3}(G,G_{*})$ defined as follows:

$$ $\displaystyle\max_{\{\ell_{1},\ldots,\ell_{K}\subset[k_{*}]\}}\Bigg{\{}\sum_{j =1}^{K}\Big{|}\sum_{i\in\mathcal{A}_{\ell_{j}}}\exp(\beta_{0i})$ $\displaystyle-\exp(\beta^{*}_{0\ell_{j}})\Big{|}+\sum_{\begin{subarray}{c}j\in [K]:\\ |\mathcal{A}_{\ell_{j}}|=1\end{subarray}}\sum_{i\in\mathcal{A}_{\ell_{j}}}\exp (\beta_{0i})\Big{[}\|\Delta\beta_{1i\ell_{j}}\|+\|\Delta\eta_{i\ell_{j}}\|\Big {]}$ $\displaystyle+\sum_{\begin{subarray}{c}j\in[K]:\\ |\mathcal{A}_{\ell_{j}}|>1\end{subarray}}\sum_{i\in\mathcal{A}_{\ell_{j}}}\exp (\beta_{0i})\Big{[}\|\Delta\beta_{1i\ell_{j}}\|^{2}+\|\Delta\eta_{i\ell_{j}}\| ^{2}\Big{]}\Bigg{\}}.$ (13) $$

###### Theorem 5 .

Suppose that the expert function $h(x,\eta)$ satisfies the condition in Definition 1, then the following $L^{2}$-lower bound holds true for any $G\in\mathcal{G}_{k}(\Theta)$:

$$ $\displaystyle\|\overline{g}_{G}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}\gtrsim \mathcal{L}_{3}(G,G_{*}).$ $$

Furthermore, this bound and the result in Theorem 4 imply that $\mathcal{L}_{3}(\widetilde{G}_{n},G_{*})=\mathcal{O}_{P}(\sqrt{\log(n)/n})$.

The proof of Theorem 5 is in Appendix C.3. A few comments regarding this theorem are in order:

(i) Under the over-specified setting, parameters $\beta^{*}_{1j},\eta^{*}_{j}$ which are fitted by one atom, i.e. $|\mathcal{A}_{j}(\widetilde{G}_{n})|=1$, share the same estimation rate of order $\mathcal{O}_{P}(\sqrt{\log(n)/n})$.
Meanwhile, those for parameters fitted by more than one atom, i.e. $|\mathcal{A}_{j}(\widetilde{G}_{n})|>1$, are slightly slower, standing at order $\mathcal{O}_{P}(\sqrt[4]{\log(n)/n})$.

(ii) Given the above parameter estimation rates and the inequality (6), we observe that the rates for estimating strongly identifiable experts $h(\cdot,\eta^{*}_{j})$ range from $\mathcal{O}_{P}(\sqrt[4]{\log(n)/n})$ to $\mathcal{O}_{P}(\sqrt{\log(n)/n})$. Notably, those rates apply for polynomial experts of degree at least two, i.e. $h(x,(a,b))=(a^{\top}x+b)^{p}$ with $p\geq 2$, as they satisfy the strong identifiability condition. By contrast, the estimation rates for those experts when using the vanilla cosine router (see Theorem 3) and the softmax gating (see [Theorem 4.6, []]) are significantly slower, and could be of order $\mathcal{O}_{P}(1/\log^{\tau}(n))$. This observation demonstrates the sample efficiency of our proposed perturbed cosine router.

###### Theorem 4 .

###### Definition 1 (Strong identifiability) .

###### Theorem 5 .

## 4 Practical Implications

We now discuss two important practical implications from the theoretical results of the paper.

1. Misspecified settings. Thus far in the paper, we have only considered well-specified settings, namely, the data are assumed to be sampled from the (perturbed) cosine router MoE. Although it may look restrictive, the results under this setting lay an important foundation for a more realistic misspecified setting where the data are not necessarily generated from those models.

Under that misspecified setting, we assume that the data are generated from a regression framework as in equation (1) but with an arbitrary regression function $q(\cdot)$, which is not a (perturbed) cosine router MoE. Then, we can demonstrate that the LSE $\widehat{G}_{n}$ converges to a mixing measure $\overline{G}\in\operatorname*{arg\,min}_{G\in\mathcal{G}_{k}(\Theta)}\|q-f_{G}
\|_{\mathbb{L}_{2}(\mu)}$, where $f_{G}(\cdot)$ is a regression function taking the form of the (perturbed) cosine router MoE. Furthermore, the optimal mixing measure will be in the boundary of the parameter space $\mathcal{G}_{k}(\Theta)$, namely, $\overline{G}$ has $k$ atoms. Thus, as $n$ becomes sufficiently large, $\widehat{G}_{n}$ also has $k$ atoms.
The insights from our theories for the well-specified setting indicate that the Voronoi losses can be used to obtain the estimation rates of individual parameters of the LSE $\widehat{G}_{n}$ to those of $\overline{G}$ and, therefore, the expert estimation rates under the (perturbed) cosine router MoE.

(1.1) Cosine router MoE: the worst expert estimation rate could be as slow as $\mathcal{O}_{P}(1/\log^{\tau}(n))$ for some $\tau>0$. It indicates that we still need an exponential number of data (roughly $\exp(1/\epsilon^{\tau})$ where $\epsilon$ is the desired approximation error) to estimate the experts as well as select important experts.

(1.2) Perturbed cosine router MoE: the slowest expert estimation rate is of order $\mathcal{O}_{P}(n^{-1/4})$. Thus, we only need a polynomial number of data (roughly $\epsilon^{-4}$) to estimate the experts.
This explains why the perturbed cosine router is a solution to the parameter estimation problem, or more generally, the expert estimation problem of the MoE models.

2. Model design: From the benefits of the perturbed cosine router for the expert estimation of MoE models, our theories suggest that when using the cosine router to avoid the representation collapse, practitioners should add noises to $\mathbb{L}_{2}$ norms of the token hidden representations and the expert embeddings to achieve a favorable performance. Additionally, the strong identifiability condition also verifies the advantages of using non-linear expert networks over linear ones.

## 5 Experiments

In this section, we first conduct numerical experiments on synthetic data (cf. Section 5.1), and then carry out experiments with real data on language modeling (cf. Section 5.2) and domain generalization (cf. Appendix F) tasks. Our main goal is to empirically demonstrate the efficacy of the perturbed cosine router over the vanilla cosine router in MoE models.

### 5.1 Numerical Experiments

We first perform numerical experiments on synthetic data to empirically verify the theoretical convergence rates of the least squares estimation for both perturbed and vanilla cosine router MoE models. We generate synthetic data based on the model described in equation (1). Specifically, we generate $\{(X_{i},Y_{i})\}_{i=1}^{n}\subset\mathbb{R}^{d}\times\mathbb{R}$ by first sampling $X_{i}\sim\mathrm{Uniform}([-1,1]^{d})$ for $i=1,\ldots,n$. Then, we generate $Y_{i}$ according to the following model:

$$ $\displaystyle Y_{i}=f_{G_{*}}(X_{i})+\varepsilon_{i},\quad i=1,\ldots,n,$ (14) $$

where the regression function $f_{G_{*}}(\cdot)$ is defined as:

$$ $\displaystyle f_{G_{*}}(x):=\sum_{i=1}^{k_{*}}\mathrm{Softmax}\left(\mathrm{ Top}_{2}\left(\frac{(\beta_{1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau)\cdot( \|x\|+\tau)},\beta_{0i}^{*}\right)\right)\cdot\phi\left((a_{i}^{*})^{\top}x+b_ {i}^{*}\right).$ (15) $$

The input data dimension is set at $d=32$. We employ $k_{*}=8$ experts of the form $\phi\left((a_{i}^{*})^{\top}x+b_{i}^{*}\right)$, where the activation function $\phi$ is either the $\mathrm{ReLU}$ function or the identity function. Additionally, we activate $K=2$ experts per input. The details of the values of the parameters as well as the training procedure are in Appendix E.1.

Figure: (a) Exact-specified setting with $k=k_{*}=8$ experts

Results. Two experimental scenarios are examined: (1) Exact-specified, and (2) Over-specified. Data for both scenarios are generated according to equation (14). In the exact-specified scenario, the model is fitted with the same number of experts as the data generation model, specifically $k=k_{*}=8$. In the over-specified scenario, the model includes one additional expert, totaling $k=k_{*}+1=9$ experts, and employs the $\mathrm{Top}_{\overline{K}}$ operator with $\overline{K}=4$. In each scenario, experiments are conducted using both the standard and the perturbed cosine routers, with $\tau$ set to zero for the standard router and $0.1$ for the perturbed router. For each experiment, we calculate the Voronoi losses for every model and report the mean values for each sample size in Figure 1. Error bars representing two standard deviations are also shown.
In Figure 1(a), the empirical convergence rates of both the standard and perturbed routers are analyzed under the exact-specified setting. The perturbed router shows a rapid convergence rate of ${\mathcal{O}}(n^{-0.5})$, while the standard vanilla router has a noticeably slower rate of ${\mathcal{O}}(n^{-0.11})$. Similarly, in Figure 1(b), the convergence rates are assessed for the same routers under the over-specified setting. Here, the perturbed router again shows a faster convergence rate of ${\mathcal{O}}(n^{-0.47})$, compared to the standard vanilla router’s slower rate of ${\mathcal{O}}(n^{-0.05})$.

### 5.2 Language Modeling

For language modeling, we apply both perturbed and vanilla cosine router MoEs to character-level and word-level language modeling tasks to compare their performance.

Datasets. We begin by evaluating the model’s pre-training capabilities on character-level language modeling tasks using the Enwik8 and Text8 datasets ([]). Additionally, we assess its performance on word-level language modeling with the Wikitext-103 dataset [].

Metrics. To quantify the performance of our perturbed cosine router relative to the original one, we utilize the Bit per character (BPC) metric for character-level language modeling and Perplexity (PPL) for word-level language modeling tasks.

Architecture and training procedure. In order to alleviate the representation collapse issues associated with estimating routing scores in the original space, we first employ the XMoE method [] to project input representations on lower-dimensional space and parameterize experts with corresponding lower-dimensional embeddings. Subsequently, we calculate the routing scores of inputs and embeddings in this reduced-dimensional space using our proposed perturbed cosine router. Our experiments utilize the Switch Transformer architecture [], which is fundamentally a sparse variant of the T5 encoder-decoder architecture [], with MoE layers replacing the MLPs. Detailed information regarding the datasets, metrics, training setup and hyperparameters for this task is provided in Appendix E.2.

Results. The empirical advantage of our proposed router over the vanilla version when applied to language modeling tasks is demonstrated in Table 1. The results indicate that the perturbed cosine router enhances the performance of XMoE on the Enwik8, Text8, and Wikitext-103 datasets across both small and medium configurations. Notably, for the Enwik8 dataset at both small and medium scales, as well as for the Text8 dataset at the medium scale, XMoE with the perturbed cosine router reduces BPC, with reductions ranging from approximately 0.15 to 0.20 BPC. Furthermore, for the Wikitext-103 dataset, our proposed router marginally outperforms the original cosine router.

**Table 1: Performance of XMoE with vanilla and perturbed cosine routers on language modeling task.**
| Model | Enwik8 (BPC $\downarrow$) | Text8 (BPC $\downarrow$) | Wikitext-103 (PPL $\downarrow$) |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
|  | Small | Medium | Small | Medium | Small | Medium |
| XMoE (Vanilla cosine router) | 1.213 | 1.161 | 1.310 | 1.271 | 90.070 | 38.018 |
| XMoE (Perturbed cosine router) | 1.197 | 1.147 | 1.303 | 1.251 | 89.910 | 37.859 |

## 6 Conclusion

In this paper, we investigate the impacts of the cosine router on the convergence rates of least squares estimation in MoE models.
We figure out that owing to the parameter interaction inside the cosine router expressed by a PDE, the rates for estimating parameters and experts are slower than any polynomial rates and, therefore, could be as slow as $\mathcal{O}_{P}(1/\log^{\tau}(n))$. In response to this issue, we propose using the perturbed cosine router where we add noises to the $\mathbb{L}_{2}$ norms of the token representations and the expert embeddings in the cosine router in order to eliminate the previous parameter interaction. Equipped with this novel router, we demonstrate that if the expert function satisfies the weak (strong) identifiability condition, then the parameter and expert estimation rates are significantly improved to be of polynomial orders under the exact-specified (over-specified) setting.

Limitations. There are a few limitations in our current analysis. First of all, the assumption that the data are sampled from the (perturbed) cosine router MoE is often violated in real-world settings. However, as discussed in Section 4, our theories can totally be extended to a more realistic misspecified setting where the data are not necessarily generated from those models, which we leave for future development. Second, since the ground-truth parameters are implicitly assumed to be independent of the sample size $n$, the parameter and expert estimation rates presented in this work are point-wise rather than uniform. To cope with this problem, we can utilize the techniques for characterizing the uniform parameter estimation rates in traditional mixture models (see [, ]). Nevertheless, since the adaptation of those techniques to the setting of the (perturbed) cosine router MoE is still challenging due to the complex structures of the (perturbed) cosine router, we believe that further technical tools need to be developed to achieve the desired uniform estimation rates.

In this supplementary material, we first explore the exact-specified setting of the perturbed cosine router MoE model in Appendix A. Next, we provide proofs for theoretical results of Section 2 and Section 3 in Appendix B and Appendix C, respectively. Those proofs are partially supported by auxiliary results presented in Appendix D. Subsequently, in Appendix E, we specify the details for the experiments performed in Section 5. Finally, we conduct further experiments on the applications of MoE models in domain generalization in Appendix F to empirically demonstrate the benefits of using our proposed perturbed cosine router over the vanilla cosine router.

## Appendix A Exact-specified Setting of the Perturbed Cosine Router MoE

We now consider the exact-specified setting of the perturbed cosine router MoE model (8). To begin with, we introduce a condition called *weak identifiability* on the expert function $h(\cdot,\eta)$ to characterize which experts have faster estimation rates than others under this setting.

###### Definition 2 (Weak identifiability) .

An expert function $x\mapsto h(x,\eta)$ is said to be weakly identifiable if it is differentiable w.r.t its parameter $\eta$ and the set of functions in $x$

$$ $\displaystyle\left\{\frac{\partial^{|\alpha_{1}|+|\alpha_{2}|}\widetilde{H}}{ \partial\beta_{1}^{\alpha_{1}}\partial\eta^{\alpha_{2}}}(x,\beta_{1i},\eta_{i} ):\alpha_{1}\in\mathbb{N}^{d_{1}},\alpha_{2}\in\mathbb{N}^{d_{2}},0\leq|\alpha _{1}|+|\alpha_{2}|\leq 1\right\},$ $$

is linearly independent for almost every $x$, for any $k\geq 1$ and pair-wise distinct parameters $\eta_{1},\ldots,\eta_{k}$, where we denote $\widetilde{H}(x,\beta_{1},\eta):=\exp(\frac{\beta_{1}^{\top}x}{(\|\beta_{1}\|+
\tau_{1})\cdot(\|x\|+\tau_{2})})h(x,\eta)$.

Recall from the “Technical challenges” paragraph in Section 1 that a key step to establish the expert estimation rates is to decompose the difference $f_{\widetilde{G}_{n}}(x)-f_{G_{*}}(x)$ into a combination of linearly independent terms via Taylor expansions to the function $H(\cdot,\beta_{1},\eta)$. Therefore, the purpose of the weak identifiability condition is to avoid all potential parameter interactions as in equation (4), which may lead to undesirable linearly dependent terms.

Example. For simplicity, we consider experts formulated as neural networks, i.e. $h(x,(a,b))=\phi(a^{\top}x+b)$. It can be validated that if the function $\phi(\cdot)$ is either a popular activation such as $\mathrm{ReLU}(\cdot)$ and $\tanh(\cdot)$ or a polynomial $\phi(z)=z^{p}$, for any $p\in\mathbb{N}$, then the expert $h(x,(a,b))$ is weakly identifiable. On the other hand, a constant expert $h(\cdot,\eta)=constant$ fails to satisfy the weak identifiability the condition.

Next, we will use the Voronoi loss function $\mathcal{L}_{2}(G,G_{*})$ defined below to determine the estimation rates for weakly identifiable experts in Theorem 6, whose proof can be found in Appendix C.2.

$$ $\displaystyle\max_{\{\ell_{1},\ldots,\ell_{K}\}\subset[k_{*}]}\Bigg{\{}\sum_{j =1}^{K}\Big{|}\sum_{i\in\mathcal{A}_{\ell_{j}}}\exp(\beta_{0i})-\exp(\beta^{*} _{0\ell_{j}})\Big{|}+\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{\ell_{j}}}\exp(\beta _{0i})\Big{[}\|\Delta\beta_{1i\ell_{j}}\|+\|\Delta\eta_{i\ell_{j}}\|\Big{]} \Bigg{\}}.$ (16) $$

###### Theorem 6 .

Assume that $h(\cdot,\eta)$ is a weakly identifiable expert function, then the following lower bound holds true for any $G\in\mathcal{E}_{k_{*}}(\Theta)$:

$$ $\displaystyle\|g_{G}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}\gtrsim\mathcal{L}_{2}(G ,G_{*}).$ $$

Furthermore, this bound and the result in Theorem 4 imply that $\mathcal{L}_{2}(\widetilde{G}_{n},G_{*})=\mathcal{O}_{P}(\sqrt{\log(n)/n})$.

The bound $\mathcal{L}_{2}(\widetilde{G}_{n},G_{*})=\mathcal{O}_{P}(\sqrt{\log(n)/n})$ all the parameters $\beta^{*}_{1j},\eta^{*}_{j}$ enjoy the same parametric estimation rates, standing at order ${\mathcal{O}}_{P}(\sqrt{\log(n)/n})$. Furthermore, by employing the argument in equation (6), we deduce that the rates for estimating experts $h(\cdot,\eta^{*}_{j})$ are also of order ${\mathcal{O}}_{P}(\sqrt{\log(n)/n})$. Those rates are substantially faster than their counterparts when using the vanilla cosine router, which could be as slow as $\mathcal{O}_{P}(1/\log^{\tau}(n))$ (see Theorem 2). This comparison highlights the benefits of our proposed perturb cosine router over the vanilla cosine router.

###### Definition 2 (Weak identifiability) .

###### Theorem 6 .

## Appendix B Proof for Results in Section 2

In this appendix, we provide proofs for the theoretical results regarding the cosine router in stated in Section 2, including Theorem 1, Theorem 2, and Theorem 3, in that order.

### B.1 Proof of Theorem 1

Prior to presenting the proof, let us introduce some necessary notations. Firstly, we denote by $\mathcal{R}_{k}(\Theta)$ the set of regression functions w.r.t mixing measures in $\mathcal{G}_{k}(\Theta)$, that is, $\mathcal{R}_{k}(\Theta):=\{g_{G}(x):G\in\mathcal{G}_{k}(\Theta)\}$.
Additionally, for each $\delta>0$, the $L^{2}$ ball centered around the regression function $g_{G_{*}}$ and intersected with the set $\mathcal{R}_{k}(\Theta)$ is defined as

$$ $\displaystyle\mathcal{R}_{k}(\Theta,\delta):=\left\{g\in\mathcal{R}_{k}(\Theta ):\|g-g_{G_{*}}\|_{L^{2}(\mu)}\leq\delta\right\}.$ $$

In order to measure the size of the above set, Geer et. al. [] suggest using the following quantity:

$$ $\displaystyle\mathcal{J}_{B}(\delta,\mathcal{R}_{k}(\Theta,\delta)):=\int_{ \delta^{2}/2^{13}}^{\delta}H_{B}^{1/2}(t,\mathcal{R}_{k}(\Theta,t),\|\cdot\|_{ L^{2}(\mu)})~{}\mathrm{d}t\vee\delta,$ (17) $$

where $H_{B}(t,\mathcal{R}_{k}(\Theta,t),\|\cdot\|_{L^{2}(\mu)})$ stands for the bracketing entropy [] of $\mathcal{R}_{k}(\Theta,u)$ under the $L^{2}$-norm, and $t\vee\delta:=\max\{t,\delta\}$. By using the similar proof argument of Theorem 7.4 and Theorem 9.2 in [] with notations being adapted to this work, we obtain the following lemma:

###### Lemma 1 .

Take $\Psi(\delta)\geq\mathcal{J}_{B}(\delta,\mathcal{R}_{k}(\Theta,\delta))$ that satisfies $\Psi(\delta)/\delta^{2}$ is a non-increasing function of $\delta$. Then, for some universal constant $c$ and for some sequence $(\delta_{n})$ such that $\sqrt{n}\delta^{2}_{n}\geq c\Psi(\delta_{n})$, we achieve that

$$ $\displaystyle\mathbb{P}\Big{(}\|g_{\widehat{G}_{n}}-g_{G_{*}}\|_{L^{2}(\mu)}> \delta\Big{)}\leq c\exp\left(-\frac{n\delta^{2}}{c^{2}}\right),$ $$

for all $\delta\geq\delta_{n}$.

General picture. We first show that when the expert functions are Lipschitz continuous, the following bound holds for any $0<\varepsilon\leq 1/2$:

$$ $\displaystyle H_{B}(\varepsilon,\mathcal{R}_{k}(\Theta),\|.\|_{\mathbb{L}_{2}( \mu)})\lesssim\log(1/\varepsilon).$ (18) $$

Given this bound, it follows that

$$ $\displaystyle\mathcal{J}_{B}(\delta,\mathcal{R}_{k}(\Theta,\delta))=\int_{ \delta^{2}/2^{13}}^{\delta}H_{B}^{1/2}(t,\mathcal{R}_{k}(\Theta,t),\|\cdot\|_{ \mathbb{L}_{2}(\mu)})~{}\mathrm{d}t\vee\delta\lesssim\int_{\delta^{2}/2^{13}}^ {\delta}\log(1/t)dt\vee\delta.$ (19) $$

Let $\Psi(\delta)=\delta\cdot[\log(1/\delta)]^{1/2}$, then $\Psi(\delta)/\delta^{2}$ is a non-increasing function of $\delta$. Furthermore, equation (19) indicates that $\Psi(\delta)\geq\mathcal{J}_{B}(\delta,\mathcal{R}_{k}(\Theta,\delta))$. In addition, let $\delta_{n}=\sqrt{\log(n)/n}$, then we get that $\sqrt{n}\delta^{2}_{n}\geq c\Psi(\delta_{n})$ for some universal constant $c$. Finally, by applying Lemma 1, we achieve the desired conclusion of the theorem. As a consequence, it suffices to demonstrate the bound (30).

Proof for the bound (18). Since the expert functions are Lipschitz continuous, then for any function $f_{G}\in\mathcal{R}_{k}(\Theta)$, we have that $f_{G}(x)\leq M$ for all $x$ where $M>0$ is some constant.

Let $\tau\leq\varepsilon$ and $\{\pi_{1},\ldots,\pi_{N}\}$ be the $\tau$-cover under the $\mathbb{L}_{2}(\mu)$ norm of the set $\mathcal{R}_{k}(\Theta)$ where $N:={N}(\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}(\mu)})$ is the $\eta$-covering number of the metric space $(\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}(\mu)})$. Then, we construct the brackets of the form $[L_{i}(x),U_{i}(x)]$ for all $i\in[N]$ as follows:

$$ $\displaystyle L_{i}(x)$ $\displaystyle:=\max\{\pi_{i}(x)-\tau,0\},$ $\displaystyle U_{i}(x)$ $\displaystyle:=\max\{\pi_{i}(x)+\tau,M\}.$ $$

From the above formulation, it can be checked that $\mathcal{R}_{k}(\Theta)\subset\cup_{i=1}^{N}[L_{i}(x),U_{i}(x)]$, and $U_{i}(x)-L_{i}(x)\leq 2\min\{2\tau,M\}$. Thus, we get that

$$ $\displaystyle\|U_{i}-L_{i}\|_{\mathbb{L}_{2}(\mu)}^{2}=\int(U_{i}(x)-L_{i}(x)) ^{2}\mathrm{d}\mu(x)\leq\int 16\tau^{2}\mathrm{d}\mu(x)=16\tau^{2},$ $$

which indicates that $\|U_{i}-L_{i}\|_{\mathbb{L}_{2}(\mu)}\leq 4\tau$. By definition of the bracketing entropy, we achieve that

$$ $\displaystyle H_{B}(4\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}( \mu)})\leq\log N=\log{N}(\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2 }(\mu)}).$ (20) $$

Therefore, it is necessary to provide an upper bound for the covering number $N$. Indeed, let us denote $\Delta:=\{(\beta_{0},\beta_{1})\in\mathbb{R}\times\mathbb{R}^{d_{1}}:(\beta_{0
},\beta_{1},\eta)\in\Theta\}$ and $\Omega:=\{\eta\in\mathbb{R}^{d_{2}}:(\beta_{0},\beta_{1},\eta)\in\Theta\}$. Since $\Theta$ is a compact set, $\Delta$ and $\Omega$ are also compact. Therefore, we can find $\tau$-covers $\Delta_{\tau}$ and ${\Omega}_{\tau}$ for $\Delta$ and $\Omega$, respectively. Furthermore, it can be validated that

$$ $\displaystyle|\Delta_{\tau}|\leq\mathcal{O}_{P}(\tau^{-(d_{1}+1)k}),\quad| \Omega_{\tau}|\leq\mathcal{O}_{P}(\tau^{-d_{2}k}).$ $$

For each mixing measure $G=\sum_{i=1}^{k}\exp(\beta_{0i})\delta_{(\beta_{1i},\eta_{i})}\in\mathcal{G}_{
k}(\Theta)$, we consider two other mixing measures $G^{\prime}$ and $\overline{G}$ defined as

$$ $\displaystyle G^{\prime}:=\sum_{i=1}^{k}\exp(\beta_{0i})\delta_{({\beta}_{1i}, \overline{\eta}_{i})},\qquad\overline{G}:=\sum_{i=1}^{k}\exp(\overline{\beta}_ {0i})\delta_{({\overline{\beta}}_{1i},\overline{\eta}_{i})}.$ $$

Here, $\overline{\eta}_{i}\in{\Omega}_{\tau}$ such that $\overline{\eta}_{i}$ is the closest to $\eta_{i}$ in that set, while $(\overline{\beta}_{0i},\overline{\beta}_{1i})\in\Delta_{\tau}$ is the closest to $(\beta_{0i},\beta_{1i})$ in that set. Now, we aim to upper bound the term $\|f_{G}-f_{G^{\prime}}\|_{\mathbb{L}_{2}(\mu)}^{2}$. In particular, we have

$$ $\displaystyle\|f_{G}-f_{G^{\prime}}\|_{\mathbb{L}_{2}(\mu)}^{2}$ $\displaystyle=\int\Bigg{[}\sum_{i=1}^{k}\mathrm{Softmax}\left(\mathrm{Top}_{ \overline{K}}\left(\frac{(\beta_{1i})^{\top}x}{\|\beta_{1i}\|\cdot\|x\|},\beta _{0i}\right)\right)\cdot[h(x,\eta_{i})-h(x,\overline{\eta}_{i})\Bigg{]}^{2}~{} \mathrm{d}\mu(x)$ $\displaystyle\leq\int\Big{[}\sum_{i=1}^{k}(h(x,\eta_{i})-h(x,\overline{\eta}_{ i}))\Big{]}^{2}~{}\mathrm{d}\mu(x)$ $\displaystyle\leq k\int\sum_{i=1}^{k}~{}[h(x,\eta_{i})-h(x,\overline{\eta}_{i} )]^{2}~{}\mathrm{d}\mu(x)$ $\displaystyle\leq k\int\sum_{i=1}^{k}~{}[L_{1}\cdot\|\eta_{i}-\overline{\eta}_ {i}\|]^{2}~{}\mathrm{d}\mu(x)$ $\displaystyle\leq k^{2}(L_{1}\tau)^{2},$ $$

which implies that $\|g_{G}-g_{G^{\prime}}\|_{\mathbb{L}_{2}(\mu)}\lesssim\tau$. Above, the second inequality is obtained by applying the Cauchy-Schwarz inequality, the third inequality holds as the softmax weight is bounded by 1, and the fourth inequality is due to the fact that the expert $h(x,\cdot)$ is a Lipschitz function with some Lipschitz constant $L_{1}$.

Next, we demonstrate that $\|g_{G^{\prime}}-g_{\overline{G}}\|_{1}\lesssim\eta$. To this end, let us consider $q:=\binom{k}{K}$ $K$-element subsets of $[k]$, which are assumed to take the form $\{\ell_{1},\ell_{2},\ldots,\ell_{K}\}$ for any $\ell\in[q]$. Additionally, we also denote $\{\ell_{K+1},\ldots,\ell_{k}\}:=\{1,\ldots,k\}\setminus\{\ell_{1},\ldots,\ell_
{K}\}$ for any $\ell\in[q]$. Then, we define

$$ $\displaystyle\mathcal{X}_{\ell}$ $\displaystyle:=\{x\in\mathcal{X}:\cos(\beta_{1i},x)\geq\cos(\beta_{1i^{\prime} },x):i\in\{\ell_{1},\ldots,\ell_{K}\},i^{\prime}\in\{\ell_{K+1},\ldots,\ell_{k _{*}}\}\},$ $\displaystyle\widetilde{\mathcal{X}}_{\ell}$ $\displaystyle:=\{x\in\mathcal{X}:\cos(\overline{\beta}_{1i},x)\geq\cos( \overline{\beta}_{1i^{\prime}},x):i\in\{\ell_{1},\ldots,\ell_{K}\},i^{\prime} \in\{\ell_{K+1},\ldots,\ell_{k_{*}}\}\}.$ $$

By using the same arguments as in the proof of Lemma 3 in Appendix D, we achieve that either $\mathcal{X}_{\ell}=\widetilde{\mathcal{X}}_{\ell}$ or $\mathcal{X}_{\ell}$ has measure zero for any $\ell\in[q]$. As the $\mathrm{Softmax}$ function is differentiable, it is Lipschitz continuous with some Lipschitz constant $L_{2}\geq 0$. Since $\mathcal{X}$ is a bounded set, we may assume that $\|x\|\leq B$ for any $x\in\mathcal{X}$. Next, we denote

$$ $\displaystyle\pi_{{\ell}}(x)$ $\displaystyle:=\Big{(}\frac{(\beta_{1\ell_{i}})^{\top}x}{\|\beta_{1\ell_{i}}\| \cdot\|x\|}+\beta_{0\ell_{i}}\Big{)}_{i=1}^{{K}},$ $\displaystyle\overline{\pi}_{{\ell}}(x)$ $\displaystyle:=\Big{(}\frac{(\overline{\beta}_{1\ell_{i}})^{\top}x}{\| \overline{\beta}_{1\ell_{i}}\|\cdot\|x\|}+\overline{\beta}_{0\ell_{i}}\Big{)}_ {i=1}^{{K}},$ $$

for any ${K}$-element subset $\{{\ell}_{1},\ldots{\ell}_{K}\}$ of $\{1,\ldots,k_{*}\}$. Then, we get

$$ $\displaystyle\|\mathrm{Softmax}(\pi_{{\ell}}(x))-\mathrm{Softmax}(\overline{ \pi}_{{\ell}}(x))\|$ $\displaystyle\leq L_{2}\cdot\|\pi_{{\ell}}(x)-\overline{\pi}_{{\ell}}(x)\|$ $\displaystyle\leq L_{2}\cdot\sum_{i=1}^{{K}}\Big{(}\|\beta_{1{\ell}_{i}}- \overline{\beta}_{1{\ell}_{i}}\|\cdot\|x\|+|\beta_{0{\ell}_{i}}-\overline{ \beta}_{0{\ell}_{i}}|\Big{)}$ $\displaystyle\leq L_{2}\cdot\sum_{i=1}^{{K}}\Big{(}\eta B+\eta\Big{)}$ $\displaystyle\lesssim\eta.$ $$

Back to the proof for $\|f_{G^{\prime}}-f_{\overline{G}}\|_{1}\lesssim\eta$, it follows from the above results that

$$ $\displaystyle\|f_{G^{\prime}}-f_{\overline{G}}\|_{1}=\int_{\mathcal{X}}|f_{G^{ \prime}}(x)-f_{\overline{G}}(x)|~{}\mathrm{d}\mu(x)\leq\sum_{\ell=1}^{q}\int_{ \mathcal{X}_{\ell}}|f_{G^{\prime}}(x)-f_{\overline{G}}(x)|~{}\mathrm{d}\mu(x)$ $\displaystyle\leq\sum_{\ell=1}^{q}\int_{\mathcal{X}_{\ell}}\sum_{i=1}^{K}\Big{ |}\mathrm{Softmax}(\pi_{\ell}(x)_{i})-\mathrm{Softmax}(\overline{\pi}_{\ell}(x )_{i})\Big{|}\cdot|h(x,\overline{\eta}_{\ell_{i}})|~{}\mathrm{d}\mu(x)$ $\displaystyle\lesssim\eta,$ (21) $$

By the triangle inequality, we have

$$ $\displaystyle\|f_{G}-f_{\overline{G}}\|_{\mathbb{L}_{2}(\mu)}\leq\|f_{G}-f_{G^ {\prime}}\|_{\mathbb{L}_{2}(\mu)}+\|f_{G^{\prime}}-f_{\overline{G}}\|_{\mathbb {L}_{2}(\mu)}\lesssim\tau.$ $$

By definition of the covering number, we deduce that

$$ $\displaystyle{N}(\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}(\mu)})$ $\displaystyle\leq|\Delta_{\tau}|\times|\Omega_{\tau}|$ $\displaystyle\leq\mathcal{O}_{P}(n^{-(d_{1}+1)k})\times\mathcal{O}(n^{-d_{2}k})$ $\displaystyle\leq\mathcal{O}(n^{-(d_{1}+1+d_{2})k}).$ (22) $$

Putting the results in equations (20) and (B.1) together, we achieve that

$$ $\displaystyle H_{B}(4\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}( \mu)})\lesssim\log(1/\tau).$ $$

By setting $\tau=\varepsilon/4$, we achieve that

$$ $\displaystyle H_{B}(\varepsilon,\mathcal{R}_{k}(\Theta),\|.\|_{\mathbb{L}_{2}( \mu)})\lesssim\log(1/\varepsilon),$ $$

which completes the proof.

###### Lemma 1 .

### B.2 Proof of Theorem 2

###### Lemma 2 .

If the following holds for any $r\geq 1$:

$$ $\displaystyle\lim_{\varepsilon\to 0}\inf_{G\in\mathcal{E}_{k_{*}}(\Theta): \mathcal{L}_{1,r}(G,G_{*})\leq\varepsilon}\frac{\|f_{G}-f_{G_{*}}\|_{\mathbb{L }_{2}(\mu)}}{\mathcal{L}_{1,r}(G,G_{*})}=0,$ (23) $$

then we obtain that

$$ $\displaystyle\inf_{\overline{G}_{n}\in\mathcal{E}_{k_{*}}(\Theta)}\sup_{G\in \mathcal{E}_{k_{*}}(\Theta)}\mathbb{E}_{f_{G}}[\mathcal{L}_{1,r}(\overline{G}_ {n},G)]\gtrsim n^{-1/2}.$ (24) $$

###### Proof of Lemma 2 .

Indeed, from the Gaussian assumption on the noise variables $\epsilon_{i}$, we obtain that $Y_{i}|X_{i}\sim\mathcal{N}(f_{G_{*}}(X_{i}),\sigma^{2})$ for all $i\in[n]$. Next, the assumption in equation (23) indicates for sufficiently small $\varepsilon>0$ and a fixed constant $C_{1}>0$ which we will choose later, we can find a mixing measure $G^{\prime}_{*}\in\mathcal{E}_{k_{*}}(\Theta)$ such that $\mathcal{L}_{1,r}(G^{\prime}_{*},G_{*})=2\varepsilon$ and $\|f_{G^{\prime}_{*}}-f_{G_{*}}\|_{L^{2}(\mu)}\leq C_{1}\varepsilon$. From Le Cam’s lemma [], as the Voronoi loss function $\mathcal{L}_{1,r}$ satisfies the weak triangle inequality, we obtain that

$$ $\displaystyle\inf_{\overline{G}_{n}\in\mathcal{E}_{k_{*}}(\Theta)}$ $\displaystyle\sup_{G\in\mathcal{E}_{k_{*}}(\Theta)}\mathbb{E}_{f_{G}}[\mathcal {L}_{1,r}(\overline{G}_{n},G)]$ $\displaystyle\gtrsim\frac{\mathcal{L}_{1,r}(G^{\prime}_{*},G_{*})}{8}\text{exp }(-n\mathbb{E}_{X\sim\mu}[\text{KL}(\mathcal{N}(f_{G^{\prime}_{*}}(X),\sigma^{ 2}),\mathcal{N}(f_{G_{*}}(X),\sigma^{2}))])$ $\displaystyle\gtrsim\varepsilon\cdot\text{exp}(-n\|f_{G^{\prime}_{*}}-f_{G_{*} }\|_{L^{2}(\mu)}^{2}),$ $\displaystyle\gtrsim\varepsilon\cdot\text{exp}(-C_{1}n\varepsilon^{2}),$ (25) $$

where the second inequality is due to the fact that

$$ $\displaystyle\text{KL}(\mathcal{N}(f_{G^{\prime}_{*}}(X),\sigma^{2}),\mathcal{ N}(f_{G_{*}}(X),\sigma^{2}))=\dfrac{(f_{G^{\prime}_{*}}(X)-f_{G_{*}}(X))^{2}}{ 2\sigma^{2}}.$ $$

By choosing $\varepsilon=n^{-1/2}$, we obtain that $\varepsilon\cdot\text{exp}(-C_{1}n\varepsilon^{2})=n^{-1/2}\exp(-C_{1})$. As a consequence, we achieve the desired minimax lower bound in equation (24).
∎

Main proof. It is sufficient to show that the following limit holds true for any $r\geq 1$:

$$ $\displaystyle\lim_{\varepsilon\to 0}\inf_{G\in\mathcal{E}_{k_{*}}(\Theta): \mathcal{L}_{1,r}(G,G_{*})\leq\varepsilon}\frac{\|f_{G}-f_{G_{*}}\|_{\mathbb{L }_{2}(\mu)}}{\mathcal{L}_{1,r}(G,G_{*})}=0.$ (26) $$

To this end, we need to construct a sequence of mixing measures $G_{n}\in\mathcal{E}_{k_{*}}(\Theta)$ that satisfies $\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ and

$$ $\displaystyle\frac{\|f_{G_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}}{\mathcal{L}_ {1,r}(G_{n},G_{*})}\to 0,$ $$

as $n\to\infty$. Next, let us take into account the sequence $G_{n}=\sum_{i=1}^{k_{*}}\exp(\beta^{n}_{0i})\delta_{(\beta^{n}_{1i},\eta^{n}_{
i})}$ in which

- •
$\exp(\beta^{n}_{0i})=\exp(\beta^{*}_{0i})$ for any $1\leq i\leq k_{*}$;
- •
$\beta^{n}_{11}=\Big{(}1+\frac{1}{n}\Big{)}\beta^{*}_{11}$ and $\beta^{n}_{1i}=\beta^{*}_{1i}$ for any $2\leq i\leq k_{*}$;
- •
$\eta^{n}_{i}=\eta^{*}_{i}$ for any $1\leq i\leq k_{*}$.

Consequently, it can be verified that when $n\to\infty$, we have

$$ $\displaystyle\mathcal{L}_{1,r}(G_{n},G_{*})=\exp(\beta^{*}_{01})\Big{[}\|\beta ^{n}_{11}-\beta^{*}_{11}\|^{r}\Big{]}=\exp(\beta^{*}_{01})\cdot\Big{(}\frac{ \sqrt{d}}{n}\Big{)}^{r}\to 0,$ $$

Next, we demonstrate that $\|f_{G_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{1,r}(G_{n},G_{*})\to
0$.

Subsequently, to specify the top $K$ selection in the formulations of $f_{G_{n}}(x)$ and $f_{G_{*}}(x)$, we divide the input space $\mathcal{X}$ into complement subsets in two ways. In particular, we first consider $q:=\binom{k_{*}}{K}$ different $K$-element subsets of $[k_{*}]$, which are assumed to take the form $\{\ell_{1},\ldots,\ell_{K}\}$, for $\ell\in[q]$. Additionally, we denote $\{\ell_{K+1},\ldots,\ell_{k_{*}}\}:=[k_{*}]\setminus\{\ell_{1},\ldots,\ell_{K}\}$. Then, we define for each $\ell\in[q]$ two following subsets of $\mathcal{X}$:

$$ $\displaystyle\mathcal{X}^{n}_{\ell}:=\Big{\{}x\in\mathcal{X}:\cos(\beta^{n}_{1 j},x)\geq\cos(\beta^{n}_{1j^{\prime}},x):\forall j\in\{\ell_{1},\ldots,\ell_{K }\},j^{\prime}\in\{\ell_{K+1},\ldots,\ell_{k_{*}}\}\Big{\}},$ $\displaystyle\mathcal{X}^{*}_{\ell}:=\Big{\{}x\in\mathcal{X}:\cos(\beta^{*}_{1 j},x)\geq\cos(\beta^{*}_{1j^{\prime}},x):\forall j\in\{\ell_{1},\ldots,\ell_{K }\},j^{\prime}\in\{\ell_{K+1},\ldots,\ell_{k_{*}}\}\Big{\}}.$ $$

Since $\beta^{n}_{1j}\to\beta^{*}_{1j}$ as $n\to\infty$ for any $j\in[k_{*}]$, we have for any arbitrarily small $\eta_{j}>0$ that $\|\beta^{n}_{1j}-\beta^{*}_{1j}\|\leq\eta_{j}$ for sufficiently large $n$. By applying Lemma 3, we obtain that $\mathcal{X}^{n}_{\ell}=\mathcal{X}^{*}_{\ell}$ for any $\ell\in[q]$ for sufficiently large $n$.

Let us consider an arbitrary subset $\mathcal{X}^{*}_{\ell}$ of the input space $\mathcal{X}$ where
$\ell$ is an arbitrary index in $[q]$.

Case 1: $1\not\in\{\ell_{1},\ldots,\ell_{K}\}$. In this case, we can validate that $f_{G_{n}}(x)-f_{G_{*}}(x)=0$ for almost every $x\in\mathcal{X}^{*}_{\ell}$.

Case 2: $1\in\{\ell_{1},\ldots,\ell_{K}\}$. WLOG, we assume that that $\{\ell_{1},\ldots,\ell_{K}\}=\{1,\ldots,K\}$. Then, for almost every $x\in\mathcal{X}^{*}_{\ell}$, we can represent $f_{G_{n}}(x)$ and $f_{G_{*}}(x)$ as

$$ $\displaystyle f_{G_{n}}(x)$ $\displaystyle=\sum_{i=1}^{K}\mathrm{Softmax}\Big{(}\frac{(\beta_{1i}^{n})^{ \top}x}{\|\beta_{1i}^{n}\|\cdot\|x\|}\Big{)}\cdot h(x,\eta_{i}^{n}),$ $\displaystyle f_{G_{*}}(x)$ $\displaystyle=\sum_{i=1}^{K}\mathrm{Softmax}\Big{(}\frac{(\beta_{1i}^{*})^{ \top}x}{\|\beta_{1i}^{*}\|\cdot\|x\|}\Big{)}\cdot h(x,\eta_{i}^{*}).$ $$

Now, we consider the quantity

$$ $\displaystyle Q_{n}(x):=\left[\sum_{j=1}^{k_{*}}\exp\left(\frac{(\beta_{1j}^{* })^{\top}x}{\|\beta_{1j}^{*}\|\cdot\|x\|}+\beta_{0j}^{*}\right)\right]\cdot[f_ {G_{n}}(x)-f_{G_{*}}(x)],$ (27) $$

which can be decomposed as follows:

$$ $\displaystyle Q_{n}(x)$ $\displaystyle=\sum_{j=1}^{k_{*}}\sum_{i\in\mathcal{A}_{j}}\exp(\beta^{n}_{0i}) \left[\exp\left(\frac{(\beta_{1i}^{n})^{\top}x}{\|\beta_{1i}^{n}\|\cdot\|x\|} \right)h(x,\eta_{i}^{n})-\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{\|\beta_{1j }^{*}\|\cdot\|x\|}\right)h(x,\eta_{j}^{*})\right]$ $\displaystyle-\sum_{j=1}^{k_{*}}\sum_{i\in\mathcal{A}_{j}}\exp(\beta^{n}_{0i}) \left[\exp\left(\frac{(\beta_{1i}^{n})^{\top}x}{\|\beta_{1i}^{n}\|\cdot\|x\|} \right)f_{G_{n}}(x)-\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{\|\beta_{1j}^{*} \|\cdot\|x\|}\right)f_{G_{n}}(x)\right]$ $\displaystyle+\sum_{j=1}^{k_{*}}\Big{(}\sum_{i\in\mathcal{A}_{j}}\exp(\beta_{0 i}^{n})-\exp(\beta_{0j}^{*})\Big{)}\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{ \|\beta_{1j}^{*}\|\cdot\|x\|}\right)\Big{[}h(x,\eta_{j}^{*})-f_{G_{n}}(x)\Big{]}$ $\displaystyle:=A_{n}(x)-B_{n}(x)+C_{n}(x).$ $$

Since $\exp(\beta_{0i}^{n})=\exp(\beta_{0i}^{*})$ for all $i\in[k_{*}]$, we deduce that $C_{n}(x)=0$. Additionally, from the choices of $\beta_{1i}^{n}$ and $\eta_{i}^{n}$, we can rewrite $A_{n}(x)$ as

$$ $\displaystyle A_{n}(x)=\exp(\beta^{*}_{01})\left[\exp\left(\frac{(\beta^{n}_{1 1})^{\top}x}{\|\beta^{n}_{11}\|\cdot\|x\|}\right)-\exp\left(\frac{(\beta^{*}_{ 11})^{\top}x}{\|\beta^{*}_{11}\|\cdot\|x\|}\right)\right]h(x,\eta^{*}_{1}).$ $$

Let us denote $F(x,\beta_{1}):=\exp\left(\frac{\beta_{1}^{\top}x}{\|\beta_{1}\|\cdot\|x\|}\right)$. By applying the Taylor expansion of order $r$, we have

$$ $\displaystyle A_{n}(x)$ $\displaystyle=\exp(\beta^{*}_{01})h(x,\eta^{*}_{1})\sum_{|\alpha|=1}^{r}\frac{ 1}{\alpha!}\cdot(\beta^{n}_{11}-\beta^{*}_{11})^{\alpha}\cdot\frac{\partial^{| \alpha|}F}{\partial\beta_{1}^{\alpha}}(x,\beta^{*}_{11})+R(x)$ $\displaystyle=\exp(\beta^{*}_{01})h(x,\eta^{*}_{1})\sum_{|\alpha|=1}^{r}\frac{ 1}{\alpha!}\Big{(}1+\frac{1}{n}\Big{)}^{|\alpha|}(\beta^{*}_{11})^{\alpha} \cdot\frac{\partial^{|\alpha|}F}{\partial\beta_{1}^{\alpha}}(x,\beta^{*}_{11}) +R(x),$ $$

where $R(x)$ is a Taylor remainder such that $R(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ as $n\to\infty$. It is implied from Lemma 4 (see Appendix D) that

$$ $\displaystyle\sum_{|\alpha|=t}\frac{1}{\alpha!}(\beta^{*}_{11})^{\alpha}\cdot \frac{\partial^{|\alpha|}F}{\partial\beta_{1}^{\alpha}}(x,\beta^{*}_{11})=0,$ $$

for any $1\leq t\leq r$, it follows that $A_{n}(x)=R(x)$. This result indicates that $A_{n}(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ as $n\to\infty$. By arguing similarly, we also obtain that $B_{n}(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ as $n\to\infty$. Combine the previous results together, we achieve that

$$ $\displaystyle Q_{n}(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0.$ $$

Since the input space $\mathcal{X}$ and the parameter space $\Theta$ are both bounded, the term $\sum_{j=1}^{k_{*}}\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{\|\beta_{1j}^{*}\|
\cdot\|x\|}+\beta_{0j}^{*}\right)$ is also bounded. This result together with the formulation of $Q_{n}(x)$ in equation (27) suggests that $[f_{G_{n}}(x)-f_{G_{*}}(x)]/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ for almost every $x\in\mathcal{X}^{*}_{\ell}$. Note that the subset $\mathcal{X}^{*}_{\ell}$ is chosen arbitrarily, therefore, the previous result holds for almost every $x\in\mathcal{X}$. As a consequence, we get that

$$ $\displaystyle\frac{\|f_{G_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}}{\mathcal{L}_ {1,r}(G_{n},G_{*})}\to 0,$ $$

as $n\to\infty$, and hence, achieve the result in equation (26).

###### Lemma 2 .

###### Proof of Lemma 2 .

### B.3 Proof of Theorem 3

Similar to the proof of Theorem 2 in Appendix B.2, we only need to demonstrate that the following limit holds true for any $r\geq 1$:

$$ $\displaystyle\lim_{\varepsilon\to 0}\inf_{G\in\mathcal{G}_{k}(\Theta):\mathcal {L}_{1,r}(G,G_{*})\leq\varepsilon}\frac{\|\bar{f}_{G}-f_{G_{*}}\|_{\mathbb{L}_ {2}(\mu)}}{\mathcal{L}_{1,r}(G,G_{*})}=0.$ (28) $$

For that purpose, it suffices to build a sequence of mixing measures $G_{n}\in\mathcal{G}_{k}(\Theta)$ that satisfies $\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ and

$$ $\displaystyle\frac{\|\bar{f}_{G_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}}{ \mathcal{L}_{1,r}(G_{n},G_{*})}\to 0,$ $$

as $n\to\infty$. Let us consider the sequence $G_{n}=\sum_{i=1}^{k_{*}+1}\exp(\beta^{n}_{0i})\delta_{(\beta^{n}_{1i},\eta^{n}
_{i})}$ in which

- •
$\exp(\beta^{n}_{01})=\exp(\beta^{n}_{02})=\frac{1}{2}\exp(\beta^{*}_{01})$, and $\exp(\beta^{n}_{0i})=\exp(\beta^{*}_{0(i-1)})$ for any $3\leq i\leq k_{*}+1$;
- •
$\beta^{n}_{11}=\Big{(}1-\frac{1}{n}\Big{)}\beta^{*}_{11}$, $\beta^{n}_{12}=\Big{(}1+\frac{1}{n}\Big{)}\beta^{*}_{11}$ and $\beta^{n}_{1i}=\beta^{*}_{1(i-1)}$ for any $3\leq i\leq k_{*}+1$;
- •
$\eta^{n}_{1}=\eta^{n}_{2}=\eta^{*}_{1}$, and $\eta^{n}_{i}=\eta^{*}_{i-1}$ for any $3\leq i\leq k_{*}+1$.

Consequently, it can be verified that when $n\to\infty$, we have

$$ $\displaystyle\mathcal{L}_{1,r}(G_{n},G_{*})=\frac{1}{2}\exp(\beta^{*}_{01}) \Big{[}\|\beta^{n}_{11}-\beta^{*}_{11}\|^{r}+\|\beta^{n}_{12}-\beta^{*}_{11}\| ^{r}\Big{]}=\exp(\beta^{*}_{01})\cdot\Big{(}\frac{\sqrt{d_{1}}}{n}\Big{)}^{r} \to 0,$ $$

Next, we demonstrate that $\|\bar{f}_{G_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{1,r}(G_{n},G_
{*})\to 0$.

Regarding the top-$K$ selection in the conditional density $g_{G_{*}}$, we partition the input space $\mathcal{X}$ in a similar fashion to Appendix B.2. More specifically, we consider $q=\binom{k_{*}}{K}$ subsets $\{\ell_{1},\ldots,\ell_{K}\}$ of $\{1,\ldots,k_{*}\}$ for any $\ell\in[q]$, and denote $\{\ell_{K+1},\ldots,\ell_{k_{*}}\}:=[k_{*}]\setminus\{\ell_{1},\ldots,\ell_{K}\}$. Then, we define

$$ $\displaystyle\mathcal{X}^{*}_{\ell}:=\Big{\{}x\in\mathcal{X}:\cos(\beta_{1j}^{ *},x)\geq\cos(\beta^{*}_{1j^{\prime}},x),\forall j\in\{\ell_{1},\ldots,\ell_{K }\},j^{\prime}\in\{\ell_{K+1},\ldots,\ell_{k_{*}}\}\Big{\}},$ $$

for any $\ell\in[q]$.

On the other hand, we need to introduce a new partition method of the input space for the weight selection in the regression function $\bar{f}_{G_{n}}$. In particular, let $\overline{K}\in\mathbb{N}$ such that $\max_{\{\ell_{j}\}_{j=1}^{K}\subset[k_{*}]}\sum_{j=1}^{K}|\mathcal{A}_{\ell_{j
}}|\leq\overline{K}\leq k$ and $\overline{q}:=\binom{k}{\overline{K}}$. Then, for any $\overline{\ell}\in[\overline{q}]$, we denote $(\overline{\ell}_{1},\ldots,\overline{\ell}_{k})$ as a subset of $[k]$ and $\{\overline{\ell}_{\overline{K}+1},\ldots,\overline{\ell}_{k}\}:=[k]\setminus
\{\overline{\ell}_{1},\ldots,\overline{\ell}_{\overline{K}}\}$. Additionally, we define

$$ $\displaystyle\mathcal{X}^{n}_{\overline{\ell}}:=\Big{\{}x\in\mathcal{X}:\cos( \beta_{1i}^{n},x)\geq\cos(\beta^{n}_{1i^{\prime}},x),\forall i\in\{\overline{ \ell}_{1},\ldots,\overline{\ell}_{\overline{K}}\},i^{\prime}\in\{\overline{ \ell}_{\overline{K}+1},\ldots,\overline{\ell}_{k}\}\Big{\}}.$ $$

Recall that we have $\beta^{n}_{1i}\to\beta^{*}_{1j}$ as $n\to\infty$ for any $j\in[k_{*}]$ and $i\in\mathcal{A}_{j}$. Thus, for any arbitrarily small $\zeta_{j}>0$, we have that $\|\beta^{n}_{1i}-\beta^{*}_{1j}\|\leq\zeta_{j}$ for sufficiently large $n$. Then, by employing arguments as in Lemma 3 that $\mathcal{X}^{*}_{\ell}=\mathcal{X}^{n}_{\overline{\ell}}$ for sufficiently large $n$, where $\overline{\ell}\in[\overline{q}]$ such that $\{\overline{\ell}_{1},\ldots\overline{\ell}_{\overline{K}}\}=\mathcal{A}_{1}
\cup\ldots\cup\mathcal{A}_{K}$.

Let us consider an arbitrary subset $\mathcal{X}^{*}_{\ell}$ of the input space $\mathcal{X}$ where
$\ell$ is an arbitrary index in $[q]$.

Case 1: $1\not\in\{\ell_{1},\ldots,\ell_{K}\}$. In this case, we can validate that $f_{G_{n}}(x)-f_{G_{*}}(x)=0$ for almost every $x\in\mathcal{X}^{*}_{\ell}$.

Case 2: $1\in\{\ell_{1},\ldots,\ell_{K}\}$. WLOG, we assume that that $\{\ell_{1},\ldots,\ell_{K}\}=\{1,\ldots,K\}$. Then, for almost every $x\in\mathcal{X}^{*}_{\ell}$, we can represent $f_{G_{n}}(x)$ and $f_{G_{*}}(x)$ as follows:

$$ $\displaystyle f_{G_{*}}(x)$ $\displaystyle=\sum_{j=1}^{K}\mathrm{Softmax}\Big{(}\frac{(\beta_{1j}^{*})^{ \top}x}{\|\beta_{1j}^{*}\|\cdot\|x\|}\Big{)}\cdot h(x,\eta_{j}^{*}),$ $\displaystyle\bar{f}_{G_{n}}(x)$ $\displaystyle=\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\mathrm{Softmax}\Big{(} \frac{(\beta_{1i}^{n})^{\top}x}{\|\beta_{1i}^{n}\|\cdot\|x\|}\Big{)}\cdot h(x, \eta_{i}^{n}).$ $$

Now, we consider the quantity

$$ $\displaystyle Q_{n}(x):=\left[\sum_{j=1}^{k_{*}}\exp\left(\frac{(\beta_{1j}^{* })^{\top}x}{\|\beta_{1j}^{*}\|\cdot\|x\|}+\beta_{0j}^{*}\right)\right]\cdot[f_ {G_{n}}(x)-f_{G_{*}}(x)],$ (29) $$

which can be decomposed as follows:

$$ $\displaystyle Q_{n}(x)$ $\displaystyle=\sum_{j=1}^{k_{*}}\sum_{i\in\mathcal{A}_{j}}\exp(\beta^{n}_{0i}) \left[\exp\left(\frac{(\beta_{1i}^{n})^{\top}x}{\|\beta_{1i}^{n}\|\cdot\|x\|} \right)h(x,\eta_{i}^{n})-\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{\|\beta_{1j }^{*}\|\cdot\|x\|}\right)h(x,\eta_{j}^{*})\right]$ $\displaystyle-\sum_{j=1}^{k_{*}}\sum_{i\in\mathcal{A}_{j}}\exp(\beta^{n}_{0i}) \left[\exp\left(\frac{(\beta_{1i}^{n})^{\top}x}{\|\beta_{1i}^{n}\|\cdot\|x\|} \right)f_{G_{n}}(x)-\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{\|\beta_{1j}^{*} \|\cdot\|x\|}\right)f_{G_{n}}(x)\right]$ $\displaystyle+\sum_{j=1}^{k_{*}}\Big{(}\sum_{i\in\mathcal{A}_{j}}\exp(\beta_{0 i}^{n})-\exp(\beta_{0j}^{*})\Big{)}\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{ \|\beta_{1j}^{*}\|\cdot\|x\|}\right)\Big{[}h(x,\eta_{j}^{*})-f_{G_{n}}(x)\Big{]}$ $\displaystyle:=A_{n}(x)-B_{n}(x)+C_{n}(x).$ $$

From the choices of $\beta_{1i}^{n}$ and $\eta_{i}^{n}$, we can rewrite $A_{n}(x)$ as

$$ $\displaystyle A_{n}(x)$ $\displaystyle=\frac{1}{2}\exp(\beta^{*}_{01})h(x,\eta^{*}_{1})\sum_{i=1}^{2} \left[\exp\left(\frac{(\beta^{n}_{1i})^{\top}x}{\|\beta^{n}_{1i}\|\cdot\|x\|} \right)-\exp\left(\frac{(\beta^{*}_{11})^{\top}x}{\|\beta^{*}_{11}\|\cdot\|x\| }\right)\right].$ $$

Let us denote $F(x,\beta_{1}):=\exp\left(\frac{\beta_{1}^{\top}x}{\|\beta_{1}\|\cdot\|x\|}\right)$. By applying the Taylor expansion of order $r$, we have

$$ $\displaystyle A_{n}(x)$ $\displaystyle=\frac{1}{2}\exp(\beta^{*}_{01})h(x,\eta^{*}_{1})\sum_{i=1}^{2} \sum_{|\alpha|=1}^{r}\frac{1}{\alpha!}\cdot(\beta^{n}_{1i}-\beta^{*}_{11})^{ \alpha}\cdot\frac{\partial^{|\alpha|}F}{\partial\beta_{1}^{\alpha}}(x,\beta^{* }_{1i})+R(x)$ $\displaystyle=\frac{1}{2}\exp(\beta^{*}_{01})h(x,\eta^{*}_{1})\sum_{i=1}^{2} \sum_{|\alpha|=1}^{r}\frac{1}{\alpha!}\Big{(}1+\frac{(-1)^{i}}{n}\Big{)}^{| \alpha|}(\beta^{*}_{11})^{\alpha}\cdot\frac{\partial^{|\alpha|}F}{\partial \beta_{1}^{\alpha}}(x,\beta^{*}_{11})+R(x),$ $$

where $R(x)$ is a Taylor remainder such that $R(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ as $n\to\infty$. It follows from Lemma 4 (see Appendix D) that

$$ $\displaystyle\sum_{|\alpha|=t}\frac{1}{\alpha!}$ $\displaystyle\Big{(}1+\frac{(-1)^{i}}{n}\Big{)}^{|\alpha|}(\beta^{*}_{11})^{ \alpha}\cdot\frac{\partial^{|\alpha|}F}{\partial\beta_{1}^{\alpha}}(x,\beta^{* }_{11})$ $\displaystyle=\Big{(}1+\frac{(-1)^{i}}{n}\Big{)}^{t}\sum_{|\alpha|=t}\frac{1}{ \alpha!}(\beta^{*}_{11})^{\alpha}\cdot\frac{\partial^{|\alpha|}F}{\partial \beta_{1}^{\alpha}}(x,\beta^{*}_{11})=0.$ $$

for any $1\leq t\leq r$. Thus, we get that $A_{n}(x)=R(x)$, which implies that $A_{n}(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ as $n\to\infty$. By arguing similarly, we also obtain that $B_{n}(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ as $n\to\infty$. Furthermore, we have

$$ $\displaystyle C_{n}(x)$ $\displaystyle=\Big{(}\sum_{i=1}^{2}\exp(\beta^{n}_{0i})-\exp(\beta^{*}_{01}) \Big{)}\exp\left(\frac{(\beta^{*}_{11})^{\top}x}{\|\beta^{*}_{11}\|\cdot\|x\|} \right)\Big{[}h(x,\eta^{*}_{1})-\bar{f}_{G_{n}}(x)\Big{]}$ $\displaystyle+\sum_{j=2}^{k_{*}}\Big{(}\exp(\beta^{n}_{0(j+1)})-\exp(\beta_{0j }^{*})\Big{)}\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{\|\beta_{1j}^{*}\|\cdot \|x\|}\right)\Big{[}h(x,\eta_{j}^{*})-\bar{f}_{G_{n}}(x)\Big{]}$ $\displaystyle=0.$ $$

Putting the previous results together, we achieve that

$$ $\displaystyle Q_{n}(x)/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0.$ $$

Since the input space $\mathcal{X}$ and the parameter space $\Theta$ are both bounded, the term $\sum_{j=1}^{k_{*}}\exp\left(\frac{(\beta_{1j}^{*})^{\top}x}{\|\beta_{1j}^{*}\|
\cdot\|x\|}+\beta_{0j}^{*}\right)$ is also bounded. This result together with the formulation of $Q_{n}(x)$ in equation (29) suggests that $[f_{G_{n}}(x)-f_{G_{*}}(x)]/\mathcal{L}_{1,r}(G_{n},G_{*})\to 0$ for almost every $x\in\mathcal{X}^{*}_{\ell}$. Note that the subset $\mathcal{X}^{*}_{\ell}$ is chosen arbitrarily, therefore, the previous result holds for almost every $x\in\mathcal{X}$. As a consequence, we get that

$$ $\displaystyle\frac{\|f_{G_{n}}-f_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}}{\mathcal{L}_ {1,r}(G_{n},G_{*})}\to 0,$ $$

as $n\to\infty$, and hence, achieve the result in equation (28).

## Appendix C Proof for Results in Section 3

In this appendix, we provide proofs for the theoretical results regarding the perturbed cosine router, namely Theorem 4, Theorem 6, and Theorem 5, in that order.

### C.1 Proof of Theorem 4

Similar to the proof of Theorem 1 in Appendix B.1, it is sufficient to demonstrate that when the expert functions are Lipschitz continuous, the following bound holds for any $0<\varepsilon\leq 1/2$:

$$ $\displaystyle H_{B}(\varepsilon,\mathcal{R}_{k}(\Theta),\|.\|_{\mathbb{L}_{2}( \mu)})\lesssim\log(1/\varepsilon).$ (30) $$

Indeed, for any function $g_{G}\in\mathcal{R}_{k}(\Theta)$, since the expert functions are bounded, we obtain that $g_{G}(x)\leq M$ for all $x$ where $M$ is bounded constant of the expert functions. Let $\tau\leq\varepsilon$ and $\{\pi_{1},\ldots,\pi_{N}\}$ be the $\tau$-cover under the $L^{2}$ norm of the set $\mathcal{R}_{k}(\Theta)$ where $N:={N}(\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}(\mu)})$ is the $\eta$-covering number of the metric space $(\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}(\mu)})$. Then, we construct the brackets of the form $[L_{i}(x),U_{i}(x)]$ for all $i\in[N]$ as follows:

$$ $\displaystyle L_{i}(x)$ $\displaystyle:=\max\{\pi_{i}(x)-\tau,0\},$ $\displaystyle U_{i}(x)$ $\displaystyle:=\max\{\pi_{i}(x)+\tau,M\}.$ $$

From the above construction, we can validate that $\mathcal{R}_{k}(\Theta)\subset\cup_{i=1}^{N}[L_{i}(x),U_{i}(x)]$ and $U_{i}(x)-L_{i}(x)\leq 2\min\{2\tau,M\}$. Therefore, it follows that

$$ $\displaystyle\|U_{i}-L_{i}\|_{\mathbb{L}_{2}(\mu)}^{2}=\int(U_{i}(x)-L_{i}(x)) ^{2}\mathrm{d}\mu(x)\leq\int 16\tau^{2}\mathrm{d}\mu(x)=16\tau^{2},$ $$

which implies that $\|U_{i}-L_{i}\|_{\mathbb{L}_{2}(\mu)}\leq 4\tau$. By definition of the bracketing entropy, we deduce that

$$ $\displaystyle H_{B}(4\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}( \mu)})\leq\log N=\log{N}(\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2 }(\mu)}).$ (31) $$

Therefore, we need to provide an upper bound for the covering number $N$. In particular, we denote $\Delta:=\{(\beta_{0},\beta_{1})\in\mathbb{R}\times\mathbb{R}^{d_{1}}:(\beta_{0
},\beta_{1},\eta)\in\Theta\}$ and $\Omega:=\{\eta\in\mathbb{R}^{d_{2}}:(\beta_{0},\beta_{1},\eta)\in\Theta\}$. Since $\Theta$ is a compact set, $\Delta$ and $\Omega$ are also compact. Therefore, we can find $\tau$-covers $\Delta_{\tau}$ and ${\Omega}_{\tau}$ for $\Delta$ and $\Omega$, respectively. We can check that

$$ $\displaystyle|\Delta_{\tau}|\leq\mathcal{O}_{P}(\tau^{-(d_{1}+1)k}),\quad| \Omega_{\tau}|\leq\mathcal{O}_{P}(\tau^{-d_{2}k}).$ $$

For each mixing measure $G=\sum_{i=1}^{k}\exp(\beta_{0i})\delta_{(\beta_{1i},\eta_{i})}\in\mathcal{G}_{
k}(\Theta)$, we consider other two mixing measures:

$$ $\displaystyle G^{\prime}:=\sum_{i=1}^{k}\exp(\beta_{0i})\delta_{({\beta}_{1i}, \overline{\eta}_{i})},\qquad\overline{G}:=\sum_{i=1}^{k}\exp(\overline{\beta}_ {0i})\delta_{({\overline{\beta}}_{1i},\overline{\eta}_{i})}.$ $$

Here, $\overline{\eta}_{i}\in{\Omega}_{\tau}$ such that $\overline{\eta}_{i}$ is the closest to $\eta_{i}$ in that set, while $(\overline{\beta}_{0i},\overline{\beta}_{1i})\in\Delta_{\tau}$ is the closest to $(\beta_{0i},\beta_{1i})$ in that set. From the above formulations, we get that

$$ $\displaystyle\|g_{G}-g_{G^{\prime}}\|_{\mathbb{L}_{2}(\mu)}^{2}$ $\displaystyle=\int\Bigg{[}\sum_{i=1}^{k}\mathrm{Softmax}\left(\mathrm{Top}_{ \overline{K}}\left(\frac{(\beta_{1i})^{\top}x}{(\|\beta_{1i}\|+\tau_{1})\cdot( \|x\|+\tau_{2})},\beta_{0i}\right)\right)\cdot[h(x,\eta_{i})-h(x,\overline{ \eta}_{i})\Bigg{]}^{2}~{}\mathrm{d}\mu(x)$ $\displaystyle\leq\int\Big{[}\sum_{i=1}^{k}(h(x,\eta_{i})-h(x,\overline{\eta}_{ i}))\Bigg{]}^{2}~{}\mathrm{d}\mu(x)$ $\displaystyle\leq k\int\sum_{i=1}^{k}~{}[h(x,\eta_{i})-h(x,\overline{\eta}_{i} )]^{2}~{}\mathrm{d}\mu(x)$ $\displaystyle\leq k\int\sum_{i=1}^{k}~{}[L_{1}\cdot\|\eta_{i}-\overline{\eta}_ {i}\|]^{2}~{}\mathrm{d}\mu(x)$ $\displaystyle\leq k^{2}(L_{1}\tau)^{2},$ $$

which indicates that $\|g_{G}-g_{G^{\prime}}\|_{\mathbb{L}_{2}(\mu)}\lesssim\tau$. Here, the second inequality is according to the Cauchy-Schwarz inequality, the third inequality occurs as the softmax weight is bounded by 1, and the fourth inequality follows from the fact that the expert $h(x,\cdot)$ is a Lipschitz function with Lipschitz constant $L_{1}$.

Next, we will also demonstrate that $\|g_{G^{\prime}}-g_{\overline{G}}\|_{1}\lesssim\eta$. For that purpose, let us consider $q:=\binom{k}{K}$ $K$-element subsets of $\{1,\ldots,k\}$, which are assumed to take the form $\{\ell_{1},\ell_{2},\ldots,\ell_{K}\}$ for any $\ell\in[q]$. Additionally, we also denote $\{\ell_{K+1},\ldots,\ell_{k}\}:=\{1,\ldots,k\}\setminus\{\ell_{1},\ldots,\ell_
{K}\}$ for any $\ell\in[q]$. Then, we define

$$ $\displaystyle\mathcal{X}_{\ell}$ $\displaystyle:=\Bigg{\{}x\in\mathcal{X}:\frac{(\beta_{1\ell_{i}})^{\top}x}{(\| \beta_{1\ell_{i}}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}\geq\frac{(\beta_{1\ell_{i^ {\prime}}})^{\top}x}{(\|\beta_{1\ell_{i^{\prime}}}\|+\tau_{1})\cdot(\|x\|+\tau _{2})},$ $\displaystyle\hskip 199.16928pti\in\{\ell_{1},\ldots,\ell_{K}\},i^{\prime}\in \{\ell_{K+1},\ldots,\ell_{k_{*}}\}\Bigg{\}},$ $\displaystyle\widetilde{\mathcal{X}}_{\ell}$ $\displaystyle:=\Bigg{\{}x\in\mathcal{X}:\frac{(\overline{\beta}_{1\ell_{i}})^{ \top}x}{(\|\overline{\beta}_{1\ell_{i}}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}\geq \frac{(\overline{\beta}_{1\ell_{i^{\prime}}})^{\top}x}{(\|\overline{\beta}_{1 \ell_{i^{\prime}}}\|+\tau_{1})\cdot(\|x\|+\tau_{2})},$ $\displaystyle\hskip 199.16928pti\in\{\ell_{1},\ldots,\ell_{K}\},i^{\prime}\in \{\ell_{K+1},\ldots,\ell_{k_{*}}\}\Bigg{\}}.$ $$

By using the same arguments as in the proof of Lemma 3 in Appendix D, we achieve that either $\mathcal{X}_{\ell}=\widetilde{\mathcal{X}}_{\ell}$ or $\mathcal{X}_{\ell}$ has measure zero for any $\ell\in[q]$. As the $\mathrm{Softmax}$ function is differentiable, it is a Lipschitz function with some Lipschitz constant $L\geq 0$. Since $\mathcal{X}$ is a bounded set, we may assume that $\|x\|\leq B$ for any $x\in\mathcal{X}$. Next, we denote

$$ $\displaystyle\pi_{{\ell}}(x)$ $\displaystyle:=\Big{(}\frac{(\beta_{1\ell_{i}})^{\top}x}{(\|\beta_{1\ell_{i}} \|+\tau_{1})\cdot(\|x\|+\tau_{2})}+\beta_{0\ell_{i}}\Big{)}_{i=1}^{{K}},$ $\displaystyle\overline{\pi}_{{\ell}}(x)$ $\displaystyle:=\Big{(}\frac{(\overline{\beta}_{1\ell_{i}})^{\top}x}{(\| \overline{\beta}_{1\ell_{i}}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}+\overline{\beta }_{0\ell_{i}}\Big{)}_{i=1}^{{K}},$ $$

for any ${K}$-element subset $\{{\ell}_{1},\ldots{\ell}_{K}\}$ of $\{1,\ldots,k_{*}\}$. Then, we get

$$ $\displaystyle\|\mathrm{Softmax}(\pi_{{\ell}}(x))-\mathrm{Softmax}(\overline{ \pi}_{{\ell}}(x))\|$ $\displaystyle\leq L\cdot\|\pi_{{\ell}}(x)-\overline{\pi}_{{\ell}}(x)\|$ $\displaystyle\leq L\cdot\sum_{i=1}^{{K}}\Big{(}\|\beta_{1{\ell}_{i}}-\overline {\beta}_{1{\ell}_{i}}\|\cdot\|x\|+|\beta_{0{\ell}_{i}}-\overline{\beta}_{0{ \ell}_{i}}|\Big{)}$ $\displaystyle\leq L\cdot\sum_{i=1}^{{K}}\Big{(}\eta B+\eta\Big{)}$ $\displaystyle\lesssim\eta.$ $$

Back to the proof for $\|g_{G^{\prime}}-g_{\overline{G}}\|_{1}\lesssim\eta$, it follows from the above results that

$$ $\displaystyle\|g_{G^{\prime}}-g_{\overline{G}}\|_{1}=\int_{\mathcal{X}}|g_{G^{ \prime}}(x)-g_{\overline{G}}(x)|~{}\mathrm{d}\mu(x)\leq\sum_{\ell=1}^{q}\int_{ \mathcal{X}_{\ell}}|g_{G^{\prime}}(x)-g_{\overline{G}}(x)|~{}\mathrm{d}\mu(x)$ $\displaystyle\leq\sum_{\ell=1}^{q}\int_{\mathcal{X}_{\ell}}\sum_{i=1}^{K}\Big{ |}\mathrm{Softmax}(\pi_{\ell}(x)_{i})-\mathrm{Softmax}(\overline{\pi}_{\ell}(x )_{i})\Big{|}\cdot|h(x,\overline{\eta}_{\ell_{i}})|~{}\mathrm{d}\mu(x)$ $\displaystyle\lesssim\eta,$ (32) $$

According to the triangle inequality, we have

$$ $\displaystyle\|g_{G}-g_{\overline{G}}\|_{\mathbb{L}_{2}(\mu)}\leq\|g_{G}-g_{G^ {\prime}}\|_{\mathbb{L}_{2}(\mu)}+\|g_{G^{\prime}}-g_{\overline{G}}\|_{\mathbb {L}_{2}(\mu)}\lesssim\tau.$ $$

By definition of the covering number, we deduce that

$$ $\displaystyle{N}(\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}(\mu)}) \leq|\Delta_{\tau}|\times|\Omega_{\tau}|\leq\mathcal{O}_{P}(n^{-(d_{1}+1)k}) \times\mathcal{O}(n^{-d_{2}k})\leq\mathcal{O}(n^{-(d_{1}+1+d_{2})k}).$ (33) $$

Combine equations (31) and (33), we achieve that

$$ $\displaystyle H_{B}(4\tau,\mathcal{R}_{k}(\Theta),\|\cdot\|_{\mathbb{L}_{2}( \mu)})\lesssim\log(1/\tau).$ $$

Let $\tau=\varepsilon/4$, then we obtain that

$$ $\displaystyle H_{B}(\varepsilon,\mathcal{R}_{k}(\Theta),\|.\|_{\mathbb{L}_{2}( \mu)})\lesssim\log(1/\varepsilon).$ $$

Hence, the proof is completed.

### C.2 Proof of Theorem 6

In this proof, we aim to establish the following inequality:

$$ $\displaystyle\inf_{G\in\mathcal{E}_{k_{*}}(\Theta)}\|g_{G}-g_{G_{*}}\|_{ \mathbb{L}_{2}(\mu)}/\mathcal{L}_{2}(G,G_{*})>0.$ (34) $$

For that purpose, we divide the proof of the above inequality into local and global parts in the sequel.

Local part: In this part, we demonstrate that

$$ $\displaystyle\lim_{\varepsilon\to 0}\inf_{G\in\mathcal{G}_{k}(\Theta):\mathcal {L}_{2}(G,G_{*})\leq\varepsilon}\|g_{G}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/ \mathcal{L}_{2}(G,G_{*})>0.$ (35) $$

Assume by contrary that the above inequality does not hold true, then there exists a sequence of mixing measures $G_{n}=\sum_{i=1}^{k_{*}}\exp(\beta^{n}_{0i})\delta_{(\beta^{n}_{1i},\eta^{n}_{
i})}$ in $\mathcal{G}_{k}(\Theta)$ such that $\mathcal{L}_{2n}:=\mathcal{L}_{2}(G_{n},G_{*})\to 0$ and

$$ $\displaystyle\|g_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{2n}\to 0,$ (36) $$

as $n\to\infty$. Let us denote by $\mathcal{A}^{n}_{j}:=\mathcal{A}_{j}(G_{n})$ a Voronoi cell of $G_{n}$ generated by the $j$-th components of $G_{*}$. Since our arguments are asymptotic, we may assume that those Voronoi cells do not depend on the sample size, i.e. $\mathcal{A}_{j}=\mathcal{A}^{n}_{j}$. Moreover, recall that under the exact-specified setting, each Voronoi cell has only one element. Therefore, we may assume WLOG that $\mathcal{A}_{j}=\{j\}$, and

$$ $\displaystyle\mathcal{L}_{2n}$ $\displaystyle:=\sum_{i=1}^{K}\Big{|}\exp(\beta_{0i}^{n})-\exp(\beta^{*}_{0i}) \Big{|}+\sum_{i=1}^{K}\exp(\beta^{n}_{0i})\Big{[}\|\Delta\beta_{1i}^{n}\|+\| \Delta\eta_{i}^{n}\|\Big{]},$ $$

where we denote $\Delta\beta_{1i}^{n}:=\beta^{n}_{1i}-\beta^{*}_{1i}$ and $\Delta\eta_{i}^{n}:=\eta^{n}_{i}-\eta^{*}_{i}$.

Let $\ell\in[q]$ such that $\{\ell_{1},\ldots,\ell_{K}\}=\{1,\ldots,K\}$. Note that Lemma 3 indicates that $\mathcal{X}^{n}_{\ell}=\mathcal{X}^{*}_{\ell}$ for sufficiently large $n$. Then, for almost every $x\in\mathcal{X}^{*}_{\ell}$, we can rewrite $g_{G_{n}}(x)$ and $g_{G_{*}}(x)$ as

$$ $\displaystyle g_{G_{n}}(x)$ $\displaystyle=\sum_{i=1}^{K}\mathrm{Softmax}\Big{(}\frac{(\beta_{1i}^{n})^{ \top}x}{(\|\beta_{1i}^{n}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}\Big{)}\cdot h(x, \eta_{i}^{n}),$ $\displaystyle g_{G_{*}}(x)$ $\displaystyle=\sum_{i=1}^{K}\mathrm{Softmax}\Big{(}\frac{(\beta_{1i}^{*})^{ \top}x}{(\|\beta_{1i}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}\Big{)}\cdot h(x, \eta_{i}^{*}).$ $$

Since $\mathcal{L}_{2n}\to 0$, we get that $(\beta_{1i}^{n},\eta_{i}^{n})\to(\beta_{1i}^{*},\eta_{i}^{*})$ and $\exp(\beta_{0i}^{n})\to\exp(\beta_{0i}^{*})$ as $n\to\infty$ for any $i\in[K]$. Now, we divide the proof of local part into three steps as follows:

Step 1: Taylor expansion. In this step, we decompose the term

$$ $\displaystyle Q_{n}(x):=\left[\sum_{j=1}^{K}\exp\Big{(}\frac{(\beta_{1j}^{*})^ {\top}x}{(\|\beta_{1j}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}+\beta_{0j}^{*} \Big{)}\right]\cdot[g_{G_{n}}(x)-g_{G_{*}}(x)]$ $$

into a combination of linearly independent elements using Taylor expansion. In particular, let us denote $F(x,\beta_{1}):=\exp\left(\frac{\beta_{1}^{\top}x}{(\|\beta_{1}\|+\tau_{1})
\cdot(\|x\|+\tau_{2})}\right)$, then we have

$$ $\displaystyle Q_{n}(x)$ $\displaystyle=\sum_{i=1}^{K}\exp(\beta^{n}_{0i})\Big{[}F(x,\beta_{1i}^{n})h(x, \eta_{i}^{n})-F(x,\beta_{1i}^{*})h(x,\eta_{i}^{*})\Big{]}$ $\displaystyle-\sum_{i=1}^{K}\exp(\beta^{n}_{0i})\Big{[}F(x,\beta_{1i}^{n})-F(x ,\beta_{1i}^{*})\Big{]}g_{G_{n}}(x)$ $\displaystyle+\sum_{i=1}^{K}\Big{(}\exp(\beta_{0i}^{n})-\exp(\beta_{0i}^{*}) \Big{)}\Big{[}F(x,\beta_{1i}^{*})h(x,\eta_{i}^{*})-F(x,\beta_{1i}^{*})g_{G_{n} }(x)\Big{]}$ $\displaystyle:=A_{n}(x)-B_{n}(x)+C_{n}(x).$ (37) $$

By means of the first-order Taylor expansion, we have

$$ $\displaystyle A_{n}(x)$ $\displaystyle=\sum_{i=1}^{K}\sum_{|\alpha|=1}\frac{\exp(\beta_{0i}^{n})}{ \alpha!}(\Delta\beta_{1i}^{n})^{\alpha_{1}}(\Delta\eta_{i}^{n})^{\alpha_{2}} \cdot\frac{\partial^{|\alpha_{1}|}F}{\partial\beta_{1}^{\alpha_{1}}}(x,\beta_{ 1i}^{*})\frac{\partial^{|\alpha_{2}|}h}{\partial\eta^{\alpha_{2}}}(x,\eta_{i}^ {*})+R_{1}(x),$ (38) $$

where $R_{1}(x)$ is a Taylor remainder such that $R_{1}(x)/\mathcal{L}_{2n}\to 0$ as $n\to\infty$.  Similarly, we also get that

$$ $\displaystyle B_{n}(x)$ $\displaystyle=\sum_{i=1}^{K}\sum_{|\gamma|=1}\frac{\exp(\beta_{0i}^{n})}{ \gamma!}(\Delta\beta_{1i}^{n})^{\gamma}\cdot\frac{\partial^{|\gamma|}F}{ \partial\beta_{1}^{\gamma}}(x,\beta_{1i}^{*})g_{G_{n}}(x)+R_{2}(x),$ $$

where $R_{2}(x)$ is a Taylor remainder such that $R_{2}(x)/\mathcal{L}_{2n}\to 0$ as $n\to\infty$.
As a result, we deduce that

$$ $\displaystyle Q_{n}(x)$ $\displaystyle=\sum_{i=1}^{K}\sum_{|\alpha|=0}^{1}T^{n}_{i,\alpha_{1},\alpha_{2 }}\cdot\frac{\partial^{|\alpha_{1}|}F}{\partial\beta_{1}^{\alpha_{1}}}(x,\beta _{1i}^{*})\frac{\partial^{|\alpha_{2}|}h}{\partial\eta^{\alpha_{2}}}(x,\eta_{i }^{*})+R_{1}(x)$ $\displaystyle-\sum_{i=1}^{K}\sum_{|\gamma|=0}^{1}S^{n}_{i,\gamma}\cdot\frac{ \partial^{|\gamma|}F}{\partial\beta_{1}^{\gamma}}(x,\beta_{1i}^{*})g_{G_{n}}(x )-R_{2}(x),$ (39) $$

where we define

$$ $\displaystyle T^{n}_{i,\alpha_{1},\alpha_{2}}$ $\displaystyle:=\frac{\exp(\beta_{0i}^{n})}{\alpha!}(\Delta\beta_{1i}^{n})^{ \alpha_{1}}(\Delta\eta_{i}^{n})^{\alpha_{2}},$ $\displaystyle S^{n}_{i,\gamma}$ $\displaystyle:=\frac{\exp(\beta_{0i}^{n})}{\gamma!}(\Delta\beta_{1ij}^{n})^{ \gamma},$ $$

for any $(\alpha_{1},\alpha_{2})\neq(\mathbf{0}_{d},0)$ and $\gamma\neq\mathbf{0}_{d}$. Otherwise, $T^{n}_{i,\mathbf{0}_{d},0}=S^{n}_{i,\mathbf{0}_{d}}:=\exp(\beta_{0i}^{n})-\exp
(\beta_{0i}^{*})$.

Step 2: Non-vanishing coefficients. In this step, we show that not all the ratios $T^{n}_{i,\alpha_{1},\alpha_{2}}/\mathcal{L}_{2n}$, and $S^{n}_{i,\gamma}/\mathcal{L}_{2n}$ converge to zero. Indeed, assume by contrary that all of them converge to zero, i.e.

$$ $\displaystyle\frac{T^{n}_{i,\alpha_{1},\alpha_{2}}}{\mathcal{L}_{2n}}\to 0, \quad\frac{S^{n}_{i,\gamma}}{\mathcal{L}_{2n}}\to 0$ $$

as $n\to\infty$. Then, it follows that

- •
$\frac{1}{\mathcal{L}_{2n}}\cdot\sum_{i=1}^{K}\Big{|}\exp(\beta^{n}_{0i})-\exp(
\beta^{*}_{0i})\Big{|}=\frac{1}{\mathcal{L}_{2n}}\cdot\sum_{i=1}^{K}|S^{n}_{i,
\mathbf{0}_{d}}|\to 0$;
- •
$\frac{1}{\mathcal{L}_{2n}}\cdot\sum_{i=1}^{K}\exp(\beta_{0i}^{n})\|\Delta\beta
_{1i}^{n}\|_{1}=\frac{1}{\mathcal{L}_{2n}}\sum_{i=1}^{K}\sum_{u=1}^{d_{1}}|T^{
n}_{i,e_{d_{1},u},\mathbf{0}_{d}}|\to 0$;
- •
$\frac{1}{\mathcal{L}_{2n}}\cdot\sum_{i=1}^{K}\exp(\beta_{0i}^{n})\|\Delta\eta_
{i}^{n}\|_{1}=\frac{1}{\mathcal{L}_{2n}}\sum_{i=1}^{K}\sum_{v=1}^{d_{2}}|T^{n}
_{i,\mathbf{0}_{d},e_{d_{2},v}}|\to 0$.

Due to the topological equivalence of the norm-1 and norm-2, we deduce that

$$ $\displaystyle\frac{1}{\mathcal{L}_{2n}}\cdot\sum_{i=1}^{K}\exp(\beta_{0i}^{n}) \|\Delta\beta_{1i}^{n}\|\to 0,\qquad\frac{1}{\mathcal{L}_{2n}}\cdot\sum_{i=1}^ {K}\exp(\beta_{0i}^{n})\|\Delta\eta_{i}^{n}\|\to 0.$ $$

As a result, we obtain that

$$ $\displaystyle 1=\frac{\mathcal{L}_{2n}}{\mathcal{L}_{2n}}=\frac{1}{\mathcal{L} _{2n}}\left\{\sum_{i=1}^{K}\Big{|}\exp(\beta_{0i}^{n})-\exp(\beta^{*}_{0i}) \Big{|}+\sum_{i=1}^{K}\exp(\beta^{n}_{0i})\Big{[}\|\Delta\beta_{1i}^{n}\|+\| \Delta\eta_{i}^{n}\|\Big{]}\right\}\to 0,$ $$

which is a contradiction. Thus, at least one among the ratios $T^{n}_{i,\alpha_{1},\alpha_{2}}/\mathcal{L}_{2n}$, and $S^{n}_{i,\gamma}/\mathcal{L}_{2n}$ must not go to zero as $n\to\infty$.

Step 3: Application of Fatou’s lemma. In this step, we demonstrate a result opposed to that in Step 2, i.e. the ratios $T^{n}_{i,\alpha_{1},\alpha_{2}}/\mathcal{L}_{2n}$, and $S^{n}_{i,\gamma}/\mathcal{L}_{2n}$ all converge to zero.

In particular, let us denote by $m_{n}$ the maximum of the absolute values of $T^{n}_{i,\alpha_{1},\alpha_{2}}/\mathcal{L}_{2n}$, and $S^{n}_{i,\gamma}/\mathcal{L}_{2n}$. Since at least one among those ratios must not approach zero as $n\to\infty$, we get that $1/m_{n}\not\to\infty$ as $n\to\infty$.

Recall from the hypothesis in equation (36) that $\|g_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{2n}\to 0$ as $n\to\infty$, which indicates that $\|g_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{1}(\mu)}/\mathcal{L}_{2n}\to 0$ due to the equivalence between $\mathbb{L}_{1}(\mu)$-norm and $L^{2}(\mu)$-norm. By means of the Fatou’s lemma, we have

$$ $\displaystyle 0=\lim_{n\to\infty}\frac{\|g_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{1} (\mu)}}{m_{n}\mathcal{L}_{2n}}\geq\int\liminf_{n\to\infty}\frac{|g_{G_{n}}(x)- g_{G_{*}}(x)|}{m_{n}\mathcal{L}_{2n}}\mathrm{d}\mu(x)\geq 0.$ $$

This result implies that $[g_{G_{n}}(x)-g_{G_{*}}(x)]/[m_{n}\mathcal{L}_{2n}]\to 0$ for almost every $x$.

Let us denote

$$ $\displaystyle T^{n}_{i,\alpha_{1},\alpha_{2}}/m_{n}\mathcal{L}_{2n}$ $\displaystyle\to t_{i,\alpha_{1},\alpha_{2}},$ $\displaystyle S^{n}_{i,\gamma}/m_{n}\mathcal{L}_{2n}$ $\displaystyle\to s_{i,\gamma}$ $$

with a note that at least one among the limits $t_{i,\alpha_{1},\alpha_{2}}$, $s_{i,\gamma}$ is non-zero. Then, from the decomposition in equation (C.2), we deduce that

$$ $\displaystyle\sum_{i=1}^{K}\sum_{|\alpha|=0}^{1}t_{i,\alpha_{1},\alpha_{2}} \cdot\frac{\partial^{|\alpha_{1}|}F}{\partial\beta_{1}^{\alpha_{1}}}(x,\beta_{ 1i}^{*})\frac{\partial^{|\alpha_{2}|}h}{\partial\eta^{\alpha_{2}}}(x,\eta_{i}^ {*})-\sum_{i=1}^{K}\sum_{|\gamma|=0}^{1}s_{i,\gamma}\cdot\frac{\partial^{| \gamma|}F}{\partial\beta_{1}^{\gamma}}(x,\beta_{1i}^{*})g_{G_{n}}(x)=0,$ $$

for almost every $x$. Note that the expert function $h(\cdot,\eta)$ satisfies the condition in Definition 2, then the above equation implies that $t_{i,\alpha_{1},\alpha_{2}}=s_{i,\gamma}=0$, for any $i\in[K]$, $\alpha_{1}\in\mathbb{N}^{d_{1}}$, $\alpha_{2}\in\mathbb{N}^{d_{2}}$ and $\gamma\in\mathbb{N}^{d_{1}}$ such that $0\leq|\alpha_{1}|+|\alpha_{2}|,|\gamma|\leq 2$. This contradicts the fact that at least one among the limits $t_{i,\alpha_{1},\alpha_{2}}$, $s_{i,\gamma}$ is different from zero.

Hence, we obtain the local inequality in equation (35). Thus, we can find an $\varepsilon^{\prime}>0$ such that

$$ $\displaystyle\inf_{G\in\mathcal{E}_{k_{*}}(\Theta):\mathcal{L}_{2}(G,G_{*}) \leq\varepsilon^{\prime}}\|g_{G}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L} _{2}(G,G_{*})>0.$ $$

Global part: Given the above result, it suffices to demonstrate that

$$ $\displaystyle\inf_{G\in\mathcal{E}_{k_{*}}(\Theta):\mathcal{L}_{2}(G,G_{*})> \varepsilon^{\prime}}\|g_{G}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{2} (G,G_{*})>0.$ (40) $$

Assume by contrary that the inequality (40) does not hold true, then we can find a sequence of mixing measures $G^{\prime}_{n}\in\mathcal{E}_{k_{*}}(\Theta)$ such that $\mathcal{L}_{2}(G^{\prime}_{n},G_{*})>\varepsilon^{\prime}$ and

$$ $\displaystyle\lim_{n\to\infty}\frac{\|g_{G^{\prime}_{n}}-g_{G_{*}}\|_{\mathbb{ L}_{2}(\mu)}}{\mathcal{L}_{2}(G^{\prime}_{n},G_{*})}=0,$ $$

which indicates that $\|g_{G^{\prime}_{n}}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}\to 0$ as $n\to\infty$. Recall that $\Theta$ is a compact set, therefore, we can replace the sequence $G^{\prime}_{n}$ by one of its subsequences that converges to a mixing measure $G^{\prime}\in\mathcal{E}_{k_{*}}(\Omega)$. Since $\mathcal{L}_{2}(G^{\prime}_{n},G_{*})>\varepsilon^{\prime}$, we deduce that $\mathcal{L}_{2}(G^{\prime},G_{*})>\varepsilon^{\prime}$.

Next, by invoking the Fatou’s lemma, we have that

$$ $\displaystyle 0=\lim_{n\to\infty}\|g_{G^{\prime}_{n}}-g_{G_{*}}\|_{\mathbb{L}_ {2}(\mu)}^{2}\geq\int\liminf_{n\to\infty}\Big{|}g_{G^{\prime}_{n}}(x)-g_{G_{*} }(x)\Big{|}^{2}~{}\mathrm{d}\mu(x).$ $$

Thus, we get that $g_{G^{\prime}}(x)=g_{G_{*}}(x)$ for almost every $x$.
From Proposition 2, we deduce that $G^{\prime}\equiv G_{*}$. Consequently, it follows that $\mathcal{L}_{2}(G^{\prime},G_{*})=0$, contradicting the fact that $\mathcal{L}_{2}(G^{\prime},G_{*})>\varepsilon^{\prime}>0$.

Hence, the proof is completed.

### C.3 Proof of Theorem 5

In this proof, it is sufficient to demonstrate the following inequality:

$$ $\displaystyle\inf_{G\in\mathcal{E}_{k_{*}}(\Theta)}\|\overline{g}_{G}-g_{G_{*} }\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{3}(G,G_{*})>0.$ (41) $$

This can be done by deriving its local part and the global part as in Appendix C.2. Since the global part can be argued in a similar fashion, our main goal is to prove the local part:

$$ $\displaystyle\lim_{\varepsilon\to 0}\inf_{G\in\mathcal{G}_{k}(\Theta):\mathcal {L}_{3}(G,G_{*})\leq\varepsilon}\|\overline{g}_{G}-g_{G_{*}}\|_{\mathbb{L}_{2} (\mu)}/\mathcal{L}_{3}(G,G_{*})>0.$ (42) $$

Assume by contrary that the above inequality does not hold true, then there exists a sequence of mixing measures $G_{n}=\sum_{i=1}^{k_{*}}\exp(\beta^{n}_{0i})\delta_{(\beta^{n}_{1i},\eta^{n}_{
i})}$ in $\mathcal{G}_{k}(\Theta)$ such that $\mathcal{L}_{3n}:=\mathcal{L}_{3}(G_{n},G_{*})\to 0$ and

$$ $\displaystyle\|\overline{g}_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal {L}_{3n}\to 0,$ (43) $$

as $n\to\infty$. Let us denote by $\mathcal{A}^{n}_{j}:=\mathcal{A}_{j}(G_{n})$ a Voronoi cell of $G_{n}$ generated by the $j$-th components of $G_{*}$. Since our arguments are asymptotic, we may assume that those Voronoi cells do not depend on the sample size, i.e., $\mathcal{A}_{j}=\mathcal{A}^{n}_{j}$.
Therefore, we may assume WLOG that

$$ $\displaystyle\mathcal{L}_{3n}:=\sum_{i=1}^{K}\Big{|}\sum_{i\in\mathcal{A}_{j}} \exp(\beta_{0i}^{n})-\exp(\beta^{*}_{0j})\Big{|}$ $\displaystyle+\sum_{j\in[K]:|\mathcal{A}_{j}|>1}\sum_{i\in\mathcal{A}_{j}}\exp (\beta^{n}_{0i})\Big{[}\|\Delta\beta_{1ij}^{n}\|^{2}+\|\Delta\eta_{ij}^{n}\|^{ 2}\Big{]}$ $\displaystyle+\sum_{j\in[K]:|\mathcal{A}_{j}|=1}\sum_{i\in\mathcal{A}_{j}}\exp (\beta^{n}_{0i})\Big{[}\|\Delta\beta_{1ij}^{n}\|+\|\Delta\eta_{ij}^{n}\|\Big{]},$ $$

where we denote $\Delta\beta_{1ij}^{n}:=\beta^{n}_{1i}-\beta^{*}_{1j}$ and $\Delta\eta_{ij}^{n}:=\eta^{n}_{i}-\eta^{*}_{j}$.

Let us consider $\ell\in[q]$ such that $\{\ell_{1},\ldots,\ell_{K}\}=\{1,\ldots,K\}$. If $\{\overline{\ell}_{1},\ldots\overline{\ell}_{\overline{K}}\}\neq\mathcal{A}_{1
}\cup\ldots\cup\mathcal{A}_{K}$ for any $\overline{\ell}\in[\overline{q}]$, then $\|\overline{g}_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{3}(G_{n}
,G_{*})\not\to 0$ as $n\to\infty$. This contradicts the hypothesis that this term must approach zero. Therefore, we only need to consider the scenario when there exists $\overline{\ell}\in[\overline{q}]$ such that $\{\overline{\ell}_{1},\ldots\overline{\ell}_{\overline{K}}\}=\mathcal{A}_{1}
\cup\ldots\cup\mathcal{A}_{K}$. Note that we have $\beta^{n}_{1i}\to\beta^{*}_{1j}$ as $n\to\infty$ for any $j\in[K]$ and $i\in\mathcal{A}_{j}$. Thus, for any arbitrarily small $\eta_{j}>0$, we have that $\|\beta^{n}_{1i}-\beta^{*}_{1j}\|\leq\eta_{j}$ for sufficiently large $n$. Then, by employing arguments in Lemma 3, we have that $\mathcal{X}^{*}_{\ell}=\mathcal{X}^{n}_{\overline{\ell}}$ for sufficiently large $n$. Thus, for almost every $x\in\mathcal{X}^{*}_{\ell}$, we can rewrite $g_{G_{n}}(x)$ and $g_{G_{*}}(x)$ as

$$ $\displaystyle\overline{g}_{G_{n}}(x)$ $\displaystyle=\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\mathrm{Softmax}\Big{(} \frac{(\beta_{1i}^{n})^{\top}x}{(\|\beta_{1i}^{n}\|+\tau_{1})\cdot(\|x\|+\tau_ {2})}\Big{)}\cdot h(x,\eta_{i}^{n}),$ $\displaystyle g_{G_{*}}(x)$ $\displaystyle=\sum_{j=1}^{K}\mathrm{Softmax}\Big{(}\frac{(\beta_{1j}^{*})^{ \top}x}{(\|\beta_{1j}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}\Big{)}\cdot h(x, \eta_{j}^{*}).$ $$

Now, we divide the proof of local part into three steps as follows:

Step 1: Taylor expansion. In this step, we decompose the term

$$ $\displaystyle Q_{n}(x):=\left[\sum_{j=1}^{K}\exp\Big{(}\frac{(\beta_{1j}^{*})^ {\top}x}{(\|\beta_{1j}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}+\beta_{0j}^{*} \Big{)}\right]\cdot[\overline{g}_{G_{n}}(x)-g_{G_{*}}(x)]$ $$

into a combination of linearly independent elements using Taylor expansion. In particular, let us denote $F(x,\beta_{1}):=\exp\left(\frac{\beta_{1}^{\top}x}{(\|\beta_{1}\|+\tau_{1})
\cdot(\|x\|+\tau_{2})}\right)$, then we have

$$ $\displaystyle Q_{n}(x)$ $\displaystyle=\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\exp(\beta^{n}_{0i})\Big {[}F(x,\beta_{1i}^{n})h(x,\eta_{i}^{n})-F(x,\beta_{1j}^{*})h(x,\eta_{j}^{*}) \Big{]}$ $\displaystyle-\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\exp(\beta^{n}_{0i})\Big {[}F(x,\beta_{1i}^{n})-F(x,\beta_{1j}^{*})\Big{]}g_{G_{n}}(x)$ $\displaystyle+\sum_{j=1}^{K}\Big{(}\sum_{i\in\mathcal{A}_{j}}\exp(\beta_{0i}^{ n})-\exp(\beta_{0j}^{*})\Big{)}\Big{[}F(x,\beta_{1j}^{*})h(x,\eta_{j}^{*})-F(x ,\beta_{1j}^{*})g_{G_{n}}(x)\Big{]}$ $\displaystyle:=A_{n}(x)-B_{n}(x)+C_{n}(x).$ (44) $$

Next, we continue to separate the term $A_{n}(x)$ into two parts as

$$ $\displaystyle A_{n}(x)$ $\displaystyle:=\sum_{j\in[K]:|\mathcal{A}_{j}|=1}\sum_{i\in\mathcal{A}_{j}} \exp(\beta^{n}_{0i})\Big{[}F(x,\beta_{1i}^{n})h(x,\eta_{i}^{n})-F(x,\beta_{1j} ^{*})h(x,\eta_{j}^{*})\Big{]}$ $\displaystyle\quad+\sum_{j\in[K]:|\mathcal{A}_{j}|>1}\sum_{i\in\mathcal{A}_{j} }\exp(\beta^{n}_{0i})\Big{[}F(x,\beta_{1i}^{n})h(x,\eta_{i}^{n})-F(x,\beta_{1j }^{*})h(x,\eta_{j}^{*})\Big{]}$ $\displaystyle:=A_{n,1}(x)+A_{n,2}(x)$ $$

Similar to equation (38), by applying the first-order and the second-order Taylor expansions to $A_{n,1}(x)$ and $A_{n,2}(x)$, respectively, we have

$$ $\displaystyle A_{n,1}(x)$ $\displaystyle=\sum_{j\in[K]:|\mathcal{A}_{j}|=1}\sum_{|\alpha|=1}\frac{\exp( \beta_{0i}^{n})}{\alpha!}(\Delta\beta_{1ij}^{n})^{\alpha_{1}}(\Delta\eta_{ij}^ {n})^{\alpha_{2}}\cdot\frac{\partial^{|\alpha_{1}|}F}{\partial\beta_{1}^{ \alpha_{1}}}(x,\beta_{1j}^{*})\frac{\partial^{|\alpha_{2}|}h}{\partial\eta^{ \alpha_{2}}}(x,\eta_{j}^{*})+R_{1}(x),$ $\displaystyle A_{n,2}(x)$ $\displaystyle=\sum_{j\in[K]:|\mathcal{A}_{j}|>1}\sum_{|\alpha|=1}^{2}\frac{ \exp(\beta_{0i}^{n})}{\alpha!}(\Delta\beta_{1ij}^{n})^{\alpha_{1}}(\Delta\eta_ {ij}^{n})^{\alpha_{2}}\cdot\frac{\partial^{|\alpha_{1}|}F}{\partial\beta_{1}^{ \alpha_{1}}}(x,\beta_{1j}^{*})\frac{\partial^{|\alpha_{2}|}h}{\partial\eta^{ \alpha_{2}}}(x,\eta_{j}^{*})+R_{2}(x),$ $$

where $R_{i}(x)$ is a Taylor remainder such that $R_{i}(x)/\mathcal{L}_{3n}\to 0$ as $n\to\infty$, for $i\in\{1,2\}$.
Analogously, we also get that $B_{n}(x)=B_{n,1}(x)+B_{n,2}(x)$ where

$$ $\displaystyle B_{n,1}(x)$ $\displaystyle=\sum_{j\in[K]:|\mathcal{A}_{j}|=1}\sum_{|\gamma|=1}\frac{\exp( \beta_{0i}^{n})}{\gamma!}(\Delta\beta_{1i}^{n})^{\gamma}\cdot\frac{\partial^{| \gamma|}F}{\partial\beta_{1}^{\gamma}}(x,\beta_{1j}^{*})g_{G_{n}}(x)+R_{3}(x),$ $\displaystyle B_{n,2}(x)$ $\displaystyle=\sum_{j\in[K]:|\mathcal{A}_{j}|>1}\sum_{|\gamma|=1}^{2}\frac{ \exp(\beta_{0i}^{n})}{\gamma!}(\Delta\beta_{1i}^{n})^{\gamma}\cdot\frac{ \partial^{|\gamma|}F}{\partial\beta_{1}^{\gamma}}(x,\beta_{1j}^{*})g_{G_{n}}(x )+R_{4}(x),$ $$

in which $R_{i}(x)$ is a Taylor remainder such that $R_{i}(x)/\mathcal{L}_{3n}\to 0$ as $n\to\infty$, for $i\in\{3,4\}$.

As a result, we deduce that

$$ $\displaystyle Q_{n}(x)$ $\displaystyle=\sum_{j=1}^{K}\sum_{|\alpha|=0}^{2}T^{n}_{j,\alpha_{1},\alpha_{2 }}\cdot\frac{\partial^{|\alpha_{1}|}F}{\partial\beta_{1}^{\alpha_{1}}}(x,\beta _{1j}^{*})\frac{\partial^{|\alpha_{2}|}h}{\partial\eta^{\alpha_{2}}}(x,\eta_{j }^{*})+R_{1}(x)+R_{2}(x)$ $\displaystyle-\sum_{j=1}^{K}\sum_{|\gamma|=0}^{2}S^{n}_{j,\gamma}\cdot\frac{ \partial^{|\gamma|}F}{\partial\beta_{1}^{\gamma}}(x,\beta_{1j}^{*})g_{G_{n}}(x )-R_{3}(x)-R_{4}(x),$ (45) $$

where we define

$$ $\displaystyle T^{n}_{j,\alpha_{1},\alpha_{2}}$ $\displaystyle:=\sum_{i\in\mathcal{A}_{j}}\frac{\exp(\beta_{0i}^{n})}{\alpha!}( \Delta\beta_{1ij}^{n})^{\alpha_{1}}(\Delta\eta_{ij}^{n})^{\alpha_{2}},$ $\displaystyle S^{n}_{j,\gamma}$ $\displaystyle:=\sum_{i\in\mathcal{A}_{j}}\frac{\exp(\beta_{0i}^{n})}{\gamma!}( \Delta\beta_{1ij}^{n})^{\gamma},$ $$

for any $(\alpha_{1},\alpha_{2})\neq(\mathbf{0}_{d},0)$ and $\gamma\neq\mathbf{0}_{d}$. Otherwise, $T^{n}_{j,\mathbf{0}_{d},0}=S^{n}_{j,\mathbf{0}_{d}}:=\sum_{i\in\mathcal{A}_{j}
}\exp(\beta_{0i}^{n})-\exp(\beta_{0j}^{*})$.

Step 2: Non-vanishing coefficients. In this step, we show that not all the ratios $T^{n}_{j,\alpha_{1},\alpha_{2}}/\mathcal{L}_{3n}$, and $S^{n}_{j,\gamma}/\mathcal{L}_{3n}$ converge to zero. Indeed, assume by contrary that all of them converge to zero, i.e.

$$ $\displaystyle\frac{T^{n}_{j,\alpha_{1},\alpha_{2}}}{\mathcal{L}_{3n}}\to 0, \quad\frac{S^{n}_{j,\gamma}}{\mathcal{L}_{3n}}\to 0$ $$

as $n\to\infty$. Then, it follows that

- •
$\frac{1}{\mathcal{L}_{3n}}\cdot\sum_{j=1}^{K}\Big{|}\sum_{i\in\mathcal{A}_{j}}
\exp(\beta^{n}_{0i})-\exp(\beta^{*}_{0j})\Big{|}=\frac{1}{\mathcal{L}_{3n}}
\cdot\sum_{j=1}^{K}|S^{n}_{j,\mathbf{0}_{d}}|\to 0$;
- •
$\frac{1}{\mathcal{L}_{3n}}\cdot\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\exp(
\beta_{0i}^{n})\|\Delta\beta_{1ij}^{n}\|_{1}=\frac{1}{\mathcal{L}_{3n}}\sum_{j
=1}^{K}\sum_{u=1}^{d_{1}}|T^{n}_{j,e_{d_{1},u},\mathbf{0}_{d}}|\to 0$;
- •
$\frac{1}{\mathcal{L}_{3n}}\cdot\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\exp(
\beta_{0i}^{n})\|\Delta\eta_{ij}^{n}\|_{1}=\frac{1}{\mathcal{L}_{3n}}\sum_{j=1
}^{K}\sum_{v=1}^{d_{2}}|T^{n}_{j,\mathbf{0}_{d},e_{d_{2},v}}|\to 0$;
- •
$\frac{1}{\mathcal{L}_{3n}}\cdot\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\exp(
\beta_{0i}^{n})\|\Delta\beta_{1ij}^{n}\|^{2}=\frac{1}{\mathcal{L}_{3n}}\sum_{j
=1}^{K}\sum_{u=1}^{d_{1}}|T^{n}_{j,2e_{d_{1},u},\mathbf{0}_{d}}|\to 0$;
- •
$\frac{1}{\mathcal{L}_{3n}}\cdot\sum_{j=1}^{K}\sum_{i\in\mathcal{A}_{j}}\exp(
\beta_{0i}^{n})\|\Delta\eta_{ij}^{n}\|^{2}=\frac{1}{\mathcal{L}_{3n}}\sum_{j=1
}^{K}\sum_{v=1}^{d_{2}}|T^{n}_{j,\mathbf{0}_{d},2e_{d_{2},v}}|\to 0$.

Due to the topological equivalence of the norm-1 and norm-2, we deduce that

$$ $\displaystyle\frac{1}{\mathcal{L}_{3n}}\cdot\sum_{i=1}^{K}\exp(\beta_{0i}^{n}) \|\Delta\beta_{1i}^{n}\|\to 0,\qquad\frac{1}{\mathcal{L}_{3n}}\cdot\sum_{i=1}^ {K}\exp(\beta_{0i}^{n})\|\Delta\eta_{i}^{n}\|\to 0.$ $$

Thus, by taking the summation of the above limits, we obtain that $1=\mathcal{L}_{3n}/\mathcal{L}_{3n}\to 0$ as $n\to\infty$,
which is a contradiction. Consequently, at least one among the ratios $T^{n}_{j,\alpha_{1},\alpha_{2}}/\mathcal{L}_{3n}$, and $S^{n}_{j,\gamma}/\mathcal{L}_{3n}$ must not go to zero as $n\to\infty$.

Step 3: Application of Fatou’s lemma. In this step, we demonstrate a result opposed to that in Step 2, i.e. the ratios $T^{n}_{j,\alpha_{1},\alpha_{2}}/\mathcal{L}_{3n}$, and $S^{n}_{j,\gamma}/\mathcal{L}_{3n}$ all converge to zero.

In particular, let us denote by $m_{n}$ the maximum of the absolute values of $T^{n}_{j,\alpha_{1},\alpha_{2}}/\mathcal{L}_{3n}$, and $S^{n}_{j,\gamma}/\mathcal{L}_{3n}$. Since at least one among those ratios must not approach zero as $n\to\infty$, we get that $1/m_{n}\not\to\infty$ as $n\to\infty$.

Recall from the hypothesis in equation (43) that $\|\overline{g}_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{2}(\mu)}/\mathcal{L}_{3n}\to 0$ as $n\to\infty$, which indicates that $\|\overline{g}_{G_{n}}-g_{G_{*}}\|_{\mathbb{L}_{1}(\mu)}/\mathcal{L}_{3n}\to 0$ due to the equivalence between $\mathbb{L}_{1}(\mu)$-norm and $L^{2}(\mu)$-norm. By means of the Fatou’s lemma, we have

$$ $\displaystyle 0=\lim_{n\to\infty}\frac{\|\overline{g}_{G_{n}}-g_{G_{*}}\|_{ \mathbb{L}_{1}(\mu)}}{m_{n}\mathcal{L}_{3n}}\geq\int\liminf_{n\to\infty}\frac{ |\overline{g}_{G_{n}}(x)-g_{G_{*}}(x)|}{m_{n}\mathcal{L}_{3n}}\mathrm{d}\mu(x) \geq 0.$ $$

This result implies that $[\overline{g}_{G_{n}}(x)-g_{G_{*}}(x)]/[m_{n}\mathcal{L}_{3n}]\to 0$ for almost every $x$.

Let us denote

$$ $\displaystyle T^{n}_{j,\alpha_{1},\alpha_{2}}/m_{n}\mathcal{L}_{3n}$ $\displaystyle\to t_{j,\alpha_{1},\alpha_{2}},$ $\displaystyle S^{n}_{j,\gamma}/m_{n}\mathcal{L}_{3n}$ $\displaystyle\to s_{j,\gamma}$ $$

with a note that at least one among the limits $t_{j,\alpha_{1},\alpha_{2}}$, $s_{j,\gamma}$ is non-zero. Then, from the decomposition in equation (C.3), we deduce that

$$ $\displaystyle\sum_{j=1}^{K}\sum_{|\alpha|=0}^{2}t_{j,\alpha_{1},\alpha_{2}} \cdot\frac{\partial^{|\alpha_{1}|}F}{\partial\beta_{1}^{\alpha_{1}}}(x,\beta_{ 1j}^{*})\frac{\partial^{|\alpha_{2}|}h}{\partial\eta^{\alpha_{2}}}(x,\eta_{j}^ {*})-\sum_{j=1}^{K}\sum_{|\gamma|=0}^{2}s_{j,\gamma}\cdot\frac{\partial^{| \gamma|}F}{\partial\beta_{1}^{\gamma}}(x,\beta_{1j}^{*})\overline{g}_{G_{n}}(x )=0,$ $$

for almost every $x$. Note that the expert function $h(\cdot,\eta)$ satisfies the condition in Definition 1, then the above equation implies that $t_{j,\alpha_{1},\alpha_{2}}=s_{j,\gamma}=0$, for any $j\in[K]$, $\alpha_{1}\in\mathbb{N}^{d_{1}}$, $\alpha_{2}\in\mathbb{N}^{d_{2}}$ and $\gamma\in\mathbb{N}^{d_{1}}$ such that $0\leq|\alpha_{1}|+|\alpha_{2}|,|\gamma|\leq 2$. This contradicts the fact that at least one among the limits $t_{j,\alpha_{1},\alpha_{2}}$, $s_{j,\gamma}$ is different from zero.

Hence, we obtain the local inequality in equation (42), and completes the proof.

## Appendix D Auxiliary Results

In this appendix, we present three additional results to facilitate the proofs in Appendix B and Appendix C.

###### Proposition 2 (Identifiability) .

If $g_{G}(x)=g_{G_{*}}(x)$ holds true for almost every $x$, then it follows that $G\equiv G^{\prime}$.

###### Proof of Proposition 2 .

For almost every $x$, since $g_{G}(x)=g_{G_{*}}(x)$, then we have

$$ $\displaystyle\sum_{i=1}^{k}\mathrm{Softmax}\Big{(}\mathrm{Top}_{K}$ $\displaystyle\left(\frac{(\beta_{1i})^{\top}x}{(\|\beta_{1i}\|+\tau_{1})\cdot( \|x\|+\tau_{2})},\beta_{0i}\right)\Big{)}\cdot h(x,\zeta_{i})$ $\displaystyle=\sum_{i=1}^{k_{*}}\mathrm{Softmax}\Big{(}\mathrm{Top}_{K}\left( \frac{(\beta_{1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_ {2})},\beta_{0i}^{*}\right)\Big{)}\cdot h(x,\eta^{*}_{i}).$ (46) $$

Due to the identifiability of the expert function $h(\cdot,\eta)$, the set $\{h(x,\eta^{\prime}_{i}):i\in[k^{\prime}]\}$, where $\eta^{\prime}_{1},\ldots,\eta^{\prime}_{k^{\prime}}$ are pair-wise different vectors for some $k^{\prime}\in\mathbb{N}$, is linearly independent for almost every $x$.

Additionally, note that if $k\neq k_{*}$, then there exists some index $i\in[k]$ such that $\zeta_{i}\neq\eta^{*}_{j}$ for any $j\in[k_{*}]$. This result implies that $\mathrm{Softmax}\left(\mathrm{Top}_{K}\left(\frac{(\beta_{1i})^{\top}x}{(\|
\beta_{1i}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}+\beta_{0i}\right)\right)=0$ for almost every $x$, which is a contradiction. Thus, we must have $k=k_{*}$. As a result, it follows that

$$ $\displaystyle\Bigg{\{}\mathrm{Softmax}\Big{(}(\beta_{1i})^{\top}X+\beta_{0i} \Big{)}:i\in[k]\Bigg{\}}=\Bigg{\{}\mathrm{Softmax}\Big{(}(\beta_{1i}^{*})^{ \top}X+\beta_{0i}^{*}\Big{)}:i\in[k_{*}]\Bigg{\}},$ $$

for almost every $X$. WLOG, we may assume that

$$ $\displaystyle\mathrm{Softmax}\Big{(}\mathrm{Top}_{K}$ $\displaystyle\left(\frac{(\beta_{1i})^{\top}x}{(\|\beta_{1i}\|+\tau_{1})\cdot( \|x\|+\tau_{2})},\beta_{0i}\right)\Big{)}$ $\displaystyle=\mathrm{Softmax}\Big{(}\mathrm{Top}_{K}\left(\frac{(\beta_{1i}^{ *})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_{2})},\beta_{0i}^{* }\right)\Big{)},$ (47) $$

for almost every $x$, for any $i\in[k_{*}]$. As the $\mathrm{Softmax}$ function is invariant to translations, then the equation (D) indicates that

$$ $\displaystyle\frac{(\beta_{1i})^{\top}x}{(\|\beta_{1i}\|+\tau_{1})\cdot(\|x\|+ \tau_{2})}$ $\displaystyle=\frac{(\beta_{1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1}) \cdot(\|x\|+\tau_{2})}$ $\displaystyle\beta_{0i}$ $\displaystyle=\beta_{0i}^{*}+v_{0},$ $$

for some $v_{0}\in\mathbb{R}$. The first equation implies that $\beta_{1i}=\beta_{1i}^{*}$, while the second equation together with the assumption $\beta_{0k}=\beta^{*}_{0k}=0$ lead to $\beta_{0i}=\beta_{0i}^{*}$ for any $i\in[k_{*}]$.

Let us consider $x\in\mathcal{X}_{\ell}$, where $\ell\in[q]$ such that $\{\ell_{1},\ldots,\ell_{K}\}=\{1,\ldots,K\}$. Then, the equation (D) can be rewritten as

$$ $\displaystyle\sum_{i=1}^{k_{*}}\exp(\beta_{0i})\exp\Bigg{(}$ $\displaystyle\frac{(\beta_{1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1}) \cdot(\|x\|+\tau_{2})}\Bigg{)}h(x,\zeta_{i})$ $\displaystyle=\sum_{i=1}^{k_{*}}\exp(\beta_{0i}^{*})\exp\Bigg{(}\frac{(\beta_{ 1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_{2})}\Bigg{)}h (x,\eta^{*}_{i}),$ (48) $$

for almost every $x\in\mathcal{X}_{\ell}$. Next, we denote $P_{1},P_{2},\ldots,P_{m}$ as a partition of the index set $[k_{*}]$, where $m\leq k$, such that $\exp(\beta_{0i})=\exp(\beta^{*}_{0i^{\prime}})$ for any $i,i^{\prime}\in P_{j}$ and $j\in[k_{*}]$. On the other hand, when $i$ and $i^{\prime}$ do not belong to the same set $P_{j}$, we let $\exp(\beta_{0i})\neq\exp(\beta_{0i^{\prime}})$. Thus, we can represent equation (D) as

$$ $\displaystyle\sum_{j=1}^{m}\sum_{i\in{P}_{j}}\exp(\beta_{0i})\exp\Bigg{(}$ $\displaystyle\frac{(\beta_{1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1}) \cdot(\|x\|+\tau_{2})}\Bigg{)}h(x,\zeta_{i})$ $\displaystyle=\sum_{j=1}^{m}\sum_{i\in{P}_{j}}\exp(\beta_{0i}^{*})\exp\Bigg{(} \frac{(\beta_{1i}^{*})^{\top}x}{(\|\beta_{1i}^{*}\|+\tau_{1})\cdot(\|x\|+\tau_ {2})}\Bigg{)}h(x,\eta^{*}_{i}),$ $$

for almost every $x\in\mathcal{X}_{\ell}$. Recall that we have $\beta_{1i}=\beta_{1i}^{*}$ and $\beta_{0i}=\beta_{0i}^{*}$, for any $i\in[k_{*}]$, then the above result leads to

$$ $\displaystyle\{\zeta_{i}:i\in P_{j}\}\equiv\{\eta^{*}_{i}:i\in P_{j}\},$ $$

for any $j\in[m]$. As a consequence, we obtain that

$$ $\displaystyle G=\sum_{j=1}^{m}\sum_{i\in P_{j}}\exp(\beta_{0i})\delta_{(\beta_ {1i},\zeta_{i})}=\sum_{j=1}^{m}\sum_{i\in P_{j}}\exp(\beta_{0i})\delta_{(\beta _{1i}^{*},\eta^{*}_{i})}=G_{*}.$ $$

Hence, we reach the conclusion of this proposition.
∎

###### Lemma 3 .

For any $i\in[k_{*}]$, let $\beta_{1i},\beta^{*}_{1i}\in\mathbb{R}^{d_{1}}$ such that $\|\beta_{1i}-\beta^{*}_{1i}\|\leq\zeta_{i}$ for some sufficiently small $\zeta_{i}>0$. Let us denote for any $\ell\in[q]$ that

$$ $\displaystyle\mathcal{X}^{*}_{\ell}$ $\displaystyle:=\Big{\{}x\in\mathcal{X}:\cos(\beta^{*}_{1j},x)\geq\cos(\beta^{* }_{1j^{\prime}},x):\forall j\in\{\ell_{1},\ldots,\ell_{K}\},j^{\prime}\in\{ \ell_{K+1},\ldots,\ell_{k_{*}}\}\Big{\}},$ $\displaystyle\mathcal{X}_{\ell}$ $\displaystyle:=\Big{\{}x\in\mathcal{X}:\cos(\beta_{1i},x)\geq\cos(\beta_{1i^{ \prime}},x),\forall i\in\{\ell_{1},\ldots,\ell_{K}\},i^{\prime}\in\{\ell_{K+1} ,\ldots,\ell_{k_{*}}\}\Big{\}}.$ $$

Then, unless the set $\mathcal{X}^{*}_{\ell}$ has measure zero, we obtain that $\mathcal{X}^{*}_{\ell}=\mathcal{X}_{\ell}$.

###### Proof of Lemma 3 .

Let $\zeta_{i}=M_{i}\varepsilon$, where $\varepsilon>0$ is a given constant and $M_{i}$ will be chosen later. For an arbitrary $\ell\in[q]$, since $\mathcal{X}$ and $\Theta$ are bounded sets, we can find some constant $c^{*}_{\ell}\geq 0$ such that

$$ $\displaystyle\min_{x,i,i^{\prime}}\Big{[}\cos(\beta^{*}_{1i},x)-\cos(\beta^{*} _{1i^{\prime}},x)\Big{]}=c^{*}_{\ell}\varepsilon,$ (49) $$

where the minimum is subject to $x\in\mathcal{X}^{*}_{\ell},i\in\{\ell_{1},\ldots,\ell_{K}\}$ and $i^{\prime}\in\{\ell_{K+1},\ldots,\ell_{k_{*}}\}$. We will point out that $c^{*}_{\ell}>0$. Assume by contrary that $c^{*}_{\ell}=0$. For $x\in\mathcal{X}^{*}_{\ell}$, we may assume for any $1\leq i<j\leq k_{*}$ that

$$ $\displaystyle\cos(\beta^{*}_{1\ell_{i}},x)\geq\cos(\beta^{*}_{1\ell_{j}},x).$ $$

Since $c^{*}_{\ell}=0$, it follows from equation (49) that $\cos(\beta^{*}_{1\ell_{K}},x)-\cos(\beta^{*}_{1\ell_{K+1}},x)=0$, or equivalently

$$ $\displaystyle\left(\frac{\beta^{*}_{1\ell_{K}}}{\|\beta^{*}_{1\ell_{K}}\|}- \frac{\beta^{*}_{1\ell_{K+1}}}{\|\beta^{*}_{1\ell_{K+1}}\|}\right)^{\top}x=0$ $$

Thus, $\mathcal{X}^{*}_{\ell}$ is a subset of

$$ $\displaystyle\mathcal{Z}:=\left\{x\in\mathcal{X}:\left(\frac{\beta^{*}_{1\ell_ {K}}}{\|\beta^{*}_{1\ell_{K}}\|}-\frac{\beta^{*}_{1\ell_{K+1}}}{\|\beta^{*}_{1 \ell_{K+1}}\|}\right)^{\top}x=0\right\}.$ $$

Since $\beta^{*}_{1\ell_{K}}-\beta^{*}_{1\ell_{K+1}}\neq\mathbf{0}_{d}$ and the input distribution $\mu$ is continuous, it follows that the set $\mathcal{Z}$ has measure zero. Since $\mathcal{X}^{*}_{\ell}\subseteq\mathcal{Z}$, we can conclude that $\mathcal{X}^{*}_{\ell}$ also has measure zero, which contradicts the hypothesis of Lemma 3. Therefore, we must have $c^{*}_{\ell}>0$.

Now, we show that $\mathcal{X}^{*}_{\ell}\subseteq{\mathcal{X}}_{\ell}$. For any vector $u$, let us denote $\bar{u}=\frac{u}{\|u\|}$.
Let $x\in\mathcal{X}^{*}_{\ell}$, then we have for any $i\in\{\ell_{1},\ldots,\ell_{K}\}$ and $i^{\prime}\in\{\ell_{K+1},\ldots,\ell_{k_{*}}\}$ that

$$ $\displaystyle\bar{\beta}_{1i}^{\top}\bar{x}$ $\displaystyle=(\bar{\beta}_{1i}-\bar{\beta}^{*}_{1i})^{\top}\bar{x}+(\bar{ \beta}^{*}_{1i})^{\top}\bar{x}$ $\displaystyle\geq-M_{i}\varepsilon B+(\bar{\beta}^{*}_{1i^{\prime}})^{\top} \bar{x}+c^{*}_{\ell}\varepsilon$ $\displaystyle=-M_{i}\varepsilon B+c^{*}_{\ell}\varepsilon+(\bar{\beta}^{*}_{1i ^{\prime}}-\bar{\beta}_{1i^{\prime}})^{\top}\bar{x}+\bar{\beta}_{1i^{\prime}}^ {\top}\bar{x}$ $\displaystyle\geq-2M_{i}\varepsilon B+c^{*}_{\ell}\varepsilon+\bar{\beta}_{1i^ {\prime}}^{\top}\bar{x}.$ $$

By setting $M_{i}\leq\dfrac{c^{*}_{\ell}}{2B}$, we get that $\bar{\beta}_{1i}^{\top}\bar{x}\geq\bar{\beta}_{1i^{\prime}}^{\top}\bar{x}$. Thus, it follows that $x\in{\mathcal{X}}_{\ell}$, which means $\mathcal{X}^{*}_{\ell}\subseteq{\mathcal{X}}_{\ell}$.
Similarly, assume that there exists some constant $c_{\ell}\geq 0$ that satisfies

$$ $\displaystyle\min_{x,i,i^{\prime}}\Big{[}\cos(\beta^{*}_{1i},x)-\cos(\beta^{*} _{1i^{\prime}},x)\Big{]}=c^{*}_{\ell}\varepsilon.$ $$

Here, the above minimum is subject to $x\in\mathcal{X}_{\ell}$, $i\in\{\ell_{1},\ldots,\ell_{K}\}$ and $i^{\prime}\in\{\ell_{K+1},\ldots,\ell_{k_{*}}\}$. If $M_{i}\leq\dfrac{c_{\ell}}{2B}$, then we also receive that $\mathcal{X}_{\ell}\subseteq\mathcal{X}^{*}_{\ell}$.

Hence, if we set $M_{i}=\dfrac{1}{2B}\min\{c^{*}_{\ell},c_{\ell}\}$, we reach the conclusion that $\mathcal{X}^{*}_{\ell}=\mathcal{X}_{\ell}$.
∎

###### Lemma 4 .

Let $F(x,\beta_{1}):=\exp\left(\dfrac{\beta_{1}^{\top}x}{\|\beta_{1}\|\cdot\|x\|}\right)$. For any vector $\beta_{1}\in\mathbb{R}^{d_{1}}$ and $t\in\mathbb{N}$, we have

$$ $\displaystyle\sum_{u_{1},\ldots,u_{t}=1}^{d_{1}}\beta_{1}^{(u_{1})}\ldots\beta _{1}^{(u_{t})}\cdot\frac{\partial^{t}F}{\partial\beta_{1}^{(u_{1})}\ldots \partial\beta_{1}^{(u_{t})}}(x,\beta_{1})=0.$ (50) $$

###### Proof of Lemma 4 .

We will prove the above result by using the induction method. In particular, we first show that it holds for $t=1$. By taking the first derivative of $F$ w.r.t $\beta_{1}$, we have

$$ $\displaystyle\frac{\partial F}{\partial\beta_{1}}(x,\beta_{1})=\dfrac{x\cdot\| \beta_{1}\|\cdot\|x\|-\frac{\beta_{1}}{\|\beta_{1}\|}\cdot\|x\|\cdot\beta_{1}^ {\top}x}{\|\beta_{1}\|^{2}\|x\|^{2}}\cdot F(x,\beta_{1}).$ $$

Then, it follows that

$$ $\displaystyle\beta_{1}^{\top}\frac{\partial F}{\partial\beta_{1}}(x,\beta_{1}) =\dfrac{\beta_{1}^{\top}x\cdot\|\beta_{1}\|\cdot\|x\|-\frac{\beta_{1}^{\top} \beta_{1}}{\|\beta_{1}\|}\cdot\|x\|\cdot\beta_{1}^{\top}x}{\|\beta_{1}\|^{2}\| x\|^{2}}=0,$ $$

or equivalently,

$$ $\displaystyle\sum_{u_{1}=1}^{d_{1}}\beta_{1}^{(u_{1})}\cdot\frac{\partial F}{ \partial\beta_{1}^{(u_{1})}}(x,\beta_{1})=0.$ $$

Subsequently, assume that the equation (50) holds for $t-1$, i.e.

$$ $\displaystyle\sum_{u_{1},\ldots,u_{t-1}=1}^{d_{1}}\beta_{1}^{(u_{1})}\ldots \beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{t-1}F}{\partial\beta_{1}^{(u_{1})} \ldots\partial\beta_{1}^{(u_{t-1})}}(x,\beta_{1})=0,$ $$

we will demonstrate that it also holds for $t$. Note that the above left hand side can be decomposed as

$$ $\displaystyle\sum_{u_{1},\ldots,u_{t-1}=1}^{d_{1}}\beta_{1}^{(u_{1})}\ldots \beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{t-1}F}{\partial\beta_{1}^{(u_{1})} \ldots\partial\beta_{1}^{(u_{t-1})}}(x,\beta_{1})=\sum_{u_{1},\ldots,u_{t-1} \neq u_{t}}\beta_{1}^{(u_{1})}\ldots\beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{ t-1}F}{\partial\beta_{1}^{(u_{1})}\ldots\partial\beta_{1}^{(u_{t-1})}}$ $\displaystyle+\binom{t-1}{1}\sum_{u_{2},\ldots,u_{t-1}\neq u_{t}}\beta_{1}^{(u _{2})}\ldots\beta_{1}^{(u_{t-1})}\beta_{1}^{(u_{t})}\cdot\frac{\partial^{t-1}F }{\partial\beta_{1}^{(u_{2})}\ldots\partial\beta_{1}^{(u_{t-1})}\partial\beta_ {1}^{(u_{t})}}(x,\beta_{1})$ $\displaystyle+\ldots$ $\displaystyle+\binom{t-1}{t-2}\sum_{u_{t-1}\neq u_{t}}\beta_{1}^{(u_{t-1})}( \beta_{1}^{(u_{t})})^{t-2}\cdot\frac{\partial^{t-1}F}{\partial\beta_{1}^{(u_{t -1})}\partial(\beta_{1}^{(u_{t})})^{t-2}}(x,\beta_{1})+(\beta_{1}^{(u_{t})})^{ t-1}\cdot\frac{\partial^{t-1}F}{\partial(\beta_{1}^{(u_{t})})^{t-1}}(x,\beta_{ 1}),$ $$

where $u_{t}$ is some index in $[d]$. By taking the derivatives of both sides w.r.t $\beta_{1}$, we get

$$ $\displaystyle 0=\sum_{u_{1},\ldots,u_{t-1}\neq u_{t}}\beta_{1}^{(u_{1})}\ldots \beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{t}F}{\partial\beta_{1}^{(u_{1})} \ldots\partial\beta_{1}^{(u_{t})}}$ $\displaystyle+\binom{t-1}{1}\sum_{u_{2},\ldots,u_{t-1}\neq u_{t}}\beta_{1}^{(u _{2})}\ldots\beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{t-1}F}{\partial\beta_{1} ^{(u_{2})}\ldots\partial\beta_{1}^{(u_{t-1})}\partial\beta_{1}^{(u_{t})}}(x, \beta_{1})$ $\displaystyle+\binom{t-1}{1}\sum_{u_{2},\ldots,u_{t-1}\neq u_{t}}\beta_{1}^{(u _{2})}\ldots\beta_{1}^{(u_{t-1})}\beta_{1}^{(u_{t})}\cdot\frac{\partial^{t}F}{ \partial\beta_{1}^{(u_{2})}\ldots\partial\beta_{1}^{(u_{t-1})}\partial(\beta_{ 1}^{(u_{t})})^{2}}(x,\beta_{1})$ $\displaystyle+\ldots$ $\displaystyle+\binom{t-1}{t-2}(t-2)\sum_{u_{t-1}\neq u_{t}}\beta_{1}^{(u_{t-1} )}(\beta_{1}^{(u_{t})})^{t-3}\cdot\frac{\partial^{t-1}F}{\partial\beta_{1}^{(u _{t-1})}\partial(\beta_{1}^{(u_{t})})^{t-2}}(x,\beta_{1})$ $\displaystyle+\binom{t-1}{t-2}\sum_{u_{t-1}\neq u_{t}}\beta_{1}^{(u_{t-1})}( \beta_{1}^{(u_{t})})^{t-2}\cdot\frac{\partial^{t}F}{\partial\beta_{1}^{(u_{t-1 })}\partial(\beta_{1}^{(u_{t})})^{t-1}}(x,\beta_{1})$ $\displaystyle+(t-1)(\beta_{1}^{(u_{t})})^{t-2}\cdot\frac{\partial^{t-1}F}{ \partial(\beta_{1}^{(u_{t})})^{t-1}}(x,\beta_{1})+(\beta_{1}^{(u_{t})})^{t-1} \cdot\frac{\partial^{t}F}{\partial(\beta_{1}^{(u_{t})})^{t}}(x,\beta_{1})$ $\displaystyle=\sum_{u_{1},\ldots,u_{t-1}=1}^{d_{1}}\beta_{1}^{(u_{1})}\ldots \beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{t}F}{\partial\beta_{1}^{(u_{1})} \ldots\partial\beta_{1}^{(u_{t})}}(x,\beta_{1})$ $\displaystyle\hskip 56.9055pt+(t-1)\sum_{u_{2},\ldots,u_{t-1}=1}^{d_{1}}\beta_ {1}^{(u_{2})}\ldots\beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{t-1}F}{\partial \beta_{1}^{(u_{2})}\ldots\partial\beta_{1}^{(u_{t})}}(x,\beta_{1}).$ $$

Therefore, it follows that

$$ $\displaystyle\sum_{u_{t}=1}^{d_{1}}\beta_{1}^{(u_{t})}\cdot 0=\sum_{u_{1}, \ldots,u_{t}=1}^{d_{1}}\beta_{1}^{(u_{1})}\ldots\beta_{1}^{(u_{t-1})}\beta_{1} ^{(u_{t})}\cdot\frac{\partial^{t}F}{\partial\beta_{1}^{(u_{1})}\ldots\partial \beta_{1}^{(u_{t})}}(x,\beta_{1})$ $\displaystyle\hskip 113.81102pt+(t-1)\sum_{u_{2},\ldots,u_{t}=1}^{d_{1}}\beta_ {1}^{(u_{2})}\ldots\beta_{1}^{(u_{t-1})}\beta_{1}^{(u_{t})}\cdot\frac{\partial ^{t-1}F}{\partial\beta_{1}^{(u_{2})}\ldots\partial\beta_{1}^{(u_{t})}}(x,\beta _{1}).$ $$

It is worth noting that

$$ $\displaystyle\sum_{u_{2},\ldots,u_{t}=1}^{d_{1}}\beta_{1}^{(u_{2})}\ldots\beta _{1}^{(u_{t-1})}$ $\displaystyle\beta_{1}^{(u_{t})}\cdot\frac{\partial^{t-1}F}{\partial\beta_{1}^ {(u_{2})}\ldots\partial\beta_{1}^{(u_{t})}}(x,\beta_{1})$ $\displaystyle=\sum_{u_{1},\ldots,u_{t-1}=1}^{d_{1}}\beta_{1}^{(u_{1})}\ldots \beta_{1}^{(u_{t-1})}\cdot\frac{\partial^{t-1}F}{\partial\beta_{1}^{(u_{1})} \ldots\partial\beta_{1}^{(u_{t-1})}}(x,\beta_{1})=0.$ $$

Consequently, we deduce that

$$ $\displaystyle\sum_{u_{1},\ldots,u_{t}=1}^{d_{1}}\beta_{1}^{(u_{1})}\ldots\beta _{1}^{(u_{t-1})}\beta_{1}^{(u_{t})}\cdot\frac{\partial^{t}F}{\partial\beta_{1} ^{(u_{1})}\ldots\partial\beta_{1}^{(u_{t})}}(x,\beta_{1})=0.$ $$

Hence, we reach the conclusion in equation (50).
∎

###### Proposition 2 (Identifiability) .

###### Proof of Proposition 2 .

###### Lemma 3 .

###### Proof of Lemma 3 .

###### Lemma 4 .

###### Proof of Lemma 4 .

## Appendix E Experimental Details

In this appendix, we provide the details for the numerical experiments on synthetic data, and the experiments with real data on language modeling conducted in Section 5.

### E.1 Experimental Details for Synthetic Data

Model details. We now provide the details for the model parameters in model (15). The variance of Gaussian noise is specified as $\sigma^{2}=0.01$. For simplicity, the perturbations for both $\|x\|$ and $\|\beta_{1i}^{*}\|$ are considered identical, denoted by $\tau_{1}=\tau_{2}=\tau$. The true parameters for the router, $(\beta_{1i}^{*},\beta_{0i}^{*})\in\mathbb{R}^{d}\times\mathbb{R}$, are drawn independently from an isotropic Gaussian distribution with zero mean and variance $\sigma_{r}^{2}=0.01/d$ for $1\leq i\leq 6$, and otherwise are set to zero. Similarly, the true parameters of the experts, $(a_{i}^{*},b_{i}^{*})\in\mathbb{R}^{d}\times\mathbb{R}$, are drawn independently of an isotropic Gaussian distribution with zero mean and variance $\sigma_{e}^{2}=1/d$ for all experts. These parameters remain unchanged for all experiments.

Training procedure. For each sample size $n$, spanning from $10^{3}$ to $10^{5}$, we perform 20 experiments. In every experiment, the parameters initialization for the router’s and experts’ parameters are adjusted to be near the true parameters, minimizing potential instabilities from the optimization process. Subsequently, we execute SGD across $10$ epochs, employing a learning rate of $\eta=0.1$ to fit a model to the synthetic data. All the numerical experiments are conducted on a MacBook Air equipped with an M1 chip CPU.

### E.2 Experimental Details for Language Modeling Task

Datasets. We use the Enwik8 and Text8 datasets ([]) for our character-level language modeling task. The Enwik8 dataset comprises 100 million bytes of unprocessed Wikipedia text, while the Text8 dataset contains 100 million processed Wikipedia characters. We further evaluate the word-level language modeling task on the Wikitext-103 dataset [], which is the largest available word-level language modeling benchmark with long-term dependency. It contains 103M training tokens from 28K articles, with an average length of 3.6K tokens per article, which allows us to test the ability of long-term dependency modeling.

Metrics. In the main paper, we employ the Bit per character (BPC) metric to assess the performance of character-level language modeling tasks. This metric is used to measure the average number of bits needed to encode each character in the dataset. It is calculated as follows:

$\text{BPC}(\text{X})=\displaystyle-\frac{1}{T}\sum_{t=1}^{T}\log_{2}\hat{P}_{t
}\left(x_{t}\right)$

where $T$ is the length of the input string $X$, $\hat{P}_{t}$ is the approximate distribution and $x_{t}$ is the character in the input string at location $t$.

For the word-level language modeling task on the Wikitext-103 dataset, we utilize Perplexity (PPL) as our evaluation metric. It represents the exponentiated average negative log-likelihood of a sequence and demonstrate how well the model predicts the next word in a sequence. More specifically, if we have a tokenized sequence $X=(x_{0},x_{1},...,x_{t})$, the perplexity of $X$ is:

$\text{PPL}(\text{X})=\exp\left\{-\frac{1}{t}\sum_{i=1}^{t}\log p_{\theta}(x_{i
}|x_{<i})\right\}$

where $p_{\theta}(x_{i}|x_{<i})$ is the log-likelihood of the $i^{th}$ token conditioned on the preceding tokens $x_{<i}$ according to our model.

Training setup and hyperparameters. We consider two model configurations: the small and medium setups. The small setup has a total of 15 million parameters with 6 SMoE layers [], each layer has the capability to learn spatial structure in the input domain and routing experts at a fine-grained level to utilize it. Similarly, the medium setup consists of 36 parameters with 8 SMoE layers []. During training, we use Adam optimizer [] with default parameters. We set the number of training steps to 60000 and 80000 for small and medium configurations, respectively. The results are averaged over three runs for fair comparisons.

All language modeling experiments are conducted on NVIDIA A100 GPUs. Training the small configuration of the Text8 and Enwik8 datasets takes 11 hours, whereas Wikitext-103 requires 5 hours. For medium configurations, training Text8 and Enwik8 takes 17 hours, while Wikitext-103 training takes 8 hours.

**Table 2: Average out-of-distribution test accuracies.**
|  | PACS | VLCS | OfficeHome | TerraIncognita | DomainNet |
| --- | --- | --- | --- | --- | --- |
| Vanilla | $87.22$ | $78.99$ | $73.27$ | $45.55$ | $48.45$ |
| Pertubed | 89.36 | 80.01 | 74.09 | 49.87 | 48.51 |

**Table 3: Per-domain performance of PACS, VLCS, OfficeHome, TerraIncognita.**
|  |  | A | C | P | S |
| --- | --- | --- | --- | --- | --- |
| PACS | Vanilla | $89.24$ | $86.11$ | $97.60$ | $75.92$ |
|  | Pertubed | 89.87 | 86.97 | 97.90 | 82.68 |
|  |  | C | L | S | V |
| VLCS | Vanilla | $98.59$ | $67.42$ | $70.88$ | 79.07 |
|  | Pertubed | $98.59$ | 67.80 | 74.70 | $78.95$ |
|  |  | A | C | P | R |
| OfficeHome | Vanilla | $73.40$ | $57.27$ | $78.69$ | $83.70$ |
|  | Pertubed | 74.64 | 57.85 | 79.59 | 84.27 |
|  |  | L100 | L30 | L43 | L46 |
| TerraIncognita | Vanilla | $50.00$ | $37.49$ | $53.02$ | $41.67$ |
|  | Pertubed | 57.59 | 43.30 | 56.93 | $41.67$ |

**Table 4: Per-domain performance of DomainNet.**
|  |  | clipart | infograph | painting | quickdraw | real | sketch |
| --- | --- | --- | --- | --- | --- | --- | --- |
| DomainNet | Vanilla | $68.05$ | $24.48$ | 55.75 | $17.39$ | $69.41$ | $55.59$ |
|  | Pertubed | 68.31 | 24.52 | $55.03$ | 17.90 | 69.46 | 55.83 |

## Appendix F Domain Generalization

In this appendix, we carry our several experiments on the applications of MoE models in the field of domain generalization. Our objective is to empirically demonstrate the efficacy of our proposed perturbed cosine router over the vanilla cosine router in this field.

Domain generalization [] aims to generalize a model’s performance to unseen test domains with distributions different from those encountered during training. Specifically, in domain generalization, a model is expected to leverage multiple training datasets gathered from various domains and exhibit robustness to domain shifts during testing. Such ability of out-of-distribution generalization largely hinges on the model’s capability to incorporate invariances across multiple domains []. Given that distribution shifts in data correspond to distribution shifts in (visual) attributes [], capturing these diverse attributes and aligning them with invariant correlations is crucial. Mixture of Experts emerges as a powerful tool for efficiently capturing these visual attributes, and it has been proven effective in enhancing performance in domain generalization []. Therefore, we further justify the effectiveness of our pertubed cosine router in domain generalization.

Datasets. We followed the experimental setting of [] and evaluated our method using 5 benchmark datasets in DomainBed []: PACS, VLCS, OfficeHome, TerraIncognita, and DomainNet. Each dataset is comprised of images for classification tasks from different domains.

Architecture. Following [], we conduct experiments on ViT-S/16, which has an input patch size of $16\times 16$, comprising 6 heads in multi-head attention layers, and a total of 12 transformer blocks. We adopt a *last-two* two-layer configuration, where each MoE block comprises 6 experts. The router selects the top 2 out of 6 experts for each image patch.

Training procedure and result.
We follow the training-domain validation procedure outlined in [, ], where each training domain is split into training and validation subsets. The final overall validation set consists of the validation subsets from all training domains. Subsequently, we select the model with the highest performance on the overall validation set. To ensure fair comparisons, the results are averaged over three runs. All DG experiments are run on NVIDIA A100 GPUs with 15,000 iterations. The training time on PACS, VLCS, OfficeHome, and TerraIncognita is 2 hours, while the training time for DomainNet is 7 hours.

Table 2 summarizes the results of our experiments. For each dataset, we report the average results across test domains. The results demonstrate that our perturbed cosine router consistently outperforms the vanilla cosine router across all datasets, thereby convincingly justifying the effectiveness of adding noise to cosine routers. Detailed performance metrics for each domain are reported in Tables 3 and 4.

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 6
presentation: 3
questions: The theoretical results are training algorithm agnostic. I'm curious about the analysis under SGD. Here, it has been claimed that adding perturbation (i.e. noise at the router) remove the parameter interaction among the elements of the router parameter. As SGD also add noises, can the SGD based algorithm also or remove the interaction (even for a linear router)? Can you comment on this?


---------------------------
After the response.
Thank you for your response to my questions. However, I decided to decrease my score to 5. My decision is based on the following reasons (related to weakness 1 and weakness 3 of my official review):

1.	The strong identifiability condition is not satisfied by a two-layer ReLU expert function. However, two-layer ReLU is the most common expert function used in practice. Moreover, there exists theoretical works analyzed the two-layer ReLU as expert functions of MoE (e.g., [1], [2])
2.	The authors claimed that the theoretical results can be extended to the more general setting where the ground truth is generated by an arbitrary regression function instead of the perturbed cosine router. A formal discussion has been provided about the generalization at section 4 of the paper. In that case, the formal results of the paper (i.e. Theorem 1-4) should be presented in the more general setting instead the current restrictive setting.

[1] Chen, Z., Deng, Y., Wu, Y., Gu, Q., & Li, Y. (2022). Towards understanding mixture of experts in deep learning. arXiv preprint arXiv:2208.02813.

[2] Chowdhury, M. N. R., Zhang, S., Wang, M., Liu, S., & Chen, P. Y. (2023, July). Patch-level routing in mixture-of-experts is provably sample-efficient for convolutional neural networks. In International Conference on Machine Learning (pp. 6074-6114). PMLR.

After the author response again, I decided to change the score back to 6. The reason is in the comment.
soundness: 3
strengths: Originality: The paper provides the first theoretical study of the cosine router MoE and it's perturbed version and confirms the theoretical advantage of the later one, which can be considered as novel. 

Quality: The author addresses some technical challenges to complete the theoretical study. For example, the normalization of the cosine router introduces more sophisticated parameter interactions among the elements of the router parameters which needed to be addressed.

Clarity: The paper is well-written and the implication of the results is easily understandable

Significance: The results are significant from the sense that, it provides the theoretical validity of using perturbation in cosine router
summary: This paper provides a theoretical understanding of the advantage of perturbing cosine router in Mixture-of-Experts (MoE) compared to the vanilla cosine router in terms of sample efficiency. In regression setting where the ground truth itself is generated by an MoE with cosine router and if the expert function satisfies a certain condition ("strong identifiability"), the paper shows that, by adding noise to the L^2 norm of the router weights and the tokens, the intrinsic interactions between the elements of the router parameters can be avoided and thus a better sample complexity can be achieved
weaknesses: 1. The scope of the theoretical result is limited as it required that, the ground truth is itself generated by a cosine routing MoE. It is not clear if practical datasets meet this assumption. Could you please discuss the implications of your results for real-world datasets that may not perfectly match the theoretical assumptions? Any intuition for how their findings might generalize to more realistic settings.

2. In the numerical experiments at section 5.1, the ground truth is generated by an MoE with perturbed cosine router rather than a clean cosine router. Also, the weights are initialized for SGD near the ground truth parameters (which are from the perturbed router). Therefore, for a fair comparison, the ground truth should be generated by the clean router to see whether the perturbed version converge faster (in terms of number of samples required) compared to the clean one. Is it possible to run an additional experiment with the ground truth is generated by a clean cosine router, to more directly test the theoretical claims about improved convergence of the perturbed version?

3. In practical MoE models, all the experts are FFN with ReLU activation with at least one hidden layer (i.e. two-layer FFN). However, in the paper, the exampled FFN version is one-layer. Can the analysis be extended to two-layer case? In other words, does the two-layer FFN with ReLU activation satisfy the strong identifiable condition? Could you please add some discussion on whether and how the analysis might extend to multi-layer FFNs, which are more common in practice?

---

confidence: 2
contribution: 3
initial_rating: 3
presentation: 3
questions: - In e.g. Theorem 2, it seems like an abuse of notation to write \bar{G}_n as in G_k(\Theta) when actually it's an estimator, i.e. a mapping from n samples to G_k(\Theta)? Or am I misunderstanding the statement?
- In Lemma 2, why isn't it enough for the limit to be finite? Why does it have to be 0? It seems like if it's a constant then the application on line 931 would still work, since it seems like C_1 doesn't have to be super small.
- I don't understand the claimed implications (i) and (ii) of Theorem 2. For (i), what if the rate of estimating \beta*_0 is bad? What if only one of {\beta*_1, \eta*} has bad rate and the other has good rate? Finally, just because the rate is slower than any polynomial doesn't mean that it could be 1/polylog(n)?
soundness: 2
strengths: Routing schemes such as the cosine router are very important components in modern machine learning models, but there has been little theoretical study. This paper presents a compelling theoretical picture that a perturbed cosine router should have better rates than the standard cosine router. The experiments are also extensive and seem quite convincing. Finally, the paper is generally quite well-written.
summary: This paper studies the cosine router from a statistical perspective. The main theoretical result is that the cosine router cannot be learned with any polynomial rate, whereas a slight modification (the perturbed cosine router) can. This is then backed up with several experiments showing that the perturbed cosine router outperforms the cosine router.
weaknesses: My main concern is that some of the most important theoretical conclusions of the paper are not formally stated, let alone proven: the claims directly after Theorem 2 about how the theorem implies slow rates for parameter estimation and expert estimation. I (roughly speaking) believe the intuition for (i), though I have some questions -- see below -- but I completely do not understand the intuition for (ii). The claim is that since the parameters \eta are hard to estimate, and h(\eta) is Lipschitz in \eta, then h(\eta) should be hard to estimate as well. But doesn't the inequality go in the wrong direction? e.g. if h(\eta) is constant in \eta, then it's trivial to estimate, and also optimally Lipschitz?

A more minor point -- see questions below -- is that the claim of 1/polylog(n) rate lower bound seems unsubstantiated, since all that is proven is that the rate cannot be any polynomial.

It's possible I am missing something, so I will be happy to increase my score if these concerns are addressed.

---

confidence: 2
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. The intuition behind Equation (4) is unclear. Could the authors elaborate on how the partial differential equation (PDE) influences generalization performance? Additionally, the benefit of the condition $\beta_1\top \frac{\partial \tilde{H}}{\partial \beta_1}(x, \beta_1m \eta)\neq 0$ is not clearly explained.
2. The types of experts used in the experiments should be specified more clearly in the Experimental section. For example, are the experts linear models, ReLU-based feedforward networks (FFNs), or other types?
3. Given that multi-layer perceptrons (MLPs) are commonly used in MoE architectures, how does the perturbed cosine router compare to a linear router with the same generalization bound? What specific advantages does it offer?
soundness: 3
strengths: The paper is clearly and logically presented, making it easy to follow the methodology and findings. The experimental results validate the theoretical analysis and demonstrate the effectiveness of the proposed method, providing solid support for the authors' claims.
summary: The paper analyzes the generalization bounds of the vanilla cosine router used in Mixture of Experts (MoE) architectures and proposes the addition of noise to enhance these bounds when the experts are Feed-Forward Networks (FFNs) or polynomial functions. Experimental results validate the effectiveness of the proposed method and the theoretical findings.
weaknesses: As I am not familiar with the statistical techniques used in this field, I found it challenging to fully assess the novelty of this paper compared to prior work. Specifically, in my literature review, I noted that [1] appears closely related to this study. Could the authors clarify any key differences or advancements offered by their approach compared to [1]?
Additionally, as noted by [2], the sparse Mixture of Experts (MoE) approach appears to offer improved generalization capabilities.

[1] Nguyen, Huy, et al. "Statistical Advantages of Perturbing Cosine Router in Sparse Mixture of Experts." arXiv preprint arXiv:2405.14131 (2024).

[2] Li, Bo, et al. "Sparse Mixture-of-Experts are Domain Generalizable Learners." The Eleventh International Conference on Learning Representations.

Meta-review: This paper introduces the perturbed cosine router in Mixture of Experts (MoE) models, showing that it improves sample efficiency by adding noise to router parameters. The authors provide theoretical guarantees and empirical validation, demonstrating that the perturbed router outperforms the standard cosine router.

Reviewers appreciated the novelty and theoretical contribution of the paper, noting the solid empirical validation and the clear explanation of the method’s advantages. The results were seen as significant, addressing an important problem in MoE models.

Decision: Accept (Poster)