Introduction
In a landmark paper, Brown et al. [8 ] showed that large language models can learn to perform new tasks from examples supplied in a prompt (also called a context), without updating their parameters at inference time, a capability they called in-context learning (ICL). Garg et al. [17 ] formulated ICL as a new paradigm for statistical learning: whereas the classical approach fits a predictor to each new dataset through parameter optimization, ICL pretrains a reusable prediction procedure across datasets and applies it to a new dataset through context alone. Tabular foundation models (TFMs) have made this paradigm practical for tabular prediction, with evaluations on the broad TabArena and TALENT benchmarks showing that TFMs can even outperform previously state-of-the-art methods such as boosted tree ensembles (Erickson et al., [16 ] ; Ye et al., [44 ] ). Other recent studies show how the ICL paradigm can outperform well-established classical methods in estimating various statistical quantities, including heterogeneous treatment effects (Balazadeh et al., [3 ] ), survival curves (Qi et al., [35 ] ), mutual information (Peyrard & Cho, [34 ] ), and Poisson means in empirical Bayes problems (Teh et al., [41 ] ). These works suggest that the central theoretical question for ICL should be not be whether it can learn to approximate an existing algorithm or statistical procedure, but how it is able to outperform established procedures across diverse statistical problems.
Several theoretical explanations have been developed by analyzing empirical risk minimization (ERM) of transformers. Bai et al. [2 ] show that transformers can implement in-context algorithm selection, including choosing among ridge penalties using a train-validation split. Wakayama & Suzuki [43 ] and Ma et al. [30 ] establish approximation of the posterior predictive mean under hierarchical priors over regression-function classes. In particular, Ma et al. [30 ] use posterior contraction to show that this predictor achieves optimal rates corresponding to the unknown smoothness and effective dimension of the task. These results suggest that part of ICL’s strength may lie in its ability to adjust the statistical procedure to the structure revealed by the context. This is a form of statistical adaptivity , which is when a single estimator attains a close to optimal accuracy appropriate to the underlying model for multiple models, without knowing that model in advance. Such adaptation is a longstanding objective in statistics, often achieved through procedures tailored to particular models and inferential targets ([7 ] ). Pretraining offers a potentially general recipe to acquiring this behavior, but guarantees for ERM do not establish that gradient-based training learns the required mechanisms.
Understanding how such adaptation is learned requires an analysis of pretraining itself. A complementary literature studies pretraining dynamics directly. Results include gradient-flow convergence for linear regression with linear attention ([47 b] ), task allocation in multi-head softmax attention for multi-task linear regression ([11 ] ), and gradient-based learning of shared low-dimensional structure for nonlinear single-index regression ([33 ] ). These results explain important forms of learned statistical behavior, including specialization and adaptation to shared structure.
In this paper, we study how adaptation can emerge from gradient-based pretraining, focusing on a simple one-dimensional location-estimation problem. Here, each task draws a context comprising n n n i.i.d. observations from either a Gaussian or a uniform distribution, and the estimation target is the location parameter of the underlying distribution. The appropriate estimator depends on the distributional family. For Gaussian observations, a sample average is optimal, with mean-squared error of order n − 1 n^{-1} n − 1 , whereas uniform observations permit the faster n − 2 n^{-2} n − 2 rate through the sample mid-range. Neither estimator attains both rates. Moreover, the family label is hidden and has to be inferred from the context. During pretraining, the learner observes the target mean but receives neither the family label nor a prescribed estimator choice. We also consider a symmetric two-component Gaussian mixture as the alternative to the Gaussian family. Its shrinking component variance σ n 2 \sigma_n^2 σ n 2 permits risk of order σ n 2 / n \sigma_n^2/n σ n 2 / n , providing a second example of adaptation to distributional structure.
Multi-head attention can be used to identify the distribution of the samples in context as well as to estimate their location. With scalar observations, the query and key matrices of an attention head collapse to a single scalar which we denote by λ \lambda λ . Thus, attention effectively computes the exponentially tilted average h ( x , λ ) = ∑ i x i e λ x i / ∑ i e λ x i h(x,\lambda)=\sum_i x_i e^{\lambda x_i}/\sum_i e^{\lambda x_i} h ( x , λ ) = ∑ i x i e λ x i / ∑ i e λ x i . This is the derivative of the empirical cumulant-generating function (CGF). Since the population CGF can be used to characterize distributions, evaluating this function at several locations supplies features for distinguishing between the two families. The same operation also constructs the relevant estimators: setting λ = 0 \lambda=0 λ = 0 gives the sample mean, while sending λ → ± ∞ \lambda\to\pm\infty λ → ± ∞ approaches the sample maximum and minimum, which are required to compute the mid-range.
We use these two roles of multi-head attention to construct a bank of estimators, or experts , as well as a feature embedding, that allows distinguishing different distributions. A learned gating parameter θ i \theta_i θ i is used within a gating layer, either a Softmax MoE or a Gated Linear Unit, to output a weighted combination of the outputs of the different experts. This weighted sum of the expert estimates forms the location estimate. Both of these architectures are minor modifications of commonly used layers within standard Transformer architectures ([37 ] ). We analyze stagewise gradient flow that first learns the gating parameters θ i \theta_i θ i with the expert parameters λ i \lambda_i λ i fixed, then learns the expert parameters λ i \lambda_i λ i with the gating parameters θ i \theta_i θ i fixed. This is also done to simplify the proof structure, while our experiments demonstrate that this is not strictly necessary. Notably, our results are stronger than an expressivity statement, as they demonstrate that gradient flow on the empirical loss is able to learn how to do in context location estimation with close to optimal rates.
Our contributions are fourfold:
Adaptive estimation and transfer. We establish family-specific risk guarantees for the output of stagewise pretraining under both the Softmax MoE and the GLU architecture. Both architectures achieve Gaussian asymptotic efficiency and nearly (up to a n ϵ n^{\epsilon} n ϵ factor) optimal uniform estimation rates. For a Gaussian mixture distribution, we also obtain order-optimal rates. This implies that our architecture performs nearly as well as the sample mean on Gaussian data and the sample mid-range on uniform data. We also establish out-of-distribution risk bounds for longer contexts as well as for samples with a fixed location.
Statistical mechanism and architectural comparison. Our results show how the risk can be decomposed into the variance of the experts, the bias of the final estimator, and the error accumulated through the gating mechanism (Lemma 3.5 ). They explain how distribution-sensitive weighting preserves the accuracy of the appropriate expert, and how the architectures differ: softmax enforces normalization of the weights and thus exact translation equivariance, whereas the GLU must learn approximate normalization of the weights (Theorem 3.1 ).
Learning dynamics. We show how training learns the gating parameters and expert parameters required by the statistical analysis (Lemma 3.3 and Lemma 3.4 ). Since the loss admits a bias-variance decomposition, our analysis tracks the movement of the bias and variance separately. The major terms of the bias are created by the sum of the weights, while variance is accumulated through the variance of the separate experts. Additionally, we observe that the bias is scaled at a different order, proportional to the prior variance σ μ 2 \sigma_\mu^2 σ μ 2 , than the variance which is of order 1 n \frac{1}{n} n 1 where n n n is the sample size. Thus, bias and variance move at different timescales. We exploit this fact to characterize the dynamics of the parameters (Lemma B.8 and Lemma B.9). Subsequent training of the attention layer lets the experts specialize their predictions to their assigned distribution (Lemma 3.4 ). Here, our analysis exploits that the second layer has already converged to a near-perfect gating of the different distributions.
Figure 1. Illustration of our studied architecture. We also highlight the parts which were fixed for simplicity.
Notation. We write [ n ] = { 1 , … , n } [n] = \{1,\ldots,n\} [ n ] = { 1 , … , n } . The norms ∥ ⋅ ∥ 2 \|\cdot\|_2 ∥ ⋅ ∥ 2 and ∥ ⋅ ∥ F \|\cdot\|_F ∥ ⋅ ∥ F denote the Euclidean and Frobenius norms, respectively. Parameter collections and their gradients are identified with stacked vectors. Let e i e_i e i be the i i i -th coordinate vector. The notation O \mathcal{O} O , Θ \Theta Θ , Ω \Omega Ω , and o o o has its usual meaning, O ~ \widetilde{\mathcal{O}} O and Ω ~ \widetilde{\Omega} Ω suppress logarithmic factors, and ≲ \lesssim ≲ denotes inequality up to an absolute multiplicative constant. Constants may change from line to line. Uppercase X i X_i X i and X X X denote random observations and contexts, while lowercase x i x_i x i and x = ( x 1 , … , x n ) x=(x_1,\ldots,x_n) x = ( x 1 , … , x n ) denote their realizations. We define estimators as functions of x x x and evaluate their risks at the random context X X X . We use E j [ ⋅ ] = E [ ⋅ ∣ τ = j ] \mathbb{E}_j[\cdot]=\mathbb{E}[\cdot\mid\tau=j] E j [ ⋅ ] = E [ ⋅ ∣ τ = j ] for expectation under family j j j , including both the location prior and the conditional sample. We write P j \mathbb{P}_j P j for this family-conditional law. For 1 ≤ p < ∞ 1\le p<\infty 1 ≤ p < ∞ , ∥ Y ∥ L p ( P j ) = ( E j [ ∣ Y ∣ p ] ) 1 / p \|Y\|_{L_p(\mathbb{P}_j)}=(\mathbb{E}_j[|Y|^p])^{1/p} ∥ Y ∥ L p ( P j ) = ( E j [ ∣ Y ∣ p ] ) 1/ p , using the Euclidean norm for random vectors and an unconditional law when the family subscript is omitted.
Problem and architectures
We consider a location-estimation task. During training and inference, the learner is presented with observations from a distribution in context and is tasked with estimating their location. The learner is not explicitly told which distribution the observations are from. To allow a fair comparison, the distributions differ only in shape, not in variance.
Definition 2.1 (Adaptive mean-estimation tasks). Sample a location μ \mu μ and a family label τ \tau τ independently:
μ ∼ N ( 0 , σ μ 2 ) , P ( τ = G ) = P ( τ = A ) = 1 2 \mu\sim\mathcal{N}(0,\sigma_{\mu}^{2}), \qquad\mathbb{P}(\tau= \mathrm{G}) = \mathbb{P}(\tau= \mathrm{A}) = \frac{1}{2} μ ∼ N ( 0 , σ μ 2 ) , P ( τ = G ) = P ( τ = A ) = 2 1 Conditional on ( μ , τ ) (\mu,\tau) ( μ , τ ) , draw ξ i ∼ i . i . d . Q τ \xi_i \mathrel{\overset{\mathrm{i.i.d.}}{\sim}} Q_{\tau} ξ i ∼ i.i.d. Q τ and set
X i = μ + ξ i , i ∈ [ n ] , X = ( X 1 , … , X n ) . X_i = \mu+ \xi_i,\qquad i \in[n],\qquad\mathbf{X} = (X_1,\ldots,X_n). X i = μ + ξ i , i ∈ [ n ] , X = ( X 1 , … , X n ) . The centered Gaussian law is Q G = N ( 0 , 1 ) Q_{\mathrm{G}} = \mathcal{N}(0,1) Q G = N ( 0 , 1 ) . The alternative centered law Q A Q_{\mathrm{A}} Q A is either
Uniform: Q A = Q U = Unif [ − 3 , 3 ] , Q_{\mathrm{A}} = Q_{\mathrm{U}} = \operatorname{Unif}[-\sqrt{3},\sqrt{3}], Q A = Q U = Unif [ − 3 , 3 ] ,
Gaussian mixture: Q A = Q M = 1 2 N ( − 1 − σ n 2 , σ n 2 ) + 1 2 N ( 1 − σ n 2 , σ n 2 ) , Q_{\mathrm{A}} = Q_{\mathrm{M}} = \frac{1}{2}\mathcal{N}(-\sqrt{1-\sigma_n^2},\sigma_n^2) + \frac{1}{2}\mathcal{N}(\sqrt{1-\sigma_n^2},\sigma_n^2), Q A = Q M = 2 1 N ( − 1 − σ n 2 , σ n 2 ) + 2 1 N ( 1 − σ n 2 , σ n 2 ) ,
where σ n 2 ∈ ( 0 , 1 ) \sigma_n^2 \in(0,1) σ n 2 ∈ ( 0 , 1 ) . In statements specific to one alternative, we write U or M in place of A. Write P μ , j P_{\mu,j} P μ , j for the law of μ + ξ \mu+\xi μ + ξ with ξ ∼ Q j \xi\sim Q_j ξ ∼ Q j . Each observed task ( X , μ ) (\mathbf{X},\mu) ( X , μ ) is the tuple of the context and the location and thus, the family label τ \tau τ is never observed.
Risk and Lower Bounds. For j ∈ { G , A } j \in\{\mathrm{G},\mathrm{A}\} j ∈ { G , A } , define the risk at location μ \mu μ and its average over the location prior by
R j , n ( μ ^ ; μ ) : = E X ∼ P μ , j n [ ( μ ^ ( X ) − μ ) 2 ] , R j , n ( μ ^ ) : = E j [ ( μ ^ ( X ) − μ ) 2 ] . R_{j,n}(\widehat{\mu};\mu) := \mathbb{E}_{\mathbf{X}\sim P_{\mu,j}^{n}}\left[(\widehat{\mu}(\mathbf{X})-\mu)^2\right],\qquad R_{j,n}(\widehat{\mu}) := \mathbb{E}_{j}\left[(\widehat{\mu}(\mathbf{X})-\mu)^2\right]. R j , n ( μ ; μ ) := E X ∼ P μ , j n [ ( μ ( X ) − μ ) 2 ] , R j , n ( μ ) := E j [ ( μ ( X ) − μ ) 2 ] .
For the trained estimator, these expectations are over an independent test task with the trained parameters held fixed. For a fixed family j j j , define the location-minimax risk
R j , n ⋆ : = inf μ ^ sup μ ∈ R E X ∼ P μ , j n [ ( μ ^ ( X ) − μ ) 2 ] . R_{j,n}^{\star} := \inf_{\widehat{\mu}}\sup_{\mu\in\mathbb{R}}\mathbb{E}_{\mathbf{X}\sim P_{\mu,j}^{n}}\left[(\widehat{\mu}(\mathbf{X})-\mu)^2\right]. R j , n ⋆ := μ inf μ ∈ R sup E X ∼ P μ , j n [ ( μ ( X ) − μ ) 2 ] .
The sample mean has risk 1 / n 1/n 1/ n under every family. For Gaussian data, the sample mean attains the exact location-minimax risk n − 1 n^{-1} n − 1 . For uniform data, the sample mid-range attains the faster location-minimax rate n − 2 n^{-2} n − 2 . For completeness, we give the proofs of these benchmarks in Section H.1. For the Gaussian mixture, revealing component labels reduces the problem to Gaussian location estimation with variance σ n 2 \sigma_n^2 σ n 2 , yielding the lower bound σ n 2 / n \sigma_n^2/n σ n 2 / n (see Lemma H.2).
Architecture
We consider a two-layer transformer architecture that consists of one multi-head attention layer followed by a second layer, which is either a Softmax Mixture of Experts (MoE) layer or a Gated Linear Unit. In the following, we will fix some of the parameters of the transformer architecture to decide before training which attention heads will be used as estimators and which will be used to identify the distribution.
Definition 2.2 (Transformer architecture). Let K K K be the number of experts and d ≥ 3 d \ge3 d ≥ 3 be the number of heads dedicated to identifying the distribution family. Let x \mathbf{x} x be the context of size n n n , containing the input dataset. For λ ∈ R \lambda\in\mathbb{R} λ ∈ R , define
h ( x , λ ) = ∑ i = 1 n e λ x i x i ∑ i = 1 n e λ x i . (1) h(\mathbf{x},\lambda)=\frac{\sum_{i=1}^{n}e^{\lambda x_i}x_i}{\sum_{i=1}^{n}e^{\lambda x_i}}. \tag*{(1)} h ( x , λ ) = ∑ i = 1 n e λ x i ∑ i = 1 n e λ x i x i . (1) Expert k ∈ [ K ] k \in[K] k ∈ [ K ] is q k ( x ) = 1 2 ( h ( x , λ k ) + h ( x , − λ k ) ) q_k(\mathbf{x}) = \frac{1}{2}\left(h(\mathbf{x},\lambda_k)+h(\mathbf{x},-\lambda_k)\right) q k ( x ) = 2 1 ( h ( x , λ k ) + h ( x , − λ k ) ) with λ k ( 0 ) ∼ i . i . d . Unif [ − 1 , 1 ] \lambda_k(0) \mathrel{\overset{\mathrm{i.i.d.}}{\sim}} \operatorname{Unif}[-1,1] λ k ( 0 ) ∼ i.i.d. Unif [ − 1 , 1 ] . For gating, sample ω r ∼ i . i . d . N ( 0 , 1 ) \omega_r \mathrel{\overset{\mathrm{i.i.d.}}{\sim}} \mathcal{N}(0,1) ω r ∼ i.i.d. N ( 0 , 1 ) , r ∈ [ d ] r \in[d] r ∈ [ d ] , and hold ω = ( ω 1 , … , ω d ) \boldsymbol{\omega}=(\omega_1,\ldots,\omega_d) ω = ( ω 1 , … , ω d ) fixed. We define ϕ ω ( x ) = ( h ( x , ω 1 ) , … , h ( x , ω d ) ) \phi_{\boldsymbol{\omega}}(\mathbf{x})=(h(\mathbf{x},\omega_1),\ldots,h(\mathbf{x},\omega_d)) ϕ ω ( x ) = ( h ( x , ω 1 ) , … , h ( x , ω d )) and then apply a LayerNorm with fixed parameters to obtain z \mathbf{z} z
z ( x ) = LayerNorm ( ϕ ω ( x ) ) = P d ϕ ω ( x ) ∥ P d ϕ ω ( x ) ∥ 2 , (2) \mathbf{z}(\mathbf{x})=\operatorname{LayerNorm}(\phi_{\boldsymbol{\omega}}(\mathbf{x}))=\frac{P_d\phi_{\boldsymbol{\omega}}(\mathbf{x})}{\lVert P_d\phi_{\boldsymbol{\omega}}(\mathbf{x})\rVert_2}, \tag*{(2)} z ( x ) = LayerNorm ( ϕ ω ( x )) = ∥ P d ϕ ω ( x ) ∥ 2 P d ϕ ω ( x ) , (2)
where P d = I d − 11 T / d P_d = I_d - 11^{\mathsf{T}}/d P d = I d − 1 1 T / d . For k ∈ [ K ] k \in[K] k ∈ [ K ] , initialize θ k ( 0 ) ∼ i . i . d . N ( 0 , σ θ 2 I d ) \theta_k(0) \overset{\mathrm{i.i.d.}}{\sim} \mathcal{N}(0,\sigma_\theta^2 I_d) θ k ( 0 ) ∼ i.i.d. N ( 0 , σ θ 2 I d ) . We will consider two different choices for w w w , the Softmax Mixture of Experts (3) and the Gated Linear Unit (4):
w k ( x ; θ ) = exp ( ⟨ z ( x ) , θ k ⟩ ) ∑ ℓ = 1 K exp ( ⟨ z ( x ) , θ ℓ ⟩ ) (3) w_k(\mathbf{x};\theta) = \frac{\exp(\langle\mathbf{z}(\mathbf{x}),\theta_k\rangle)}{\sum_{\ell=1}^{K}\exp(\langle\mathbf{z}(\mathbf{x}),\theta_\ell\rangle)} \tag*{(3)} w k ( x ; θ ) = ∑ ℓ = 1 K exp (⟨ z ( x ) , θ ℓ ⟩) exp (⟨ z ( x ) , θ k ⟩) (3)
w k ( x ; θ ) = σ ( ⟨ z ( x ) , θ k ⟩ ) = 1 1 + e − ⟨ z ( x ) , θ k ⟩ (4) w_k(\mathbf{x};\theta) = \sigma(\langle\mathbf{z}(\mathbf{x}),\theta_k\rangle) = \frac{1}{1+e^{-\langle\mathbf{z}(\mathbf{x}),\theta_k\rangle}} \tag*{(4)} w k ( x ; θ ) = σ (⟨ z ( x ) , θ k ⟩) = 1 + e − ⟨ z ( x ) , θ k ⟩ 1 (4)
Finally, we define the final network output as
μ ^ θ , λ ( x ) = ∑ k = 1 K w k ( x ; θ ) g k ( x ) . (5) \widehat{\mu}_{\theta,\lambda}(\mathbf{x}) = \sum_{k=1}^{K} w_k(\mathbf{x};\theta)g_k(\mathbf{x}). \tag*{(5)} μ θ , λ ( x ) = k = 1 ∑ K w k ( x ; θ ) g k ( x ) . (5)
The parameters θ = ( θ 1 , … , θ K ) \theta= (\theta_1,\ldots,\theta_K) θ = ( θ 1 , … , θ K ) and λ = ( λ 1 , … , λ K ) \lambda= (\lambda_1,\ldots,\lambda_K) λ = ( λ 1 , … , λ K ) are trained, while ω \omega ω remains fixed.
The architecture in Definition 2.2 fixes some parameters to remove permutation invariances. The attention heads are split into the experts g k g_k g k , which implement the candidate estimators, and the heads forming the feature z \mathbf{z} z , which identifies the distribution family. When the routing feature is replaced by its population value, the unbiased experts g k g_k g k give an unbiased Softmax MoE output, whereas the GLU must also learn normalization. For sample-dependent gates, softmax guarantees exact translation equivariance but need not be exactly unbiased. The feature does not depend on the location, z ( X + μ 1 ) = z ( X ) \mathbf{z}(\mathbf{X}+\mu\mathbf{1})=\mathbf{z}(\mathbf{X}) z ( X + μ 1 ) = z ( X ) , so its distribution depends only on the family. Under family j j j , z ( X ) → z ‾ j \mathbf{z}(\mathbf{X}) \to\overline{\mathbf{z}}_j z ( X ) → z j in probability as n → ∞ n\to\infty n → ∞ , where z ‾ j \overline{\mathbf{z}}_j z j is the centered and normalized vector of derivatives of the CGF of Q j Q_j Q j at ω 1 , … , ω d \omega_1,\ldots,\omega_d ω 1 , … , ω d . Since z ‾ G ≠ z ‾ A \overline{\mathbf{z}}_G \ne\overline{\mathbf{z}}_A z G = z A almost surely (Lemma F.5), z \mathbf{z} z distinguishes the families for large n n n .
Our architecture introduces a LayerNorm for the gating input to the second layer, as this simplifies calculations. We believe this is not strictly necessary. For details, see Appendix J.
Training protocol
For our training dataset, we sample m m m i.i.d. tasks of size n n n from Definition 2.1 and denote our dataset by { ( X b , μ b ) } b = 1 m \{(\mathbf{X}_b,\mu_b)\}_{b=1}^{m} {( X b , μ b ) } b = 1 m .
Definition 2.3 (Stagewise gradient flow training). For either architecture, (3) or (4), define the population loss L ( θ , λ ) = 1 2 E [ ( μ ^ ( X ) − μ ) 2 ] \mathcal{L}(\theta,\lambda)=\frac{1}{2}\mathbb{E}[(\widehat{\mu}(\mathbf{X})-\mu)^2] L ( θ , λ ) = 2 1 E [( μ ( X ) − μ ) 2 ] and the empirical loss L ^ m ( θ , λ ) = 1 2 m ∑ b = 1 m ( μ ^ ( X b ) − μ b ) 2 \widehat{\mathcal{L}}_m(\theta,\lambda)=\frac{1}{2m}\sum_{b=1}^{m}(\widehat{\mu}(\mathbf{X}_b)-\mu_b)^2 L m ( θ , λ ) = 2 m 1 ∑ b = 1 m ( μ ( X b ) − μ b ) 2 . Training proceeds in two stages:
For 0 ≤ t < t θ 0 \le t < t_\theta 0 ≤ t < t θ , run θ ˙ = − ∇ θ L ^ m \dot{\theta}=-\nabla_\theta\widehat{\mathcal{L}}_m θ ˙ = − ∇ θ L m with λ \lambda λ fixed.
For t θ ≤ t < t λ t_\theta\le t < t_\lambda t θ ≤ t < t λ , run λ ˙ = − ∇ λ L ^ m \dot{\lambda}=-\nabla_\lambda\widehat{\mathcal{L}}_m λ ˙ = − ∇ λ L m with θ \theta θ fixed.
The full population flow is the same procedure with L ^ m \widehat{\mathcal{L}}_m L m replaced by L \mathcal{L} L in both stages.
Main results
Theorem 3.1 (Main result; proof in Section B.5). Let K = 2 K=2 K = 2 be the number of experts. Fix any η , ϵ ∈ ( 0 , 1 ) \eta,\epsilon\in(0,1) η , ϵ ∈ ( 0 , 1 ) , a gating dimension d ≥ 3 d\ge3 d ≥ 3 , and sufficiently small σ μ 2 > 0 \sigma_\mu^2>0 σ μ 2 > 0 , all independent of n n n . Sample m = Ω ~ ( n 1 + ϵ ) m=\widetilde{\Omega}(n^{1+\epsilon}) m = Ω ( n 1 + ϵ ) independent tasks according to Definition 2.1, with m ∈ poly ( n ) m\in\operatorname{poly}(n) m ∈ poly ( n ) . In the Gaussian-mixture case, assume n − 1 + ϵ ≤ σ n 2 ≤ o ( 1 ) n^{-1+\epsilon}\le\sigma_n^2\le o(1) n − 1 + ϵ ≤ σ n 2 ≤ o ( 1 ) . Initialize as in Definition 2.2, with fixed σ θ 2 > 0 \sigma_\theta^2>0 σ θ 2 > 0 , sufficiently small depending on n n n . Relabel the experts and permute θ \theta θ according to so that ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ |\lambda_1(0)|<|\lambda_2(0)| ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ . Let μ ^ t r a i n e d = μ ^ θ ( t θ ) , λ ( t λ ) \widehat{\mu}_{\mathrm{trained}}=\widehat{\mu}_{\theta(t_\theta),\lambda(t_\lambda)} μ trained = μ θ ( t θ ) , λ ( t λ ) , with t λ t_\lambda t λ as in Lemma 3.4. For sufficiently large n n n , with probability at least 1 − η 1-\eta 1 − η over the initialization and training tasks,
R G , n ( μ ^ t r a i n e d ) = 1 + o ( 1 ) n , R A , n ( μ ^ t r a i n e d ) = { O ( n − 2 + ϵ ) , uniform alternative , O ( σ n 2 / n ) , Gaussian-mixture alternative . R_{G,n}(\widehat{\mu}_{\mathrm{trained}})=\frac{1+o(1)}{n},\qquad
R_{A,n}(\widehat{\mu}_{\mathrm{trained}})=
\begin{cases}
O(n^{-2+\epsilon}), & \text{uniform alternative},\\
O(\sigma_n^2/n), & \text{Gaussian-mixture alternative}.
\end{cases} R G , n ( μ trained ) = n 1 + o ( 1 ) , R A , n ( μ trained ) = { O ( n − 2 + ϵ ) , O ( σ n 2 / n ) , uniform alternative , Gaussian-mixture alternative . For the GLU, we have, for every μ ∈ R \mu\in\mathbb{R} μ ∈ R and j ∈ { G , A } j\in\{G,A\} j ∈ { G , A } ,
R j , n ( μ ^ t r a i n e d ; μ ) ≤ 2 R j , n ( μ ^ t r a i n e d ) + C μ 2 n 2 . R_{j,n}(\widehat{\mu}_{\mathrm{trained}};\mu)\le2R_{j,n}(\widehat{\mu}_{\mathrm{trained}})+\frac{C\mu^2}{n^2}. R j , n ( μ trained ; μ ) ≤ 2 R j , n ( μ trained ) + n 2 C μ 2 . For the softmax MoE, for every μ ∈ R \mu\in\mathbb{R} μ ∈ R and j ∈ { G , A } j\in\{G,A\} j ∈ { G , A } ,
R j , n ( μ ^ t r a i n e d ; μ ) = R j , n ( μ ^ t r a i n e d ) . R_{j,n}(\widehat{\mu}_{\mathrm{trained}};\mu)=R_{j,n}(\widehat{\mu}_{\mathrm{trained}}). R j , n ( μ trained ; μ ) = R j , n ( μ trained ) .
The Gaussian and Gaussian-mixture rates match the lower bounds of Proposition H.1 and Lemma H.2 up to constants, and the uniform rate is within a factor of n ϵ n^{\epsilon} n ϵ of the minimax rate n − 2 n^{-2} n − 2 . Table 1 summarizes the results. The Softmax MoE architecture has a stronger guarantee when ∣ μ ∣ |\mu| ∣ μ ∣ is large.
Table 1. The terminal expert parameters and fresh-context risks certified by the main theorem.
This follows from its exact translation equivariance, while the GLU has to learn approximate normalization.
Corollary 3.2 (Length generalization; proof in Section D.3.7). Under the assumptions of Theorem 3.1 , for sufficiently large n n n , with probability at least 1 − η 1-\eta 1 − η over the initialization and pretraining tasks, for every n ′ ≥ n n' \ge n n ′ ≥ n ,
R G , n ′ ( μ ^ t r a i n e d ) = O ( 1 n ′ + log n ′ n 2 ) , R_{G,n'}(\widehat{\mu}_{\mathrm{trained}})=O\left(\frac{1}{n'}+\frac{\log n'}{n^2}\right), R G , n ′ ( μ trained ) = O ( n ′ 1 + n 2 log n ′ ) , R A , n ′ ( μ ^ t r a i n e d ) = { O ( n − 1 + ϵ / n ′ + n − 2 ) , Uniform , O ( σ n 2 / n ′ + log n ′ / n 2 ) , Gaussian-mixture . R_{A,n'}(\widehat{\mu}_{\mathrm{trained}})=
\begin{cases}
O(n^{-1+\epsilon}/n'+n^{-2}), & \text{Uniform},\\
O(\sigma_n^2/n'+\log n'/n^2), & \text{Gaussian-mixture}.
\end{cases} R A , n ′ ( μ trained ) = { O ( n − 1 + ϵ / n ′ + n − 2 ) , O ( σ n 2 / n ′ + log n ′ / n 2 ) , Uniform , Gaussian-mixture .
Pretraining dynamics
We establish the gate bound of Lemma 3.3 and the expert-parameter bounds of Lemma 3.4 : first train the gating parameters with fixed experts, then specialize the expert parameters with fixed gates. Equation 3.4 supplies the resulting risk guarantees.
We specialize to two experts and two families. Define the population attention responses and feature direction by
m j ( a ) = E j [ e a ( X − μ ) ( X − μ ) ] E j [ e a ( X − μ ) ] , ϕ ˉ j = ( m j ( ω 1 ) , … , m j ( ω d ) ) ⊤ , z ˉ j = P d ϕ ˉ j ∥ P d ϕ ˉ j ∥ . m_j(a)=\frac{\mathbb{E}_j\left[e^{a(X-\mu)}(X-\mu)\right]}{\mathbb{E}_j\left[e^{a(X-\mu)}\right]}, \qquad\bar{\phi}_j=\left(m_j(\omega_1),\ldots,m_j(\omega_d)\right)^\top, \qquad\bar{z}_j=\frac{P_d\bar{\phi}_j}{\lVert P_d\bar{\phi}_j\rVert}. m j ( a ) = E j [ e a ( X − μ ) ] E j [ e a ( X − μ ) ( X − μ ) ] , ϕ ˉ j = ( m j ( ω 1 ) , … , m j ( ω d ) ) ⊤ , z ˉ j = ∥ P d ϕ ˉ j ∥ P d ϕ ˉ j .
Let w ˉ k j \bar{w}_{kj} w ˉ k j denote w k w_k w k with z ( X ) z(X) z ( X ) replaced by z ˉ j \bar{z}_j z ˉ j , and w ˉ ⋅ j = ( w ˉ 1 j , w ˉ 2 j ) ⊤ \bar{w}_{\cdot j}=(\bar{w}_{1j},\bar{w}_{2j})^\top w ˉ ⋅ j = ( w ˉ 1 j , w ˉ 2 j ) ⊤ . Throughout, bars indicate evaluation at population moments rather than expectation of the corresponding nonlinear statistic. In particular, z ˉ j ≠ E j [ z ( X ) ] \bar{z}_j\ne\mathbb{E}_j[z(X)] z ˉ j = E j [ z ( X )] in general. In the proofs, Δ \Delta Δ denotes deviation from the corresponding population-moment value. In particular, under family j j j , Δ z = z − z ˉ j \Delta z=z-\bar{z}_j Δ z = z − z ˉ j .
Stage 1: gating dynamics
Lemma 3.3 (Gating dynamics; proof in Section B.3 for the GLU). Under the assumptions of Theorem 3.1 , run the first stage of Definition 2.3. For sufficiently large n n n , with probability at least 1 − η 1-\eta 1 − η over the initialization and training tasks, the first stage ends at a finite time t θ t_\theta t θ with
max { ∥ w ˉ ⋅ G ( t θ ) − e 1 ∥ 1 , ∥ w ˉ ⋅ A ( t θ ) − e 2 ∥ 1 } = O ( n − 1 ) , max q ∥ θ q ( t θ ) ∥ 2 = O ( log n ) . \max\left\{\lVert\bar{w}_{\cdot G}(t_\theta)-e_1\rVert_1,\lVert\bar{w}_{\cdot A}(t_\theta)-e_2\rVert_1\right\}=O(n^{-1}), \qquad\max_q\lVert\theta_q(t_\theta)\rVert_2=O(\log n). max { ∥ w ˉ ⋅ G ( t θ ) − e 1 ∥ 1 , ∥ w ˉ ⋅ A ( t θ ) − e 2 ∥ 1 } = O ( n − 1 ) , q max ∥ θ q ( t θ ) ∥ 2 = O ( log n ) . Proof sketch. The population features z ˉ j \bar{z}_j z ˉ j distinguish the families. Let Σ ( j ) \Sigma^{(j)} Σ ( j ) be the asymptotic covariance matrix of g g g given data from family j j j , that is,
E j [ ( g i − μ ) ( g k − μ ) ] = Σ i k ( j ) n + o ( n − 1 ) . \mathbb{E}_j[(g_i-\mu)(g_k-\mu)]=\frac{\Sigma^{(j)}_{ik}}{n}+o(n^{-1}). E j [( g i − μ ) ( g k − μ )] = n Σ ik ( j ) + o ( n − 1 ) . We show that, for the families we study, there must exist an expert i i i such that for all k ≠ i k\ne i k = i we have almost surely
Σ i i ( j ) < Σ i k ( j ) < Σ k k ( j ) . (6) \Sigma^{(j)}_{ii}<\Sigma^{(j)}_{ik}<\Sigma^{(j)}_{kk}. \tag*{(6)} Σ ii ( j ) < Σ ik ( j ) < Σ k k ( j ) . (6)
This implies that the optimal gating must exclusively choose the “best” expert. Finally, we observe that the main component of the loss can be identified as
L t r u n c a t e d ( θ ) = 1 4 ∑ j [ σ μ 2 ( ∑ k = 1 2 w ˉ k j − 1 ) 2 + 1 n w ˉ ⋅ j T Σ ( j ) w ˉ ⋅ j ] . (7) \mathcal{L}^{\mathrm{truncated}}(\theta)=\frac{1}{4}\sum_j\left[\sigma_\mu^2\left(\sum_{k=1}^{2}\bar{w}_{kj}-1\right)^2+\frac{1}{n}\bar{w}_{\cdot j}^{\mathsf{T}}\boldsymbol{\Sigma}^{(j)}\bar{w}_{\cdot j}\right]. \tag*{(7)} L truncated ( θ ) = 4 1 j ∑ σ μ 2 ( k = 1 ∑ 2 w ˉ k j − 1 ) 2 + n 1 w ˉ ⋅ j T Σ ( j ) w ˉ ⋅ j . (7)
For softmax, the normalization term vanishes as ∑ k = 1 2 w ˉ k j = 1 \sum_{k=1}^{2}\bar{w}_{kj}=1 ∑ k = 1 2 w ˉ k j = 1 .
Softmax MoE First, note that this problem is highly nonconvex due to w w w being generated by a softmax. Since ∑ i w i = 1 \sum_i w_i=1 ∑ i w i = 1 and the routing feature concentrates at z ˉ j \bar{z}_j z ˉ j , the loss expansion gives L ( θ ) = L s m ( θ ) + o ( 1 / n ) \mathcal{L}(\theta)=\mathcal{L}^{\mathrm{sm}}(\theta)+o(1/n) L ( θ ) = L sm ( θ ) + o ( 1/ n ) , where
L s m ( θ ) = 1 4 n ∑ j w ˉ ⋅ j T Σ ( j ) w ˉ ⋅ j . (8) \mathcal{L}^{\mathrm{sm}}(\theta)=\frac{1}{4n}\sum_j\bar{w}_{\cdot j}^{\mathsf{T}}\boldsymbol{\Sigma}^{(j)}\bar{w}_{\cdot j}. \tag*{(8)} L sm ( θ ) = 4 n 1 j ∑ w ˉ ⋅ j T Σ ( j ) w ˉ ⋅ j . (8)
We can analyze the gradient flow on L s m \mathcal{L}^{\mathrm{sm}} L sm and show global convergence. Correcting for the o ( 1 / n ) o(1/n) o ( 1/ n ) remainder finishes the proof.
Gated linear unit For the GLU, unbiasedness is not automatic even when the gates are evaluated at z ˉ j \bar{z}_j z ˉ j . Our approach will be to analyze the gradient flow on L t r u n c a t e d \mathcal{L}^{\mathrm{truncated}} L truncated and correct for the perturbation L ( θ ) − L t r u n c a t e d ( θ ) \mathcal{L}(\theta)-\mathcal{L}^{\mathrm{truncated}}(\theta) L ( θ ) − L truncated ( θ ) . The loss L t r u n c a t e d ( θ ) \mathcal{L}^{\mathrm{truncated}}(\theta) L truncated ( θ ) has two distinct scales, where one scales with σ μ 2 \sigma_\mu^2 σ μ 2 and one scales with 1 / n 1/n 1/ n . The term σ μ 2 ( ∑ k = 1 2 w ˉ k j − 1 ) 2 \sigma_\mu^2\left(\sum_{k=1}^{2}\bar{w}_{kj}-1\right)^2 σ μ 2 ( ∑ k = 1 2 w ˉ k j − 1 ) 2 corresponds (roughly) to the bias of the predictor. In the truncated loss, there exists a whole manifold of unbiased predictors, and we show that the gradient flow finds a solution near this manifold, while optimizing for the variance of the predictor. Choosing n n n sufficiently large lets us attack this problem using Tikhonov’s theorem and determine where on the manifold the gradient flow converges. Notably, L ( θ ) − L t r u n c a t e d ( θ ) \mathcal{L}(\theta)-\mathcal{L}^{\mathrm{truncated}}(\theta) L ( θ ) − L truncated ( θ ) comes from the variance of w w w and thus scales with σ μ 2 \sigma_\mu^2 σ μ 2 . Hence, the proof depends on σ μ 2 \sigma_\mu^2 σ μ 2 being below some threshold. This is natural: a larger prior variance σ μ 2 \sigma_\mu^2 σ μ 2 increases the cost of normalization error, amplifying inaccuracies in the gating and potentially leading to a collapse of the gating layer towards a single expert for some initializations.
Stage 2: expert dynamics
For t ≥ t θ t\ge t_\theta t ≥ t θ , θ \theta θ is frozen. In this second stage, we analyze the dynamics of λ \lambda λ . We establish that the expert parameter assigned to samples from the Gaussian family moves toward zero, while uniform expert parameters grow toward endpoint estimation, and mixture expert parameters approach a certain limit. In the respective regimes, the leading expert-parameter flows satisfy λ ˙ 1 ≍ − λ 1 3 / n \dot{\lambda}_1\asymp-\lambda_1^3/n λ ˙ 1 ≍ − λ 1 3 / n and λ ˙ 2 ≍ 1 / ( n λ 2 2 ) \dot{\lambda}_2\asymp1/(n\lambda_2^2) λ ˙ 2 ≍ 1/ ( n λ 2 2 ) assuming without loss of generality λ 2 > 0 \lambda_2>0 λ 2 > 0 . Controlling the residuals yields the following result.
Lemma 3.4 (Expert dynamics; proof in Section F.1). Under the assumptions of Theorem 3.1 , assume the first stage of Definition 2.3 ends at a finite time t θ t_\theta t θ satisfying
max { ∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } ≤ C n , max q ∥ θ q ∥ 2 ≤ C log n , \max\left\{\left\|\bar{w}_{\cdot\mathrm{G}}-e_1\right\|_1,\left\|\bar{w}_{\cdot\mathrm{A}}-e_2\right\|_1\right\}\le\frac{C}{n},\qquad\max_q\left\|\theta_q\right\|_2\le C\log n, max { ∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } ≤ n C , q max ∥ θ q ∥ 2 ≤ C log n , and ∣ λ 1 ( t θ ) ∣ ≤ 1 \lvert\lambda_1(t_\theta)\rvert\le1 ∣ λ 1 ( t θ )∣ ≤ 1 , C − 1 ≤ ∣ λ 2 ( t θ ) ∣ ≤ 1 C^{-1}\le\lvert\lambda_2(t_\theta)\rvert\le1 C − 1 ≤ ∣ λ 2 ( t θ )∣ ≤ 1 , for a constant C < ∞ C<\infty C < ∞ independent of n n n . Use the training procedure in Definition 2.3. For sufficiently large n n n , with probability at least 1 − η 1-\eta 1 − η , uniformly over the possible ( θ , λ ) (\theta,\lambda) ( θ , λ ) at t θ t_\theta t θ satisfying these bounds, ∣ λ 1 ∣ ≤ 2 \lvert\lambda_1\rvert\le2 ∣ λ 1 ∣ ≤ 2 until ∣ λ 2 ∣ \lvert\lambda_2\rvert ∣ λ 2 ∣ first reaches the value below, and this first time t λ t_\lambda t λ satisfies
{ ∣ λ 2 ( t λ ) ∣ = n 1 − ϵ , t λ − t θ ≤ C n 4 − 3 ϵ , Uniform , ∣ λ 2 ( t λ ) ∣ = log ( 1 / σ n 2 ) 4 1 − σ n 2 , t λ − t θ ≤ C n / σ n 2 , Gaussian mixture . \begin{cases}
\lvert\lambda_2(t_\lambda)\rvert=n^{1-\epsilon}, & t_\lambda-t_\theta\le Cn^{4-3\epsilon}, & \text{Uniform},\\
\lvert\lambda_2(t_\lambda)\rvert=\dfrac{\log(1/\sigma_n^2)}{4\sqrt{1-\sigma_n^2}}, & t_\lambda-t_\theta\le Cn/\sigma_n^2, & \text{Gaussian mixture}.
\end{cases} ⎩ ⎨ ⎧ ∣ λ 2 ( t λ )∣ = n 1 − ϵ , ∣ λ 2 ( t λ )∣ = 4 1 − σ n 2 log ( 1/ σ n 2 ) , t λ − t θ ≤ C n 4 − 3 ϵ , t λ − t θ ≤ C n / σ n 2 , Uniform , Gaussian mixture . Moreover, ∣ λ 1 ( t λ ) ∣ = o ( 1 ) \lvert\lambda_1(t_\lambda)\rvert=o(1) ∣ λ 1 ( t λ )∣ = o ( 1 ) . The tasks used for training λ \lambda λ may also have been used for training $\theta.
Efficiency of the final estimator
For every expert i i i , the error of the final estimator decomposes as
μ ^ − μ = g i − μ ⏟ expert error + ∑ k ≠ i w k ( g k − g i ) ⏟ routing error + ( ∑ k w k − 1 ) g i ⏟ normalization error . (9) \hat{\mu}-\mu= \underbrace{g_i-\mu}_{\text{expert error}}+\underbrace{\sum_{k\ne i}w_k(g_k-g_i)}_{\text{routing error}}+\underbrace{\left(\sum_k w_k-1\right)g_i}_{\text{normalization error}}. \tag*{(9)} μ ^ − μ = expert error g i − μ + routing error k = i ∑ w k ( g k − g i ) + normalization error ( k ∑ w k − 1 ) g i . (9)
The normalization error vanishes for the softmax MoE, since ∑ k w k = 1 \sum_k w_k=1 ∑ k w k = 1 . Lemma 3.5 bounds the routing and normalization errors in L 2 ( P j ) L^2(\mathbb{P}_j) L 2 ( P j ) through ∥ w ˉ ⋅ j − e i ∥ 1 \lVert\bar{w}_{\cdot j}-e_i\rVert_1 ∥ w ˉ ⋅ j − e i ∥ 1 .
Lemma 3.5 (Accuracy of the final estimator; proof in Appendix C). Under the data model of Definition 2.1, fix j ∈ { G , A } j\in\{\mathrm{G},\mathrm{A}\} j ∈ { G , A } . Condition on the trained ( θ , λ ) (\theta,\lambda) ( θ , λ ) and evaluate on an independent pair ( μ , X ) (\mu,\mathbf{X}) ( μ , X ) , with max k ∥ θ k ∥ 2 ≤ C log n \max_k\lVert\theta_k\rVert_2\le C\log n max k ∥ θ k ∥ 2 ≤ C log n . Then, for sufficiently large n n n , every expert i ∈ [ 2 ] i\in[2] i ∈ [ 2 ] , and arbitrary λ , \lambda, λ ,
E j [ ( μ ^ ( X ) − μ ) 2 ] ≤ E j [ ( g i ( X ) − μ ) 2 ] + C ∥ w ˉ ⋅ j − e i ∥ 1 ( σ μ 2 + E j [ max ℓ ∈ [ n ] ∣ X ℓ − μ ∣ 4 ] ) 1 / 2 . \sqrt{\mathbb{E}_j\left[(\hat{\mu}(\mathbf{X})-\mu)^2\right]}
\le
\sqrt{\mathbb{E}_j\left[(g_i(\mathbf{X})-\mu)^2\right]
+C\lVert\bar{w}_{\cdot j}-e_i\rVert_1
\left(\sigma_\mu^2+\sqrt{\mathbb{E}_j\left[\max_{\ell\in[n]}\lvert X_\ell-\mu\rvert^4\right]}\right)^{1/2}}. E j [ ( μ ^ ( X ) − μ ) 2 ] ≤ E j [ ( g i ( X ) − μ ) 2 ] + C ∥ w ˉ ⋅ j − e i ∥ 1 ( σ μ 2 + E j [ ℓ ∈ [ n ] max ∣ X ℓ − μ ∣ 4 ] ) 1/2 .
Proof sketch of Theorem 3.1. Under the conclusions of Lemma 3.4, the moment estimates in Lemma F.1, Lemma F.2, and Lemma F.3 give expert risks ( 1 + o ( 1 ) ) / n (1+o(1))/n ( 1 + o ( 1 )) / n , O ( n − 2 + ϵ ) O(n^{-2+\epsilon}) O ( n − 2 + ϵ ) , and O ( σ n 2 / n ) O(\sigma_n^2/n) O ( σ n 2 / n ) , respectively. Applying Lemma 3.5 and its proof with i = 1 i=1 i = 1 for j = G j=\mathrm{G} j = G and i = 2 i=2 i = 2 for j = A j=\mathrm{A} j = A , the gate bound of Lemma 3.3, and the sample-maximum moment bounds gives
∥ μ ^ − g i ∥ L 2 ( P j ) = O ( σ μ 2 + log n n ) . (10) \lVert\hat{\mu}-g_i\rVert_{L^2(\mathbb{P}_j)}
=O\left(\frac{\sqrt{\sigma_\mu^2+\log n}}{n}\right). \tag*{(10)} ∥ μ ^ − g i ∥ L 2 ( P j ) = O n σ μ 2 + log n . (10)
The triangle inequality then gives the stated risk bounds and preserves the Gaussian leading constant. The fixed-location claims follow from the translation identities and normalization estimate in Section D.3.6.
Experiments
Figures 2 and 3 show joint training of the softmax MoE and GLU with the uniform alternative. We use m = 8000 m=8000 m = 8000 , n = 150 n=150 n = 150 , K = 2 K=2 K = 2 , d = 10 d=10 d = 10 , and σ μ = 0.5 \sigma_\mu=0.5 σ μ = 0.5 , with 600,000 gradient-descent steps and constant step sizes 20 for θ \theta θ and 100 for λ \lambda λ . Both learn family-specific selection as ∣ λ 1 ∣ \lvert\lambda_1\rvert ∣ λ 1 ∣ decreases toward zero and ∣ λ 2 ∣ \lvert\lambda_2\rvert ∣ λ 2 ∣ grows, with greater variation in the onset of specialization across GLU runs. Gaussian error stays near the sample-mean error, while uniform error falls below it toward the sample mid-range error. Training details, Gaussian-mixture results, and stagewise experiments are in Appendix I.
Related work
In-context learning of statistical procedures. Prior-data fitted networks and tabular foundation models learn prediction procedures by pretraining on synthetic tasks [31 , 19 , 16 ] , and related pretrained models estimate treatment effects, survival curves, mutual information, and Poisson means [3 , 35 , 34 , 41 ] . Their focus is prediction or posterior approximation, not how pretraining attains estimation rates that depend on an unknown family.
Statistical theory of pretrained predictors. Transformers can implement in-context algorithm selection [2 ] , attain minimax rates over a known function class [25 ] , and approximate Bayesian posterior predictors whose rates adapt to unknown structure [43 , 30 ] ; idealized pretrained Bayes estimators are similarly adaptive in empirical Bayes problems [10 ] . These guarantees concern the empirical risk minimizer or an idealized predictor; we follow the training trajectory and identify the internal parameter that carries the adaptation.
Training dynamics of attention. Gradient-based analyses of attention for in-context learning [47 , 20 , 33 ] (Kim & Suzuki 2024) include task allocation across softmax heads [11 ] , where the task handled by each head is fixed by the task structure. Here the family changes across contexts, so specialization must be paired with learned routing.
Adaptive estimation and architecture. Adaptivity is a classical objective in statistics [28 , 15 ] , including adaptive estimation of a symmetric location [40 , 7 ] ; the rate gap in our problem stems from the irregularity of the uniform family [21 ] . Our model is a small Set Transformer [26 ] whose second layer is a softmax mixture of experts [23 ] or a GLU [37 ] . Appendix K discusses these connections in detail.
Discussion
Our current analysis is limited by making some simplifying assumptions on the training procedure as well as the architecture. Without fixing parameters, we observe that the problem becomes much easier to learn in practice, but admits many possible optimal solutions making it much harder to study. We also observe that separating training into two stages slows down training while making the problem much easier to study. Future work should focus on addressing these issues. Additionally, we believe transformers are able to do parameter estimation for much larger families of distributions. Extending our analysis towards these would also be a natural next step. Finally, we observe that there is an upper bound to the prior variance σ μ 2 \sigma_\mu^2 σ μ 2 , which seems to be unavoidable in a simple architecture. Still, finding an architecture that is able to handle arbitrary σ μ 2 \sigma_\mu^2 σ μ 2 would be a clear next step.
Conclusion
We show that stagewise gradient flow on the empirical loss learns an adaptive location estimator without observing family labels. The estimator achieves Gaussian asymptotic efficiency, nearly optimal uniform rates, and order-optimal rates for Gaussian mixtures with shrinking component variance. Attention provides both distribution-sensitive features and candidate estimators, while the gating layer learns which expert to select. Softmax enforces normalization and exact translation equivariance, whereas the GLU learns approximate normalization before selecting experts.
Funding Statement
Y.S. Tan was supported by NUS Startup Grant A-8000448-00-00 and the Singapore Ministry of Education (MOE) AcRF Tier 1 Grants A-8002498-00-00 and A-8004458-00-00. Klusowski gratefully acknowledges support from the National Science Foundation through NSF CAREER award DMS-2239448 and from the Alfred P. Sloan Foundation through a Sloan Research Fellowship. Subhro Ghosh was supported in part by the NUS Dean’s Chair Associate Professorship E-146-00-0037-01 and the Singapore MOE grants A-8002014-00-00 and A-8003802-00-00.
AI Use Statement
In this work, we used generative AI tools to assist in the writing of proofs, formulate mathematical claims and implement the experiment code. Additionally, we used generative AI tools to polish the writing, find typesetting and grammar errors, suggest the structure of the main paper, and identify and summarize related work. We have reviewed all AI-assisted work. All proofs were verified by the authors. The experiment code was reviewed and tested by the authors. We take responsibility for the final content of this work, including text, claims or artifacts produced with the aid of generative AI.
Outline
Proof map. Lemma B.5 gives the reparameterization used in the dynamics, and Lemma F.5 establishes the geometry of z z z . Appendix B assembles the main theorem from the fresh-context risk bound in Appendix C, the gating analysis in Appendix D, and the expert-parameter analysis in Appendix F. Appendix G collects auxiliary estimates, and Appendix H gives the Gaussian-mixture benchmark. Appendix I reports additional experiments, and Appendix J discusses the role of LayerNorm. Appendix K gives an extended discussion of related work. See section 1 for notation.
Proof of Theorem 3.1
Expert hierarchy
Definition B.1 (Expert covariance and the better expert). Let Σ ( j ) \Sigma^{(j)} Σ ( j ) be the matrix with entries Σ i k ( j ) = Σ g ( λ i , λ k ) \Sigma_{ik}^{(j)}=\Sigma_g(\lambda_i,\lambda_k) Σ ik ( j ) = Σ g ( λ i , λ k ) evaluated under the centered law Q j Q_j Q j . The symmetrized covariance formula is given in Definition F.9, with family-specific calculations in the expert-covariance appendix. Expert i ∈ { 1 , 2 } i \in\{1,2\} i ∈ { 1 , 2 } is better for family j ∈ { G , A } j \in\{G,A\} j ∈ { G , A } if, for the other expert k ≠ i k \ne i k = i ,
Σ i i ( j ) < Σ i k ( j ) < Σ k k ( j ) . (11) \Sigma_{ii}^{(j)} < \Sigma_{ik}^{(j)} < \Sigma_{kk}^{(j)}. \tag*{(11)} Σ ii ( j ) < Σ ik ( j ) < Σ k k ( j ) . (11) The experts satisfy the expert hierarchy if each family has a better expert. Its strict covariance gaps are the two positive differences in the ordering.
Lemma B.2 (Gaussian distribution satisfies the expert hierarchy). Let Y ∼ N ( 0 , 1 ) Y \sim\mathcal{N}(0,1) Y ∼ N ( 0 , 1 ) and λ 1 , λ 2 ∈ R \lambda_1,\lambda_2 \in\mathbb{R} λ 1 , λ 2 ∈ R with 0 < ∣ λ 1 ∣ < ∣ λ 2 ∣ 0 < |\lambda_1| < |\lambda_2| 0 < ∣ λ 1 ∣ < ∣ λ 2 ∣ . Then
Σ g ( λ 1 , λ 1 ) < Σ g ( λ 1 , λ 2 ) < Σ g ( λ 2 , λ 2 ) . (12) \Sigma_g(\lambda_1,\lambda_1) < \Sigma_g(\lambda_1,\lambda_2) < \Sigma_g(\lambda_2,\lambda_2). \tag*{(12)} Σ g ( λ 1 , λ 1 ) < Σ g ( λ 1 , λ 2 ) < Σ g ( λ 2 , λ 2 ) . (12) Proof. The statement follows from Σ g ( λ 1 , λ 2 ) = cosh ( λ 1 λ 2 ) + λ 1 λ 2 sinh ( λ 1 λ 2 ) \Sigma_g(\lambda_1,\lambda_2)=\cosh(\lambda_1\lambda_2)+\lambda_1\lambda_2\sinh(\lambda_1\lambda_2) Σ g ( λ 1 , λ 2 ) = cosh ( λ 1 λ 2 ) + λ 1 λ 2 sinh ( λ 1 λ 2 ) , which is strictly increasing in ∣ λ 1 λ 2 ∣ |\lambda_1\lambda_2| ∣ λ 1 λ 2 ∣ .
Lemma B.3 (Gaussian mixture distribution satisfies the expert hierarchy). For every fixed 0 < δ < 1 0 < \delta< 1 0 < δ < 1 there exists σ δ > 0 \sigma_\delta> 0 σ δ > 0 such that for all 0 < σ n < σ δ < 1 / 2 0 < \sigma_n < \sigma_\delta< 1/\sqrt{2} 0 < σ n < σ δ < 1/ 2 and 0 ≤ ∣ λ 1 ∣ < ∣ λ 2 ∣ ≤ L max = ( 1 − δ ) log ( 1 / σ n ) 0 \le|\lambda_1| < |\lambda_2| \le L_{\max}=(1-\delta)\log(1/\sigma_n) 0 ≤ ∣ λ 1 ∣ < ∣ λ 2 ∣ ≤ L m a x = ( 1 − δ ) log ( 1/ σ n ) ,
Σ g ( λ 1 , λ 1 ) > Σ g ( λ 1 , λ 2 ) > Σ g ( λ 2 , λ 2 ) . (13) \Sigma_g(\lambda_1,\lambda_1) > \Sigma_g(\lambda_1,\lambda_2) > \Sigma_g(\lambda_2,\lambda_2). \tag*{(13)} Σ g ( λ 1 , λ 1 ) > Σ g ( λ 1 , λ 2 ) > Σ g ( λ 2 , λ 2 ) . (13) Proof. See Lemma F.16.
Lemma B.4 (Uniform distribution satisfies the expert hierarchy). Let Y ∼ Unif [ − 3 , 3 ] Y \sim\operatorname{Unif}[-\sqrt{3},\sqrt{3}] Y ∼ Unif [ − 3 , 3 ] and λ 1 , λ 2 ∈ [ − 1 , 1 ] \lambda_1,\lambda_2 \in[-1,1] λ 1 , λ 2 ∈ [ − 1 , 1 ] with ∣ λ 1 ∣ < ∣ λ 2 ∣ |\lambda_1| < |\lambda_2| ∣ λ 1 ∣ < ∣ λ 2 ∣ . Then
Σ g ( λ 1 , λ 1 ) > Σ g ( λ 1 , λ 2 ) > Σ g ( λ 2 , λ 2 ) . (14) \Sigma_g(\lambda_1,\lambda_1) > \Sigma_g(\lambda_1,\lambda_2) > \Sigma_g(\lambda_2,\lambda_2). \tag*{(14)} Σ g ( λ 1 , λ 1 ) > Σ g ( λ 1 , λ 2 ) > Σ g ( λ 2 , λ 2 ) . (14) Proof. See Corollary F.13.
In the parameter ranges above, 0 < ∣ λ 1 ∣ < ∣ λ 2 ∣ 0 < |\lambda_1| < |\lambda_2| 0 < ∣ λ 1 ∣ < ∣ λ 2 ∣ makes expert 1 better on Gaussian contexts and expert 2 better on alternative contexts.
Gating-layer dynamics
Lemma B.5 (Decomposition of the gating parameters). For the GLU, let Z j k = ⟨ z ˉ j , z ˉ k ⟩ Z_{jk}=\langle\bar{z}_j,\bar{z}_k\rangle Z j k = ⟨ z ˉ j , z ˉ k ⟩ and suppose Z ≻ 0 Z \succ0 Z ≻ 0 . Each gating parameter has the decomposition
θ q = θ q ∥ + θ q ⊥ , θ q ∥ = ∑ ℓ , j ( Z − 1 ) ℓ j σ − 1 ( w ˉ q j ) z ˉ ℓ , θ q ⊥ ⊥ span { z ˉ j } j ∈ { G , A } . \theta_q=\theta_q^{\parallel}+\theta_q^{\perp}, \qquad\theta_q^{\parallel}=\sum_{\ell,j}(Z^{-1})_{\ell j}\sigma^{-1}(\bar{w}_{qj})\bar{z}_{\ell}, \qquad\theta_q^{\perp}\perp\operatorname{span}\{\bar{z}_j\}_{j\in\{G,A\}}. θ q = θ q ∥ + θ q ⊥ , θ q ∥ = ℓ , j ∑ ( Z − 1 ) ℓ j σ − 1 ( w ˉ q j ) z ˉ ℓ , θ q ⊥ ⊥ span { z ˉ j } j ∈ { G , A } . Thus θ \theta θ is equivalently parameterized by ( w ˉ , θ ⊥ ) (\bar{w},\theta^\perp) ( w ˉ , θ ⊥ ) . Moreover,
∥ θ q ∥ 2 ≤ ∥ θ q ⊥ ∥ 2 + 2 λ min ( Z ) max j log 1 w ˉ q j . \|\theta_q\|_2 \le\|\theta_q^{\perp}\|_2+\sqrt{\frac{2}{\lambda_{\min}(Z)}}\max_j\log\frac{1}{\bar{w}_{qj}}. ∥ θ q ∥ 2 ≤ ∥ θ q ⊥ ∥ 2 + λ m i n ( Z ) 2 j max log w ˉ q j 1 .
Proof. Taking the inner product of θ q ∥ \theta_q^{\parallel} θ q ∥ with z ˉ j \bar{z}_j z ˉ j gives σ − 1 ( w ˉ q j ) = ⟨ θ q , z ˉ j ⟩ \sigma^{-1}(\bar{w}_{qj})=\langle\theta_q,\bar{z}_j\rangle σ − 1 ( w ˉ q j ) = ⟨ θ q , z ˉ j ⟩ , so the stated decomposition is orthogonal. Moreover,
∥ θ q ∥ ∥ 2 2 = ∑ i , j σ − 1 ( w ˉ q i ) ( Z − 1 ) i j σ − 1 ( w ˉ q j ) ≤ 1 λ min ( Z ) ∑ j ∣ σ − 1 ( w ˉ q j ) ∣ 2 . \left\|\theta_q^{\parallel}\right\|_2^2=\sum_{i,j}\sigma^{-1}(\bar{w}_{qi})(Z^{-1})_{ij}\sigma^{-1}(\bar{w}_{qj})\leq\frac{1}{\lambda_{\min}(Z)}\sum_j\left|\sigma^{-1}(\bar{w}_{qj})\right|^2. θ q ∥ 2 2 = i , j ∑ σ − 1 ( w ˉ q i ) ( Z − 1 ) ij σ − 1 ( w ˉ q j ) ≤ λ m i n ( Z ) 1 j ∑ σ − 1 ( w ˉ q j ) 2 .
The conclusion follows from the triangle inequality and ∣ log ( p / ( 1 − p ) ) ∣ ≤ log ( 1 / ( p ( 1 − p ) ) ) \left|\log(p/(1-p))\right|\leq\log(1/(p(1-p))) ∣ log ( p / ( 1 − p )) ∣ ≤ log ( 1/ ( p ( 1 − p ))) for 0 < p < 1 0<p<1 0 < p < 1 . □
For the truncated flow, θ ˙ q \dot{\theta}_q θ ˙ q lies in span { z ˉ j } j ∈ { G , A } \operatorname{span}\{\bar{z}_j\}_{j\in\{\mathrm{G},\mathrm{A}\}} span { z ˉ j } j ∈ { G , A } , so θ q ⊥ ( t ) = θ q ⊥ ( 0 ) \theta_q^{\perp}(t)=\theta_q^{\perp}(0) θ q ⊥ ( t ) = θ q ⊥ ( 0 ) . Under the assumptions of Lemma D.10, the full flow also has ∥ θ q ⊥ ( t ) ∥ 2 = O ( 1 ) \left\|\theta_q^{\perp}(t)\right\|_2=O(1) θ q ⊥ ( t ) 2 = O ( 1 ) for t c r i t ≤ t ≤ t θ t_{\mathrm{crit}}\leq t\leq t_\theta t crit ≤ t ≤ t θ .
Definition B.6 (Truncated loss). For fixed λ \lambda λ , define the bias loss
L b i a s ( θ ) = σ μ 2 4 ∑ j ( w ˉ 1 j + w ˉ 2 j − 1 ) 2 . \mathcal{L}^{\mathrm{bias}}(\theta)=\frac{\sigma_\mu^2}{4}\sum_j(\bar{w}_{1j}+\bar{w}_{2j}-1)^2. L bias ( θ ) = 4 σ μ 2 j ∑ ( w ˉ 1 j + w ˉ 2 j − 1 ) 2 .
and recall the truncated loss from (7)
L t r u n c a t e d ( θ ) = 1 4 ∑ j [ σ μ 2 ( ∑ k = 1 2 w ˉ k j − 1 ) 2 + 1 n w ˉ ⋅ j T Σ ( j ) w ˉ ⋅ j ] . \mathcal{L}^{\mathrm{truncated}}(\theta)=\frac{1}{4}\sum_j\left[\sigma_\mu^2\left(\sum_{k=1}^{2}\bar{w}_{kj}-1\right)^2+\frac{1}{n}\bar{w}_{\cdot j}^{\mathsf T}\Sigma^{(j)}\bar{w}_{\cdot j}\right]. L truncated ( θ ) = 4 1 j ∑ σ μ 2 ( k = 1 ∑ 2 w ˉ k j − 1 ) 2 + n 1 w ˉ ⋅ j T Σ ( j ) w ˉ ⋅ j .
Lemma B.7 (Stationary points of the truncated flow). Fix λ \lambda λ and σ μ 2 > 0 \sigma_\mu^2>0 σ μ 2 > 0 , suppose the expert hierarchy of Definition B.1 holds, and let k j k_j k j denote the better expert in family j j j . Let e 1 = ( 1 , 0 ) T e_1=(1,0)^{\mathsf T} e 1 = ( 1 , 0 ) T , e 2 = ( 0 , 1 ) T e_2=(0,1)^{\mathsf T} e 2 = ( 0 , 1 ) T , and suppose Z ≻ 0 Z\succ0 Z ≻ 0 . The truncated flow is
w ˉ ˙ q k = − 1 2 w ˉ q k ′ ∑ j Z j k w ˉ q j ′ S q j ( w ˉ ) , \dot{\bar{w}}_{qk}=-\frac{1}{2}\bar{w}_{qk}^{\prime}\sum_j Z_{jk}\bar{w}_{qj}^{\prime}S_{qj}(\bar{w}), w ˉ ˙ q k = − 2 1 w ˉ q k ′ j ∑ Z j k w ˉ q j ′ S q j ( w ˉ ) , S q j ( w ˉ ) = σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) + 1 n ∑ i = 1 2 Σ q i ( j ) w ˉ i j . S_{qj}(\bar{w})=\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)+\frac{1}{n}\sum_{i=1}^{2}\Sigma_{qi}^{(j)}\bar{w}_{ij}. S q j ( w ˉ ) = σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) + n 1 i = 1 ∑ 2 Σ q i ( j ) w ˉ ij . Its stationary points form the set
S = { w ˉ ∘ ∈ [ 0 , 1 ] 2 × 2 : w ˉ q j ∘ ( 1 − w ˉ q j ∘ ) S q j ( w ˉ ∘ ) = 0 for all q , j } , \mathcal{S}=\left\{\bar{w}^{\circ}\in[0,1]^{2\times2}:\bar{w}_{qj}^{\circ}(1-\bar{w}_{qj}^{\circ})S_{qj}(\bar{w}^{\circ})=0\text{ for all }q,j\right\}, S = { w ˉ ∘ ∈ [ 0 , 1 ] 2 × 2 : w ˉ q j ∘ ( 1 − w ˉ q j ∘ ) S q j ( w ˉ ∘ ) = 0 for all q , j } , with
w ˉ ∘ ∈ S ⟺ w ˉ ⋅ j ∘ ∈ { 0 , e 1 , e 2 , e 1 + e 2 , n σ μ 2 n σ μ 2 + Σ 11 ( j ) e 1 , n σ μ 2 n σ μ 2 + Σ 22 ( j ) e 2 } ( j ∈ { G , A } ) . \bar{w}^{\circ}\in\mathcal{S}\quad\Longleftrightarrow\quad\bar{w}_{\cdot j}^{\circ}\in\left\{0,e_1,e_2,e_1+e_2,\frac{n\sigma_\mu^2}{n\sigma_\mu^2+\Sigma_{11}^{(j)}}e_1,\frac{n\sigma_\mu^2}{n\sigma_\mu^2+\Sigma_{22}^{(j)}}e_2\right\}\quad(j\in\{\mathrm{G},\mathrm{A}\}). w ˉ ∘ ∈ S ⟺ w ˉ ⋅ j ∘ ∈ { 0 , e 1 , e 2 , e 1 + e 2 , n σ μ 2 + Σ 11 ( j ) n σ μ 2 e 1 , n σ μ 2 + Σ 22 ( j ) n σ μ 2 e 2 } ( j ∈ { G , A }) . The unique optimum is
w ˉ ⋅ j ∗ = n σ μ 2 n σ μ 2 + Σ k j k j ( j ) e k j , \bar{w}_{\cdot j}^{*}=\frac{n\sigma_\mu^2}{n\sigma_\mu^2+\Sigma_{k_jk_j}^{(j)}}e_{k_j}, w ˉ ⋅ j ∗ = n σ μ 2 + Σ k j k j ( j ) n σ μ 2 e k j , arg min w ˉ ∈ [ 0 , 1 ] 2 × 2 L t r u n c a t e d ( w ˉ ) = { w ˉ ∗ } . \underset{\bar{w}\in[0,1]^{2\times2}}{\arg\min}\ \mathcal{L}^{\mathrm{truncated}}(\bar{w})=\{\bar{w}^{*}\}. w ˉ ∈ [ 0 , 1 ] 2 × 2 arg min L truncated ( w ˉ ) = { w ˉ ∗ } . Proof. See Section D.3.1. □
Lemma B.8 (Convergence to the critical manifold). Consider the unperturbed flow
θ ˙ = − ∇ θ L b i a s . \dot{\theta}=-\nabla_\theta\mathcal{L}^{\mathrm{bias}}. θ ˙ = − ∇ θ L bias . Assume Z ≻ 0 Z\succ0 Z ≻ 0 , fixed σ μ 2 > 0 \sigma_\mu^2>0 σ μ 2 > 0 , and initialization θ ( 0 ) \theta(0) θ ( 0 ) such that max q , j ∣ w ˉ q j ( 0 ) − 1 / 2 ∣ ≤ δ \max_{q,j}|\bar{w}_{qj}(0)-1/2|\leq\delta max q , j ∣ w ˉ q j ( 0 ) − 1/2∣ ≤ δ for sufficiently small δ \delta δ . Then all gates remain in [ 1 / 4 , 3 / 4 ] [1/4,3/4] [ 1/4 , 3/4 ] , and
max j ∣ w ˉ 1 j ( t ) + w ˉ 2 j ( t ) − 1 ∣ ≤ C δ e − α t , α = 9 σ μ 2 λ min ( Z ) 256 . \max_j|\bar{w}_{1j}(t)+\bar{w}_{2j}(t)-1|\leq C\delta e^{-\alpha t},\qquad\alpha=\frac{9\sigma_\mu^2\lambda_{\min}(Z)}{256}. j max ∣ w ˉ 1 j ( t ) + w ˉ 2 j ( t ) − 1∣ ≤ C δ e − α t , α = 256 9 σ μ 2 λ m i n ( Z ) .
For the truncated flow at fixed λ \lambda λ , there is also a time t c r i t = O ( log n ) t_{\mathrm{crit}} = \mathcal{O}(\log n) t crit = O ( log n ) such that all gates remain in [ 1 / 4 , 3 / 4 ] [1/4, 3/4] [ 1/4 , 3/4 ] up to t c r i t t_{\mathrm{crit}} t crit and
max j ∣ w ˉ 1 j ( t c r i t ) + w ˉ 2 j ( t c r i t ) − 1 ∣ = O ( n − 1 ) . \max_j \left|\bar{w}_{1j}(t_{\mathrm{crit}}) + \bar{w}_{2j}(t_{\mathrm{crit}}) - 1\right| = \mathcal{O}(n^{-1}). j max ∣ w ˉ 1 j ( t crit ) + w ˉ 2 j ( t crit ) − 1 ∣ = O ( n − 1 ) .
The same conclusion at t c r i t t_{\mathrm{crit}} t crit holds for the full population flow at fixed λ \lambda λ if max q ∥ θ q ( 0 ) ∥ 2 \max_q \|\theta_q(0)\|_2 max q ∥ θ q ( 0 ) ∥ 2 is bounded independently of n n n . Under this initialization bound and the data conditions of Lemma D.4, fix ϵ > 0 \epsilon> 0 ϵ > 0 and sample m = Ω ~ ( n 1 + ϵ ) m = \widetilde{\Omega}(n^{1+\epsilon}) m = Ω ( n 1 + ϵ ) independent tasks, with m ∈ poly ( n ) m \in\operatorname{poly}(n) m ∈ poly ( n ) . With probability at least 1 − 1 / n 1 - 1/n 1 − 1/ n , the empirical flow θ ˙ = − ∇ θ L ^ m \dot{\theta} = -\nabla_\theta\widehat{\mathcal{L}}_m θ ˙ = − ∇ θ L m has the same conclusion at t c r i t = O ( log n ) t_{\mathrm{crit}} = \mathcal{O}(\log n) t crit = O ( log n ) , with all gates in [ 1 / 4 , 3 / 4 ] [1/4, 3/4] [ 1/4 , 3/4 ] and sup 0 ≤ t ≤ t c r i t ∥ θ ( t ) ∥ 2 = O ( 1 ) \sup_{0 \le t \le t_{\mathrm{crit}}} \|\theta(t)\|_2 = \mathcal{O}(1) sup 0 ≤ t ≤ t crit ∥ θ ( t ) ∥ 2 = O ( 1 ) . Constants are independent of n n n , but may depend on σ μ 2 \sigma_\mu^2 σ μ 2 , Z Z Z , and the fixed λ \lambda λ , ω \omega ω .
Proof. See Section D.3.2.
Lemma B.9 (Convergence below loss barrier). Fix λ \lambda λ independently of n n n and suppose the strict expert hierarchy holds. Assume Z ≻ 0 Z \succ0 Z ≻ 0 and Z G A < min { Z G G , Z A A } Z_{\mathrm{GA}} < \min\{Z_{\mathrm{GG}}, Z_{\mathrm{AA}}\} Z GA < min { Z GG , Z AA } . Suppose
w ˉ ( t c r i t ) ∈ [ 1 / 4 , 3 / 4 ] 2 × 2 , n σ μ 2 max j ∣ w ˉ 1 j ( t c r i t ) + w ˉ 2 j ( t c r i t ) − 1 ∣ ≤ C 0 , \bar{w}(t_{\mathrm{crit}}) \in[1/4, 3/4]^{2 \times2}, \qquad n\sigma_\mu^2 \max_j \left|\bar{w}_{1j}(t_{\mathrm{crit}}) + \bar{w}_{2j}(t_{\mathrm{crit}}) - 1\right| \le C_0, w ˉ ( t crit ) ∈ [ 1/4 , 3/4 ] 2 × 2 , n σ μ 2 j max ∣ w ˉ 1 j ( t crit ) + w ˉ 2 j ( t crit ) − 1 ∣ ≤ C 0 , with C 0 C_0 C 0 independent of n n n . For the truncated flow and fixed σ μ 2 > 0 \sigma_\mu^2 > 0 σ μ 2 > 0 , there exist S , κ > 0 S, \kappa> 0 S , κ > 0 , independent of n n n , such that, for sufficiently large n n n ,
L t r u n c a t e d ( w ˉ ( t c r i t + n S ) ) < L t r u n c a t e d ( w ˉ ∘ ) − κ n \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}} + nS)) < \mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ}) - \frac{\kappa}{n} L truncated ( w ˉ ( t crit + n S )) < L truncated ( w ˉ ∘ ) − n κ for every
w ˉ ∘ ∈ { ( 1 1 0 0 ) , ( 0 0 1 1 ) , ( 0 1 1 0 ) } . (15) \bar{w}^{\circ} \in\left\{
\begin{pmatrix} 1 & 1 \\ 0 & 0 \end{pmatrix},
\begin{pmatrix} 0 & 0 \\ 1 & 1 \end{pmatrix},
\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}
\right\}. \tag*{(15)} w ˉ ∘ ∈ { ( 1 0 1 0 ) , ( 0 1 0 1 ) , ( 0 1 1 0 ) } . (15) For the full population flow, assume also that max q ∥ θ q ⊥ ( t c r i t ) ∥ 2 \max_q \|\theta_q^{\perp}(t_{\mathrm{crit}})\|_2 max q ∥ θ q ⊥ ( t crit ) ∥ 2 is bounded independently of n n n and σ μ 2 \sigma_\mu^2 σ μ 2 . For sufficiently small fixed σ μ 2 > 0 \sigma_\mu^2 > 0 σ μ 2 > 0 and then sufficiently large n n n , both L t r u n c a t e d ( w ˉ ( t c r i t + n S ) ) \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}} + nS)) L truncated ( w ˉ ( t crit + n S )) and L ( θ ( t c r i t + n S ) ) \mathcal{L}(\theta(t_{\mathrm{crit}}+nS)) L ( θ ( t crit + n S )) satisfy the same upper bound. Under these assumptions and the data and sample-size conditions of the empirical part of Lemma B.8, the same conclusions hold for the empirical flow with probability at least 1 − 1 / n 1 - 1/n 1 − 1/ n , uniformly over possibly data-dependent initial parameters satisfying the stated bounds. For the full population and empirical flows, sup t c r i t ≤ t ≤ t c r i t + n S ∥ θ ( t ) ∥ 2 = O ( 1 ) \sup_{t_{\mathrm{crit}} \le t \le t_{\mathrm{crit}}+nS} \|\theta(t)\|_2 = \mathcal{O}(1) sup t crit ≤ t ≤ t crit + n S ∥ θ ( t ) ∥ 2 = O ( 1 ) , with a bound independent of n n n and sufficiently small σ μ 2 \sigma_\mu^2 σ μ 2 .
Proof. See Section D.3.3.
Lemma B.10 (Flow at fixed λ \lambda λ ). Fix λ \lambda λ independently of n n n and suppose the strict inequalities in Definition B.1 hold. Assume Z ≻ 0 Z \succ0 Z ≻ 0 , Z G A ≥ 0 Z_{\mathrm{GA}} \ge0 Z GA ≥ 0 , and fixed σ μ 2 > 0 \sigma_\mu^2 > 0 σ μ 2 > 0 . Use Lemma B.7 with k G = 1 k_{\mathrm{G}} = 1 k G = 1 and k A = 2 k_{\mathrm{A}} = 2 k A = 2 . Suppose w ˉ ( t c r i t ) ∈ ( 0 , 1 ) 2 × 2 \bar{w}(t_{\mathrm{crit}}) \in(0,1)^{2 \times2} w ˉ ( t crit ) ∈ ( 0 , 1 ) 2 × 2 , L t r u n c a t e d ( w ˉ ( t c r i t ) ) = O ( 1 / n ) \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})) = \mathcal{O}(1/n) L truncated ( w ˉ ( t crit )) = O ( 1/ n ) , and, for some fixed κ > 0 \kappa> 0 κ > 0 ,
L t r u n c a t e d ( w ˉ ( t c r i t ) ) ≤ L t r u n c a t e d ( w ˉ ∘ ) − κ n \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})) \le\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ}) - \frac{\kappa}{n} L truncated ( w ˉ ( t crit )) ≤ L truncated ( w ˉ ∘ ) − n κ for every w ˉ ∘ \bar{w}^{\circ} w ˉ ∘ in (15). For sufficiently large n n n , the truncated flow reaches a finite time t θ ≥ t c r i t t_\theta\ge t_{\mathrm{crit}} t θ ≥ t crit with
∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 2 ≤ 1 n + Σ k j ( j ) n σ μ 2 + Σ k j ( j ) = O ( n − 1 ) . \|\bar{w}_{\cdot j}(t_\theta) - e_{k_j}\|_2 \le\frac{1}{n} + \frac{\Sigma_{k_j}^{(j)}}{n\sigma_\mu^2 + \Sigma_{k_j}^{(j)}} = \mathcal{O}(n^{-1}). ∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 2 ≤ n 1 + n σ μ 2 + Σ k j ( j ) Σ k j ( j ) = O ( n − 1 ) . For the full population flow, assume that ∥ θ ( t c r i t ) ∥ 2 \|\theta(t_{\mathrm{crit}})\|_2 ∥ θ ( t crit ) ∥ 2 and n L t r u n c a t e d ( w ˉ ( t c r i t ) ) n\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})) n L truncated ( w ˉ ( t crit )) are bounded independently of n n n and σ μ 2 \sigma_\mu^2 σ μ 2 . For sufficiently small fixed σ μ 2 > 0 \sigma_\mu^2 > 0 σ μ 2 > 0 and then sufficiently large n n n , let C 0 C_0 C 0 be the constant from Lemma D.10 and set
ρ = C 0 n σ μ 2 . \rho= \frac{C_0}{n\sigma_\mu^2}. ρ = n σ μ 2 C 0 . There is a time t θ ≤ t c r i t + 2 C 0 2 n σ μ 2 t_\theta\le t_{\mathrm{crit}} + 2C_0^2 n\sigma_\mu^2 t θ ≤ t crit + 2 C 0 2 n σ μ 2 with
∥ w ˉ ⋅ j ( t θ ) − w ˉ ⋅ j ∗ ∥ 2 ≤ ρ + Σ k j ( j ) n σ μ 2 + Σ k j ( j ) , L t r u n c a t e d ( w ˉ ( t θ ) ) ≤ L t r u n c a t e d ( w ˉ ( t c r i t ) ) . \|\bar{w}_{\cdot j}(t_\theta) - \bar{w}_{\cdot j}^{*}\|_2 \le\rho+ \frac{\Sigma_{k_j}^{(j)}}{n\sigma_\mu^2 + \Sigma_{k_j}^{(j)}}, \qquad\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_\theta)) \le\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})). ∥ w ˉ ⋅ j ( t θ ) − w ˉ ⋅ j ∗ ∥ 2 ≤ ρ + n σ μ 2 + Σ k j ( j ) Σ k j ( j ) , L truncated ( w ˉ ( t θ )) ≤ L truncated ( w ˉ ( t crit )) . In particular, the gate error is O ( n − 1 ) \mathcal{O}(n^{-1}) O ( n − 1 ) , and sup t c r i t ≤ t ≤ t θ ∥ θ ( t ) ∥ 2 = O ( log n ) \sup_{t_{\mathrm{crit}} \le t \le t_\theta} \|\theta(t)\|_2 = \mathcal{O}(\log n) sup t crit ≤ t ≤ t θ ∥ θ ( t ) ∥ 2 = O ( log n ) .
Proof. See Section D.3.4.
Lemma B.11 (Empirical flow at fixed λ \lambda λ ). Assume the data conditions of Lemma D.4 and the full-flow assumptions of Lemma B.10, with ∥ θ ( t c r i t ) ∥ 2 ≤ B \lVert\theta(t_{\mathrm{crit}})\rVert_2 \le B ∥ θ ( t crit ) ∥ 2 ≤ B and N t r u n c a t e d ( w ˉ ( t c r i t ) ) ≤ c \mathcal{N}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})) \le c N truncated ( w ˉ ( t crit )) ≤ c . Let C 0 C_0 C 0 and ρ \rho ρ be as there. Fix ϵ > 0 \epsilon> 0 ϵ > 0 and sample m m m independent tasks according to Definition 2.1, where m ∈ poly ( n ) m \in\operatorname{poly}(n) m ∈ poly ( n ) and
m ≥ n 1 + ϵ . m \ge n^{1+\epsilon}. m ≥ n 1 + ϵ . Consider θ ˙ = − ∇ θ L ^ m \dot{\theta}=-\nabla_\theta\widehat{\mathcal{L}}_m θ ˙ = − ∇ θ L m from possibly data-dependent parameters θ ( t c r i t ) \theta(t_{\mathrm{crit}}) θ ( t crit ) satisfying these assumptions. For sufficiently large n n n , with probability at least 1 − 1 / n 1-1/n 1 − 1/ n , there is a time t θ ≤ t c r i t + 2 C 0 2 n 2 σ μ 2 t_\theta\le t_{\mathrm{crit}}+2C_0^2n^2\sigma_\mu^2 t θ ≤ t crit + 2 C 0 2 n 2 σ μ 2 with
∥ w ˉ ⋅ j ( t θ ) − w ˉ ⋅ j ∗ ∥ 2 ≤ ρ + Σ k j k j ( j ) n σ μ 2 + Σ k j k j ( j ) , L t r u n c a t e d ( w ˉ ( t θ ) ) ≤ L t r u n c a t e d ( w ˉ ( t c r i t ) ) , \lVert\bar{w}_{\cdot j}(t_\theta)-\bar{w}^{*}_{\cdot j}\rVert_2
\le\rho+\frac{\Sigma^{(j)}_{k_jk_j}}{n\sigma_\mu^2+\Sigma^{(j)}_{k_jk_j}},
\qquad
\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_\theta))
\le\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})), ∥ w ˉ ⋅ j ( t θ ) − w ˉ ⋅ j ∗ ∥ 2 ≤ ρ + n σ μ 2 + Σ k j k j ( j ) Σ k j k j ( j ) , L truncated ( w ˉ ( t θ )) ≤ L truncated ( w ˉ ( t crit )) , sup t c r i t ≤ t ≤ t θ ∥ θ ( t ) ∥ 2 ≤ B + 3 C 0 log ( 1 + c n σ μ 2 ) = O ( log n ) , sup t c r i t ≤ t ≤ t θ ∥ θ q ⊥ ( t ) ∥ 2 = O ( 1 ) , \sup_{t_{\mathrm{crit}}\le t\le t_\theta}\lVert\theta(t)\rVert_2
\le B+3C_0\log(1+cn\sigma_\mu^2)=O(\log n),
\qquad
\sup_{t_{\mathrm{crit}}\le t\le t_\theta}\lVert\theta_q^\perp(t)\rVert_2=O(1), t crit ≤ t ≤ t θ sup ∥ θ ( t ) ∥ 2 ≤ B + 3 C 0 log ( 1 + c n σ μ 2 ) = O ( log n ) , t crit ≤ t ≤ t θ sup ∥ θ q ⊥ ( t ) ∥ 2 = O ( 1 ) , and
L ( θ ( t θ ) ) = O ( n − 1 ) , L ^ m ( θ ( t θ ) ) = O ( n − 1 ) . \mathcal{L}(\theta(t_\theta))=O(n^{-1}),
\qquad
\widehat{\mathcal{L}}_m(\theta(t_\theta))=O(n^{-1}). L ( θ ( t θ )) = O ( n − 1 ) , L m ( θ ( t θ )) = O ( n − 1 ) .
Proof. See Section D.3.5.
Proof of the GLU part of Lemma 3.3
Proof of the GLU part of Lemma 3.3. Since λ \lambda λ is fixed in the first stage, λ ( t θ ) = λ ( 0 ) \lambda(t_\theta)=\lambda(0) λ ( t θ ) = λ ( 0 ) , and ∣ λ k ( 0 ) ∣ ≤ 1 |\lambda_k(0)|\le1 ∣ λ k ( 0 ) ∣ ≤ 1 lies in the ranges of Lemma B.2, Lemma B.3 and Lemma B.4 for sufficiently large n n n . By those lemmas, 0 < ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ 0<|\lambda_1(0)|<|\lambda_2(0)| 0 < ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ makes expert 1 better in family G and expert 2 better in family A. Under this hierarchy and w ˉ 1 j + w ˉ 2 j = 1 \bar{w}_{1j}+\bar{w}_{2j}=1 w ˉ 1 j + w ˉ 2 j = 1 , selecting the better expert minimizes the variance in family j j j . Lemma F.5 gives Z ≻ 0 Z\succ0 Z ≻ 0 , Z G A ≥ 0 Z_{\mathrm{GA}}\ge0 Z GA ≥ 0 and Z G A < min { Z G G , Z A A } Z_{\mathrm{GA}}<\min\{Z_{\mathrm{GG}},Z_{\mathrm{AA}}\} Z GA < min { Z GG , Z AA } for d ≥ 3 d\ge3 d ≥ 3 , almost surely over ω \omega ω .
Apply Lemma B.8 to obtain the gate and parameter bounds at t c r i t t_{\mathrm{crit}} t crit . Then Lemma B.9 gives, at t c r i t + n S t_{\mathrm{crit}}+nS t crit + n S , the loss bound below every suboptimal corner and ∥ θ ( t c r i t + n S ) ∥ 2 = O ( 1 ) \lVert\theta(t_{\mathrm{crit}}+nS)\rVert_2=O(1) ∥ θ ( t crit + n S ) ∥ 2 = O ( 1 ) . Since the loss at each such corner is O ( n − 1 ) O(n^{-1}) O ( n − 1 ) , these bounds supply the entry assumptions of Lemma B.11, with its initial time shifted to t c r i t + n S t_{\mathrm{crit}}+nS t crit + n S . Since m = Ω ~ ( n 1 + ϵ ) ≥ n 1 + ϵ / 2 m=\widetilde{\Omega}(n^{1+\epsilon})\ge n^{1+\epsilon/2} m = Ω ( n 1 + ϵ ) ≥ n 1 + ϵ /2 for sufficiently large n n n , apply that lemma with ϵ / 2 \epsilon/2 ϵ /2 in place of ϵ \epsilon ϵ to obtain a finite time t θ t_\theta t θ with ∥ w ˉ ⋅ j ( t θ ) − w ˉ ⋅ j ∗ ∥ 2 = O ( n − 1 ) \lVert\bar{w}_{\cdot j}(t_\theta)-\bar{w}^{*}_{\cdot j}\rVert_2=O(n^{-1}) ∥ w ˉ ⋅ j ( t θ ) − w ˉ ⋅ j ∗ ∥ 2 = O ( n − 1 ) and max q ∥ θ q ( t θ ) ∥ 2 = O ( log n ) \max_q\lVert\theta_q(t_\theta)\rVert_2=O(\log n) max q ∥ θ q ( t θ ) ∥ 2 = O ( log n ) . Lemma B.7 gives ∥ w ˉ ⋅ j ∗ − e k j ∥ 1 = O ( n − 1 ) \lVert\bar{w}^{*}_{\cdot j}-e_{k_j}\rVert_1=O(n^{-1}) ∥ w ˉ ⋅ j ∗ − e k j ∥ 1 = O ( n − 1 ) , so
max { ∥ w ˉ ⋅ G ( t θ ) − e 1 ∥ 1 , ∥ w ˉ ⋅ A ( t θ ) − e 2 ∥ 1 } = O ( n − 1 ) . \max\{\lVert\bar{w}_{\cdot G}(t_\theta)-e_1\rVert_1,\lVert\bar{w}_{\cdot A}(t_\theta)-e_2\rVert_1\}=O(n^{-1}). max {∥ w ˉ ⋅ G ( t θ ) − e 1 ∥ 1 , ∥ w ˉ ⋅ A ( t θ ) − e 2 ∥ 1 } = O ( n − 1 ) .
The probability that any of these first-stage conclusions fails is O ( n − 1 ) O(n^{-1}) O ( n − 1 ) .
Attention-expert dynamics
Corollary B.12 (Accuracy with fixed gating parameters). Under the assumptions of Lemma 3.4, stop training λ \lambda λ at t λ t_\lambda t λ . For sufficiently large n n n , with probability at least 1 − η 1-\eta 1 − η , the mean-squared errors on independent test samples satisfy
E G [ ( μ ^ − μ ) 2 ] = 1 + o ( 1 ) n , E A [ ( μ ^ − μ ) 2 ] = { O ( n − 2 + ϵ ) , Uniform , O ( σ n 2 / n ) , Gaussian mixture . \mathbb{E}_{\mathrm{G}}[(\hat{\mu}-\mu)^2]=\frac{1+o(1)}{n},
\qquad
\mathbb{E}_{\mathrm{A}}[(\hat{\mu}-\mu)^2]
=
\begin{cases}
O(n^{-2+\epsilon}), & \text{Uniform},\\
O(\sigma_n^2/n), & \text{Gaussian mixture}.
\end{cases} E G [( μ ^ − μ ) 2 ] = n 1 + o ( 1 ) , E A [( μ ^ − μ ) 2 ] = { O ( n − 2 + ϵ ) , O ( σ n 2 / n ) , Uniform , Gaussian mixture .
Proof. See Section D.3.6.
Theorem assembly
Proof of Theorem 3.1. Apply Lemma 3.3 for the respective architecture and freeze the gating parameters at t θ t_\theta t θ . For the softmax MoE, represent the frozen weights by the sigmoid parameters ( θ 1 − θ 2 , θ 2 − θ 1 ) (\theta_1-\theta_2,\theta_2-\theta_1) ( θ 1 − θ 2 , θ 2 − θ 1 ) , which retain the O ( log n ) O(\log n) O ( log n ) norm bound and give the same loss for every λ \lambda λ . Since λ ( t θ ) = λ ( 0 ) \lambda(t_\theta)=\lambda(0) λ ( t θ ) = λ ( 0 ) , the expert parameters retain their initialization bounds, and m = Ω ~ ( n 1 + ϵ ) m=\widetilde{\Omega}(n^{1+\epsilon}) m = Ω ( n 1 + ϵ ) satisfies the sample-size requirement of Lemma 3.4. Its uniform conclusion applies to the data-dependent parameters at t ϑ t_{\vartheta} t ϑ using the same training tasks and gives a finite target time t λ t_{\lambda} t λ . Finally, Corollary B.12 gives the stated test risks at t λ t_{\lambda} t λ , with joint probability at least 1 − η 1-\eta 1 − η by the failure bounds below. The bounds at fixed μ \mu μ follow from the translation identities in Section D.3.6.
Under Definition 2.2 , after relabeling, 0 < ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ 0 < |\lambda_1(0)| < |\lambda_2(0)| 0 < ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ almost surely and P ( ∣ λ 2 ( 0 ) ∣ < C − 1 ) = C − 2 \mathbb{P}(|\lambda_2(0)| < C^{-1}) = C^{-2} P ( ∣ λ 2 ( 0 ) ∣ < C − 1 ) = C − 2 . For sufficiently large C > 1 C > 1 C > 1 , independent of n n n , both C − 2 ≤ η / 4 C^{-2} \le\eta/4 C − 2 ≤ η /4 and P ( max q ∥ θ q ( 0 ) ∥ 2 > C ) ≤ η / 4 \mathbb{P}(\max_q \|\theta_q(0)\|_2 > C) \le\eta/4 P ( max q ∥ θ q ( 0 ) ∥ 2 > C ) ≤ η /4 . For the GLU, choose σ θ 2 \sigma_\theta^2 σ θ 2 sufficiently small that P ( max q ∥ θ q ( 0 ) ∥ 2 > min { C , 4 δ } ) ≤ η / 4 \mathbb{P}(\max_q \|\theta_q(0)\|_2 > \min\{C,4\delta\}) \le\eta/4 P ( max q ∥ θ q ( 0 ) ∥ 2 > min { C , 4 δ }) ≤ η /4 , where δ > 0 \delta> 0 δ > 0 is the sufficiently small constant in Lemma B.8. On the complementary event, max q , j ∣ w ˉ q j ( 0 ) − 1 / 2 ∣ ≤ δ \max_{q,j} |\bar{w}_{qj}(0)-1/2| \le\delta max q , j ∣ w ˉ q j ( 0 ) − 1/2∣ ≤ δ , since ∥ z ˉ j ∥ 2 = 1 \|\bar{z}_j\|_2 = 1 ∥ z ˉ j ∥ 2 = 1 and ∣ σ ( u ) − 1 / 2 ∣ ≤ ∣ u ∣ / 4 |\sigma(u)-1/2| \le|u|/4 ∣ σ ( u ) − 1/2∣ ≤ ∣ u ∣/4 . Thus the required initialization bounds hold jointly with probability at least 1 − η / 2 1-\eta/2 1 − η /2 . For sufficiently large n n n , the remaining failure probabilities are at most η / 4 \eta/4 η /4 per training stage, giving probability at least 1 − η 1-\eta 1 − η in both Lemma 3.3 and Theorem 3.1 . □
Accuracy of the final estimator
Proof of Lemma 3.5. It suffices to consider sigmoid gates, since for K = 2 K=2 K = 2 the softmax weights equal the sigmoid weights with parameters ( θ 1 − θ 2 , θ 2 − θ 1 ) (\theta_1-\theta_2,\theta_2-\theta_1) ( θ 1 − θ 2 , θ 2 − θ 1 ) , whose norms are still O ( log n ) O(\log n) O ( log n ) . Since h ( X + μ 1 , a ) = h ( X , a ) + μ h(X+\mu\mathbf{1},a)=h(X,a)+\mu h ( X + μ 1 , a ) = h ( X , a ) + μ , centering the feature coordinates removes the location exactly:
z ( X + μ 1 ) = z ( X ) . z(X+\mu\mathbf{1})=z(X). z ( X + μ 1 ) = z ( X ) .
Thus z z z and the gates depend only on the centered observations and are independent of μ \mu μ . Each centered feature satisfies
h ( X , ω r ) − μ = n − 1 ∑ ℓ = 1 n e ω r ( X ℓ − μ ) ( X ℓ − μ ) n − 1 ∑ ℓ = 1 n e ω r ( X ℓ − μ ) . h(X,\omega_r)-\mu=
\frac{n^{-1}\sum_{\ell=1}^{n}e^{\omega_r(X_\ell-\mu)}(X_\ell-\mu)}
{n^{-1}\sum_{\ell=1}^{n}e^{\omega_r(X_\ell-\mu)}}. h ( X , ω r ) − μ = n − 1 ∑ ℓ = 1 n e ω r ( X ℓ − μ ) n − 1 ∑ ℓ = 1 n e ω r ( X ℓ − μ ) ( X ℓ − μ ) .
The summands have finite moments of every order, uniformly in n n n also for the Gaussian mixture, since its laws are uniformly 1-sub-Gaussian and ω \omega ω is fixed. The population denominators are positive, and by Lemma F.5 the centered population feature norms are bounded below, so the normalization map is locally Lipschitz there. Moment bounds for the empirical averages therefore give
E j [ ∥ Δ z ∥ 2 2 p ] = O ( n − p ) \mathbb{E}_j\left[\|\Delta z\|_2^{2p}\right]=O(n^{-p}) E j [ ∥Δ z ∥ 2 2 p ] = O ( n − p )
for every fixed integer p ≥ 1 p\ge1 p ≥ 1 : on a fixed neighborhood of the population averages this follows from local Lipschitz continuity, and outside that neighborhood it follows from ∥ Δ z ∥ 2 ≤ 2 \|\Delta z\|_2\le2 ∥Δ z ∥ 2 ≤ 2 and Markov’s inequality applied to the averages. Using max k ∥ θ k ∥ 2 ≤ C log n \max_k\|\theta_k\|_2\le C\log n max k ∥ θ k ∥ 2 ≤ C log n , another application of Markov’s inequality gives
P [ max k ∣ ⟨ θ k , Δ z ⟩ ∣ > 1 ∣ τ = j ] = O ( n − p ( log n ) 2 p ) . \mathbb{P}\left[\max_k|\langle\theta_k,\Delta z\rangle|>1\mid\tau=j\right]
=O\left(n^{-p}(\log n)^{2p}\right). P [ k max ∣ ⟨ θ k , Δ z ⟩ ∣ > 1 ∣ τ = j ] = O ( n − p ( log n ) 2 p ) .
Since max k ∣ ⟨ θ k , Δ z ⟩ ∣ ≤ 2 C log n \max_k|\langle\theta_k,\Delta z\rangle|\le2C\log n max k ∣ ⟨ θ k , Δ z ⟩ ∣ ≤ 2 C log n , splitting at the event above and choosing p > 8 C p>8C p > 8 C gives
E j [ exp ( 4 max k ∣ ⟨ θ k , Δ z ⟩ ∣ ) ] ≤ e 4 + O ( n 8 C − p ( log n ) 2 p ) ≤ C . \mathbb{E}_j\left[\exp\left(4\max_k|\langle\theta_k,\Delta z\rangle|\right)\right]
\le e^4+O\left(n^{8C-p}(\log n)^{2p}\right)\le C. E j [ exp ( 4 k max ∣ ⟨ θ k , Δ z ⟩ ∣ ) ] ≤ e 4 + O ( n 8 C − p ( log n ) 2 p ) ≤ C .
The sigmoid satisfies
σ ( u + v ) ≤ e ∣ v ∣ σ ( u ) , 1 − σ ( u + v ) ≤ e ∣ v ∣ ( 1 − σ ( u ) ) . \sigma(u+v)\le e^{|v|}\sigma(u),\qquad
1-\sigma(u+v)\le e^{|v|}(1-\sigma(u)). σ ( u + v ) ≤ e ∣ v ∣ σ ( u ) , 1 − σ ( u + v ) ≤ e ∣ v ∣ ( 1 − σ ( u )) .
Applying these inequalities to each gate yields
∣ 1 − w i ( X ) ∣ + ∑ k ≠ i w k ( X ) ≤ exp ( max k ∣ ⟨ θ k , Δ z ⟩ ∣ ) ∥ w ˉ j − e i ∥ 1 . |1-w_i(X)|+\sum_{k\ne i}w_k(X)
\le\exp\left(\max_k|\langle\theta_k,\Delta z\rangle|\right)\|\bar{w}_j-e_i\|_1. ∣1 − w i ( X ) ∣ + k = i ∑ w k ( X ) ≤ exp ( k max ∣ ⟨ θ k , Δ z ⟩ ∣ ) ∥ w ˉ j − e i ∥ 1 .
The difference from the selected expert is
μ ^ − g i = μ ( ∑ k w k − 1 ) + ∑ k ( w k − 1 { k = i } ) ( g k − μ ) . \hat{\mu}-g_i
=\mu\left(\sum_k w_k-1\right)+\sum_k(w_k-\mathbf{1}_{\{k=i\}})(g_k-\mu). μ ^ − g i = μ ( k ∑ w k − 1 ) + k ∑ ( w k − 1 { k = i } ) ( g k − μ ) .
The gates and centered experts depend only on the centered observations and are independent of μ \mu μ . Since E [ μ ] = 0 \mathbb{E}[\mu]=0 E [ μ ] = 0 , averaging over μ \mu μ eliminates the cross term and gives
E j [ ( μ ^ − g i ) 2 ] = σ μ 2 E j [ ( ∑ k w k − 1 ) 2 ] + E j [ ( ∑ k ( w k − 1 { k = i } ) ( g k − μ ) ) 2 ] ≤ ∥ w ˉ ⋅ j − e i ∥ 1 2 E j [ exp ( 2 max k ∣ ⟨ θ k , Δ z ⟩ ∣ ) ( σ μ 2 + max ℓ ∈ [ n ] ∣ X ℓ − μ ∣ 2 ) ] ≤ C ∥ w ˉ ⋅ j − e i ∥ 1 2 ( σ μ 2 + E j [ max ℓ ∈ [ n ] ∣ X ℓ − μ ∣ 4 ] ) . \begin{aligned}
\mathbb{E}_j\left[(\hat{\mu}-g_i)^2\right]=\sigma_\mu^2\mathbb{E}_j\left[\left(\sum_k w_k-1\right)^2\right]+\mathbb{E}_j\left[\left(\sum_k(w_k-1_{\{k=i\}})(g_k-\mu)\right)^2\right] \\
&\leq\lVert\bar{w}_{\cdot j}-e_i\rVert_1^2\mathbb{E}_j\left[\exp\left(2\max_k\left\lvert\langle\theta_k,\Delta z\rangle\right\rvert\right)\left(\sigma_\mu^2+\max_{\ell\in[n]}\lvert X_\ell-\mu\rvert^2\right)\right] \\
&\leq C\lVert\bar{w}_{\cdot j}-e_i\rVert_1^2\left(\sigma_\mu^2+\sqrt{\mathbb{E}_j\left[\max_{\ell\in[n]}\lvert X_\ell-\mu\rvert^4\right]}\right).
\end{aligned} E j [ ( μ ^ − g i ) 2 ] = σ μ 2 E j ( k ∑ w k − 1 ) 2 + E j ( k ∑ ( w k − 1 { k = i } ) ( g k − μ ) ) 2 ≤ ∥ w ˉ ⋅ j − e i ∥ 1 2 E j [ exp ( 2 k max ∣ ⟨ θ k , Δ z ⟩ ∣ ) ( σ μ 2 + ℓ ∈ [ n ] max ∣ X ℓ − μ ∣ 2 ) ] ≤ C ∥ w ˉ ⋅ j − e i ∥ 1 2 ( σ μ 2 + E j [ ℓ ∈ [ n ] max ∣ X ℓ − μ ∣ 4 ] ) .
The first inequality uses ∣ g k − μ ∣ ≤ max ℓ ∣ X ℓ − μ ∣ \lvert g_k-\mu\rvert\leq\max_{\ell}\lvert X_\ell-\mu\rvert ∣ g k − μ ∣ ≤ max ℓ ∣ X ℓ − μ ∣ , which holds for every λ k \lambda_k λ k , and the second uses Cauchy–Schwarz and the exponential moment bound above. The triangle inequality in L 2 L^2 L 2 proves the claim.
The bound on E j [ ( μ ^ − g i ) 2 ] \mathbb{E}_j\left[(\hat{\mu}-g_i)^2\right] E j [ ( μ ^ − g i ) 2 ] is quadratic in ∥ w ˉ ⋅ j − e i ∥ 1 \lVert\bar{w}_{\cdot j}-e_i\rVert_1 ∥ w ˉ ⋅ j − e i ∥ 1 and uniform over λ \lambda λ . It therefore applies throughout training of λ \lambda λ after θ \theta θ is fixed.
Gating-layer dynamics
Derivation of the population gradient flow
Lemma D.2 (Population gradient expansion). Let θ q \theta_q θ q be the gating parameter vector for expert q ∈ { 1 , 2 } q\in\{1,2\} q ∈ { 1 , 2 } , and let the loss function L ( θ ) L(\theta) L ( θ ) be defined as:
L ( θ ) = 1 2 E [ ( ∑ i = 1 2 w i ( X ) g i − μ ) 2 ] L(\theta)=\frac{1}{2}\mathbb{E}\left[\left(\sum_{i=1}^{2}w_i(X)g_i-\mu\right)^2\right] L ( θ ) = 2 1 E ( i = 1 ∑ 2 w i ( X ) g i − μ ) 2 Then
∇ θ q L ( θ ) = 1 2 ∑ j { σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) w ˉ q j ′ z ˉ j + w ˉ q j ′ n ∑ i = 1 2 w ˉ i j Σ Z , q i ( j ) z ˉ j \nabla_{\theta_q}L(\theta)=\frac{1}{2}\sum_j\left\{\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\bar{w}'_{qj}\bar{z}_j+\frac{\bar{w}'_{qj}}{n}\sum_{i=1}^{2}\bar{w}_{ij}\Sigma^{(j)}_{Z,qi}\bar{z}_j
\right. ∇ θ q L ( θ ) = 2 1 j ∑ { σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) w ˉ q j ′ z ˉ j + n w ˉ q j ′ i = 1 ∑ 2 w ˉ ij Σ Z , q i ( j ) z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j ∑ i = 1 2 w ˉ i j ′ θ i T E j [ Δ z ] \left.
+\sigma_\mu^2\bar{w}'_{qj}\bar{z}_j\sum_{i=1}^{2}\bar{w}'_{ij}\theta_i^\mathsf{T}\mathbb{E}_j[\Delta z]
\right. + σ μ 2 w ˉ q j ′ z ˉ j i = 1 ∑ 2 w ˉ ij ′ θ i T E j [ Δ z ] + σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) [ w ˉ q j ′ ′ z ˉ j θ q T E j [ Δ z ] + w ˉ q j ′ E j [ Δ z ] ] \left.
+\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left[\bar{w}''_{qj}\bar{z}_j\theta_q^\mathsf{T}\mathbb{E}_j[\Delta z]+\bar{w}'_{qj}\mathbb{E}_j[\Delta z]\right]
\right. + σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) [ w ˉ q j ′′ z ˉ j θ q T E j [ Δ z ] + w ˉ q j ′ E j [ Δ z ] ] + σ μ 2 n ∑ i = 1 2 w ˉ i j ′ [ w ˉ q j ′ ′ ( θ q T Σ Z ( j ) θ i ) z ˉ j + w ˉ q j ′ Σ Z ( j ) θ i ] + σ μ 2 n w ˉ q j ′ ′ ( ∑ i = 1 2 w ˉ i j − 1 ) Σ Z ( j ) θ q \left.
+\frac{\sigma_\mu^2}{n}\sum_{i=1}^{2}\bar{w}'_{ij}\left[\bar{w}''_{qj}\left(\theta_q^\mathsf{T}\Sigma_Z^{(j)}\theta_i\right)\bar{z}_j+\bar{w}'_{qj}\Sigma_Z^{(j)}\theta_i\right]
+\frac{\sigma_\mu^2}{n}\bar{w}''_{qj}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\Sigma_Z^{(j)}\theta_q
\right. + n σ μ 2 i = 1 ∑ 2 w ˉ ij ′ [ w ˉ q j ′′ ( θ q T Σ Z ( j ) θ i ) z ˉ j + w ˉ q j ′ Σ Z ( j ) θ i ] + n σ μ 2 w ˉ q j ′′ ( i = 1 ∑ 2 w ˉ ij − 1 ) Σ Z ( j ) θ q + σ μ 2 2 n w ˉ q j ′ ′ [ ∑ i = 1 2 w ˉ i j ′ ′ ( θ i T Σ Z ( j ) θ i ) ] z ˉ j \left.
+\frac{\sigma_\mu^2}{2n}\bar{w}''_{qj}\left[\sum_{i=1}^{2}\bar{w}''_{ij}\left(\theta_i^\mathsf{T}\Sigma_Z^{(j)}\theta_i\right)\right]\bar{z}_j
\right. + 2 n σ μ 2 w ˉ q j ′′ [ i = 1 ∑ 2 w ˉ ij ′′ ( θ i T Σ Z ( j ) θ i ) ] z ˉ j + σ μ 2 2 n ( ∑ i = 1 2 w ˉ i j − 1 ) w ˉ q j ′ ′ ′ ( θ q T Σ Z ( j ) θ q ) z ˉ j + w ˉ q j ′ O ( n − 3 / 2 ) } . \left.
+\frac{\sigma_\mu^2}{2n}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\bar{w}'''_{qj}\left(\theta_q^\mathsf{T}\Sigma_Z^{(j)}\theta_q\right)\bar{z}_j+\bar{w}'_{qj}O(n^{-3/2})
\right\}. + 2 n σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) w ˉ q j ′′′ ( θ q T Σ Z ( j ) θ q ) z ˉ j + w ˉ q j ′ O ( n − 3/2 ) } . where w ˉ i j = σ ( ⟨ θ i , z ˉ j ⟩ ) \bar{w}_{ij}=\sigma(\langle\theta_i,\bar{z}_j\rangle) w ˉ ij = σ (⟨ θ i , z ˉ j ⟩) , z ˉ j \bar{z}_j z ˉ j is obtained by applying layer normalization to the population moment ratios, Δ w i = w i ( z ) − w ˉ i j \Delta w_i=w_i(z)-\bar{w}_{ij} Δ w i = w i ( z ) − w ˉ ij , and Δ w q ′ = w q ′ ( z ) − w ˉ q j ′ \Delta w'_q=w'_q(z)-\bar{w}'_{qj} Δ w q ′ = w q ′ ( z ) − w ˉ q j ′ . Primes on gates denote derivatives of the
sigmoid with respect to its scalar logit, so w q ′ = w q ( 1 − w q ) w'_q = w_q(1-w_q) w q ′ = w q ( 1 − w q ) , with the same convention for population gates and higher derivatives. The matrix Σ ( j ) \Sigma^{(j)} Σ ( j ) is defined in Definition B.1 , and Σ z ( j ) \Sigma_z^{(j)} Σ z ( j ) is the asymptotic covariance matrix of n ( z − z ˉ j ) \sqrt{n}(\mathbf{z} - \bar{\mathbf{z}}_j) n ( z − z ˉ j ) under family j j j .
Proof.
∇ θ q L ( θ ) = E [ ( ∑ i = 1 2 w i ( X ) g i − μ ) g q w q ′ ( X ) z ] = 1 2 ∑ j E j [ ( ∑ i = 1 2 w i ( X ) ( μ 2 + ( g i − μ ) ( g q − μ ) ) − μ 2 ) w q ′ ( z ) z ] = 1 2 ∑ j E j [ { ∑ i = 1 2 ( w ˉ i j + Δ w i ) ( μ 2 + ( g i − μ ) ( g q − μ ) ) − μ 2 } × ( w ˉ q j ′ + Δ w q ′ ) ( z ˉ j + Δ z ) ] = 1 2 ∑ j ( σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) w ˉ q j ′ z ˉ j + ( ∑ i = 1 2 w ˉ i j E j [ ( g i − μ ) ( g q − μ ) ] ) w ˉ q j ′ z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j ∑ i = 1 2 E j [ Δ w i ] + σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) [ z ˉ j E j [ Δ w q ′ ] + w ˉ q j ′ E j [ Δ z ] ] + σ μ 2 ∑ i = 1 2 E j [ Δ w i Δ w q ′ ] z ˉ j + σ μ 2 ∑ i = 1 2 E j [ Δ w i Δ z ] w ˉ q j ′ + σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) E j [ Δ w q ′ Δ z ] + ( ∑ i = 1 2 E j [ Δ w i ( g i − μ ) ( g q − μ ) ] ) w ˉ q j ′ z ˉ j + ∑ i = 1 2 E j [ ( w ˉ i j + Δ w i ) ( g i − μ ) ( g q − μ ) Δ z ] w ˉ q j ′ + ∑ i = 1 2 E j [ ( w ˉ i j + Δ w i ) ( g i − μ ) ( g q − μ ) Δ w q ′ ] z ˉ j + σ μ 2 ∑ i = 1 2 E j [ Δ w i Δ w q ′ Δ z ] ) = 1 2 ∑ j ( σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) w ˉ q j ′ z ˉ j + ( ∑ i = 1 2 w ˉ i j E j [ ( g i − μ ) ( g q − μ ) ] ) w ˉ q j ′ z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j ∑ i = 1 2 E j [ Δ w i ] + σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) [ z ˉ j E j [ Δ w q ′ ] + w ˉ q j ′ E j [ Δ z ] ] + σ μ 2 ∑ i = 1 2 E j [ Δ w i Δ w q ′ ] z ˉ j + σ μ 2 ∑ i = 1 2 E j [ Δ w i Δ z ] w ˉ q j ′ + σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) E j [ Δ w q ′ Δ z ] + w ˉ q j ′ O ( n − 3 / 2 ) ) \begin{aligned}
\nabla_{\theta_q}\mathcal{L}(\theta)
&= \mathbb{E}\left[\left(\sum_{i=1}^{2}w_i(\mathbf{X})g_i-\mu\right)g_qw'_q(\mathbf{X})z\right]\\
&= \frac{1}{2}\sum_j\mathbb{E}_j\left[\left(\sum_{i=1}^{2}w_i(\mathbf{X})\left(\mu^2+(g_i-\mu)(g_q-\mu)\right)-\mu^2\right)w'_q(\mathbf{z})z\right]\\
&= \frac{1}{2}\sum_j\mathbb{E}_j\left[\left\{\sum_{i=1}^{2}(\bar{w}_{ij}+\Delta w_i)\left(\mu^2+(g_i-\mu)(g_q-\mu)\right)-\mu^2\right\}\right.\\
&\qquad\qquad\left.\times(\bar{w}'_{qj}+\Delta w'_q)(\bar{z}_j+\Delta z)\right]\\
&= \frac{1}{2}\sum_j\left(\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\bar{w}'_{qj}\bar{z}_j+\left(\sum_{i=1}^{2}\bar{w}_{ij}\mathbb{E}_j[(g_i-\mu)(g_q-\mu)]\right)\bar{w}'_{qj}\bar{z}_j\right.\\
&\qquad+\sigma_\mu^2\bar{w}'_{qj}\bar{z}_j\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i]+\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left[\bar{z}_j\mathbb{E}_j[\Delta w'_q]+\bar{w}'_{qj}\mathbb{E}_j[\Delta z]\right]\\
&\qquad+\sigma_\mu^2\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i\Delta w'_q]\bar{z}_j+\sigma_\mu^2\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i\Delta z]\bar{w}'_{qj}\\
&\qquad+\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\mathbb{E}_j[\Delta w'_q\Delta z]\\
&\qquad+\left(\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i(g_i-\mu)(g_q-\mu)]\right)\bar{w}'_{qj}\bar{z}_j\\
&\qquad+\sum_{i=1}^{2}\mathbb{E}_j[(\bar{w}_{ij}+\Delta w_i)(g_i-\mu)(g_q-\mu)\Delta z]\bar{w}'_{qj}\\
&\qquad+\sum_{i=1}^{2}\mathbb{E}_j[(\bar{w}_{ij}+\Delta w_i)(g_i-\mu)(g_q-\mu)\Delta w'_q]\bar{z}_j\\
&\qquad\left.+\sigma_\mu^2\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i\Delta w'_q\Delta z]\right)\\
&= \frac{1}{2}\sum_j\left(\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\bar{w}'_{qj}\bar{z}_j+\left(\sum_{i=1}^{2}\bar{w}_{ij}\mathbb{E}_j[(g_i-\mu)(g_q-\mu)]\right)\bar{w}'_{qj}\bar{z}_j\right.\\
&\qquad+\sigma_\mu^2\bar{w}'_{qj}\bar{z}_j\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i]\\
&\qquad+\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left[\bar{z}_j\mathbb{E}_j[\Delta w'_q]+\bar{w}'_{qj}\mathbb{E}_j[\Delta z]\right]\\
&\qquad+\sigma_\mu^2\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i\Delta w'_q]\bar{z}_j+\sigma_\mu^2\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i\Delta z]\bar{w}'_{qj}\\
&\qquad\left.+\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\mathbb{E}_j[\Delta w'_q\Delta z]+\bar{w}'_{qj}O\left(n^{-3/2}\right)\right)
\end{aligned} ∇ θ q L ( θ ) = E [ ( i = 1 ∑ 2 w i ( X ) g i − μ ) g q w q ′ ( X ) z ] = 2 1 j ∑ E j [ ( i = 1 ∑ 2 w i ( X ) ( μ 2 + ( g i − μ ) ( g q − μ ) ) − μ 2 ) w q ′ ( z ) z ] = 2 1 j ∑ E j [ { i = 1 ∑ 2 ( w ˉ ij + Δ w i ) ( μ 2 + ( g i − μ ) ( g q − μ ) ) − μ 2 } × ( w ˉ q j ′ + Δ w q ′ ) ( z ˉ j + Δ z ) ] = 2 1 j ∑ ( σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) w ˉ q j ′ z ˉ j + ( i = 1 ∑ 2 w ˉ ij E j [( g i − μ ) ( g q − μ )] ) w ˉ q j ′ z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j i = 1 ∑ 2 E j [ Δ w i ] + σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) [ z ˉ j E j [ Δ w q ′ ] + w ˉ q j ′ E j [ Δ z ] ] + σ μ 2 i = 1 ∑ 2 E j [ Δ w i Δ w q ′ ] z ˉ j + σ μ 2 i = 1 ∑ 2 E j [ Δ w i Δ z ] w ˉ q j ′ + σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) E j [ Δ w q ′ Δ z ] + ( i = 1 ∑ 2 E j [ Δ w i ( g i − μ ) ( g q − μ )] ) w ˉ q j ′ z ˉ j + i = 1 ∑ 2 E j [( w ˉ ij + Δ w i ) ( g i − μ ) ( g q − μ ) Δ z ] w ˉ q j ′ + i = 1 ∑ 2 E j [( w ˉ ij + Δ w i ) ( g i − μ ) ( g q − μ ) Δ w q ′ ] z ˉ j + σ μ 2 i = 1 ∑ 2 E j [ Δ w i Δ w q ′ Δ z ] ) = 2 1 j ∑ ( σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) w ˉ q j ′ z ˉ j + ( i = 1 ∑ 2 w ˉ ij E j [( g i − μ ) ( g q − μ )] ) w ˉ q j ′ z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j i = 1 ∑ 2 E j [ Δ w i ] + σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) [ z ˉ j E j [ Δ w q ′ ] + w ˉ q j ′ E j [ Δ z ] ] + σ μ 2 i = 1 ∑ 2 E j [ Δ w i Δ w q ′ ] z ˉ j + σ μ 2 i = 1 ∑ 2 E j [ Δ w i Δ z ] w ˉ q j ′ + σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) E j [ Δ w q ′ Δ z ] + w ˉ q j ′ O ( n − 3/2 ) )
Taylor expansion of the gates and Lemma F.6 give
∇ θ q L ( θ ) = 1 2 ∑ j { σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) w ˉ q j ′ z ˉ j + w ˉ q j ′ n ∑ i = 1 2 w ˉ i j ζ q ( j ) z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j ∑ i = 1 2 w ˉ i j ′ θ i T E j [ Δ z ] + σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) [ w ˉ q j ′ ′ z ˉ j θ q T E j [ Δ z ] + w ˉ q j ′ E j [ Δ z ] ] + σ μ 2 n ∑ i = 1 2 w ˉ i j ′ [ w ˉ q j ′ ′ ( θ q T Σ z ( j ) θ i ) z ˉ j + w ˉ q j ′ Σ z ( j ) θ i ] + σ μ 2 n w ˉ q j ′ ′ ( ∑ i = 1 2 w ˉ i j − 1 ) Σ z ( j ) θ q + σ μ 2 2 n w ˉ q j ′ [ ∑ i = 1 2 w ˉ i j ′ ′ ( θ i T Σ z ( j ) θ i ) ] z ˉ j + σ μ 2 2 n ( ∑ i = 1 2 w ˉ i j − 1 ) w ˉ q j ′ ′ ′ ( θ q T Σ z ( j ) θ q ) z ˉ j + w ˉ q j ′ O ( n − 3 / 2 ) } . \begin{aligned}
\nabla_{\theta_q}\mathcal{L}(\theta)
={}&\frac{1}{2}\sum_j\Bigg\{\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\bar{w}'_{qj}\bar{z}_j+\frac{\bar{w}'_{qj}}{n}\sum_{i=1}^{2}\bar{w}_{ij}\zeta_q^{(j)}\bar{z}_j\\
&+\sigma_\mu^2\bar{w}'_{qj}\bar{z}_j\sum_{i=1}^{2}\bar{w}'_{ij}\theta_i^\mathsf{T}\mathbb{E}_j[\Delta z]\\
&+\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left[\bar{w}''_{qj}\bar{z}_j\theta_q^\mathsf{T}\mathbb{E}_j[\Delta z]+\bar{w}'_{qj}\mathbb{E}_j[\Delta z]\right]\\
&+\frac{\sigma_\mu^2}{n}\sum_{i=1}^{2}\bar{w}'_{ij}\left[\bar{w}''_{qj}\left(\theta_q^\mathsf{T}\Sigma_z^{(j)}\theta_i\right)\bar{z}_j+\bar{w}'_{qj}\Sigma_z^{(j)}\theta_i\right]\\
&+\frac{\sigma_\mu^2}{n}\bar{w}''_{qj}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\Sigma_z^{(j)}\theta_q\\
&+\frac{\sigma_\mu^2}{2n}\bar{w}'_{qj}\left[\sum_{i=1}^{2}\bar{w}''_{ij}\left(\theta_i^\mathsf{T}\Sigma_z^{(j)}\theta_i\right)\right]\bar{z}_j\\
&+\frac{\sigma_\mu^2}{2n}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\bar{w}'''_{qj}\left(\theta_q^\mathsf{T}\Sigma_z^{(j)}\theta_q\right)\bar{z}_j+\bar{w}'_{qj}O(n^{-3/2})\Bigg\}.
\end{aligned} ∇ θ q L ( θ ) = 2 1 j ∑ { σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) w ˉ q j ′ z ˉ j + n w ˉ q j ′ i = 1 ∑ 2 w ˉ ij ζ q ( j ) z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j i = 1 ∑ 2 w ˉ ij ′ θ i T E j [ Δ z ] + σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) [ w ˉ q j ′′ z ˉ j θ q T E j [ Δ z ] + w ˉ q j ′ E j [ Δ z ] ] + n σ μ 2 i = 1 ∑ 2 w ˉ ij ′ [ w ˉ q j ′′ ( θ q T Σ z ( j ) θ i ) z ˉ j + w ˉ q j ′ Σ z ( j ) θ i ] + n σ μ 2 w ˉ q j ′′ ( i = 1 ∑ 2 w ˉ ij − 1 ) Σ z ( j ) θ q + 2 n σ μ 2 w ˉ q j ′ [ i = 1 ∑ 2 w ˉ ij ′′ ( θ i T Σ z ( j ) θ i ) ] z ˉ j + 2 n σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) w ˉ q j ′′′ ( θ q T Σ z ( j ) θ q ) z ˉ j + w ˉ q j ′ O ( n − 3/2 ) } .
Lemma D.3 (Population loss expansion). Let θ q \theta_q θ q be the gating parameter vector for expert q ∈ { 1 , 2 } q \in\{1,2\} q ∈ { 1 , 2 } , and let the loss function L ( θ ) \mathcal{L}(\theta) L ( θ ) be defined as:
L ( θ ) = 1 2 E [ ( ∑ i = 1 2 w i ( X ) g i − μ ) 2 ] \mathcal{L}(\theta)=\frac{1}{2}\mathbb{E}\left[\left(\sum_{i=1}^{2}w_i(X)g_i-\mu\right)^2\right] L ( θ ) = 2 1 E ( i = 1 ∑ 2 w i ( X ) g i − μ ) 2 Then the expected loss can be expanded as:
L ( θ ) = 1 4 ∑ j { σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) 2 + 1 n ∑ i = 1 2 ∑ q = 1 2 w ˉ i j w ˉ q j ζ i q ( j ) + σ μ 2 n ∑ i = 1 2 ∑ q = 1 2 w ˉ i j ′ w ˉ q j ′ ( θ i T Σ z ( j ) θ q ) + 2 σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) ∑ i = 1 2 w ˉ i j ′ θ i T E j [ Δ z ] + σ μ 2 n ( ∑ i = 1 2 w ˉ i j − 1 ) ∑ i = 1 2 w ˉ i j ′ ′ ( θ i T Σ z ( j ) θ i ) } + O ( n − 3 / 2 ) \begin{aligned}
\mathcal{L}(\theta)
={}&\frac{1}{4}\sum_j\Bigg\{\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)^2+\frac{1}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}\bar{w}_{ij}\bar{w}_{qj}\zeta_{iq}^{(j)}\\
&+\frac{\sigma_\mu^2}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}\bar{w}'_{ij}\bar{w}'_{qj}\left(\theta_i^\mathsf{T}\Sigma_z^{(j)}\theta_q\right)\\
&+2\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\sum_{i=1}^{2}\bar{w}'_{ij}\theta_i^\mathsf{T}\mathbb{E}_j[\Delta z]\\
&+\frac{\sigma_\mu^2}{n}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\sum_{i=1}^{2}\bar{w}''_{ij}\left(\theta_i^\mathsf{T}\Sigma_z^{(j)}\theta_i\right)\Bigg\}+O(n^{-3/2})
\end{aligned} L ( θ ) = 4 1 j ∑ { σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) 2 + n 1 i = 1 ∑ 2 q = 1 ∑ 2 w ˉ ij w ˉ q j ζ i q ( j ) + n σ μ 2 i = 1 ∑ 2 q = 1 ∑ 2 w ˉ ij ′ w ˉ q j ′ ( θ i T Σ z ( j ) θ q ) + 2 σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) i = 1 ∑ 2 w ˉ ij ′ θ i T E j [ Δ z ] + n σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) i = 1 ∑ 2 w ˉ ij ′′ ( θ i T Σ z ( j ) θ i ) } + O ( n − 3/2 )
Proof. We can directly compute
L ( θ ) = 1 4 ∑ j E j [ μ 2 ( ∑ i = 1 2 w i ( X ) − 1 ) 2 + ( ∑ i = 1 2 w i ( X ) ( g i − μ ) ) 2 ] = 1 4 ∑ j E j [ σ μ 2 ( ∑ i = 1 2 w i ( X ) − 1 ) 2 + 1 n ∑ i = 1 2 ∑ q = 1 2 w i ( X ) w q ( X ) Σ i q ( j ) ] + O ( n − 3 / 2 ) = 1 4 ∑ j E j [ σ μ 2 ( ∑ i = 1 2 ( w ˉ i j + Δ w i ) − 1 ) 2 + 1 n ∑ i = 1 2 ∑ q = 1 2 ( w ˉ i j + Δ w i ) ( w ˉ q j + Δ w q ) Σ i q ( j ) ] + O ( n − 3 / 2 ) = 1 4 ∑ j { σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) 2 + 1 n ∑ i = 1 2 ∑ q = 1 2 w ˉ i j w ˉ q j Σ i q ( j ) + 2 σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) ∑ i = 1 2 E j [ Δ w i ] + σ μ 2 ∑ i = 1 2 ∑ q = 1 2 E j [ Δ w i Δ w q ] + 1 n ∑ i = 1 2 ∑ q = 1 2 Σ i q ( j ) E j [ Δ w i Δ w q ] } + O ( n − 3 / 2 ) = 1 4 ∑ j { σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) 2 + 1 n ∑ i = 1 2 ∑ q = 1 2 w ˉ i j w ˉ q j Σ i q ( j ) + σ μ 2 n ∑ i = 1 2 ∑ q = 1 2 w ˉ i j ′ w ˉ q j ′ ( θ i T Σ Z ( j ) θ q ) + 2 σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) ∑ i = 1 2 w ˉ i j ′ θ i T E j [ Δ z ] + σ μ 2 n ( ∑ i = 1 2 w ˉ i j − 1 ) ∑ i = 1 2 w ˉ i j ′ ′ ( θ i T Σ Z ( j ) θ i ) } + O ( n − 3 / 2 ) \begin{aligned}
\mathcal{L}(\theta)
&= \frac{1}{4}\sum_j \mathbb{E}_j\left[\mu^2\left(\sum_{i=1}^{2}w_i(X)-1\right)^2+\left(\sum_{i=1}^{2}w_i(X)(g_i-\mu)\right)^2\right]\\
&= \frac{1}{4}\sum_j \mathbb{E}_j\left[\sigma_\mu^2\left(\sum_{i=1}^{2}w_i(X)-1\right)^2+\frac{1}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}w_i(X)w_q(X)\Sigma_{iq}^{(j)}\right]+O(n^{-3/2})\\
&= \frac{1}{4}\sum_j\mathbb{E}_j\left[\sigma_\mu^2\left(\sum_{i=1}^{2}(\bar{w}_{ij}+\Delta w_i)-1\right)^2+\frac{1}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}(\bar{w}_{ij}+\Delta w_i)(\bar{w}_{qj}+\Delta w_q)\Sigma_{iq}^{(j)}\right]+O(n^{-3/2})\\
&= \frac{1}{4}\sum_j\left\{\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)^2+\frac{1}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}\bar{w}_{ij}\bar{w}_{qj}\Sigma_{iq}^{(j)}+2\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\sum_{i=1}^{2}\mathbb{E}_j[\Delta w_i]\right.\\
&\qquad\left.+\sigma_\mu^2\sum_{i=1}^{2}\sum_{q=1}^{2}\mathbb{E}_j[\Delta w_i\Delta w_q]+\frac{1}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}\Sigma_{iq}^{(j)}\mathbb{E}_j[\Delta w_i\Delta w_q]\right\}+O(n^{-3/2})\\
&= \frac{1}{4}\sum_j\left\{\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)^2+\frac{1}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}\bar{w}_{ij}\bar{w}_{qj}\Sigma_{iq}^{(j)}\right.\\
&\qquad+\frac{\sigma_\mu^2}{n}\sum_{i=1}^{2}\sum_{q=1}^{2}\bar{w}'_{ij}\bar{w}'_{qj}\left(\theta_i^{\mathsf T}\Sigma_Z^{(j)}\theta_q\right)\\
&\qquad+2\sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\sum_{i=1}^{2}\bar{w}'_{ij}\theta_i^{\mathsf T}\mathbb{E}_j[\Delta z]\\
&\qquad\left.+\frac{\sigma_\mu^2}{n}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\sum_{i=1}^{2}\bar{w}''_{ij}\left(\theta_i^{\mathsf T}\Sigma_Z^{(j)}\theta_i\right)\right\}+O(n^{-3/2})
\end{aligned} L ( θ ) = 4 1 j ∑ E j μ 2 ( i = 1 ∑ 2 w i ( X ) − 1 ) 2 + ( i = 1 ∑ 2 w i ( X ) ( g i − μ ) ) 2 = 4 1 j ∑ E j σ μ 2 ( i = 1 ∑ 2 w i ( X ) − 1 ) 2 + n 1 i = 1 ∑ 2 q = 1 ∑ 2 w i ( X ) w q ( X ) Σ i q ( j ) + O ( n − 3/2 ) = 4 1 j ∑ E j σ μ 2 ( i = 1 ∑ 2 ( w ˉ ij + Δ w i ) − 1 ) 2 + n 1 i = 1 ∑ 2 q = 1 ∑ 2 ( w ˉ ij + Δ w i ) ( w ˉ q j + Δ w q ) Σ i q ( j ) + O ( n − 3/2 ) = 4 1 j ∑ ⎩ ⎨ ⎧ σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) 2 + n 1 i = 1 ∑ 2 q = 1 ∑ 2 w ˉ ij w ˉ q j Σ i q ( j ) + 2 σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) i = 1 ∑ 2 E j [ Δ w i ] + σ μ 2 i = 1 ∑ 2 q = 1 ∑ 2 E j [ Δ w i Δ w q ] + n 1 i = 1 ∑ 2 q = 1 ∑ 2 Σ i q ( j ) E j [ Δ w i Δ w q ] } + O ( n − 3/2 ) = 4 1 j ∑ ⎩ ⎨ ⎧ σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) 2 + n 1 i = 1 ∑ 2 q = 1 ∑ 2 w ˉ ij w ˉ q j Σ i q ( j ) + n σ μ 2 i = 1 ∑ 2 q = 1 ∑ 2 w ˉ ij ′ w ˉ q j ′ ( θ i T Σ Z ( j ) θ q ) + 2 σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) i = 1 ∑ 2 w ˉ ij ′ θ i T E j [ Δ z ] + n σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) i = 1 ∑ 2 w ˉ ij ′′ ( θ i T Σ Z ( j ) θ i ) } + O ( n − 3/2 )
Flow reparameterization
Use S q j S_{qj} S q j from Lemma B.7. Recall that we are studying the gradient flow
θ ˙ q = − ∇ θ q L ( θ ) = − 1 2 ∑ j { S q j ( w ˉ ) w ˉ q j ′ z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j ∑ i = 1 2 w ˉ i j ′ θ i T E j [ Δ z ] + σ μ 2 ( ∑ i = 1 2 w ˉ i j − 1 ) [ w ˉ q j ′ ′ z ˉ j θ q T E j [ Δ z ] + w ˉ q j ′ E j [ Δ z ] ] + σ μ 2 n ∑ i = 1 2 w ˉ i j ′ [ w ˉ q j ′ ′ ( θ q T Σ Z ( j ) θ i ) z ˉ j + w ˉ q j ′ Σ Z ( j ) θ i ] + σ μ 2 n w ˉ q j ′ ′ ( ∑ i = 1 2 w ˉ i j − 1 ) Σ Z ( j ) θ q + σ μ 2 2 n w ˉ q j ′ [ ∑ i = 1 2 w ˉ i j ′ ′ ( θ i T Σ Z ( j ) θ i ) ] z ˉ j + σ μ 2 2 n ( ∑ i = 1 2 w ˉ i j − 1 ) [ w ˉ q j ′ ′ ′ ( θ q T Σ Z ( j ) θ q ) z ˉ j + w ˉ q j ′ O ( n − 3 / 2 ) ] } . \begin{aligned}
\dot{\theta}_q
&= -\nabla_{\theta_q}\mathcal{L}(\theta)\\
&= -\frac{1}{2}\sum_j \Bigg\{ S_{qj}(\bar{w})\bar{w}'_{qj}\bar{z}_j
+ \sigma_\mu^2\bar{w}'_{qj}\bar{z}_j\sum_{i=1}^{2}\bar{w}'_{ij}\theta_i^{\mathsf T}\mathbb{E}_j[\Delta z]\\
&\qquad\qquad+ \sigma_\mu^2\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left[\bar{w}''_{qj}\bar{z}_j\theta_q^{\mathsf T}\mathbb{E}_j[\Delta z]+\bar{w}'_{qj}\mathbb{E}_j[\Delta z]\right]\\
&\qquad\qquad+ \frac{\sigma_\mu^2}{n}\sum_{i=1}^{2}\bar{w}'_{ij}\left[\bar{w}''_{qj}\left(\theta_q^{\mathsf T}\Sigma_Z^{(j)}\theta_i\right)\bar{z}_j+\bar{w}'_{qj}\Sigma_Z^{(j)}\theta_i\right]\\
&\qquad\qquad+ \frac{\sigma_\mu^2}{n}\bar{w}''_{qj}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\Sigma_Z^{(j)}\theta_q\\
&\qquad\qquad+ \frac{\sigma_\mu^2}{2n}\bar{w}'_{qj}\left[\sum_{i=1}^{2}\bar{w}''_{ij}\left(\theta_i^{\mathsf T}\Sigma_Z^{(j)}\theta_i\right)\right]\bar{z}_j\\
&\qquad\qquad+ \frac{\sigma_\mu^2}{2n}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left[\bar{w}'''_{qj}\left(\theta_q^{\mathsf T}\Sigma_Z^{(j)}\theta_q\right)\bar{z}_j+\bar{w}'_{qj}O\left(n^{-3/2}\right)\right]\Bigg\}.
\end{aligned} θ ˙ q = − ∇ θ q L ( θ ) = − 2 1 j ∑ { S q j ( w ˉ ) w ˉ q j ′ z ˉ j + σ μ 2 w ˉ q j ′ z ˉ j i = 1 ∑ 2 w ˉ ij ′ θ i T E j [ Δ z ] + σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) [ w ˉ q j ′′ z ˉ j θ q T E j [ Δ z ] + w ˉ q j ′ E j [ Δ z ] ] + n σ μ 2 i = 1 ∑ 2 w ˉ ij ′ [ w ˉ q j ′′ ( θ q T Σ Z ( j ) θ i ) z ˉ j + w ˉ q j ′ Σ Z ( j ) θ i ] + n σ μ 2 w ˉ q j ′′ ( i = 1 ∑ 2 w ˉ ij − 1 ) Σ Z ( j ) θ q + 2 n σ μ 2 w ˉ q j ′ [ i = 1 ∑ 2 w ˉ ij ′′ ( θ i T Σ Z ( j ) θ i ) ] z ˉ j + 2 n σ μ 2 ( i = 1 ∑ 2 w ˉ ij − 1 ) [ w ˉ q j ′′′ ( θ q T Σ Z ( j ) θ q ) z ˉ j + w ˉ q j ′ O ( n − 3/2 ) ] } .
We now re-parameterize the flow in terms of w ˉ = ( w ˉ i j ) i ∈ [ 2 ] , j ∈ { G , A } \bar{w}=(\bar{w}_{ij})_{i\in[2],j\in\{G,A\}} w ˉ = ( w ˉ ij ) i ∈ [ 2 ] , j ∈ { G , A } , using w ˉ q k = σ ( ⟨ θ q , z ˉ k ⟩ ) \bar{w}_{qk}=\sigma(\langle\theta_q,\bar{z}_k\rangle) w ˉ q k = σ (⟨ θ q , z ˉ k ⟩) and the chain rule.
∂ w ˉ q k ∂ t = ∂ w ˉ q k ∂ θ q ∂ θ q ∂ t = − ( 1 2 ∑ j { S q j ( w ˉ ) w ˉ q j ′ w ˉ q k ′ ⟨ z ˉ j , z ˉ k ⟩ + σ μ 2 w ˉ q j ′ w ˉ q k ′ ⟨ z ˉ j , z ˉ k ⟩ ∑ i = 1 2 w ˉ i j ′ θ i E j [ Δ z ] + σ μ 2 w ˉ q k ′ ( ∑ i = 1 2 w ˉ i j − 1 ) [ w ˉ q j ′ ′ ⟨ z ˉ j , z ˉ k ⟩ θ q T E j [ Δ z ] + w ˉ q j ′ ⟨ E j [ Δ z ] , z ˉ k ⟩ ] + w ˉ q k ′ σ μ 2 n ∑ i = 1 2 w ˉ i j ′ [ w ˉ q j ′ ′ ( θ q T ∑ Z ( i ) θ i ) ⟨ z ˉ j , z ˉ k ⟩ + w ˉ q j ′ ⟨ ∑ Z ( j ) θ i , z ˉ k ⟩ ] + σ μ 2 w ˉ q j ′ ′ w ˉ q k ′ n ( ∑ i = 1 2 w ˉ i j − 1 ) ⟨ ∑ Z ( j ) θ q , z ˉ k ⟩ + σ μ 2 2 n w ˉ q j ′ w ˉ q k ′ [ ∑ i = 1 2 w ˉ i j ′ ′ ( θ i T ∑ Z ( i ) θ i ) ] ⟨ z ˉ j , z ˉ k ⟩ + σ μ 2 2 n w ˉ q k ′ ( ∑ i = 1 2 w ˉ i j − 1 ) w ˉ q j ′ ′ ′ ( θ q T ∑ Z ( j ) θ q ) ⟨ z ˉ j , z ˉ k ⟩ + w ˉ q k ′ w ˉ q j ′ O ( n − 3 / 2 ) } ) . \begin{aligned}
\frac{\partial\bar{w}_{qk}}{\partial t}
&=\frac{\partial\bar{w}_{qk}}{\partial\theta_q}\frac{\partial\theta_q}{\partial t}\\
&=-\left(\frac{1}{2}\sum_j\left\{S_{qj}(\bar{w})\bar{w}'_{qj}\bar{w}'_{qk}\langle\bar{z}_j,\bar{z}_k\rangle\right.\right.\\
&\quad+\sigma_\mu^2\bar{w}'_{qj}\bar{w}'_{qk}\langle\bar{z}_j,\bar{z}_k\rangle\sum_{i=1}^{2}\bar{w}'_{ij}\theta_i\mathbb{E}_j[\Delta z]\\
&\quad+\sigma_\mu^2\bar{w}'_{qk}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left[\bar{w}''_{qj}\langle\bar{z}_j,\bar{z}_k\rangle\theta_q^{\mathsf T}\mathbb{E}_j[\Delta z]+\bar{w}'_{qj}\langle\mathbb{E}_j[\Delta z],\bar{z}_k\rangle\right]\\
&\quad+\frac{\bar{w}'_{qk}\sigma_\mu^2}{n}\sum_{i=1}^{2}\bar{w}'_{ij}\left[\bar{w}''_{qj}\left(\theta_q^{\mathsf T}\sum_Z^{(i)}\theta_i\right)\langle\bar{z}_j,\bar{z}_k\rangle+\bar{w}'_{qj}\left\langle\sum_Z^{(j)}\theta_i,\bar{z}_k\right\rangle\right]\\
&\quad+\frac{\sigma_\mu^2\bar{w}''_{qj}\bar{w}'_{qk}}{n}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\left\langle\sum_Z^{(j)}\theta_q,\bar{z}_k\right\rangle\\
&\quad+\frac{\sigma_\mu^2}{2n}\bar{w}'_{qj}\bar{w}'_{qk}\left[\sum_{i=1}^{2}\bar{w}''_{ij}\left(\theta_i^{\mathsf T}\sum_Z^{(i)}\theta_i\right)\right]\langle\bar{z}_j,\bar{z}_k\rangle\\
&\quad+\frac{\sigma_\mu^2}{2n}\bar{w}'_{qk}\left(\sum_{i=1}^{2}\bar{w}_{ij}-1\right)\bar{w}'''_{qj}\left(\theta_q^{\mathsf T}\sum_Z^{(j)}\theta_q\right)\langle\bar{z}_j,\bar{z}_k\rangle\\
&\quad\left.\left.+\bar{w}'_{qk}\bar{w}'_{qj}O(n^{-3/2})\right\}\right).
\end{aligned} ∂ t ∂ w ˉ q k = ∂ θ q ∂ w ˉ q k ∂ t ∂ θ q = − ( 2 1 j ∑ { S q j ( w ˉ ) w ˉ q j ′ w ˉ q k ′ ⟨ z ˉ j , z ˉ k ⟩ + σ μ 2 w ˉ q j ′ w ˉ q k ′ ⟨ z ˉ j , z ˉ k ⟩ i = 1 ∑ 2 w ˉ ij ′ θ i E j [ Δ z ] + σ μ 2 w ˉ q k ′ ( i = 1 ∑ 2 w ˉ ij − 1 ) [ w ˉ q j ′′ ⟨ z ˉ j , z ˉ k ⟩ θ q T E j [ Δ z ] + w ˉ q j ′ ⟨ E j [ Δ z ] , z ˉ k ⟩ ] + n w ˉ q k ′ σ μ 2 i = 1 ∑ 2 w ˉ ij ′ w ˉ q j ′′ θ q T Z ∑ ( i ) θ i ⟨ z ˉ j , z ˉ k ⟩ + w ˉ q j ′ ⟨ Z ∑ ( j ) θ i , z ˉ k ⟩ + n σ μ 2 w ˉ q j ′′ w ˉ q k ′ ( i = 1 ∑ 2 w ˉ ij − 1 ) ⟨ Z ∑ ( j ) θ q , z ˉ k ⟩ + 2 n σ μ 2 w ˉ q j ′ w ˉ q k ′ i = 1 ∑ 2 w ˉ ij ′′ θ i T Z ∑ ( i ) θ i ⟨ z ˉ j , z ˉ k ⟩ + 2 n σ μ 2 w ˉ q k ′ ( i = 1 ∑ 2 w ˉ ij − 1 ) w ˉ q j ′′′ θ q T Z ∑ ( j ) θ q ⟨ z ˉ j , z ˉ k ⟩ + w ˉ q k ′ w ˉ q j ′ O ( n − 3/2 ) } ) .
Concentration bounds
Uniform concentration bound for the empirical gradient
Lemma D.4 (Concentration bound for the gradient of θ \theta θ ). Let B d ( r ) B_d(r) B d ( r ) denote the Euclidean ball of radius r r r in R d \mathbb{R}^d R d . Fix j ∈ { G , A } j\in\{G,A\} j ∈ { G , A } and sample the m m m tasks independently conditional on τ b = j \tau_b=j τ b = j , writing z ˉ = z ˉ j \bar{z}=\bar{z}_j z ˉ = z ˉ j and w ˉ k = w ˉ k j \bar{w}_k=\bar{w}_{kj} w ˉ k = w ˉ k j . Fix σ μ 2 \sigma_\mu^2 σ μ 2 and λ \lambda λ independently of n n n , with either data law from Definition 2.1. Let 0 < β < 1 / 2 0<\beta<1/2 0 < β < 1/2 , 0 < δ < 1 0<\delta<1 0 < δ < 1 , r = O ( log n ) r=O(\log n) r = O ( log n ) , and suppose m , δ − 1 ∈ poly ( n ) m,\delta^{-1}\in\operatorname{poly}(n) m , δ − 1 ∈ poly ( n ) . For sufficiently large n n n , with probability at least 1 − δ 1-\delta 1 − δ , simultaneously for all θ 1 , θ 2 ∈ B d ( r ) \theta_1,\theta_2\in B_d(r) θ 1 , θ 2 ∈ B d ( r ) and all q ∈ { 1 , 2 } q\in\{1,2\} q ∈ { 1 , 2 } and s ∈ [ d ] s\in[d] s ∈ [ d ] ,
∣ 1 m ∑ b = 1 m [ ( ∑ k = 1 2 w k ( X b ) g k ( X b ) − μ b ) g q ( X b ) w q ′ ( X b ) z s ( X b ) ] − E j [ ( ∑ k = 1 2 w k ( X ) g k − μ ) g q w q ′ ( X ) z s ] ∣ ≤ ( ∣ ∑ k = 1 2 w ˉ k − 1 ∣ + n − 1 / 2 + β ) w ˉ q ( 1 − w ˉ q ) O ~ ( m − 1 / 2 ) . \left|
\frac{1}{m}\sum_{b=1}^{m}\left[\left(\sum_{k=1}^{2}w_k(X_b)g_k(X_b)-\mu_b\right)g_q(X_b)w'_q(X_b)z_s(X_b)\right]
-\mathbb{E}_j\left[\left(\sum_{k=1}^{2}w_k(X)g_k-\mu\right)g_qw'_q(X)z_s\right]
\right|
\leq
\left(\left|\sum_{k=1}^{2}\bar{w}_k-1\right|+n^{-1/2+\beta}\right)\bar{w}_q(1-\bar{w}_q)\widetilde{O}(m^{-1/2}). m 1 b = 1 ∑ m [ ( k = 1 ∑ 2 w k ( X b ) g k ( X b ) − μ b ) g q ( X b ) w q ′ ( X b ) z s ( X b ) ] − E j [ ( k = 1 ∑ 2 w k ( X ) g k − μ ) g q w q ′ ( X ) z s ] ≤ ( k = 1 ∑ 2 w ˉ k − 1 + n − 1/2 + β ) w ˉ q ( 1 − w ˉ q ) O ( m − 1/2 ) .
Proof. Set M = n − 1 / 2 + β M=n^{-1/2+\beta} M = n − 1/2 + β and choose R , C = O ( log n ) R,C=O(\sqrt{\log n}) R , C = O ( log n ) , C ≥ 1 C\geq1 C ≥ 1 , with sufficiently large constants. Apply Lemma F.17 with k = 1 k=1 k = 1 at the fixed ± λ k \pm\lambda_k ± λ k and ω s \omega_s ω s , using deviations equal to a sufficiently small constant multiple of M M M . Since n M 2 / ( R 2 e 2 R ∣ λ ∣ ) = n 2 β − o ( 1 ) nM^2/(R^2e^{2R|\lambda|})=n^{2\beta-o(1)} n M 2 / ( R 2 e 2 R ∣ λ ∣ ) = n 2 β − o ( 1 ) , symmetry of the centered observations, the fixed d d d and ω \omega ω , and the Gaussian tail of μ \mu μ give
E = { max k ∣ g k − μ ∣ ≤ M , ∣ μ ∣ ≤ C , ∥ z − z ˉ ∥ 2 ≤ M } , P j ( E c ) = O ( n − A ) \mathcal{E}=\left\{\max_k\lvert g_k-\mu\rvert\le M,\ \lvert\mu\rvert\le C,\ \lVert z-\bar{z}\rVert_2\le M\right\},\qquad\mathbb{P}_j(\mathcal{E}^{\mathsf{c}})=O(n^{-A}) E = { k max ∣ g k − μ ∣ ≤ M , ∣ μ ∣ ≤ C , ∥ z − z ˉ ∥ 2 ≤ M } , P j ( E c ) = O ( n − A )
for any prescribed fixed A > 0 A>0 A > 0 . Apply the deterministic covers in Lemma D.5 to the integrands multiplied by 1 E 1_{\mathcal{E}} 1 E . The discarded normalized integrand is bounded by
3 e 2 r M ( ∣ μ ∣ + max ℓ ∈ [ n ] ∣ X ℓ − μ ∣ ) 2 \frac{3e^{2r}}{M}\left(\lvert\mu\rvert+\max_{\ell\in[n]}\lvert X_\ell-\mu\rvert\right)^2 M 3 e 2 r ( ∣ μ ∣ + ℓ ∈ [ n ] max ∣ X ℓ − μ ∣ ) 2
since w q ′ / w ˉ q ′ ≤ e 2 r w'_q/\bar{w}'_q\le e^{2r} w q ′ / w ˉ q ′ ≤ e 2 r and Γ 1 ≥ M \Gamma_1\ge M Γ 1 ≥ M . Its L 2 L^2 L 2 norm is polynomial in n n n , so Cauchy–Schwarz and sufficiently large A A A make the discarded expectation o ( m − 1 / 2 ) o(m^{-1/2}) o ( m − 1/2 ) and the probability of discarding any training task at most δ / 2 \delta/2 δ /2 . Use failure probability δ / 2 \delta/2 δ /2 for the fixed number of coordinates in the helper bound, where r M = o ( 1 ) rM=o(1) r M = o ( 1 ) and its remaining factors are logarithmic.
Lemma D.5 (Concentration bound for the normalized gradient). Fix j ∈ { G , A } j\in\{\mathrm{G},\mathrm{A}\} j ∈ { G , A } , a gate index q ∈ [ 2 ] q\in[2] q ∈ [ 2 ] , a coordinate s ∈ [ d ] s\in[d] s ∈ [ d ] , a radius r > 0 r>0 r > 0 and a failure probability δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , and sample m m m tasks independently conditional on τ b = j \tau_b=j τ b = j , writing z ˉ = z ˉ j \bar{z}=\bar{z}_j z ˉ = z ˉ j and w ˉ k = w ˉ k j \bar{w}_k=\bar{w}_{kj} w ˉ k = w ˉ k j . Suppose M > 0 M>0 M > 0 , C ≥ 1 C\ge1 C ≥ 1 , and, almost surely for a single task and every k k k ,
∣ g k ( X ) − μ ∣ ≤ M , ∣ μ ∣ ≤ C , ∥ z ( X ) − z ˉ ∥ 2 ≤ M , ∥ z ˉ ∥ 2 ≤ C . \lvert g_k(X)-\mu\rvert\le M,\qquad\lvert\mu\rvert\le C,\qquad\lVert z(X)-\bar{z}\rVert_2\le M,\qquad\lVert\bar{z}\rVert_2\le C. ∣ g k ( X ) − μ ∣ ≤ M , ∣ μ ∣ ≤ C , ∥ z ( X ) − z ˉ ∥ 2 ≤ M , ∥ z ˉ ∥ 2 ≤ C . Let
w k ( X ) = σ ( ⟨ θ k , z ( X ) ⟩ ) , w ˉ k = σ ( ⟨ θ k , z ˉ ⟩ ) , w_k(X)=\sigma\left(\langle\theta_k,z(X)\rangle\right),\qquad\bar{w}_k=\sigma\left(\langle\theta_k,\bar{z}\rangle\right), w k ( X ) = σ ( ⟨ θ k , z ( X )⟩ ) , w ˉ k = σ ( ⟨ θ k , z ˉ ⟩ ) , and define
Γ 1 = ∣ ∑ k = 1 2 w ˉ k − 1 ∣ + M , Γ 2 = w ˉ q ( 1 − w ˉ q ) , \Gamma_1=\left\lvert\sum_{k=1}^{2}\bar{w}_k-1\right\rvert+M,\qquad\Gamma_2=\bar{w}_q(1-\bar{w}_q), Γ 1 = k = 1 ∑ 2 w ˉ k − 1 + M , Γ 2 = w ˉ q ( 1 − w ˉ q ) , Ψ θ , q , s ( X , μ ) = ( ∑ k = 1 2 w k ( X ) g k ( X ) − μ ) g q ( X ) w q ′ ( X ) z s ( X ) . \Psi_{\theta,q,s}(X,\mu)=\left(\sum_{k=1}^{2}w_k(X)g_k(X)-\mu\right)g_q(X)w'_q(X)z_s(X). Ψ θ , q , s ( X , μ ) = ( k = 1 ∑ 2 w k ( X ) g k ( X ) − μ ) g q ( X ) w q ′ ( X ) z s ( X ) . Then, with probability at least 1 − δ 1-\delta 1 − δ ,
sup θ 1 , θ 2 ∈ B d ( r ) 1 Γ 1 Γ 2 ∣ 1 m ∑ b = 1 m Ψ θ , q , s ( X b , μ b ) − E j [ Ψ θ , q , s ( X , μ ) ] ∣ ≲ 2 ( C + M + C r ) e r M ( M + C ) 2 [ 2 d log { 2 + 2 m r ( C + M ) ( 1 + M − 1 ) } + log ( 2 / δ ) m ] 1 / 2 . \sup_{\theta_1,\theta_2\in B_d(r)}
\frac{1}{\Gamma_1\Gamma_2}
\left\lvert\frac{1}{m}\sum_{b=1}^{m}\Psi_{\theta,q,s}(X_b,\mu_b)-\mathbb{E}_j[\Psi_{\theta,q,s}(X,\mu)]\right\rvert
\lesssim2(C+M+Cr)e^{rM}(M+C)^2
\left[\frac{2d\log\{2+2mr(C+M)(1+M^{-1})\}+\log(2/\delta)}{m}\right]^{1/2}. θ 1 , θ 2 ∈ B d ( r ) sup Γ 1 Γ 2 1 m 1 b = 1 ∑ m Ψ θ , q , s ( X b , μ b ) − E j [ Ψ θ , q , s ( X , μ )] ≲ 2 ( C + M + C r ) e r M ( M + C ) 2 [ m 2 d log { 2 + 2 m r ( C + M ) ( 1 + M − 1 )} + log ( 2/ δ ) ] 1/2 .
Proof. Here L ∞ L_\infty L ∞ denotes the supremum over the full support of a single task. All covers below are deterministic. Define
F a = { f θ : ( z , g , μ ) ↦ 1 Γ 1 ( ∑ k = 1 2 σ ( θ k T z ) g k − μ ) : θ k ∈ B d ( r ) } . \mathcal{F}_a=\left\{f_\theta:(z,g,\mu)\mapsto\frac{1}{\Gamma_1}\left(\sum_{k=1}^{2}\sigma(\theta_k^\mathsf{T}z)g_k-\mu\right):\theta_k\in B_d(r)\right\}. F a = { f θ : ( z , g , μ ) ↦ Γ 1 1 ( k = 1 ∑ 2 σ ( θ k T z ) g k − μ ) : θ k ∈ B d ( r ) } .
For f θ ∈ F a f_\theta\in\mathcal{F}_a f θ ∈ F a we can write
f θ = 1 Γ 1 ( ∑ k = 1 2 w k ( g k − μ ) + μ ∑ k = 1 2 ( w k − w ˉ k ) + μ ( ∑ k = 1 2 w ˉ k − 1 ) ) . f_\theta=\frac{1}{\Gamma_1}\left(\sum_{k=1}^{2}w_k(g_k-\mu)+\mu\sum_{k=1}^{2}(w_k-\bar{w}_k)+\mu\left(\sum_{k=1}^{2}\bar{w}_k-1\right)\right). f θ = Γ 1 1 ( k = 1 ∑ 2 w k ( g k − μ ) + μ k = 1 ∑ 2 ( w k − w ˉ k ) + μ ( k = 1 ∑ 2 w ˉ k − 1 ) ) .
Since ∣ w k − w ˉ k ∣ ≤ r M / 4 \lvert w_k-\bar{w}_k\rvert\le rM/4 ∣ w k − w ˉ k ∣ ≤ r M /4 and C ≥ 1 C\ge1 C ≥ 1 , this gives
∥ f θ ∥ ∞ ≤ 2 ( C + M + C r ) ≡ B a . \lVert f_\theta\rVert_\infty\le2(C+M+Cr)\equiv B_a. ∥ f θ ∥ ∞ ≤ 2 ( C + M + C r ) ≡ B a .
The normalizing factor also depends on θ \theta θ , with
∣ Γ 1 ( θ ) − Γ 1 ( θ ′ ) ∣ ≤ C 2 max k ∥ θ k − θ k ′ ∥ 2 . \lvert\Gamma_1(\theta)-\Gamma_1(\theta')\rvert\le\frac{C}{2}\max_k\lVert\theta_k-\theta'_k\rVert_2. ∣ Γ 1 ( θ ) − Γ 1 ( θ ′ )∣ ≤ 2 C k max ∥ θ k − θ k ′ ∥ 2 .
Using Γ 1 ≥ M \Gamma_1 \ge M Γ 1 ≥ M and the sigmoid’s 1 / 4 1/4 1/4 -Lipschitz bound, we obtain
∥ f θ − f θ ′ ∥ ∞ ≤ ( C + M ) 2 + B a C 2 M max k ∥ θ k − θ k ′ ∥ 2 ≤ 2 B a ( C + M ) M max k ∥ θ k − θ k ′ ∥ 2 . \lVert f_\theta-f_{\theta'}\rVert_\infty\le\frac{(C+M)^2+B_aC}{2M}\max_k\lVert\theta_k-\theta'_k\rVert_2 \le\frac{2B_a(C+M)}{M}\max_k\lVert\theta_k-\theta'_k\rVert_2. ∥ f θ − f θ ′ ∥ ∞ ≤ 2 M ( C + M ) 2 + B a C k max ∥ θ k − θ k ′ ∥ 2 ≤ M 2 B a ( C + M ) k max ∥ θ k − θ k ′ ∥ 2 .
A Euclidean cover of each B d ( r ) B_d(r) B d ( r ) therefore gives
log N ( u , F a , L ∞ ) ≲ 2 d log ( 2 + 2 r B a ( C + M ) M u ) . (16) \log\mathcal{N}(u,\mathcal{F}_a,L_\infty)\lesssim2d\log\left(2+\frac{2rB_a(C+M)}{Mu}\right). \tag*{(16)} log N ( u , F a , L ∞ ) ≲ 2 d log ( 2 + M u 2 r B a ( C + M ) ) . (16)
Define
F b = { ( z , g , μ ) ↦ w q ′ g q z s Γ 2 : θ q ∈ B d ( r ) } . \mathcal{F}_b=\left\{(\mathbf{z},\mathbf{g},\mu)\mapsto\frac{w'_qg_qz_s}{\Gamma_2}:\theta_q\in B_d(r)\right\}. F b = { ( z , g , μ ) ↦ Γ 2 w q ′ g q z s : θ q ∈ B d ( r ) } .
Since ∣ d d u log σ ′ ( u ) ∣ ≤ 1 \left|\frac{d}{du}\log\sigma'(u)\right|\le1 d u d log σ ′ ( u ) ≤ 1 ,
w q ′ Γ 2 ≤ e r M , ∥ ∇ θ q log w q ′ Γ 2 ∥ 2 ≤ M + 2 C . \frac{w'_q}{\Gamma_2}\le e^{rM},\qquad\left\lVert\nabla_{\theta_q}\log\frac{w'_q}{\Gamma_2}\right\rVert_2\le M+2C. Γ 2 w q ′ ≤ e r M , ∇ θ q log Γ 2 w q ′ 2 ≤ M + 2 C .
Thus the functions in F b \mathcal{F}_b F b are bounded in absolute value by e r M ( M + C ) 2 e^{rM}(M+C)^2 e r M ( M + C ) 2 and have Lipschitz constant at most e r M ( M + C ) 2 ( M + 2 C ) e^{rM}(M+C)^2(M+2C) e r M ( M + C ) 2 ( M + 2 C ) in θ q \theta_q θ q , including the dependence of Γ 2 \Gamma_2 Γ 2 . Let F \mathcal{F} F consist of the products f a f b f_af_b f a f b with the same parameters in both factors. These products are bounded in absolute value by B a e r M ( M + C ) 2 B_ae^{rM}(M+C)^2 B a e r M ( M + C ) 2 . A deterministic parameter cover with mesh [ 4 m ( C + M ) ( 1 + M − 1 ) ] − 1 [4m(C+M)(1+M^{-1})]^{-1} [ 4 m ( C + M ) ( 1 + M − 1 ) ] − 1 gives
log N ( B a e r M ( M + C ) 2 m , F , L ∞ ) ≲ 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) . \log\mathcal{N}\left(\frac{B_ae^{rM}(M+C)^2}{m},\mathcal{F},L_\infty\right)\lesssim2d\log\left(2+2mr(C+M)(1+M^{-1})\right). log N ( m B a e r M ( M + C ) 2 , F , L ∞ ) ≲ 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) .
Hoeffding’s inequality and a union bound over this cover, followed by approximation in L ∞ L_\infty L ∞ , give, with probability at least 1 − δ 1-\delta 1 − δ ,
sup f ∈ F ∣ 1 m ∑ b = 1 m f ( X b ) − E j [ f ] ∣ ≲ B a e r M ( M + C ) 2 [ 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) + log ( 2 / δ ) m ] 1 / 2 . \sup_{f\in\mathcal{F}}\left|\frac{1}{m}\sum_{b=1}^{m}f(\mathbf{X}_b)-\mathbb{E}_j[f]\right|\lesssim B_ae^{rM}(M+C)^2\left[\frac{2d\log\left(2+2mr(C+M)(1+M^{-1})\right)+\log(2/\delta)}{m}\right]^{1/2}. f ∈ F sup m 1 b = 1 ∑ m f ( X b ) − E j [ f ] ≲ B a e r M ( M + C ) 2 [ m 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) + log ( 2/ δ ) ] 1/2 .
The approximation contributes at most 2 B a e r M ( M + C ) 2 / m 2B_ae^{rM}(M+C)^2/m 2 B a e r M ( M + C ) 2 / m , which is absorbed in this bound.
Lemma D.6 (Local concentration for the loss). Under the assumptions of Lemma D.4 , with probability at least 1 − δ 1-\delta 1 − δ , uniformly over θ 1 , θ 2 ∈ B d ( r ) \theta_1,\theta_2\in B_d(r) θ 1 , θ 2 ∈ B d ( r ) satisfying ∣ ∑ k w ˉ k − 1 ∣ = O ( n − 1 ) \left|\sum_k\bar{w}_k-1\right|=O(n^{-1}) ∣ ∑ k w ˉ k − 1 ∣ = O ( n − 1 ) with a fixed implied constant,*
∣ L ^ m ( j ) ( θ ) − L ( j ) ( θ ) ∣ = O ~ ( n − 1 + β m + n − 1 + 2 β m ) . \left|\widehat{L}^{(j)}_m(\theta)-L^{(j)}(\theta)\right|=\widetilde{O}\left(\frac{n^{-1+\beta}}{\sqrt{m}}+\frac{n^{-1+2\beta}}{m}\right). L m ( j ) ( θ ) − L ( j ) ( θ ) = O ( m n − 1 + β + m n − 1 + 2 β ) .
Proof. Use E \mathcal{E} E , M M M , and C C C from the proof of Lemma D.4 , and apply the covers in Lemma D.7 to F s q 1 E \mathcal{F}_{\mathrm{sq}1\mathcal{E}} F sq 1 E . The normalized squared residual has envelope
9 M 2 ( ∣ μ ∣ + max ℓ ∈ [ n ] ∣ X ℓ − μ ∣ ) 2 . \frac{9}{M^2}\left(|\mu|+\max_{\ell\in[n]}|X_\ell-\mu|\right)^2. M 2 9 ( ∣ μ ∣ + ℓ ∈ [ n ] max ∣ X ℓ − μ ∣ ) 2 .
Cauchy–Schwarz makes the discarded expectation o ( m − 1 ) o(m^{-1}) o ( m − 1 ) , with the probability of discarding a training task absorbed in δ \delta δ . The fixed-parameter moment-ratio argument in the proof of Lemma 3.5 , applied also to the paired experts, and independence of μ \mu μ from the centered observations give
L ( j ) = O ( ( 1 + r ) 2 n ) = O ~ ( n − 1 ) , Γ 1 2 U = O ~ ( n − 1 + 2 β ) . \mathcal{L}^{(j)}=O\left(\frac{(1+r)^2}{n}\right)=\widetilde{O}(n^{-1}),\qquad\Gamma_1^2U=\widetilde{O}(n^{-1+2\beta}). L ( j ) = O ( n ( 1 + r ) 2 ) = O ( n − 1 ) , Γ 1 2 U = O ( n − 1 + 2 β ) .
Substitute into Lemma D.7 . The discarded expectation is absorbed by its linear term.
Lemma D.7 (Uniform concentration for the loss). Fix j ∈ { G , A } j \in\{\mathrm{G},\mathrm{A}\} j ∈ { G , A } and sample the m m m tasks independently conditional on τ b = j \tau_b = j τ b = j , writing z ˉ = z ˉ j \bar{z} = \bar{z}_j z ˉ = z ˉ j and w ˉ k = w ˉ k j \bar{w}_k = \bar{w}_{kj} w ˉ k = w ˉ k j . Suppose M > 0 M > 0 M > 0 , C ≥ 1 C \ge1 C ≥ 1 , and the following bounds hold almost surely for a single task and every k k k :
∣ g k ( X ) − μ ∣ ≤ M ∣ μ ∣ ≤ C ∥ z ( X ) − z ˉ ∥ 2 ≤ M ∥ z ˉ ∥ 2 ≤ C w k ( X ) = σ ( ⟨ θ k , z ( X ) ⟩ ) w ˉ k = σ ( ⟨ θ k , z ˉ ⟩ ) Γ 1 = ∣ ∑ k = 1 2 w ˉ k − 1 ∣ + M U = 4 ( C + M + C r ) 2 \begin{aligned}
|g_k(\mathbf{X})-\mu|&\le M\\
|\mu|&\le C\\
\|\mathbf{z}(\mathbf{X})-\bar{\mathbf{z}}\|_2&\le M\\
\|\bar{\mathbf{z}}\|_2&\le C\\
w_k(\mathbf{X})&=\sigma(\langle\theta_k,\mathbf{z}(\mathbf{X})\rangle)\\
\bar{w}_k&=\sigma(\langle\theta_k,\bar{\mathbf{z}}\rangle)\\
\Gamma_1&=\left|\sum_{k=1}^{2}\bar{w}_k-1\right|+M\\
U&=4(C+M+Cr)^2
\end{aligned} ∣ g k ( X ) − μ ∣ ∣ μ ∣ ∥ z ( X ) − z ˉ ∥ 2 ∥ z ˉ ∥ 2 w k ( X ) w ˉ k Γ 1 U ≤ M ≤ C ≤ M ≤ C = σ (⟨ θ k , z ( X )⟩) = σ (⟨ θ k , z ˉ ⟩) = k = 1 ∑ 2 w ˉ k − 1 + M = 4 ( C + M + C r ) 2 Let
L ^ m ( j ) ( θ ) = 1 2 m ∑ b = 1 m ( ∑ k = 1 2 w k ( X b ) g k ( X b ) − μ b ) 2 , L ( j ) ( θ ) = 1 2 E j [ ( ∑ k = 1 2 w k ( X ) g k ( X ) − μ ) 2 ] . \widehat{\mathcal{L}}_m^{(j)}(\theta)=\frac{1}{2m}\sum_{b=1}^{m}\left(\sum_{k=1}^{2}w_k(\mathbf{X}_b)g_k(\mathbf{X}_b)-\mu_b\right)^2,\qquad\mathcal{L}^{(j)}(\theta)=\frac{1}{2}\mathbb{E}_j\left[\left(\sum_{k=1}^{2}w_k(\mathbf{X})g_k(\mathbf{X})-\mu\right)^2\right]. L m ( j ) ( θ ) = 2 m 1 b = 1 ∑ m ( k = 1 ∑ 2 w k ( X b ) g k ( X b ) − μ b ) 2 , L ( j ) ( θ ) = 2 1 E j ( k = 1 ∑ 2 w k ( X ) g k ( X ) − μ ) 2 . Then, with probability at least 1 − δ 1-\delta 1 − δ , the following holds for all θ 1 , θ 2 ∈ B d ( r ) \theta_1,\theta_2\in B_d(r) θ 1 , θ 2 ∈ B d ( r ) :
∣ L ^ m ( j ) ( θ ) − L ( j ) ( θ ) ∣ ≲ L ( j ) ( θ ) Γ 1 2 U 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) + log ( 2 / δ ) m + Γ 1 2 U 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) + log ( 2 / δ ) m . \left|\widehat{\mathcal{L}}_m^{(j)}(\theta)-\mathcal{L}^{(j)}(\theta)\right|\lesssim\sqrt{\mathcal{L}^{(j)}(\theta)\Gamma_1^2U\frac{2d\log\left(2+2mr(C+M)(1+M^{-1})\right)+\log(2/\delta)}{m}}+\Gamma_1^2U\frac{2d\log\left(2+2mr(C+M)(1+M^{-1})\right)+\log(2/\delta)}{m}. L m ( j ) ( θ ) − L ( j ) ( θ ) ≲ L ( j ) ( θ ) Γ 1 2 U m 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) + log ( 2/ δ ) + Γ 1 2 U m 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) + log ( 2/ δ ) . Proof. Use F a \mathcal{F}_a F a from the proof of Lemma D.5, with B a = 2 ( C + M + C r ) B_a=2(C+M+Cr) B a = 2 ( C + M + C r ) , and let
F s q = { f θ 2 : f θ ∈ F a } . \mathcal{F}_{sq}=\{f_\theta^2:f_\theta\in\mathcal{F}_a\}. F s q = { f θ 2 : f θ ∈ F a } . For every u ∈ F s q u\in\mathcal{F}_{sq} u ∈ F s q ,
0 ≤ u ≤ B a 2 = U , Var ( u ) ≤ E j [ u 2 ] ≤ U E j [ u ] . 0\le u\le B_a^2=U,\qquad\operatorname{Var}(u)\le\mathbb{E}_j[u^2]\le U\mathbb{E}_j[u]. 0 ≤ u ≤ B a 2 = U , Var ( u ) ≤ E j [ u 2 ] ≤ U E j [ u ] . Since squaring is 2 B a 2B_a 2 B a -Lipschitz on [ − B a , B a ] [-B_a,B_a] [ − B a , B a ] , (16) gives
log N ( u , F s q , L ∞ ) ≲ 2 d log ( 2 + 2 r U ( C + M ) M u ) . \log\mathcal{N}(u,\mathcal{F}_{sq},L_\infty)\lesssim2d\log\left(2+\frac{2rU(C+M)}{Mu}\right). log N ( u , F s q , L ∞ ) ≲ 2 d log ( 2 + M u 2 r U ( C + M ) ) . Choose u 0 = U / m u_0=U/m u 0 = U / m and a deterministic u 0 u_0 u 0 -cover C u 0 ⊂ F s q \mathcal{C}_{u_0}\subset\mathcal{F}_{sq} C u 0 ⊂ F s q in L ∞ L_\infty L ∞ over the full support. Then
log ∣ C u 0 ∣ ≲ 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) . \log|\mathcal{C}_{u_0}|\lesssim2d\log\left(2+2mr(C+M)(1+M^{-1})\right). log ∣ C u 0 ∣ ≲ 2 d log ( 2 + 2 m r ( C + M ) ( 1 + M − 1 ) ) . Bernstein’s inequality and a union bound give, simultaneously for every v ∈ C u 0 v\in\mathcal{C}_{u_0} v ∈ C u 0 , with probability at least 1 − δ 1-\delta 1 − δ ,
∣ 1 m ∑ b = 1 m v ( X b ) − E j [ v ] ∣ ≤ 2 U E j [ v ] log ( 2 ∣ C u 0 ∣ / δ ) m + 2 U log ( 2 ∣ C u 0 ∣ / δ ) 3 m . \left|\frac{1}{m}\sum_{b=1}^{m}v(\mathbf{X}_b)-\mathbb{E}_j[v]\right|\le\sqrt{\frac{2U\mathbb{E}_j[v]\log(2|\mathcal{C}_{u_0}|/\delta)}{m}}+\frac{2U\log(2|\mathcal{C}_{u_0}|/\delta)}{3m}. m 1 b = 1 ∑ m v ( X b ) − E j [ v ] ≤ m 2 U E j [ v ] log ( 2∣ C u 0 ∣/ δ ) + 3 m 2 U log ( 2∣ C u 0 ∣/ δ ) . For any u ∈ F s q u\in\mathcal{F}_{sq} u ∈ F s q choose v v v in this cover with ∥ u − v ∥ ∞ ≤ U / m \|u-v\|_\infty\le U/m ∥ u − v ∥ ∞ ≤ U / m . This controls both the empirical average and the expectation, so
∣ 1 m ∑ b = 1 m u ( X b ) − E j [ u ] ∣ ≤ ∣ 1 m ∑ b = 1 m v ( X b ) − E j [ v ] ∣ + 2 U m , E j [ v ] ≤ E j [ u ] + U m . \left|\frac{1}{m}\sum_{b=1}^{m}u(\mathbf{X}_b)-\mathbb{E}_j[u]\right|\le\left|\frac{1}{m}\sum_{b=1}^{m}v(\mathbf{X}_b)-\mathbb{E}_j[v]\right|+\frac{2U}{m},\qquad\mathbb{E}_j[v]\le\mathbb{E}_j[u]+\frac{U}{m}. m 1 b = 1 ∑ m u ( X b ) − E j [ u ] ≤ m 1 b = 1 ∑ m v ( X b ) − E j [ v ] + m 2 U , E j [ v ] ≤ E j [ u ] + m U . The resulting approximation terms are absorbed by the linear term in Bernstein’s bound. Finally, for u = f θ 2 u=f_\theta^2 u = f θ 2 ,
L ^ m ( j ) ( θ ) = Γ 1 2 2 m ∑ b = 1 m u ( X b ) , L ( j ) ( θ ) = Γ 1 2 2 E j [ u ] . \widehat{\mathcal{L}}_m^{(j)}(\theta)=\frac{\Gamma_1^2}{2m}\sum_{b=1}^{m}u(\mathbf{X}_b),\qquad\mathcal{L}^{(j)}(\theta)=\frac{\Gamma_1^2}{2}\mathbb{E}_j[u]. L m ( j ) ( θ ) = 2 m Γ 1 2 b = 1 ∑ m u ( X b ) , L ( j ) ( θ ) = 2 Γ 1 2 E j [ u ] . Multiplying by Γ 1 2 / 2 \Gamma_1^2/2 Γ 1 2 /2 proves the claimed bound simultaneously for all parameters.
Analysis of individual stationary points: complete flow
Proof of Lemma B.7
Proof. Since Z ≻ 0 Z \succ0 Z ≻ 0 ,
d d t L t r u n c a t e d ( w ˉ ) = − 1 4 ∑ q = 1 2 ∥ ∑ j w ˉ q j ′ S q j ( w ˉ ) z ˉ j ∥ 2 2 \frac{d}{dt}\mathcal{L}^{\mathrm{truncated}}(\bar{w})=-\frac{1}{4}\sum_{q=1}^{2}\left\lVert\sum_j\bar{w}'_{qj}S_{qj}(\bar{w})\bar{z}_j\right\rVert_2^2 d t d L truncated ( w ˉ ) = − 4 1 q = 1 ∑ 2 j ∑ w ˉ q j ′ S q j ( w ˉ ) z ˉ j 2 2
w ˉ ˙ = 0 ⟺ w ˉ q j ′ S q j ( w ˉ ) = 0 for all q , j . \dot{\bar{w}}=0\quad\Longleftrightarrow\quad\bar{w}'_{qj}S_{qj}(\bar{w})=0\quad\text{for all }q,j. w ˉ ˙ = 0 ⟺ w ˉ q j ′ S q j ( w ˉ ) = 0 for all q , j .
For k ≠ k j k\ne k_j k = k j , the strict hierarchy gives
S k j ( w ˉ ) − S k j k j ( w ˉ ) = ∑ k k j ( j ) − ∑ k j k j ( j ) n w ˉ k j j + ∑ k k ( j ) − ∑ k k j ( j ) n w ˉ k j > 0 S_{k_j}(\bar{w})-S_{k_jk_j}(\bar{w})=\frac{\sum_{k k_j}^{(j)}-\sum_{k_j k_j}^{(j)}}{n}\bar{w}_{k_jj}+\frac{\sum_{kk}^{(j)}-\sum_{k k_j}^{(j)}}{n}\bar{w}_{kj}>0 S k j ( w ˉ ) − S k j k j ( w ˉ ) = n ∑ k k j ( j ) − ∑ k j k j ( j ) w ˉ k j j + n ∑ k k ( j ) − ∑ k k j ( j ) w ˉ k j > 0
whenever w ˉ k j j + w ˉ k j > 0 \bar{w}_{k_jj}+\bar{w}_{kj}>0 w ˉ k j j + w ˉ k j > 0 , excluding two interior gates in the same context. For q ≠ k q\ne k q = k and 0 < w ˉ q j ′ < 1 0<\bar{w}'_{qj}<1 0 < w ˉ q j ′ < 1 , stationarity requires
w ˉ k j j ∗ = 1 ⟹ 0 = S q j ( w ˉ ∘ ) = ( σ μ 2 + ∑ q q ( j ) n ) w ˉ q j ′ + ∑ q k ( j ) n > 0 , \bar{w}_{k_jj}^{*}=1\quad\Longrightarrow\quad0=S_{qj}(\bar{w}^{\circ})=\left(\sigma_\mu^2+\frac{\sum_{qq}^{(j)}}{n}\right)\bar{w}'_{qj}+\frac{\sum_{qk}^{(j)}}{n}>0, w ˉ k j j ∗ = 1 ⟹ 0 = S q j ( w ˉ ∘ ) = ( σ μ 2 + n ∑ q q ( j ) ) w ˉ q j ′ + n ∑ q k ( j ) > 0 ,
w ˉ k j j ∗ = 0 ⟹ w ˉ q j ′ = n σ μ 2 n σ μ 2 + ∑ q q ( j ) . \bar{w}_{k_jj}^{*}=0\quad\Longrightarrow\quad\bar{w}'_{qj}=\frac{n\sigma_\mu^2}{n\sigma_\mu^2+\sum_{qq}^{(j)}}. w ˉ k j j ∗ = 0 ⟹ w ˉ q j ′ = n σ μ 2 + ∑ q q ( j ) n σ μ 2 .
The four corners have w ˉ q j ′ = 0 \bar{w}'_{qj}=0 w ˉ q j ′ = 0 , completing the classification. The unique optimum follows from convexity, strict convexity on the selected coordinates, and
∂ L t r u n c a t e d ∂ w ˉ q j = 1 2 S q j , S k j ( w ˉ ∗ ) = 0 , \frac{\partial\mathcal{L}^{\mathrm{truncated}}}{\partial\bar{w}_{qj}}=\frac{1}{2}S_{qj},\qquad S_{k_j}(\bar{w}^{*})=0, ∂ w ˉ q j ∂ L truncated = 2 1 S q j , S k j ( w ˉ ∗ ) = 0 ,
S k j ( w ˉ ∗ ) = w ˉ k j j ∗ n ( ∑ k k j ( j ) − ∑ k j k j ( j ) ) > 0 ( k ≠ k j ) . S_{k_j}(\bar{w}^{*})=\frac{\bar{w}_{k_jj}^{*}}{n}\left(\sum_{k k_j}^{(j)}-\sum_{k_j k_j}^{(j)}\right)>0\quad(k\ne k_j). S k j ( w ˉ ∗ ) = n w ˉ k j j ∗ k k j ∑ ( j ) − k j k j ∑ ( j ) > 0 ( k = k j ) .
Proof of Lemma B.8
Proof of Lemma B.8. Whenever w ˉ q j ∈ [ 1 / 4 , 3 / 4 ] \bar{w}_{qj}\in[1/4,3/4] w ˉ q j ∈ [ 1/4 , 3/4 ] , we have w ˉ q j ′ ≥ 3 / 16 \bar{w}'_{qj}\ge3/16 w ˉ q j ′ ≥ 3/16 , and therefore
∥ ∇ θ L b i a s ∥ 2 2 = σ μ 4 4 ∑ q = 1 2 ∥ ∑ j ( w ˉ 1 j + w ˉ 2 j − 1 ) w ˉ q j ′ z ˉ j ∥ 2 2 ≥ σ μ 4 λ min ( Z ) 4 ∑ q , j ( w ˉ 1 j + w ˉ 2 j − 1 ) 2 ( w ˉ q j ′ ) 2 \begin{aligned}
\left\lVert\nabla_\theta\mathcal{L}^{\mathrm{bias}}\right\rVert_2^2=\frac{\sigma_\mu^4}{4}\sum_{q=1}^{2}\left\lVert\sum_j(\bar{w}_{1j}+\bar{w}_{2j}-1)\bar{w}'_{qj}\bar{z}_j\right\rVert_2^2 \\
&\ge\frac{\sigma_\mu^4\lambda_{\min}(Z)}{4}\sum_{q,j}(\bar{w}_{1j}+\bar{w}_{2j}-1)^2(\bar{w}'_{qj})^2
\end{aligned} ∇ θ L bias 2 2 = 4 σ μ 4 q = 1 ∑ 2 j ∑ ( w ˉ 1 j + w ˉ 2 j − 1 ) w ˉ q j ′ z ˉ j 2 2 ≥ 4 σ μ 4 λ m i n ( Z ) q , j ∑ ( w ˉ 1 j + w ˉ 2 j − 1 ) 2 ( w ˉ q j ′ ) 2
≥ 2 α L b i a s . \ge2\alpha\mathcal{L}^{\mathrm{bias}}. ≥ 2 α L bias .
Consequently, locally the flow satisfies a PL inequality. Moreover,
− d d t L b i a s = ∥ ∇ θ L b i a s ∥ 2 2 2 L b i a s ≥ α 2 ∥ θ ˙ ∥ 2 . -\frac{d}{dt}\sqrt{\mathcal{L}^{\mathrm{bias}}}=\frac{\left\lVert\nabla_\theta\mathcal{L}^{\mathrm{bias}}\right\rVert_2^2}{2\sqrt{\mathcal{L}^{\mathrm{bias}}}}\ge\sqrt{\frac{\alpha}{2}}\lVert\dot{\theta}\rVert_2. − d t d L bias = 2 L bias ∇ θ L bias 2 2 ≥ 2 α ∥ θ ˙ ∥ 2 .
Thus,
∥ θ ( 0 ) − θ ( t ) ∥ 2 ≤ ∫ 0 t ∥ θ ˙ ( s ) ∥ 2 d s ≤ 2 L b i a s ( θ ( 0 ) ) α . \lVert\theta(0)-\theta(t)\rVert_2\le\int_0^t\lVert\dot{\theta}(s)\rVert_2\,ds\le\sqrt{\frac{2\mathcal{L}^{\mathrm{bias}}(\theta(0))}{\alpha}}. ∥ θ ( 0 ) − θ ( t ) ∥ 2 ≤ ∫ 0 t ∥ θ ˙ ( s ) ∥ 2 d s ≤ α 2 L bias ( θ ( 0 )) .
Since the map θ ↦ w ˉ \theta\mapsto\bar{w} θ ↦ w ˉ is globally λ max ( Z ) / 4 \sqrt{\lambda_{\max}(Z)}/4 λ m a x ( Z ) /4 -Lipschitz, we obtain
∫ 0 t ∥ w ˉ ˙ ( s ) ∥ F d s ≤ λ max ( Z ) 4 2 L b i a s ( θ ( 0 ) ) α . \int_0^t\lVert\dot{\bar{w}}(s)\rVert_F\,ds\le\frac{\sqrt{\lambda_{\max}(Z)}}{4}\sqrt{\frac{2\mathcal{L}^{\mathrm{bias}}(\theta(0))}{\alpha}}. ∫ 0 t ∥ w ˉ ˙ ( s ) ∥ F d s ≤ 4 λ m a x ( Z ) α 2 L bias ( θ ( 0 )) .
Since max q , j ∣ w ˉ q j ( 0 ) − 1 / 2 ∣ ≤ δ \max_{q,j} \lvert\bar{w}_{qj}(0)-1/2\rvert\le\delta max q , j ∣ w ˉ q j ( 0 ) − 1/2 ∣ ≤ δ , we have L b i a s ( θ ( 0 ) ) ≤ 2 σ μ 2 δ 2 \mathcal{L}^{\mathrm{bias}}(\theta(0)) \le2\sigma_\mu^2\delta^2 L bias ( θ ( 0 )) ≤ 2 σ μ 2 δ 2 . Thus we obtain a travel bound on w ˉ \bar{w} w ˉ of
∥ w ˉ ( 0 ) − w ˉ ( t ) ∥ F ≤ C δ . \lVert\bar{w}(0)-\bar{w}(t)\rVert_{\mathrm{F}} \le C\delta. ∥ w ˉ ( 0 ) − w ˉ ( t ) ∥ F ≤ C δ .
With ( 1 + C ) δ < 1 / 4 (1+C)\delta<1/4 ( 1 + C ) δ < 1/4 , a first-exit argument shows that the flow remains in w ˉ ∈ [ 1 / 4 , 3 / 4 ] 2 × 2 \bar{w}\in[1/4,3/4]^{2\times2} w ˉ ∈ [ 1/4 , 3/4 ] 2 × 2 for all time. Moreover,
d d t L b i a s = − ∥ ∇ θ L b i a s ∥ 2 2 ≤ − 2 α L b i a s , \frac{d}{dt}\mathcal{L}^{\mathrm{bias}}=-\lVert\nabla_\theta\mathcal{L}^{\mathrm{bias}}\rVert_2^2\le-2\alpha\mathcal{L}^{\mathrm{bias}}, d t d L bias = − ∥ ∇ θ L bias ∥ 2 2 ≤ − 2 α L bias ,
which gives the asserted exponential bound on the sum residuals.
The truncated gradient differs from the bias gradient by O ( n − 1 ) O(n^{-1}) O ( n − 1 ) at fixed λ \lambda λ . The same bound holds for the full population gradient on bounded sets of θ \theta θ , by the loss and gradient expansions. The PL inequality and ∥ ∇ θ L b i a s ∥ 2 ≤ C L b i a s \lVert\nabla_\theta\mathcal{L}^{\mathrm{bias}}\rVert_2\le C\sqrt{\mathcal{L}^{\mathrm{bias}}} ∥ ∇ θ L bias ∥ 2 ≤ C L bias give
d d t L b i a s ≤ − α L b i a s + C n , L b i a s ( θ ( t ) ) ≤ e − α t L b i a s ( θ ( 0 ) ) + C α n . \frac{d}{dt}\sqrt{\mathcal{L}^{\mathrm{bias}}}\le-\alpha\sqrt{\mathcal{L}^{\mathrm{bias}}}+\frac{C}{n},\qquad
\sqrt{\mathcal{L}^{\mathrm{bias}}(\theta(t))}\le e^{-\alpha t}\sqrt{\mathcal{L}^{\mathrm{bias}}(\theta(0))}+\frac{C}{\alpha n}. d t d L bias ≤ − α L bias + n C , L bias ( θ ( t )) ≤ e − α t L bias ( θ ( 0 )) + α n C .
At zero loss the inequality is interpreted using the upper right derivative. Integrating ∥ θ ˙ ∥ 2 ≤ C L b i a s + C / n \lVert\dot{\theta}\rVert_2\le C\sqrt{\mathcal{L}^{\mathrm{bias}}}+C/n ∥ θ ˙ ∥ 2 ≤ C L bias + C / n now bounds the gate travel by C δ + C ( 1 + t ) / n C\delta+C(1+t)/n C δ + C ( 1 + t ) / n . Choose t c r i t = 2 α − 1 log n t_{\mathrm{crit}}=2\alpha^{-1}\log n t crit = 2 α − 1 log n and then n n n sufficiently large. The same first-exit argument keeps the gates in [ 1 / 4 , 3 / 4 ] [1/4,3/4] [ 1/4 , 3/4 ] up to t c r i t t_{\mathrm{crit}} t crit , and the displayed bound gives the claimed O ( n − 1 ) O(n^{-1}) O ( n − 1 ) residual. For the full population flow, the same travel bound keeps θ \theta θ in a fixed bounded set up to t c r i t t_{\mathrm{crit}} t crit .
For the empirical flow, apply Lemma D.4 with β = min { ϵ , 1 } / 4 \beta=\min\{\epsilon,1\}/4 β = min { ϵ , 1 } /4 and failure probabilities of order 1 / n 1/n 1/ n , conditional on the family labels. Hoeffding’s inequality bounds the deviations of the family proportions from 1 / 2 1/2 1/2 by O ~ ( m − 1 / 2 ) \widetilde{O}(m^{-1/2}) O ( m − 1/2 ) . On bounded sets of θ \theta θ , the conditional gradient expansion bounds each family’s population gradient by C max j ∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ + C / n C\max_j\lvert\bar{w}_{1j}+\bar{w}_{2j}-1\rvert+C/n C max j ∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ + C / n . Combining these bounds gives, with probability at least 1 − 1 / n 1-1/n 1 − 1/ n , uniformly on these sets,
∥ ∇ θ ( L ^ m − L ) ∥ 2 ≤ O ~ ( n − 1 / 2 − ϵ / 2 ) max j ∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ + O ~ ( n − 1 − ϵ / 4 ) . (17) \lVert\nabla_\theta(\widehat{\mathcal{L}}_m-\mathcal{L})\rVert_2\le\widetilde{O}(n^{-1/2-\epsilon/2})\max_j\lvert\bar{w}_{1j}+\bar{w}_{2j}-1\rvert+\widetilde{O}(n^{-1-\epsilon/4}). \tag*{(17)} ∥ ∇ θ ( L m − L ) ∥ 2 ≤ O ( n − 1/2 − ϵ /2 ) j max ∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ + O ( n − 1 − ϵ /4 ) . (17)
For fixed σ μ 2 > 0 \sigma_\mu^2>0 σ μ 2 > 0 , the first term is o ( 1 ) L b i a s o(1)\sqrt{\mathcal{L}^{\mathrm{bias}}} o ( 1 ) L bias and the second is o ( n − 1 ) o(n^{-1}) o ( n − 1 ) . Up to first exit from the bounded parameter set and [ 1 / 4 , 3 / 4 ] 2 × 2 [1/4,3/4]^{2\times2} [ 1/4 , 3/4 ] 2 × 2 , the preceding PL inequality therefore gives
d d t L b i a s ≤ − α 2 L b i a s + C n , L b i a s ( θ ( t ) ) ≤ e − α t / 2 L b i a s ( θ ( 0 ) ) + 2 C α n . \frac{d}{dt}\sqrt{\mathcal{L}^{\mathrm{bias}}}\le-\frac{\alpha}{2}\sqrt{\mathcal{L}^{\mathrm{bias}}}+\frac{C}{n},\qquad
\sqrt{\mathcal{L}^{\mathrm{bias}}(\theta(t))}\le e^{-\alpha t/2}\sqrt{\mathcal{L}^{\mathrm{bias}}(\theta(0))}+\frac{2C}{\alpha n}. d t d L bias ≤ − 2 α L bias + n C , L bias ( θ ( t )) ≤ e − α t /2 L bias ( θ ( 0 )) + α n 2 C .
The same integration of ∥ θ ˙ ∥ 2 \lVert\dot{\theta}\rVert_2 ∥ θ ˙ ∥ 2 bounds the travel by C δ + C ( 1 + t ) / n C\delta+C(1+t)/n C δ + C ( 1 + t ) / n and prevents exit up to t c r i t = 2 α − 1 log n t_{\mathrm{crit}}=2\alpha^{-1}\log n t crit = 2 α − 1 log n . This proves the empirical residual and parameter bounds.
Proof of Lemma B.9
Proof of Lemma B.9. First, we check the assumptions of Lemma D.8. By Lemma F.5, almost surely over ω \omega ω we have Z ≻ 0 Z\succ0 Z ≻ 0 , Z G A ≥ 0 Z_{\mathrm{GA}}\ge0 Z GA ≥ 0 and Z G A < min { Z G G , Z A A } Z_{\mathrm{GA}}<\min\{Z_{\mathrm{GG}},Z_{\mathrm{AA}}\} Z GA < min { Z GG , Z AA } , with λ min ( Z ) \lambda_{\min}(Z) λ m i n ( Z ) bounded below independently of n n n .
Set s = ( t − t c r i t ) / n s=(t-t_{\mathrm{crit}})/n s = ( t − t crit ) / n and
r j = n σ μ 2 ( w ˉ 1 j + w ˉ 2 j − 1 ) . r_j=n\sigma_\mu^2(\bar{w}_{1j}+\bar{w}_{2j}-1). r j = n σ μ 2 ( w ˉ 1 j + w ˉ 2 j − 1 ) .
The truncated flow satisfies
1 n σ μ 2 d r k d s = − 1 2 w ˉ 1 k − ∑ j Z j k w ˉ 1 j − ( 2 r j + ∑ i = 1 2 w ˉ i j ( Σ 1 i ( j ) + Σ 2 i ( j ) ) ) + O ( 1 n σ μ 2 ) , \frac{1}{n\sigma_\mu^2}\frac{d r_k}{d s}
=-\frac{1}{2}\bar{w}_{1k}^{-}\sum_j Z_{jk}\bar{w}_{1j}^{-}\left(2r_j+\sum_{i=1}^{2}\bar{w}_{ij}\left(\Sigma_{1i}^{(j)}+\Sigma_{2i}^{(j)}\right)\right)+O\left(\frac{1}{n\sigma_\mu^2}\right), n σ μ 2 1 d s d r k = − 2 1 w ˉ 1 k − j ∑ Z j k w ˉ 1 j − ( 2 r j + i = 1 ∑ 2 w ˉ ij ( Σ 1 i ( j ) + Σ 2 i ( j ) ) ) + O ( n σ μ 2 1 ) ,
d d s [ σ − 1 ( w ˉ 1 k ) − σ − 1 ( w ˉ 2 k ) 2 ] = − 1 4 ∑ j Z j k w ˉ 1 j − n ( S 1 j − S 2 j ) ( w ˉ ) + O ( 1 n σ μ 2 ) , \frac{d}{d s}\left[\frac{\sigma^{-1}(\bar{w}_{1k})-\sigma^{-1}(\bar{w}_{2k})}{2}\right]
=-\frac{1}{4}\sum_j Z_{jk}\bar{w}_{1j}^{-}n(S_{1j}-S_{2j})(\bar{w})+O\left(\frac{1}{n\sigma_\mu^2}\right), d s d [ 2 σ − 1 ( w ˉ 1 k ) − σ − 1 ( w ˉ 2 k ) ] = − 4 1 j ∑ Z j k w ˉ 1 j − n ( S 1 j − S 2 j ) ( w ˉ ) + O ( n σ μ 2 1 ) ,
where S q j S_{qj} S q j is defined in Lemma B.7. On bounded coordinate sets, the vector fields are bounded through two derivatives, and the remainder bound holds through two derivatives.
Initialize the reduced flow in Lemma D.8 by
w ˉ 1 j r e d u c e d ( 0 ) = σ ( σ − 1 ( w ˉ 1 j ( t c r i t ) ) − σ − 1 ( w ˉ 2 j ( t c r i t ) ) 2 ) , w ˉ 2 j r e d u c e d ( 0 ) = 1 − w ˉ 1 j r e d u c e d ( 0 ) . \bar{w}_{1j}^{\mathrm{reduced}}(0)=\sigma\left(\frac{\sigma^{-1}(\bar{w}_{1j}(t_{\mathrm{crit}}))-\sigma^{-1}(\bar{w}_{2j}(t_{\mathrm{crit}}))}{2}\right),\qquad
\bar{w}_{2j}^{\mathrm{reduced}}(0)=1-\bar{w}_{1j}^{\mathrm{reduced}}(0). w ˉ 1 j reduced ( 0 ) = σ ( 2 σ − 1 ( w ˉ 1 j ( t crit )) − σ − 1 ( w ˉ 2 j ( t crit )) ) , w ˉ 2 j reduced ( 0 ) = 1 − w ˉ 1 j reduced ( 0 ) .
Then
d d s ( n L t r u n c a t e d ( w ˉ r e d u c e d ) ) = − 1 8 ∑ j , k w ˉ 1 j r e d u c e d η ( S 1 j − S 2 j ) ( w ˉ r e d u c e d ) × Z j k w ˉ 1 k r e d u c e d η ( S 1 k − S 2 k ) ( w ˉ r e d u c e d ) ≤ − λ min ( Z ) 8 ∑ j ( w ˉ 1 j r e d u c e d η ( S 1 j − S 2 j ) ( w ˉ r e d u c e d ) ) 2 ≤ 0. \begin{aligned}
\frac{d}{ds}\left(n\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\mathrm{reduced}})\right)
= -\frac{1}{8}\sum_{j,k}\bar{w}^{\mathrm{reduced}}_{1j}\eta(S_{1j}-S_{2j})(\bar{w}^{\mathrm{reduced}})
\times Z_{jk}\bar{w}^{\mathrm{reduced}}_{1k}\eta(S_{1k}-S_{2k})(\bar{w}^{\mathrm{reduced}}) \\
&\leq-\frac{\lambda_{\min}(Z)}{8}\sum_j\left(\bar{w}^{\mathrm{reduced}}_{1j}\eta(S_{1j}-S_{2j})(\bar{w}^{\mathrm{reduced}})\right)^2 \leq0.
\end{aligned} d s d ( n L truncated ( w ˉ reduced ) ) = − 8 1 j , k ∑ w ˉ 1 j reduced η ( S 1 j − S 2 j ) ( w ˉ reduced ) × Z j k w ˉ 1 k reduced η ( S 1 k − S 2 k ) ( w ˉ reduced ) ≤ − 8 λ m i n ( Z ) j ∑ ( w ˉ 1 j reduced η ( S 1 j − S 2 j ) ( w ˉ reduced ) ) 2 ≤ 0.
The sum is integrable and uniformly continuous, hence tends to zero. Since η ( S 1 G − S 2 G ) < 0 < η ( S 1 A − S 2 A ) \eta(S_{1G}-S_{2G}) < 0 < \eta(S_{1A}-S_{2A}) η ( S 1 G − S 2 G ) < 0 < η ( S 1 A − S 2 A ) , connectedness of the accumulation set gives convergence to a corner. Lemma D.8, also with indices interchanged, excludes the two corners selecting the same expert. Loss monotonicity excludes the remaining corner, which selects the wrong expert in both contexts. Indeed, on the critical manifold
L t r u n c a t e d ( w ˉ ) = 1 4 n ∑ j q j ( w ˉ 1 j ) , q j ( π ) = π 2 Σ 11 ( j ) + 2 π ( 1 − π ) Σ 12 ( j ) + ( 1 − π ) 2 Σ 22 ( j ) . \mathcal{L}^{\mathrm{truncated}}(\bar{w}) = \frac{1}{4n}\sum_j q_j(\bar{w}_{1j}), \qquad q_j(\pi)=\pi^2\Sigma_{11}^{(j)}+2\pi(1-\pi)\Sigma_{12}^{(j)}+(1-\pi)^2\Sigma_{22}^{(j)}. L truncated ( w ˉ ) = 4 n 1 j ∑ q j ( w ˉ 1 j ) , q j ( π ) = π 2 Σ 11 ( j ) + 2 π ( 1 − π ) Σ 12 ( j ) + ( 1 − π ) 2 Σ 22 ( j ) .
and
q j ′ ′ = 2 ( 1 , − 1 ) Σ ( j ) ( 1 , − 1 ) ⊤ ≥ 0 q_j''=2(1,-1)\Sigma^{(j)}(1,-1)^\top\geq0 q j ′′ = 2 ( 1 , − 1 ) Σ ( j ) ( 1 , − 1 ) ⊤ ≥ 0
because Σ ( j ) \Sigma^{(j)} Σ ( j ) is a covariance matrix. Each q j q_j q j is therefore convex on [ 0 , 1 ] [0,1] [ 0 , 1 ] and attains its maximum at an endpoint. As q j ( 1 ) = Σ 11 ( j ) q_j(1)=\Sigma_{11}^{(j)} q j ( 1 ) = Σ 11 ( j ) and q j ( 0 ) = Σ 22 ( j ) q_j(0)=\Sigma_{22}^{(j)} q j ( 0 ) = Σ 22 ( j ) , which the strict hierarchy separates, the maximum is attained at the endpoint selecting the wrong expert in family j j j , and strictly so over w ˉ 1 j ∈ [ c , 1 − c ] \bar{w}_{1j}\in[c,1-c] w ˉ 1 j ∈ [ c , 1 − c ] for any c > 0 c>0 c > 0 . Summing over j j j , the corner selecting the wrong expert in both contexts is the strict maximizer of L t r u n c a t e d \mathcal{L}^{\mathrm{truncated}} L truncated on the manifold. Since w ˉ ( t c r i t ) ∈ [ 1 / 4 , 3 / 4 ] 2 × 2 \bar{w}(t_{\mathrm{crit}})\in[1/4,3/4]^{2\times2} w ˉ ( t crit ) ∈ [ 1/4 , 3/4 ] 2 × 2 gives bounded logits, w ˉ r e d u c e d ( 0 ) \bar{w}^{\mathrm{reduced}}(0) w ˉ reduced ( 0 ) lies in [ c , 1 − c ] 2 [c,1-c]^2 [ c , 1 − c ] 2 for some absolute c > 0 c>0 c > 0 , so the nonincreasing reduced flow cannot converge to that corner. Thus w ˉ r e d u c e d ( s ) → I 2 \bar{w}^{\mathrm{reduced}}(s)\to I_2 w ˉ reduced ( s ) → I 2 , and compactness, continuous dependence, and loss monotonicity give common S , κ > 0 S,\kappa>0 S , κ > 0 with
n L t r u n c a t e d ( w ˉ r e d u c e d ( S ) ) ≤ min w ˉ ∘ in (15) n L t r u n c a t e d ( w ˉ ∘ ) − 4 κ . n\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\mathrm{reduced}}(S))\leq\min_{\bar{w}^{\circ}\text{ in (15)}} n\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ})-4\kappa. n L truncated ( w ˉ reduced ( S )) ≤ w ˉ ∘ in (15) min n L truncated ( w ˉ ∘ ) − 4 κ .
Bounded logit derivatives give w ˉ 1 j r e d u c e d ( s ) ∈ [ c , 1 − c ] \bar{w}^{\mathrm{reduced}}_{1j}(s)\in[c,1-c] w ˉ 1 j reduced ( s ) ∈ [ c , 1 − c ] on [ 0 , S ] [0,S] [ 0 , S ] , uniformly for some 0 < c < 1 / 2 0<c<1/2 0 < c < 1/2 .
Following Theorem G.2, we set
y = ( σ − 1 ( w ˉ 1 j ) − σ − 1 ( w ˉ 2 j ) 2 ) j ∈ { G , A } , ε = 1 n σ μ 2 , y=\left(\frac{\sigma^{-1}(\bar{w}_{1j})-\sigma^{-1}(\bar{w}_{2j})}{2}\right)_{j\in\{G,A\}}, \qquad\varepsilon=\frac{1}{n\sigma_\mu^2}, y = ( 2 σ − 1 ( w ˉ 1 j ) − σ − 1 ( w ˉ 2 j ) ) j ∈ { G , A } , ε = n σ μ 2 1 ,
y 0 ( s ) = ( σ − 1 ( w ˉ 1 j r e d u c e d ( s ) ) ) j ∈ { G , A } . y^0(s)=\left(\sigma^{-1}(\bar{w}^{\mathrm{reduced}}_{1j}(s))\right)_{j\in\{G,A\}}. y 0 ( s ) = ( σ − 1 ( w ˉ 1 j reduced ( s )) ) j ∈ { G , A } .
On w ˉ 2 j = 1 − w ˉ 1 j \bar{w}_{2j}=1-\bar{w}_{1j} w ˉ 2 j = 1 − w ˉ 1 j , the limiting normal equilibrium and stability bound are
r j ∗ ( y ) = − 1 2 ∑ i = 1 2 w ˉ i j ( Σ 1 i ( j ) + Σ 2 i ( j ) ) , r_j^*(y)=-\frac{1}{2}\sum_{i=1}^{2}\bar{w}_{ij}\left(\Sigma_{1i}^{(j)}+\Sigma_{2i}^{(j)}\right), r j ∗ ( y ) = − 2 1 i = 1 ∑ 2 w ˉ ij ( Σ 1 i ( j ) + Σ 2 i ( j ) ) ,
λ max ( [ − w ˉ 1 k ′ Z j k w ˉ 1 j ′ ] k , j ∈ { G , A } ) ≤ − c 2 ( 1 − c ) 2 λ min ( Z ) < 0. \lambda_{\max}\left(\left[-\bar{w}'_{1k}Z_{jk}\bar{w}'_{1j}\right]_{k,j\in\{G,A\}}\right)\leq-c^2(1-c)^2\lambda_{\min}(Z)<0. λ m a x ( [ − w ˉ 1 k ′ Z j k w ˉ 1 j ′ ] k , j ∈ { G , A } ) ≤ − c 2 ( 1 − c ) 2 λ m i n ( Z ) < 0.
The affine normal equation gives, up to first exit from a bounded interior neighborhood,
∥ ( r j ( s ) + 1 2 ∑ i = 1 2 w ˉ i j ( t c r i t + n s ) ( Σ 1 i ( j ) + Σ 2 i ( j ) ) ) j ∈ { G , A } ∥ 2 ≤ C e − κ 0 n σ μ 2 s + C n σ μ 2 . \left\|\left(r_j(s)+\frac{1}{2}\sum_{i=1}^{2}\bar{w}_{ij}(t_{\mathrm{crit}}+ns)\left(\Sigma_{1i}^{(j)}+\Sigma_{2i}^{(j)}\right)\right)_{j\in\{G,A\}}\right\|_2
\leq Ce^{-\kappa_0 n\sigma_\mu^2s}+\frac{C}{n\sigma_\mu^2}. ( r j ( s ) + 2 1 i = 1 ∑ 2 w ˉ ij ( t crit + n s ) ( Σ 1 i ( j ) + Σ 2 i ( j ) ) ) j ∈ { G , A } 2 ≤ C e − κ 0 n σ μ 2 s + n σ μ 2 C .
This bounds r r r uniformly up to first exit. The limiting slow equation is independent of r r r , so its difference from the actual slow equation is uniformly O ( ε ) O(\varepsilon) O ( ε ) on this region. Since y ( 0 ) = y 0 ( 0 ) y(0)=y^0(0) y ( 0 ) = y 0 ( 0 ) , the Lipschitz bound and Gronwall’s inequality give, up to first exit,
∥ y ( s ) − y 0 ( s ) ∥ 2 ≤ C ∫ 0 s ∥ y ( u ) − y 0 ( u ) ∥ 2 d u + C ε s , \|y(s)-y^0(s)\|_2\leq C\int_0^s\|y(u)-y^0(u)\|_2\,du+C\varepsilon s, ∥ y ( s ) − y 0 ( s ) ∥ 2 ≤ C ∫ 0 s ∥ y ( u ) − y 0 ( u ) ∥ 2 d u + C ε s ,
sup 0 ≤ s ≤ S ∥ y ( s ) − y 0 ( s ) ∥ 2 ≤ C S ε . \sup_{0\leq s\leq S}\|y(s)-y^0(s)\|_2\leq CS\varepsilon. 0 ≤ s ≤ S sup ∥ y ( s ) − y 0 ( s ) ∥ 2 ≤ C S ε .
Since w ˉ 1 j + w ˉ 2 j − 1 = ε r j \bar{w}_{1j}+\bar{w}_{2j}-1=\varepsilon r_j w ˉ 1 j + w ˉ 2 j − 1 = ε r j , smooth inversion of the coordinates on the interior region gives
sup 0 ≤ s ≤ S ∥ w ˉ ( t c r i t + n s ) − w ˉ r e d u c e d ( s ) ∥ F ≤ C S n σ μ 2 , sup 0 ≤ s ≤ S ∥ r ( s ) ∥ 2 ≤ C S . \sup_{0\le s\le S}\left\|\bar{w}(t_{\mathrm{crit}}+ns)-\bar{w}^{\mathrm{reduced}}(s)\right\|_{\mathrm{F}}\le\frac{C_S}{n\sigma_\mu^2},\qquad\sup_{0\le s\le S}\|r(s)\|_2\le C_S. 0 ≤ s ≤ S sup w ˉ ( t crit + n s ) − w ˉ reduced ( s ) F ≤ n σ μ 2 C S , 0 ≤ s ≤ S sup ∥ r ( s ) ∥ 2 ≤ C S .
These bounds prevent exit before S S S , and
n L t r u n c a t e d ( w ˉ ( t c r i t + n S ) ) = n L t r u n c a t e d ( w ˉ r e d u c e d ( S ) ) + O ( 1 n σ μ 2 ) < min w ˉ ∘ in (15) n L t r u n c a t e d ( w ˉ ∘ ) − κ \begin{aligned}
n\mathcal{L}^{\mathrm{truncated}}\left(\bar{w}(t_{\mathrm{crit}}+nS)\right)=n\mathcal{L}^{\mathrm{truncated}}\left(\bar{w}^{\mathrm{reduced}}(S)\right)+O\left(\frac{1}{n\sigma_\mu^2}\right) \\
&<\min_{\bar{w}^{\circ}\text{ in (15)}}n\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ})-\kappa
\end{aligned} n L truncated ( w ˉ ( t crit + n S ) ) = n L truncated ( w ˉ reduced ( S ) ) + O ( n σ μ 2 1 ) < w ˉ ∘ in (15) min n L truncated ( w ˉ ∘ ) − κ
for sufficiently large n n n .
For the full population flow, the loss and gradient expansions give, on bounded sets of θ \theta θ ,
∣ L − L t r u n c a t e d ∣ + ∥ ∇ θ ( L − L t r u n c a t e d ) ∥ 2 ≤ C ( σ μ 2 n + n − 3 / 2 ) , \left|\mathcal{L}-\mathcal{L}^{\mathrm{truncated}}\right|+\left\|\nabla_\theta\left(\mathcal{L}-\mathcal{L}^{\mathrm{truncated}}\right)\right\|_2\le C\left(\frac{\sigma_\mu^2}{n}+n^{-3/2}\right), L − L truncated + ∇ θ ( L − L truncated ) 2 ≤ C ( n σ μ 2 + n − 3/2 ) ,
∥ d θ q ⊥ d s ∥ 2 ≤ C ( σ μ 2 + n − 1 / 2 ) , \left\|\frac{d\theta_q^\perp}{ds}\right\|_2\le C(\sigma_\mu^2+n^{-1/2}), d s d θ q ⊥ 2 ≤ C ( σ μ 2 + n − 1/2 ) ,
uniformly in n n n and 0 < σ μ 2 ≤ 1 0<\sigma_\mu^2\le1 0 < σ μ 2 ≤ 1 , by Lemma F.6. By Lemma B.5, bounded logits and perpendicular components give bounded θ \theta θ . The coordinate errors are O ( σ μ 2 + n − 1 / 2 ) O(\sigma_\mu^2+n^{-1/2}) O ( σ μ 2 + n − 1/2 ) , so normal stability and Gronwall’s inequality give, up to first exit,
sup 0 ≤ s ≤ S ∥ w ˉ ( t c r i t + n s ) − w ˉ r e d u c e d ( s ) ∥ F ≤ C S ( σ μ 2 + n − 1 / 2 + 1 n σ μ 2 ) , sup 0 ≤ s ≤ S ∥ r ( s ) ∥ 2 ≤ C S . \sup_{0\le s\le S}\left\|\bar{w}(t_{\mathrm{crit}}+ns)-\bar{w}^{\mathrm{reduced}}(s)\right\|_{\mathrm{F}}\le C_S\left(\sigma_\mu^2+n^{-1/2}+\frac{1}{n\sigma_\mu^2}\right),\qquad\sup_{0\le s\le S}\|r(s)\|_2\le C_S. 0 ≤ s ≤ S sup w ˉ ( t crit + n s ) − w ˉ reduced ( s ) F ≤ C S ( σ μ 2 + n − 1/2 + n σ μ 2 1 ) , 0 ≤ s ≤ S sup ∥ r ( s ) ∥ 2 ≤ C S .
For sufficiently small σ μ 2 \sigma_\mu^2 σ μ 2 and then sufficiently large n n n , these bounds prevent exit before S S S , and
max { n L t r u n c a t e d ( w ˉ ( t c r i t + n S ) ) , n L ( θ ( t c r i t + n S ) ) } ≤ n L t r u n c a t e d ( w ˉ r e d u c e d ( S ) ) + C S ( σ μ 2 + n − 1 / 2 + 1 n σ μ 2 ) < min w ˉ ∘ in (15) n L t r u n c a t e d ( w ˉ ∘ ) − κ . \begin{aligned}
\max\left\{n\mathcal{L}^{\mathrm{truncated}}\left(\bar{w}(t_{\mathrm{crit}}+nS)\right),n\mathcal{L}\left(\theta(t_{\mathrm{crit}}+nS)\right)\right\} \\
&\le n\mathcal{L}^{\mathrm{truncated}}\left(\bar{w}^{\mathrm{reduced}}(S)\right)+C_S\left(\sigma_\mu^2+n^{-1/2}+\frac{1}{n\sigma_\mu^2}\right) \\
&<\min_{\bar{w}^{\circ}\text{ in (15)}}n\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ})-\kappa.
\end{aligned} max { n L truncated ( w ˉ ( t crit + n S ) ) , n L ( θ ( t crit + n S ) ) } ≤ n L truncated ( w ˉ reduced ( S ) ) + C S ( σ μ 2 + n − 1/2 + n σ μ 2 1 ) < w ˉ ∘ in (15) min n L truncated ( w ˉ ∘ ) − κ .
For the empirical flow, use the uniform concentration event in (17). Up to first exit from the same bounded region in ( r , y , θ ⊥ ) (r,y,\theta^\perp) ( r , y , θ ⊥ ) , bounded r r r gives max j ∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ = O ( n − 1 ) \max_j|\bar{w}_{1j}+\bar{w}_{2j}-1|=O(n^{-1}) max j ∣ w ˉ 1 j + w ˉ 2 j − 1∣ = O ( n − 1 ) for fixed σ μ 2 > 0 \sigma_\mu^2>0 σ μ 2 > 0 , and hence
n ∥ ∇ θ ( L ^ m − L ) ∥ 2 = o ( 1 ) . n\left\|\nabla_\theta(\hat{\mathcal{L}}_m-\mathcal{L})\right\|_2=o(1). n ∇ θ ( L ^ m − L ) 2 = o ( 1 ) .
In the rescaled equations this adds o ( 1 ) o(1) o ( 1 ) to the right-hand sides of the normal equation, the slow equation, and the equation for θ q ⊥ \theta_q^\perp θ q ⊥ . The normal stability estimate and Gronwall’s inequality for the slow equation consequently give
sup 0 ≤ s ≤ S ∥ w ˉ ( t c r i t + n s ) − w ˉ r e d u c e d ( s ) ∥ F ≤ C S ( σ μ 2 + n − 1 / 2 + 1 n σ μ 2 ) + o ( 1 ) , \sup_{0\le s\le S}\left\|\bar{w}(t_{\mathrm{crit}}+ns)-\bar{w}^{\mathrm{reduced}}(s)\right\|_{\mathrm{F}}\le C_S\left(\sigma_\mu^2+n^{-1/2}+\frac{1}{n\sigma_\mu^2}\right)+o(1), 0 ≤ s ≤ S sup w ˉ ( t crit + n s ) − w ˉ reduced ( s ) F ≤ C S ( σ μ 2 + n − 1/2 + n σ μ 2 1 ) + o ( 1 ) ,
sup 0 ≤ s ≤ S ∥ r ( s ) ∥ 2 ≤ C S + o ( 1 ) . \sup_{0\le s\le S}\|r(s)\|_2\le C_S+o(1). 0 ≤ s ≤ S sup ∥ r ( s ) ∥ 2 ≤ C S + o ( 1 ) .
Also, sup 0 ≤ s ≤ S ∥ θ q ⊥ ( t c r i t + n s ) − θ q ⊥ ( t c r i t ) ∥ 2 ≤ C S σ μ 2 + o ( 1 ) \sup_{0\le s\le S}\|\theta_q^\perp(t_{\mathrm{crit}}+ns)-\theta_q^\perp(t_{\mathrm{crit}})\|_2\le C_S\sigma_\mu^2+o(1) sup 0 ≤ s ≤ S ∥ θ q ⊥ ( t crit + n s ) − θ q ⊥ ( t crit ) ∥ 2 ≤ C S σ μ 2 + o ( 1 ) . Choose the bounds on r r r and θ ⊥ \theta^\perp θ ⊥ strictly larger than these estimates and the logit bounds strictly larger than those of the reduced flow. For sufficiently small fixed σ μ 2 \sigma_\mu^2 σ μ 2 and then sufficiently large n n n , the estimates prevent exit before S S S . The preceding loss comparison acquires only an additional o ( 1 ) o(1) o ( 1 ) term after multiplication by n n n , so the strict loss margin is preserved. Bounded logits and perpendicular components give the stated parameter bound by Lemma B.5.
Lemma D.8 (Exit from a neighborhood of a suboptimal stationary point). Let Z i j = ⟨ z ˉ i , z ˉ j ⟩ Z_{ij}=\langle\bar{z}_i,\bar{z}_j\rangle Z ij = ⟨ z ˉ i , z ˉ j ⟩ and assume
Z G A < min { Z G G , Z A A } . Z_{\mathrm{GA}}<\min\{Z_{\mathrm{GG}},Z_{\mathrm{AA}}\}. Z GA < min { Z GG , Z AA } . :::`
In the time variable s = ( t − t c r i t ) / n s=(t-t_{\mathrm{crit}})/n s = ( t − t crit ) / n , consider the reduced flow on the critical manifold w ˉ 1 j + w ˉ 2 j = 1 \bar{w}_{1j}+\bar{w}_{2j}=1 w ˉ 1 j + w ˉ 2 j = 1 given by
w ˉ ˙ 1 q = − 1 4 w ˉ 1 q ′ ∑ j Z j q w ˉ 1 j ′ n ( S 1 j − S 2 j ) ( w ˉ ) , \dot{\bar{w}}_{1q}=-\frac{1}{4}\bar{w}_{1q}^{\prime}\sum_j Z_{jq}\bar{w}_{1j}^{\prime}n(S_{1j}-S_{2j})(\bar{w}), w ˉ ˙ 1 q = − 4 1 w ˉ 1 q ′ j ∑ Z j q w ˉ 1 j ′ n ( S 1 j − S 2 j ) ( w ˉ ) ,
where S q j S_{qj} S q j is defined in Lemma B.7, so that
n ( S 1 j − S 2 j ) ( w ˉ ) = ( Σ 11 ( j ) − Σ 12 ( j ) ) w ˉ 1 j + ( Σ 12 ( j ) − Σ 22 ( j ) ) w ˉ 2 j . n(S_{1j}-S_{2j})(\bar{w})=(\Sigma_{11}^{(j)}-\Sigma_{12}^{(j)})\bar{w}_{1j}+(\Sigma_{12}^{(j)}-\Sigma_{22}^{(j)})\bar{w}_{2j}. n ( S 1 j − S 2 j ) ( w ˉ ) = ( Σ 11 ( j ) − Σ 12 ( j ) ) w ˉ 1 j + ( Σ 12 ( j ) − Σ 22 ( j ) ) w ˉ 2 j .
Suppose the expert hierarchy of Definition B.1 holds and consider the suboptimal stationary point w ˉ 1 G ∘ = w ˉ 1 A ∘ = 1 \bar{w}_{1G}^{\circ}=\bar{w}_{1A}^{\circ}=1 w ˉ 1 G ∘ = w ˉ 1 A ∘ = 1 , w ˉ 2 G ∘ = w ˉ 2 A ∘ = 0 \bar{w}_{2G}^{\circ}=\bar{w}_{2A}^{\circ}=0 w ˉ 2 G ∘ = w ˉ 2 A ∘ = 0 . The corner selecting the other expert in both contexts is covered by exchanging the expert indices. There exist δ ∈ ( 0 , 1 / 2 ) \delta\in(0,1/2) δ ∈ ( 0 , 1/2 ) , r 0 ∈ ( 0 , 1 ) r_0\in(0,1) r 0 ∈ ( 0 , 1 ) , p > 0 p>0 p > 0 and γ > 0 \gamma>0 γ > 0 , depending only on Z Z Z and { Σ ( j ) } j ∈ { G , A } \{\Sigma^{(j)}\}_{j\in\{G,A\}} { Σ ( j ) } j ∈ { G , A } , such that the following holds. Define
R δ = { 0 < w ˉ 2 G , w ˉ 2 A < δ } R_\delta=\{0<\bar{w}_{2G},\bar{w}_{2A}<\delta\} R δ = { 0 < w ˉ 2 G , w ˉ 2 A < δ }
W ( w ˉ ) = 1 w ˉ 2 A max { 1 , ( w ˉ 2 G r 0 w ˉ 2 A ) p } . W(\bar{w})=\frac{1}{\bar{w}_{2A}}\max\left\{1,\left(\frac{\bar{w}_{2G}}{r_0\bar{w}_{2A}}\right)^p\right\}. W ( w ˉ ) = w ˉ 2 A 1 max { 1 , ( r 0 w ˉ 2 A w ˉ 2 G ) p } .
For every initialization w ˉ ( 0 ) ∈ R δ \bar{w}(0)\in R_\delta w ˉ ( 0 ) ∈ R δ , the first exit time satisfies
inf { s ≥ 0 : w ˉ ( s ) ∉ R δ } ≤ W ( w ˉ ( 0 ) ) γ < ∞ . \inf\{s\geq0:\bar{w}(s)\notin R_\delta\}\leq\frac{W(\bar{w}(0))}{\gamma}<\infty. inf { s ≥ 0 : w ˉ ( s ) ∈ / R δ } ≤ γ W ( w ˉ ( 0 )) < ∞.
Proof. Note that w ˉ 1 q ′ = w ˉ 2 q ′ \bar{w}_{1q}^{\prime}=\bar{w}_{2q}^{\prime} w ˉ 1 q ′ = w ˉ 2 q ′ . Also
n ( S 1 G − S 2 G ) ( w ˉ ) ≤ 0 , n ( S 1 A − S 2 A ) ( w ˉ ∘ ) = Σ 11 ( A ) − Σ 12 ( A ) > 0. n(S_{1G}-S_{2G})(\bar{w})\leq0,\qquad n(S_{1A}-S_{2A})(\bar{w}^{\circ})=\Sigma_{11}^{(A)}-\Sigma_{12}^{(A)}>0. n ( S 1 G − S 2 G ) ( w ˉ ) ≤ 0 , n ( S 1 A − S 2 A ) ( w ˉ ∘ ) = Σ 11 ( A ) − Σ 12 ( A ) > 0.
Thus, for sufficiently small δ > 0 \delta>0 δ > 0 ,
n ( S 1 A − S 2 A ) ( w ˉ ) ≥ 1 2 n ( S 1 A − S 2 A ) ( w ˉ ∘ ) > 0 n(S_{1A}-S_{2A})(\bar{w})\geq\frac{1}{2}n(S_{1A}-S_{2A})(\bar{w}^{\circ})>0 n ( S 1 A − S 2 A ) ( w ˉ ) ≥ 2 1 n ( S 1 A − S 2 A ) ( w ˉ ∘ ) > 0
for all w ˉ ∈ R δ \bar{w}\in R_\delta w ˉ ∈ R δ . Choose p > 0 p>0 p > 0 such that
p Z G G − ( p + 1 ) Z G A > 0 , pZ_{GG}-(p+1)Z_{GA}>0, p Z GG − ( p + 1 ) Z G A > 0 ,
( p + 1 ) Z A A − p Z G A > 0. (p+1)Z_{AA}-pZ_{GA}>0. ( p + 1 ) Z AA − p Z G A > 0.
Such a p p p exists: since Z A A > 0 Z_{AA}>0 Z AA > 0 and Z G A < Z A A Z_{GA}<Z_{AA} Z G A < Z AA , the second inequality holds for every p > 0 p>0 p > 0 , and since Z G A < Z G G Z_{GA}<Z_{GG} Z G A < Z GG , the first holds for every p > max { 0 , Z G A } / ( Z G G − Z G A ) p>\max\{0,Z_{GA}\}/(Z_{GG}-Z_{GA}) p > max { 0 , Z G A } / ( Z GG − Z G A ) . Choose δ \delta δ sufficiently small that
p ( 1 − w ˉ 2 G ) Z G G − ( p + 1 ) ( 1 − w ˉ 2 A ) Z G A > 0 , p(1-\bar{w}_{2G})Z_{GG}-(p+1)(1-\bar{w}_{2A})Z_{GA}>0, p ( 1 − w ˉ 2 G ) Z GG − ( p + 1 ) ( 1 − w ˉ 2 A ) Z G A > 0 ,
( p + 1 ) ( 1 − w ˉ 2 A ) Z A A − p ( 1 − w ˉ 2 G ) Z G A > 0 , (p+1)(1-\bar{w}_{2A})Z_{AA}-p(1-\bar{w}_{2G})Z_{GA}>0, ( p + 1 ) ( 1 − w ˉ 2 A ) Z AA − p ( 1 − w ˉ 2 G ) Z G A > 0 ,
uniformly on R δ R_\delta R δ .
We show W ˙ ≤ − γ < 0 \dot{W}\leq-\gamma<0 W ˙ ≤ − γ < 0 for w ˉ ∈ R δ \bar{w}\in R_\delta w ˉ ∈ R δ .
If w ˉ 2 G ≤ r 0 w ˉ 2 A \bar{w}_{2G}\leq r_0\bar{w}_{2A} w ˉ 2 G ≤ r 0 w ˉ 2 A , then W ( w ˉ ) = 1 / w ˉ 2 A W(\bar{w})=1/\bar{w}_{2A} W ( w ˉ ) = 1/ w ˉ 2 A and
W ˙ = − w ˉ ˙ 2 A w ˉ 2 A 2 = − ( 1 − w ˉ 2 A ) 2 4 [ Z G A w ˉ 1 G ′ w ˉ 1 A ′ n ( S 1 G − S 2 G ) ( w ˉ ) + Z A A n ( S 1 A − S 2 A ) ( w ˉ ) ] . \dot{W}=-\frac{\dot{\bar{w}}_{2A}}{\bar{w}_{2A}^{2}}
=-\frac{(1-\bar{w}_{2A})^{2}}{4}\left[Z_{GA}\frac{\bar{w}_{1G}^{\prime}}{\bar{w}_{1A}^{\prime}}n(S_{1G}-S_{2G})(\bar{w})+Z_{AA}n(S_{1A}-S_{2A})(\bar{w})\right]. W ˙ = − w ˉ 2 A 2 w ˉ ˙ 2 A = − 4 ( 1 − w ˉ 2 A ) 2 [ Z G A w ˉ 1 A ′ w ˉ 1 G ′ n ( S 1 G − S 2 G ) ( w ˉ ) + Z AA n ( S 1 A − S 2 A ) ( w ˉ ) ] .
Moreover,
w ˉ 1 G ′ w ˉ 1 A ′ = w ˉ 2 G ( 1 − w ˉ 2 G ) w ˉ 2 A ( 1 − w ˉ 2 A ) ≤ r 0 1 − δ . \frac{\bar{w}_{1G}^{\prime}}{\bar{w}_{1A}^{\prime}}=\frac{\bar{w}_{2G}(1-\bar{w}_{2G})}{\bar{w}_{2A}(1-\bar{w}_{2A})}\leq\frac{r_0}{1-\delta}. w ˉ 1 A ′ w ˉ 1 G ′ = w ˉ 2 A ( 1 − w ˉ 2 A ) w ˉ 2 G ( 1 − w ˉ 2 G ) ≤ 1 − δ r 0 .
Since n ( S 1 G − S 2 G ) n(S_{1G}-S_{2G}) n ( S 1 G − S 2 G ) is bounded, choose r 0 ∈ ( 0 , 1 ) r_0\in(0,1) r 0 ∈ ( 0 , 1 ) such that
max { Z G A , 0 } r 0 1 − δ sup w ˉ ∈ R δ ∣ n ( S 1 G − S 2 G ) ( w ˉ ) ∣ ≤ 1 4 Z A A n ( S 1 A − S 2 A ) ( w ˉ ∘ ) . \max\{Z_{GA},0\}\frac{r_0}{1-\delta}\sup_{\bar{w}\in R_\delta}|n(S_{1G}-S_{2G})(\bar{w})|\leq\frac{1}{4}Z_{AA}n(S_{1A}-S_{2A})(\bar{w}^{\circ}). max { Z G A , 0 } 1 − δ r 0 w ˉ ∈ R δ sup ∣ n ( S 1 G − S 2 G ) ( w ˉ ) ∣ ≤ 4 1 Z AA n ( S 1 A − S 2 A ) ( w ˉ ∘ ) .
Then
W ˙ ≤ − ( 1 − δ ) 2 Z A A n ( S 1 A − S 2 A ) ( w ˉ ∘ ) 16 < 0. (18) \dot{W} \leq-\frac{(1-\delta)^2 Z_{AA} n(S_{1A}-S_{2A})(\bar{w}^{\circ})}{16}<0. \tag*{(18)} W ˙ ≤ − 16 ( 1 − δ ) 2 Z AA n ( S 1 A − S 2 A ) ( w ˉ ∘ ) < 0. (18)
Suppose next that w ˉ 2 G ≥ r 0 w ˉ 2 A \bar{w}_{2G} \geq r_0\bar{w}_{2A} w ˉ 2 G ≥ r 0 w ˉ 2 A . For the branch W = w ˉ 2 G p / ( r 0 w ˉ 2 A p + 1 ) W=\bar{w}_{2G}^{p}/(r_0\bar{w}_{2A}^{p+1}) W = w ˉ 2 G p / ( r 0 w ˉ 2 A p + 1 ) , the uniform bounds above give a constant c > 0 c>0 c > 0 , independent of w ˉ ∈ R δ \bar{w}\in R_\delta w ˉ ∈ R δ , such that
4 W ˙ W = 4 ( p w ˉ ˙ 2 G w ˉ 2 G − ( p + 1 ) w ˉ ˙ 2 A w ˉ 2 A ) = p w ˉ 1 G ′ w ˉ 2 G ∑ j Z j G w ˉ 1 j ′ n ( S 1 j − S 2 j ) ( w ˉ ) − ( p + 1 ) w ˉ 1 A ′ w ˉ 2 A ∑ j Z j A w ˉ 1 j ′ n ( S 1 j − S 2 j ) ( w ˉ ) = p ( 1 − w ˉ 2 G ) [ Z G G w ˉ 1 G ′ n ( S 1 G − S 2 G ) ( w ˉ ) + Z G A w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ) ] − ( p + 1 ) ( 1 − w ˉ 2 A ) [ Z G A w ˉ 1 G ′ n ( S 1 G − S 2 G ) ( w ˉ ) + Z A A w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ) ] = [ p ( 1 − w ˉ 2 G ) Z G G − ( p + 1 ) ( 1 − w ˉ 2 A ) Z G A ] w ˉ 1 G ′ n ( S 1 G − S 2 G ) ( w ˉ ) + [ p ( 1 − w ˉ 2 G ) Z G A − ( p + 1 ) ( 1 − w ˉ 2 A ) Z A A ] w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ) ≤ − [ ( p + 1 ) ( 1 − w ˉ 2 A ) Z A A − p ( 1 − w ˉ 2 G ) Z G A ] w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ) ≤ − 1 2 [ ( p + 1 ) ( 1 − w ˉ 2 A ) Z A A − p ( 1 − w ˉ 2 G ) Z G A ] w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ∘ ) ≤ − 4 c w ˉ 1 A ′ . \begin{aligned}
\frac{4\dot{W}}{W}
&=4\left(p\frac{\dot{\bar{w}}_{2G}}{\bar{w}_{2G}}-(p+1)\frac{\dot{\bar{w}}_{2A}}{\bar{w}_{2A}}\right)\\
&=p\frac{\bar{w}'_{1G}}{\bar{w}_{2G}}\sum_j Z_{jG}\bar{w}'_{1j}n(S_{1j}-S_{2j})(\bar{w})-(p+1)\frac{\bar{w}'_{1A}}{\bar{w}_{2A}}\sum_j Z_{jA}\bar{w}'_{1j}n(S_{1j}-S_{2j})(\bar{w})\\
&=p(1-\bar{w}_{2G})[Z_{GG}\bar{w}'_{1G}n(S_{1G}-S_{2G})(\bar{w})+Z_{GA}\bar{w}'_{1A}n(S_{1A}-S_{2A})(\bar{w})]\\
&\quad-(p+1)(1-\bar{w}_{2A})[Z_{GA}\bar{w}'_{1G}n(S_{1G}-S_{2G})(\bar{w})+Z_{AA}\bar{w}'_{1A}n(S_{1A}-S_{2A})(\bar{w})]\\
&=[p(1-\bar{w}_{2G})Z_{GG}-(p+1)(1-\bar{w}_{2A})Z_{GA}]\bar{w}'_{1G}n(S_{1G}-S_{2G})(\bar{w})\\
&\quad+[p(1-\bar{w}_{2G})Z_{GA}-(p+1)(1-\bar{w}_{2A})Z_{AA}]\bar{w}'_{1A}n(S_{1A}-S_{2A})(\bar{w})\\
&\leq-[(p+1)(1-\bar{w}_{2A})Z_{AA}-p(1-\bar{w}_{2G})Z_{GA}]\bar{w}'_{1A}n(S_{1A}-S_{2A})(\bar{w})\\
&\leq-\frac{1}{2}[(p+1)(1-\bar{w}_{2A})Z_{AA}-p(1-\bar{w}_{2G})Z_{GA}]\bar{w}'_{1A}n(S_{1A}-S_{2A})(\bar{w}^{\circ})\\
&\leq-4c\bar{w}'_{1A}.
\end{aligned} W 4 W ˙ = 4 ( p w ˉ 2 G w ˉ ˙ 2 G − ( p + 1 ) w ˉ 2 A w ˉ ˙ 2 A ) = p w ˉ 2 G w ˉ 1 G ′ j ∑ Z j G w ˉ 1 j ′ n ( S 1 j − S 2 j ) ( w ˉ ) − ( p + 1 ) w ˉ 2 A w ˉ 1 A ′ j ∑ Z j A w ˉ 1 j ′ n ( S 1 j − S 2 j ) ( w ˉ ) = p ( 1 − w ˉ 2 G ) [ Z GG w ˉ 1 G ′ n ( S 1 G − S 2 G ) ( w ˉ ) + Z G A w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ )] − ( p + 1 ) ( 1 − w ˉ 2 A ) [ Z G A w ˉ 1 G ′ n ( S 1 G − S 2 G ) ( w ˉ ) + Z AA w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ )] = [ p ( 1 − w ˉ 2 G ) Z GG − ( p + 1 ) ( 1 − w ˉ 2 A ) Z G A ] w ˉ 1 G ′ n ( S 1 G − S 2 G ) ( w ˉ ) + [ p ( 1 − w ˉ 2 G ) Z G A − ( p + 1 ) ( 1 − w ˉ 2 A ) Z AA ] w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ) ≤ − [( p + 1 ) ( 1 − w ˉ 2 A ) Z AA − p ( 1 − w ˉ 2 G ) Z G A ] w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ) ≤ − 2 1 [( p + 1 ) ( 1 − w ˉ 2 A ) Z AA − p ( 1 − w ˉ 2 G ) Z G A ] w ˉ 1 A ′ n ( S 1 A − S 2 A ) ( w ˉ ∘ ) ≤ − 4 c w ˉ 1 A ′ .
Thus
W ˙ ≤ − c w ˉ 1 A ′ W = − c ( 1 − w ˉ 2 A ) ( w ˉ 2 G r 0 w ˉ 2 A ) p ≤ − c ( 1 − δ ) < 0. \begin{aligned}
\dot{W}\leq-c\bar{w}'_{1A}W \\
&=-c(1-\bar{w}_{2A})\left(\frac{\bar{w}_{2G}}{r_0\bar{w}_{2A}}\right)^p \\
&\leq-c(1-\delta)<0.
\end{aligned} W ˙ ≤ − c w ˉ 1 A ′ W = − c ( 1 − w ˉ 2 A ) ( r 0 w ˉ 2 A w ˉ 2 G ) p ≤ − c ( 1 − δ ) < 0.
Both branch derivatives satisfy these bounds at w ˉ 2 G = r 0 w ˉ 2 A \bar{w}_{2G}=r_0\bar{w}_{2A} w ˉ 2 G = r 0 w ˉ 2 A as well. Since W W W is locally Lipschitz, W ˙ ≤ − γ \dot{W}\leq-\gamma W ˙ ≤ − γ almost everywhere along the trajectory for a common γ > 0 \gamma>0 γ > 0 . Apply Lemma G.1 with lower bound C = 0 C=0 C = 0 .
Lemma D.9 (Gradient bound away from stationary points). Fix λ \lambda λ , suppose the expert hierarchy of Definition B.1 holds and Z ≻ 0 Z\succ0 Z ≻ 0 , and let σ μ 2 , c , ρ > 0 \sigma_\mu^2,c,\rho>0 σ μ 2 , c , ρ > 0 . Use S S S from Lemma B.7 and define
R c , ρ = { w ˉ ∈ [ 0 , 1 ] 2 × 2 : L t r u n c a t e d ( w ˉ ) − min w ˉ ∘ ∈ S L t r u n c a t e d ( w ˉ ∘ ) ≤ c n , min w ˉ ∘ ∈ S ∥ w ˉ − w ˉ ∘ ∥ F ≥ ρ } , R_{c,\rho}=\left\{\bar{w}\in[0,1]^{2\times2}:\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\min_{\bar{w}^{\circ}\in S}\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ})\leq\frac{c}{n},\quad\min_{\bar{w}^{\circ}\in S}\lVert\bar{w}-\bar{w}^{\circ}\rVert_F\geq\rho\right\}, R c , ρ = { w ˉ ∈ [ 0 , 1 ] 2 × 2 : L truncated ( w ˉ ) − w ˉ ∘ ∈ S min L truncated ( w ˉ ∘ ) ≤ n c , w ˉ ∘ ∈ S min ∥ w ˉ − w ˉ ∘ ∥ F ≥ ρ } , C Σ = max j ∈ { G , A } max q ≠ k j { 1 Σ k j k j ( j ) , 1 Σ q k j ( j ) − Σ k j k j ( j ) , 1 Σ q q ( j ) − Σ q k j ( j ) } . C_{\Sigma}=\max_{j\in\{G,A\}}\max_{q\ne k_j}\left\{\frac{1}{\Sigma^{(j)}_{k_jk_j}},\frac{1}{\Sigma^{(j)}_{qk_j}-\Sigma^{(j)}_{k_jk_j}},\frac{1}{\Sigma^{(j)}_{qq}-\Sigma^{(j)}_{qk_j}}\right\}. C Σ = j ∈ { G , A } max q = k j max ⎩ ⎨ ⎧ Σ k j k j ( j ) 1 , Σ q k j ( j ) − Σ k j k j ( j ) 1 , Σ q q ( j ) − Σ q k j ( j ) 1 ⎭ ⎬ ⎫ . If
n σ μ 2 ≥ max { 16 c + 4 ∑ j Σ k j k j ( j ) , max i , k , j Σ i k ( j ) } , n\sigma_\mu^2\geq\max\left\{16c+4\sum_j\Sigma^{(j)}_{k_jk_j},\ \max_{i,k,j}\Sigma^{(j)}_{ik}\right\}, n σ μ 2 ≥ max { 16 c + 4 j ∑ Σ k j k j ( j ) , i , k , j max Σ ik ( j ) } , then every w ˉ ∈ R c , ρ \bar{w}\in R_{c,\rho} w ˉ ∈ R c , ρ satisfies
∥ ∇ θ L t r u n c a t e d ( w ˉ ) ∥ 2 ≥ λ min ( Z ) 160 C Σ ρ n . \lVert\nabla_\theta\mathcal{L}^{\mathrm{truncated}}(\bar{w})\rVert_2\geq\frac{\lambda_{\min}(Z)}{160C_{\Sigma}}\frac{\rho}{n}. ∥ ∇ θ L truncated ( w ˉ ) ∥ 2 ≥ 160 C Σ λ m i n ( Z ) n ρ . Proof. The loss bound and min w ˉ ∘ ∈ S L t r u n c a t e d ( w ˉ ∘ ) ≤ L t r u n c a t e d ( I 2 ) \min_{\bar{w}^{\circ}\in S}\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ})\leq\mathcal{L}^{\mathrm{truncated}}(I_2) min w ˉ ∘ ∈ S L truncated ( w ˉ ∘ ) ≤ L truncated ( I 2 ) give
∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ 2 ≤ 4 c + ∑ ℓ Σ ℓ ℓ ( ℓ ) n σ μ 2 ≤ 1 4 . \lvert\bar{w}_{1j}+\bar{w}_{2j}-1\rvert^2\leq\frac{4c+\sum_{\ell}\Sigma^{(\ell)}_{\ell\ell}}{n\sigma_\mu^2}\leq\frac{1}{4}. ∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ 2 ≤ n σ μ 2 4 c + ∑ ℓ Σ ℓℓ ( ℓ ) ≤ 4 1 .
For each j j j , choose q q q with w ˉ q j ≥ w ˉ k j \bar{w}_{qj} \ge\bar{w}_{kj} w ˉ q j ≥ w ˉ k j , k ≠ q k \ne q k = q , so w ˉ q j ≥ 1 / 4 \bar{w}_{qj} \ge1/4 w ˉ q j ≥ 1/4 and w ˉ k j ≤ 3 / 4 \bar{w}_{kj} \le3/4 w ˉ k j ≤ 3/4 . The hierarchy gives ∣ S q j − S k j ∣ ≥ 1 / ( 2 C Σ n ) |S_{qj}-S_{kj}| \ge1/(2C\Sigma n) ∣ S q j − S k j ∣ ≥ 1/ ( 2 C Σ n ) . If 1 − w ˉ q j ≥ w ˉ k j / 2 1-\bar{w}_{qj} \ge\bar{w}_{kj}/2 1 − w ˉ q j ≥ w ˉ k j /2 , then
w ˉ k j 2 C Σ n ≤ w ˉ k j ∣ S q j − S k j ∣ ≤ 12 max i , j ∣ w ˉ i j ′ S i j ∣ . \frac{\bar{w}_{kj}}{2C\Sigma n} \le\bar{w}_{kj}|S_{qj}-S_{kj}| \le12\max_{i,j}|\bar{w}'_{ij}S_{ij}|. 2 C Σ n w ˉ k j ≤ w ˉ k j ∣ S q j − S k j ∣ ≤ 12 i , j max ∣ w ˉ ij ′ S ij ∣.
Otherwise S k j ≥ ∑ k q ( j ) w ˉ q j / n ≥ 1 / ( 4 C Σ n ) S_{kj} \ge\sum_{kq}^{(j)}\bar{w}_{qj}/n \ge1/(4C\Sigma n) S k j ≥ ∑ k q ( j ) w ˉ q j / n ≥ 1/ ( 4 C Σ n ) , so w ˉ k j ′ S k j ≥ w ˉ k j / ( 16 C Σ n ) \bar{w}'_{kj}S_{kj} \ge\bar{w}_{kj}/(16C\Sigma n) w ˉ k j ′ S k j ≥ w ˉ k j / ( 16 C Σ n ) . Thus in both cases
w ˉ k j ≤ 24 C Σ n max i , j ∣ w ˉ i j ′ S i j ∣ . \bar{w}_{kj} \le24C\Sigma n\max_{i,j}|\bar{w}'_{ij}S_{ij}|. w ˉ k j ≤ 24 C Σ n i , j max ∣ w ˉ ij ′ S ij ∣.
As a polynomial in w ˉ q j \bar{w}_{qj} w ˉ q j , ( 1 − w ˉ q j ) S q j (1-\bar{w}_{qj})S_{qj} ( 1 − w ˉ q j ) S q j has roots
1 , n σ μ 2 − ( n σ μ 2 + Σ q k ( j ) ) w ˉ k j n σ μ 2 + Σ q q ( j ) , 1,\qquad\frac{n\sigma_\mu^2-(n\sigma_\mu^2+\Sigma_{qk}^{(j)})\bar{w}_{kj}}{n\sigma_\mu^2+\Sigma_{qq}^{(j)}}, 1 , n σ μ 2 + Σ q q ( j ) n σ μ 2 − ( n σ μ 2 + Σ q k ( j ) ) w ˉ k j ,
separated by at least Σ q q ( j ) / ( n σ μ 2 + Σ q q ( j ) ) \Sigma_{qq}^{(j)}/(n\sigma_\mu^2+\Sigma_{qq}^{(j)}) Σ q q ( j ) / ( n σ μ 2 + Σ q q ( j ) ) . Using w ˉ q j ≥ 1 / 4 \bar{w}_{qj} \ge1/4 w ˉ q j ≥ 1/4 and ( n σ μ 2 + Σ q k ( j ) ) / ( n σ μ 2 + Σ q q ( j ) ) ≤ 2 (n\sigma_\mu^2+\Sigma_{qk}^{(j)})/(n\sigma_\mu^2+\Sigma_{qq}^{(j)}) \le2 ( n σ μ 2 + Σ q k ( j ) ) / ( n σ μ 2 + Σ q q ( j ) ) ≤ 2 gives
min { 1 − w ˉ q j , ∣ w ˉ q j − n σ μ 2 n σ μ 2 + Σ q q ( j ) ∣ } ≤ 8 C Σ n ∣ w ˉ q j ′ S q j ∣ + 2 w ˉ k j . \min\left\{1-\bar{w}_{qj},\left|\bar{w}_{qj}-\frac{n\sigma_\mu^2}{n\sigma_\mu^2+\Sigma_{qq}^{(j)}}\right|\right\}\le8C\Sigma n|\bar{w}'_{qj}S_{qj}|+2\bar{w}_{kj}. min { 1 − w ˉ q j , w ˉ q j − n σ μ 2 + Σ q q ( j ) n σ μ 2 } ≤ 8 C Σ n ∣ w ˉ q j ′ S q j ∣ + 2 w ˉ k j .
Setting w ˉ k j = 0 \bar{w}_{kj}=0 w ˉ k j = 0 and choosing the nearer of these two values in each family produces a stationary point, hence
ρ ≤ min w ˉ ∘ ∈ S ∥ w ˉ − w ˉ ∘ ∥ F ≤ 80 C Σ n ( ∑ i , j ( w ˉ i j ′ S i j ) 2 ) 1 / 2 ≤ 160 C Σ n λ min ( Z ) ∥ ∇ θ L t r u n c a t e d ∥ 2 . \rho\le\min_{\bar{w}^{\circ}\in\mathcal{S}}\|\bar{w}-\bar{w}^{\circ}\|_{\mathrm{F}}\le80C\Sigma n\left(\sum_{i,j}(\bar{w}'_{ij}S_{ij})^2\right)^{1/2}\le\frac{160C\Sigma n}{\sqrt{\lambda_{\min}(Z)}}\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2. ρ ≤ w ˉ ∘ ∈ S min ∥ w ˉ − w ˉ ∘ ∥ F ≤ 80 C Σ n ( i , j ∑ ( w ˉ ij ′ S ij ) 2 ) 1/2 ≤ λ m i n ( Z ) 160 C Σ n ∥ ∇ θ L truncated ∥ 2 .
Lemma D.10 (Population gradient perturbation). **Assume the initial loss and covariance conditions of Lemma B.10, with its constant κ \kappa κ , at a point θ 0 \theta_0 θ 0 . Fix B , c > 0 B,c>0 B , c > 0 independently of n n n and σ μ 2 \sigma_\mu^2 σ μ 2 , and assume ∥ θ 0 ∥ 2 ≤ B \|\theta_0\|_2\le B ∥ θ 0 ∥ 2 ≤ B and L t r u n c a t e d ( w ˉ ( θ 0 ) ) − L t r u n c a t e d ( w ˉ ∗ ) ≤ c / n \mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta_0))-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})\le c/n L truncated ( w ˉ ( θ 0 )) − L truncated ( w ˉ ∗ ) ≤ c / n . Here w ˉ ∗ \bar{w}^{*} w ˉ ∗ denotes the optimum, and L t r u n c a t e d \mathcal{L}^{\mathrm{truncated}} L truncated is composed with w ˉ ( θ ) \bar{w}(\theta) w ˉ ( θ ) when differentiating. For a constant C 0 C_0 C 0 and ρ = C 0 / ( n σ μ 2 ) \rho=C_0/(n\sigma_\mu^2) ρ = C 0 / ( n σ μ 2 ) , set
E ( θ ) = L t r u n c a t e d ( w ˉ ( θ ) ) − L t r u n c a t e d ( w ˉ ∗ ) + 1 n σ μ 2 , E 0 = c + κ n + 1 n σ μ 2 , E(\theta)=\mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta))-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})+\frac{1}{n\sigma_\mu^2},\qquad E_0=\frac{c+\kappa}{n}+\frac{1}{n\sigma_\mu^2}, E ( θ ) = L truncated ( w ˉ ( θ )) − L truncated ( w ˉ ∗ ) + n σ μ 2 1 , E 0 = n c + κ + n σ μ 2 1 , and let D \mathcal{D} D be the closed set of θ \theta θ satisfying
L t r u n c a t e d ( w ˉ ( θ ) ) ≤ L t r u n c a t e d ( w ˉ ( θ 0 ) ) + κ 2 n , min w ˉ ∘ ∈ S ∥ w ˉ ( θ ) − w ˉ ∘ ∥ F ≥ ρ , \mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta))\le\mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta_0))+\frac{\kappa}{2n},\qquad\min_{\bar{w}^{\circ}\in\mathcal{S}}\|\bar{w}(\theta)-\bar{w}^{\circ}\|_{\mathrm{F}}\ge\rho, L truncated ( w ˉ ( θ )) ≤ L truncated ( w ˉ ( θ 0 )) + 2 n κ , w ˉ ∘ ∈ S min ∥ w ˉ ( θ ) − w ˉ ∘ ∥ F ≥ ρ , ∥ θ ∥ 2 ≤ B + 1 + 4 C 0 log E 0 E ( θ ) . \|\theta\|_2\le B+1+4C_0\log\frac{E_0}{E(\theta)}. ∥ θ ∥ 2 ≤ B + 1 + 4 C 0 log E ( θ ) E 0 . There is such a C 0 C_0 C 0 , independent of n n n and σ μ 2 \sigma_\mu^2 σ μ 2 , for which the following hold for sufficiently small fixed σ μ 2 > 0 \sigma_\mu^2>0 σ μ 2 > 0 and then sufficiently large n n n .
(a) D \mathcal{D} D is contained in the ball of radius r = B + 1 + 4 C 0 log ( 1 + ( c + κ ) n σ μ 2 ) = O ( log n ) r=B+1+4C_0\log(1+(c+\kappa)n\sigma_\mu^2)=O(\log n) r = B + 1 + 4 C 0 log ( 1 + ( c + κ ) n σ μ 2 ) = O ( log n ) , and uniformly over θ ∈ D \theta\in\mathcal{D} θ ∈ D ,
∥ ∇ θ L t r u n c a t e d ∥ 2 ≥ E ( θ ) C 0 , \|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2\ge\frac{E(\theta)}{C_0}, ∥ ∇ θ L truncated ∥ 2 ≥ C 0 E ( θ ) , ∑ q , j w ˉ q j ′ ≤ C 0 n ∥ ∇ θ L t r u n c a t e d ∥ 2 , \sum_{q,j}\bar{w}'_{qj}\le C_0n\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2, q , j ∑ w ˉ q j ′ ≤ C 0 n ∥ ∇ θ L truncated ∥ 2 , ∥ ∇ θ ( L − L t r u n c a t e d ) ∥ 2 ≤ [ C 0 σ μ 2 n E ( θ ) ( 1 + ∥ θ ∥ 2 ) 2 + O ~ ( n − 1 ) ] ∥ ∇ θ L t r u n c a t e d ∥ 2 ≤ 1 4 ∥ ∇ θ L t r u n c a t e d ∥ 2 . \|\nabla_\theta(\mathcal{L}-\mathcal{L}^{\mathrm{truncated}})\|_2
\le\left[C_0\sigma_\mu^2 nE(\theta)(1+\|\theta\|_2)^2+\widetilde{O}(n^{-1})\right]\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2
\le\frac{1}{4}\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2. ∥ ∇ θ ( L − L truncated ) ∥ 2 ≤ [ C 0 σ μ 2 n E ( θ ) ( 1 + ∥ θ ∥ 2 ) 2 + O ( n − 1 ) ] ∥ ∇ θ L truncated ∥ 2 ≤ 4 1 ∥ ∇ θ L truncated ∥ 2 .
(b) Let θ ( t ) \theta(t) θ ( t ) , t ≥ t c r i t t \ge t_{\mathrm{crit}} t ≥ t crit , be absolutely continuous with θ ( t c r i t ) = θ 0 \theta(t_{\mathrm{crit}})=\theta_0 θ ( t crit ) = θ 0 and
θ ˙ = − ∇ θ L ( θ ) − ζ ( t ) , \dot{\theta}=-\nabla_\theta\mathcal{L}(\theta)-\zeta(t), θ ˙ = − ∇ θ L ( θ ) − ζ ( t ) ,
∥ ζ ( t ) ∥ 2 ≤ min { 1 4 , 1 log n } ∥ ∇ θ L t r u n c a t e d ( θ ( t ) ) ∥ 2 whenever θ ( t ) ∈ D , \|\zeta(t)\|_2 \le\min\left\{\frac{1}{4},\frac{1}{\log n}\right\}\left\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}(\theta(t))\right\|_2 \quad\text{whenever } \theta(t)\in\mathcal{D}, ∥ ζ ( t ) ∥ 2 ≤ min { 4 1 , log n 1 } ∇ θ L truncated ( θ ( t )) 2 whenever θ ( t ) ∈ D ,
Let t ρ t_\rho t ρ be the first time t ≥ t c r i t t\ge t_{\mathrm{crit}} t ≥ t crit with min w ˉ ∘ ∈ S ∥ w ˉ ( θ ( t ) ) − w ˉ ∘ ∥ F ≤ ρ \min_{\bar{w}^{\circ}\in S}\|\bar{w}(\theta(t))-\bar{w}^{\circ}\|_F\le\rho min w ˉ ∘ ∈ S ∥ w ˉ ( θ ( t )) − w ˉ ∘ ∥ F ≤ ρ . Then t ρ ≤ t c r i t + 2 C 0 2 n − 2 σ μ − 2 t_\rho\le t_{\mathrm{crit}}+2C_0^2n^{-2}\sigma_\mu^{-2} t ρ ≤ t crit + 2 C 0 2 n − 2 σ μ − 2 , θ ( t ) ∈ D \theta(t)\in\mathcal{D} θ ( t ) ∈ D for t c r i t ≤ t < t ρ t_{\mathrm{crit}}\le t<t_\rho t crit ≤ t < t ρ , and for t c r i t ≤ t ≤ t ρ t_{\mathrm{crit}}\le t\le t_\rho t crit ≤ t ≤ t ρ ,
d d t L t r u n c a t e d ( w ˉ ( θ ( t ) ) ) ≤ − 1 2 ∥ ∇ θ L t r u n c a t e d ∥ 2 2 , ∥ θ ˙ ∥ 2 ≤ 3 2 ∥ ∇ θ L t r u n c a t e d ∥ 2 , \frac{d}{dt}\mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta(t)))\le-\frac{1}{2}\left\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\right\|_2^2,\qquad\|\dot{\theta}\|_2\le\frac{3}{2}\left\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\right\|_2, d t d L truncated ( w ˉ ( θ ( t ))) ≤ − 2 1 ∇ θ L truncated 2 2 , ∥ θ ˙ ∥ 2 ≤ 2 3 ∇ θ L truncated 2 ,
∥ θ ( t ) ∥ 2 ≤ B + 3 C 0 log E ( θ 0 ) E ( θ ( t ) ) ≤ B + 3 C 0 log ( 1 + c n σ μ 2 ) , \|\theta(t)\|_2\le B+3C_0\log\frac{E(\theta_0)}{E(\theta(t))}\le B+3C_0\log(1+cn\sigma_\mu^2), ∥ θ ( t ) ∥ 2 ≤ B + 3 C 0 log E ( θ ( t )) E ( θ 0 ) ≤ B + 3 C 0 log ( 1 + c n σ μ 2 ) ,
∥ θ q ℓ ( t ) − θ q ℓ ( t c r i t ) ∥ 2 ≤ O ( σ μ 2 ) + O ~ ( n − 1 ) + 2 C 0 log n log ( 1 + c n σ μ 2 ) . \|\theta_q^\ell(t)-\theta_q^\ell(t_{\mathrm{crit}})\|_2\le O(\sigma_\mu^2)+\widetilde{O}(n^{-1})+\frac{2C_0}{\log n}\log(1+cn\sigma_\mu^2). ∥ θ q ℓ ( t ) − θ q ℓ ( t crit ) ∥ 2 ≤ O ( σ μ 2 ) + O ( n − 1 ) + log n 2 C 0 log ( 1 + c n σ μ 2 ) .
The full population flow is the case ζ ≡ 0 \zeta\equiv0 ζ ≡ 0 .
Proof. Part (a). On D \mathcal{D} D , the truncated loss is O ( n − 1 ) O(n^{-1}) O ( n − 1 ) , lies at least κ / ( 2 n ) \kappa/(2n) κ / ( 2 n ) below the loss of every point in (15), and has excess at most ( c + κ ) / n (c+\kappa)/n ( c + κ ) / n . In particular, 1 / ( n 2 σ μ 2 ) ≤ E ( θ ) ≤ E 0 1/(n^2\sigma_\mu^2)\le E(\theta)\le E_0 1/ ( n 2 σ μ 2 ) ≤ E ( θ ) ≤ E 0 , which gives the radius r r r . The excess-loss bound (20) of Lemma D.11 gives
max j [ ∑ q w ˉ q j ′ + ∣ ∑ q w ˉ q j − 1 ∣ ] ≲ n [ L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ] + 1 n σ μ 2 = n E ( θ ) . \max_j\left[\sum_q \bar{w}'_{qj}+\left|\sum_q\bar{w}_{qj}-1\right|\right]\lesssim n\left[\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})\right]+\frac{1}{n\sigma_\mu^2}=nE(\theta). j max [ q ∑ w ˉ q j ′ + q ∑ w ˉ q j − 1 ] ≲ n [ L truncated ( w ˉ ) − L truncated ( w ˉ ∗ ) ] + n σ μ 2 1 = n E ( θ ) .
Minimizing the quadratic loss over the other gates shows that the loss gap below each wrong selection bounds w ˉ k j j \bar{w}_{k_jj} w ˉ k j j and 1 − w ˉ q j j 1-\bar{w}_{q_jj} 1 − w ˉ q j j away from zero for q ≠ k j q\ne k_j q = k j . The same two-case calculation as in Lemma D.9 then gives
w ˉ q j n + σ μ 2 ( ∑ i w ˉ i j − 1 ) 2 ≲ ∥ ∇ θ L t r u n c a t e d ∥ 2 2 + 1 n 2 σ μ 2 . \frac{\bar{w}_{qj}}{n}+\sigma_\mu^2\left(\sum_i\bar{w}_{ij}-1\right)^2\lesssim\left\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\right\|_2^2+\frac{1}{n^2\sigma_\mu^2}. n w ˉ q j + σ μ 2 ( i ∑ w ˉ ij − 1 ) 2 ≲ ∇ θ L truncated 2 2 + n 2 σ μ 2 1 .
Expanding the quadratic loss and applying Lemma D.9 with ρ = C 0 / ( n σ μ 2 ) \rho=C_0/(n\sigma_\mu^2) ρ = C 0 / ( n σ μ 2 ) proves the first estimate for sufficiently large C 0 C_0 C 0 . Combined with the first display, it gives the second estimate after enlarging C 0 C_0 C 0 . These two estimates depend only on w ˉ \bar{w} w ˉ , so C 0 C_0 C 0 is fixed before σ μ 2 \sigma_\mu^2 σ μ 2 is chosen.
Taylor-expand the conditional gradient through cubic order in the centered empirical moments. Their signed cubic moments and fourth absolute moments are O ( n − 2 ) O(n^{-2}) O ( n − 2 ) , so retaining the sigmoid derivatives gives
∥ ∇ θ ( L − L t r u n c a t e d ) ∥ 2 ≲ ∑ q , j w ˉ q j ′ [ σ μ 2 ( 1 + ∥ θ ∥ 2 ) 2 n ( ∑ i w ˉ i j ′ + ∣ ∑ i w ˉ i j − 1 ∣ ) + ( 1 + ∥ θ ∥ 2 ) 4 n 2 ] . \left\|\nabla_\theta(\mathcal{L}-\mathcal{L}^{\mathrm{truncated}})\right\|_2\lesssim\sum_{q,j}\bar{w}'_{qj}\left[\frac{\sigma_\mu^2(1+\|\theta\|_2)^2}{n}\left(\sum_i\bar{w}'_{ij}+\left|\sum_i\bar{w}_{ij}-1\right|\right)+\frac{(1+\|\theta\|_2)^4}{n^2}\right]. ∇ θ ( L − L truncated ) 2 ≲ q , j ∑ w ˉ q j ′ [ n σ μ 2 ( 1 + ∥ θ ∥ 2 ) 2 ( i ∑ w ˉ ij ′ + i ∑ w ˉ ij − 1 ) + n 2 ( 1 + ∥ θ ∥ 2 ) 4 ] .
This bound is uniform for ∥ θ ∥ 2 ≤ r \|\theta\|_2\le r ∥ θ ∥ 2 ≤ r and 0 < σ μ 2 ≤ 1 0<\sigma_\mu^2\le1 0 < σ μ 2 ≤ 1 , using the moment bounds and truncation from Lemma D.4. The first display and the second estimate turn it into the first inequality of the third estimate. On D \mathcal{D} D , 1 + ∥ θ ∥ 2 ≤ 2 + B + 4 C 0 log ( E 0 / E ( θ ) ) 1+\|\theta\|_2\le2+B+4C_0\log(E_0/E(\theta)) 1 + ∥ θ ∥ 2 ≤ 2 + B + 4 C 0 log ( E 0 / E ( θ )) , so with u = E ( θ ) / E 0 ∈ ( 0 , 1 ] u=E(\theta)/E_0\in(0,1] u = E ( θ ) / E 0 ∈ ( 0 , 1 ] and n E 0 = O ( 1 ) nE_0=O(1) n E 0 = O ( 1 ) ,
C 0 σ μ 2 n E ( θ ) ( 1 + ∥ θ ∥ 2 ) 2 ≤ C 0 σ μ 2 n E 0 sup 0 < u ≤ 1 ( 2 + B + 4 C 0 log 1 u ) 2 = O ( σ μ 2 ) . C_0\sigma_\mu^2 nE(\theta)(1+\|\theta\|_2)^2\le C_0\sigma_\mu^2 nE_0\sup_{0<u\le1} \left(2+B+4C_0\log\frac{1}{u}\right)^2=O(\sigma_\mu^2). C 0 σ μ 2 n E ( θ ) ( 1 + ∥ θ ∥ 2 ) 2 ≤ C 0 σ μ 2 n E 0 0 < u ≤ 1 sup ( 2 + B + 4 C 0 log u 1 ) 2 = O ( σ μ 2 ) .
Choose σ μ 2 \sigma_\mu^2 σ μ 2 small and then n n n large to make the bracket at most 1 / 4 1/4 1/4 .
Part (b). Write θ ˙ = − ∇ θ L t r u n c a t e d − p \dot{\theta}=-\nabla_\theta\mathcal{L}^{\mathrm{truncated}}-p θ ˙ = − ∇ θ L truncated − p with p = ∇ θ ( L − L t r u n c a t e d ) + ζ p=\nabla_\theta(\mathcal{L}-\mathcal{L}^{\mathrm{truncated}})+\zeta p = ∇ θ ( L − L truncated ) + ζ . While θ ( t ) ∈ D \theta(t)\in\mathcal{D} θ ( t ) ∈ D , part (a) gives ∥ p ∥ 2 ≤ 1 2 ∥ ∇ θ L t r u n c a t e d ∥ 2 \|p\|_2\le\frac{1}{2}\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2 ∥ p ∥ 2 ≤ 2 1 ∥ ∇ θ L truncated ∥ 2 , hence the displayed descent and speed bounds, and, by the first estimate,
d d t log E ( θ ( t ) ) ≤ − ∥ ∇ θ L t r u n c a t e d ∥ 2 2 2 E ( θ ( t ) ) ≤ − ∥ ∇ θ L t r u n c a t e d ∥ 2 2 C 0 . \frac{d}{dt}\log E(\theta(t))\le-\frac{\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2^2}{2E(\theta(t))}\le-\frac{\|\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\|_2}{2C_0}. d t d log E ( θ ( t )) ≤ − 2 E ( θ ( t )) ∥ ∇ θ L truncated ∥ 2 2 ≤ − 2 C 0 ∥ ∇ θ L truncated ∥ 2 .
Integrating,
∫ t c r i t t ∥ ∇ θ L t r u n c a t e d ∥ 2 2 d s ≤ 2 C 0 log E ( θ 0 ) E ( θ ( t ) ) , ∫ t c r i t t ∥ θ ˙ ( s ) ∥ 2 2 d s ≤ 3 C 0 log E ( θ 0 ) E ( θ ( t ) ) . (19) \int_{t_{\mathrm{crit}}}^{t}\lVert\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\rVert_2^2\,ds \le2C_0\log\frac{E(\theta_0)}{E(\theta(t))},\qquad\int_{t_{\mathrm{crit}}}^{t}\lVert\dot{\theta}(s)\rVert_2^2\,ds \le3C_0\log\frac{E(\theta_0)}{E(\theta(t))}. \tag*{(19)} ∫ t crit t ∥ ∇ θ L truncated ∥ 2 2 d s ≤ 2 C 0 log E ( θ ( t )) E ( θ 0 ) , ∫ t crit t ∥ θ ˙ ( s ) ∥ 2 2 d s ≤ 3 C 0 log E ( θ ( t )) E ( θ 0 ) . (19)
We first show that the trajectory cannot leave D \mathcal{D} D before t ρ t_\rho t ρ . Let T T T be the supremum of times t ≤ t ρ t\le t_\rho t ≤ t ρ with θ ( [ t c r i t , t ] ) ⊂ D \theta([t_{\mathrm{crit}},t])\subset\mathcal{D} θ ([ t crit , t ]) ⊂ D , and suppose T < t ρ T<t_\rho T < t ρ . Since D \mathcal{D} D is closed, (19) holds up to T T T , so
L t r u n c a t e d ( w ˉ ( θ ( T ) ) ) ≤ L t r u n c a t e d ( w ˉ ( θ 0 ) ) < L t r u n c a t e d ( w ˉ ( θ 0 ) ) + κ 2 n , \mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta(T)))\le\mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta_0))<\mathcal{L}^{\mathrm{truncated}}(\bar{w}(\theta_0))+\frac{\kappa}{2n}, L truncated ( w ˉ ( θ ( T ))) ≤ L truncated ( w ˉ ( θ 0 )) < L truncated ( w ˉ ( θ 0 )) + 2 n κ ,
∥ θ ( T ) ∥ 2 ≤ B + 3 C 0 log E ( θ 0 ) E ( θ ( T ) ) < B + 1 + 4 C 0 log E 0 E ( θ ( T ) ) . \lVert\theta(T)\rVert_2\le B+3C_0\log\frac{E(\theta_0)}{E(\theta(T))}<B+1+4C_0\log\frac{E_0}{E(\theta(T))}. ∥ θ ( T ) ∥ 2 ≤ B + 3 C 0 log E ( θ ( T )) E ( θ 0 ) < B + 1 + 4 C 0 log E ( θ ( T )) E 0 .
using E ( θ 0 ) ≤ E 0 E(\theta_0)\le E_0 E ( θ 0 ) ≤ E 0 , while the distance to S \mathcal{S} S exceeds ρ \rho ρ because T < t ρ T<t_\rho T < t ρ . All three conditions defining D \mathcal{D} D hold strictly at θ ( T ) \theta(T) θ ( T ) , so by continuity they hold on a neighborhood of T T T , contradicting the definition of T T T .
For finite entry, set W = − 1 / E W=-1/E W = − 1/ E . On [ t c r i t , t ρ ) [t_{\mathrm{crit}},t_\rho) [ t crit , t ρ ) ,
d d t W ( θ ( t ) ) = E ˙ E 2 ≤ − ∥ ∇ θ L t r u n c a t e d ∥ 2 2 2 E 2 ≤ − 1 2 C 0 2 , − n 2 σ μ 2 ≤ W < 0 , \frac{d}{dt}W(\theta(t))=\frac{\dot{E}}{E^2}\le-\frac{\lVert\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\rVert_2^2}{2E^2}\le-\frac{1}{2C_0^2},\qquad-n^2\sigma_\mu^2\le W<0, d t d W ( θ ( t )) = E 2 E ˙ ≤ − 2 E 2 ∥ ∇ θ L truncated ∥ 2 2 ≤ − 2 C 0 2 1 , − n 2 σ μ 2 ≤ W < 0 ,
so, as in Lemma G.1, t ρ ≤ t c r i t + 2 C 0 2 n 2 σ μ 2 t_\rho\le t_{\mathrm{crit}}+2C_0^2n^2\sigma_\mu^2 t ρ ≤ t crit + 2 C 0 2 n 2 σ μ 2 . The parameter bound follows from (19), ∥ θ 0 ∥ 2 ≤ B \lVert\theta_0\rVert_2\le B ∥ θ 0 ∥ 2 ≤ B , and n 2 σ μ 2 E ( θ 0 ) ≤ 1 + c n σ μ 2 ≤ n 2 σ μ 2 E 0 n^2\sigma_\mu^2E(\theta_0)\le1+cn\sigma_\mu^2\le n^2\sigma_\mu^2E_0 n 2 σ μ 2 E ( θ 0 ) ≤ 1 + c n σ μ 2 ≤ n 2 σ μ 2 E 0 .
Since the truncated gradient has zero perpendicular component, ∥ θ ˙ q ∥ 2 ≤ ∥ ∇ θ ( L − L t r u n c a t e d ) ∥ 2 + ∥ ζ ∥ 2 \lVert\dot{\theta}_q\rVert_2\le\lVert\nabla_\theta(\mathcal{L}-\mathcal{L}^{\mathrm{truncated}})\rVert_2+\lVert\zeta\rVert_2 ∥ θ ˙ q ∥ 2 ≤ ∥ ∇ θ ( L − L truncated ) ∥ 2 + ∥ ζ ∥ 2 . Along the trajectory, E E E decreases and ∫ t c r i t t ∥ ∇ θ L t r u n c a t e d ∥ 2 2 d s ≤ − 2 C 0 d E / E \int_{t_{\mathrm{crit}}}^{t}\lVert\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\rVert_2^2\,ds\le-2C_0\,dE/E ∫ t crit t ∥ ∇ θ L truncated ∥ 2 2 d s ≤ − 2 C 0 d E / E . Substituting the third estimate of part (a) and the parameter bound of D \mathcal{D} D ,
∫ t c r i t t ∥ ∇ θ ( L − L t r u n c a t e d ) ∥ 2 d s ≤ 2 C 0 2 σ μ 2 n E 0 ∫ 0 1 ( 2 + B + 4 C 0 log 1 u ) 2 d u + O ~ ( n − 1 ) log ( 1 + c n σ μ 2 ) = O ( σ μ 2 ) + O ~ ( n − 1 ) . \begin{aligned}
\int_{t_{\mathrm{crit}}}^{t}\lVert\nabla_\theta(\mathcal{L}-\mathcal{L}^{\mathrm{truncated}})\rVert_2\,ds
&\le2C_0^2\sigma_\mu^2nE_0\int_0^1\left(2+B+4C_0\log\frac{1}{u}\right)^2\,du\\
&\qquad+\widetilde{O}(n^{-1})\log(1+cn\sigma_\mu^2)\\
&=O(\sigma_\mu^2)+\widetilde{O}(n^{-1}).
\end{aligned} ∫ t crit t ∥ ∇ θ ( L − L truncated ) ∥ 2 d s ≤ 2 C 0 2 σ μ 2 n E 0 ∫ 0 1 ( 2 + B + 4 C 0 log u 1 ) 2 d u + O ( n − 1 ) log ( 1 + c n σ μ 2 ) = O ( σ μ 2 ) + O ( n − 1 ) .
Finally, ∫ t c r i t t ∥ ζ ∥ 2 d s ≤ 2 C 0 log n log ( 1 + c n σ μ 2 ) \int_{t_{\mathrm{crit}}}^{t}\lVert\zeta\rVert_2\,ds\le\frac{2C_0}{\log n}\log(1+cn\sigma_\mu^2) ∫ t crit t ∥ ζ ∥ 2 d s ≤ l o g n 2 C 0 log ( 1 + c n σ μ 2 ) by (19). □
Proof of Lemma B.10
Proof. Use S \mathcal{S} S from Lemma B.7 and C Σ C_\Sigma C Σ from Lemma D.9. Until entry within distance 1 / n 1/n 1/ n of S \mathcal{S} S ,
∥ ∇ θ L t r u n c a t e d ∥ 2 ≥ λ min ( Z ) 160 C Σ n 2 , \lVert\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\rVert_2\ge\frac{\sqrt{\lambda_{\min}(Z)}}{160C_\Sigma n^2}, ∥ ∇ θ L truncated ∥ 2 ≥ 160 C Σ n 2 λ m i n ( Z ) ,
d d t L t r u n c a t e d ( w ˉ ( t ) ) = − ∥ ∇ θ L t r u n c a t e d ∥ 2 2 ≤ − λ min ( Z ) ( 160 C Σ ) 2 n 4 . \frac{d}{dt}\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t))=-\lVert\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\rVert_2^2\le-\frac{\lambda_{\min}(Z)}{(160C_\Sigma)^2n^4}. d t d L truncated ( w ˉ ( t )) = − ∥ ∇ θ L truncated ∥ 2 2 ≤ − ( 160 C Σ ) 2 n 4 λ m i n ( Z ) .
Since L t r u n c a t e d ≥ 0 \mathcal{L}^{\mathrm{truncated}}\ge0 L truncated ≥ 0 , entry occurs by
t θ ≤ t c r i t + ( 160 C Σ ) 2 n 4 λ min ( Z ) L t r u n c a t e d ( w ˉ ( t c r i t ) ) = t c r i t + O ( n 3 ) . t_\theta\le t_{\mathrm{crit}}+\frac{(160C_\Sigma)^2n^4}{\lambda_{\min}(Z)}\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}}))=t_{\mathrm{crit}}+O(n^3). t θ ≤ t crit + λ m i n ( Z ) ( 160 C Σ ) 2 n 4 L truncated ( w ˉ ( t crit )) = t crit + O ( n 3 ) .
For ρ = O ( n − 1 ) \rho=O(n^{-1}) ρ = O ( n − 1 ) , ρ \rho ρ -neighborhoods of stationary points with both gates 0 or 1 in a context have
L t r u n c a t e d ( w ˉ ) ≥ σ μ 2 4 − O ( n − 1 ) > L t r u n c a t e d ( w ˉ ( t c r i t ) ) . \mathcal{L}^{\mathrm{truncated}}(\bar{w})\ge\frac{\sigma_\mu^2}{4}-O(n^{-1})>\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})). L truncated ( w ˉ ) ≥ 4 σ μ 2 − O ( n − 1 ) > L truncated ( w ˉ ( t crit )) .
For every w ˉ ∘ \bar{w}^{\circ} w ˉ ∘ in (15) and every w ˉ \bar{w} w ˉ with ∥ w ˉ − w ˉ ∘ ∥ F = O ( n − 1 ) \lVert\bar{w}-\bar{w}^{\circ}\rVert_{\mathrm{F}}=O(n^{-1}) ∥ w ˉ − w ˉ ∘ ∥ F = O ( n − 1 ) , the quadratic expansion gives
L t r u n c a t e d ( w ˉ ) ≥ L t r u n c a t e d ( w ˉ ∘ ) − O ( n − 2 ) > L t r u n c a t e d ( w ˉ ( t c r i t ) ) . \begin{aligned}
\mathcal{L}^{\mathrm{truncated}}(\bar{w})\ge\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{\circ})-O(n^{-2}) \\
&>\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})).
\end{aligned} L truncated ( w ˉ ) ≥ L truncated ( w ˉ ∘ ) − O ( n − 2 ) > L truncated ( w ˉ ( t crit )) .
Thus, by Lemma B.7, loss descent permits entry only near stationary points with
w ˉ ⋅ j ∈ { e k j , w ˉ ⋅ j ∗ } , ∥ e k j − w ˉ ⋅ j ∗ ∥ 2 = Σ k j k j ( j ) n σ μ 2 + Σ k j k j ( j ) . \bar{w}_{\cdot j} \in\{e_{k_j},\bar{w}_{\cdot j}^{*}\}, \qquad\lVert e_{k_j}-\bar{w}_{\cdot j}^{*}\rVert_2=\frac{\Sigma_{k_j k_j}^{(j)}}{n\sigma_\mu^2+\Sigma_{k_j k_j}^{(j)}}. w ˉ ⋅ j ∈ { e k j , w ˉ ⋅ j ∗ } , ∥ e k j − w ˉ ⋅ j ∗ ∥ 2 = n σ μ 2 + Σ k j k j ( j ) Σ k j k j ( j ) .
Adding the entry radius 1 / n 1/n 1/ n bounds ∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 2 \lVert\bar{w}_{\cdot j}(t_\theta)-e_{k_j}\rVert_2 ∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 2 as claimed.
For the full flow, take B B B and c c c as the assumed bounds on ∥ θ ( t c r i t ) ∥ 2 \lVert\theta(t_{\mathrm{crit}})\rVert_2 ∥ θ ( t crit ) ∥ 2 and L t r u n c a t e d ( w ˉ ( t c r i t ) ) \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})) L truncated ( w ˉ ( t crit )) , and apply part (b) of Lemma D.10 with θ 0 = θ ( t c r i t ) \theta_0=\theta(t_{\mathrm{crit}}) θ 0 = θ ( t crit ) and ζ ≡ 0 \zeta\equiv0 ζ ≡ 0 . Set t θ = t ρ ≤ t c r i t + 2 C 2 n 2 σ μ 2 t_\theta=t_\rho\le t_{\mathrm{crit}}+2C_2n^2\sigma_\mu^2 t θ = t ρ ≤ t crit + 2 C 2 n 2 σ μ 2 . It gives L t r u n c a t e d ( w ˉ ( t θ ) ) ≤ L t r u n c a t e d ( w ˉ ( t c r i t ) ) \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_\theta))\le\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})) L truncated ( w ˉ ( t θ )) ≤ L truncated ( w ˉ ( t crit )) and ∥ θ ( t ) ∥ 2 ≤ B + 3 C 0 log ( 1 + c n σ μ 2 ) = O ( log n ) \lVert\theta(t)\rVert_2\le B+3C_0\log(1+cn\sigma_\mu^2)=O(\log n) ∥ θ ( t ) ∥ 2 ≤ B + 3 C 0 log ( 1 + c n σ μ 2 ) = O ( log n ) for t c r i t ≤ t ≤ t θ t_{\mathrm{crit}}\le t\le t_\theta t crit ≤ t ≤ t θ . Since ρ = O ( n − 1 ) \rho=O(n^{-1}) ρ = O ( n − 1 ) , the exclusion above applies to a point of S \mathcal{S} S within distance ρ \rho ρ of w ˉ ( t θ ) \bar{w}(t_\theta) w ˉ ( t θ ) , and the triangle inequality gives the full-flow gate bound.
Proof of Lemma B.11
Proof. Let D \mathcal{D} D and r = O ( log n ) r=O(\log n) r = O ( log n ) be as in Lemma D.10 with θ 0 = θ ( t c r i t ) \theta_0=\theta(t_{\mathrm{crit}}) θ 0 = θ ( t crit ) . The radius r r r depends only on B B B , c c c , κ \kappa κ , and C 0 C_0 C 0 , so the concentration events below do not depend on the data-dependent initial point. Write m ( j ) = # { b : τ b = j } m^{(j)}=\#\{b:\tau_b=j\} m ( j ) = # { b : τ b = j } and L ( j ) = 1 2 E j [ ( μ ^ − μ ) 2 ] \mathcal{L}^{(j)}=\frac{1}{2}\mathbb{E}_j[(\hat{\mu}-\mu)^2] L ( j ) = 2 1 E j [( μ ^ − μ ) 2 ] , with L ^ m ( j ) \hat{\mathcal{L}}_{m^{(j)}} L ^ m ( j ) its empirical average over the tasks of family j j j , so that
L = 1 2 ∑ j L ( j ) , L ^ m = ∑ j m ( j ) m L ^ m ( j ) . \mathcal{L}=\frac{1}{2}\sum_j\mathcal{L}^{(j)},\qquad\hat{\mathcal{L}}_m=\sum_j\frac{m^{(j)}}{m}\hat{\mathcal{L}}_{m^{(j)}}. L = 2 1 j ∑ L ( j ) , L ^ m = j ∑ m m ( j ) L ^ m ( j ) .
Concentration. Hoeffding’s inequality gives, with failure probability at most 1 / ( 3 n ) 1/(3n) 1/ ( 3 n ) ,
max j ∣ m ( j ) m − 1 2 ∣ = O ~ ( m − 1 / 2 ) , \max_j\left|\frac{m^{(j)}}{m}-\frac{1}{2}\right|=\widetilde{O}(m^{-1/2}), j max m m ( j ) − 2 1 = O ( m − 1/2 ) ,
so m ( j ) ≥ m / 4 m^{(j)}\ge m/4 m ( j ) ≥ m /4 for large n n n . Conditioning on the family labels, apply Lemma D.4 and Lemma D.6 with radius r r r and β = min { ϵ , 1 } / 4 \beta=\min\{\epsilon,1\}/4 β = min { ϵ , 1 } /4 to the m ( j ) m^{(j)} m ( j ) tasks of each family, each with failure probability 1 / ( 6 n ) 1/(6n) 1/ ( 6 n ) . The total failure probability is at most 1 / n 1/n 1/ n , and all bounds below hold on this event, uniformly over the ball of radius r r r .
Relative gradient error. On D \mathcal{D} D , since Σ ( j ) ⪰ 0 \Sigma^{(j)}\succeq0 Σ ( j ) ⪰ 0 ,
max j ∣ ∑ k w ˉ k j − 1 ∣ 2 ≤ 4 σ μ 2 L t r u n c a t e d ( w ˉ ) ≤ 4 σ μ 2 ( L t r u n c a t e d ( w ˉ ( t c r i t ) ) + κ 2 n ) = O ( n − 1 ) , \max_j\left|\sum_k\bar{w}_{kj}-1\right|^2\le\frac{4}{\sigma_\mu^2}\mathcal{L}^{\mathrm{truncated}}(\bar{w})\le\frac{4}{\sigma_\mu^2}\left(\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}}))+\frac{\kappa}{2n}\right)=O(n^{-1}), j max k ∑ w ˉ k j − 1 2 ≤ σ μ 2 4 L truncated ( w ˉ ) ≤ σ μ 2 4 ( L truncated ( w ˉ ( t crit )) + 2 n κ ) = O ( n − 1 ) ,
so the prefactor in Lemma D.4 is at most 2 n − 1 / 2 + β 2n^{-1/2+\beta} 2 n − 1/2 + β . Summing its coordinatewise bound over the fixed number of coordinates and weighting by m ( j ) / m m^{(j)}/m m ( j ) / m ,
∥ ∑ j m ( j ) m ∇ θ ( L ^ m ( j ) ( j ) − L ( j ) ) ∥ 2 ≤ O ~ ( n − 1 / 2 + β m ) ∑ q , j w ˉ q j ′ . \left\lVert\sum_j\frac{m^{(j)}}{m}\nabla_\theta\left(\hat{\mathcal{L}}_{m^{(j)}}^{(j)}-\mathcal{L}^{(j)}\right)\right\rVert_2\le\widetilde{O}\left(\frac{n^{-1/2+\beta}}{\sqrt{m}}\right)\sum_{q,j}\bar{w}'_{qj}. j ∑ m m ( j ) ∇ θ ( L ^ m ( j ) ( j ) − L ( j ) ) 2 ≤ O ( m n − 1/2 + β ) q , j ∑ w ˉ q j ′ .
The truncation bounds in the proof of Lemma D.4 also give
∥ ∑ j ( m ( j ) m − 1 2 ) ∇ θ L ( j ) ∥ 2 ≤ O ~ ( n − 1 / 2 + β m ) ∑ q , j w ˉ q j ′ . \left\lVert\sum_j\left(\frac{m^{(j)}}{m}-\frac{1}{2}\right)\nabla_\theta\mathcal{L}^{(j)}\right\rVert_2\le\widetilde{O}\left(\frac{n^{-1/2+\beta}}{\sqrt{m}}\right)\sum_{q,j}\bar{w}'_{qj}. j ∑ ( m m ( j ) − 2 1 ) ∇ θ L ( j ) 2 ≤ O ( m n − 1/2 + β ) q , j ∑ w ˉ q j ′ .
By the second estimate of Lemma D.10(a), uniformly over θ ∈ D \theta\in\mathcal{D} θ ∈ D ,
∥ ∇ θ ( L ^ m − L ) ∥ 2 ∥ ∇ θ L t r u n c a t e d ∥ 2 ≤ C 0 n O ~ ( n − 1 / 2 + β m ) = O ~ ( n 1 / 2 + β m ) ≤ min { 1 4 , 1 log n } . \frac{\lVert\nabla_\theta(\hat{\mathcal{L}}_m-\mathcal{L})\rVert_2}{\lVert\nabla_\theta\mathcal{L}^{\mathrm{truncated}}\rVert_2}\le C_0n\widetilde{O}\left(\frac{n^{-1/2+\beta}}{\sqrt{m}}\right)=\widetilde{O}\left(\frac{n^{1/2+\beta}}{\sqrt{m}}\right)\le\min\left\{\frac{1}{4},\frac{1}{\log n}\right\}. ∥ ∇ θ L truncated ∥ 2 ∥ ∇ θ ( L ^ m − L ) ∥ 2 ≤ C 0 n O ( m n − 1/2 + β ) = O ( m n 1/2 + β ) ≤ min { 4 1 , log n 1 } .
For the last inequality, write the preceding bound as C ( log n ) a n 1 / 2 + β / m C(\log n)^a n^{1/2+\beta}/\sqrt{m} C ( log n ) a n 1/2 + β / m with C C C and a a a fixed. Since β = min { ϵ , 1 } / 4 \beta=\min\{\epsilon,1\}/4 β = min { ϵ , 1 } /4 and m ≥ n 1 + ϵ m\ge n^{1+\epsilon} m ≥ n 1 + ϵ , it is at most C ( log n ) a n − min { ϵ , 1 } / 4 C(\log n)^a n^{-\min\{\epsilon,1\}/4} C ( log n ) a n − m i n { ϵ , 1 } /4 , hence at most min { 1 / 4 , 1 / log n } \min\{1/4,1/\log n\} min { 1/4 , 1/ log n } for sufficiently large $n.
Entry, parameter bound, and gate accuracy. The empirical flow is θ ˙ = − ∇ θ L − ζ ( t ) \dot{\theta}=-\nabla_{\theta}\mathcal{L}-\zeta(t) θ ˙ = − ∇ θ L − ζ ( t ) with ζ ( t ) = ∇ θ ( L ^ m − L ) ( θ ( t ) ) \zeta(t)=\nabla_{\theta}(\widehat{\mathcal{L}}_m-\mathcal{L})(\theta(t)) ζ ( t ) = ∇ θ ( L m − L ) ( θ ( t )) , which satisfies ∥ ζ ( t ) ∥ 2 ≤ min { 1 / 4 , 1 / log n } ∥ ∇ θ L t r u n c a t e d ∥ 2 \|\zeta(t)\|_2\le\min\{1/4,1/\log n\}\|\nabla_{\theta}\mathcal{L}^{\mathrm{truncated}}\|_2 ∥ ζ ( t ) ∥ 2 ≤ min { 1/4 , 1/ log n } ∥ ∇ θ L truncated ∥ 2 whenever θ ( t ) ∈ D \theta(t)\in\mathcal{D} θ ( t ) ∈ D . Part (b) of Lemma D.10 applies. Combined with part (a), it gives, before entry,
∥ ∇ θ ( L ^ m − L t r u n c a t e d ) ∥ 2 ≤ 1 2 ∥ ∇ θ L t r u n c a t e d ∥ 2 , \|\nabla_{\theta}(\widehat{\mathcal{L}}_m-\mathcal{L}^{\mathrm{truncated}})\|_2\le\frac{1}{2}\|\nabla_{\theta}\mathcal{L}^{\mathrm{truncated}}\|_2, ∥ ∇ θ ( L m − L truncated ) ∥ 2 ≤ 2 1 ∥ ∇ θ L truncated ∥ 2 ,
d d t L t r u n c a t e d ≤ − 1 2 ∥ ∇ θ L t r u n c a t e d ∥ 2 2 , \frac{d}{dt}\mathcal{L}^{\mathrm{truncated}}\le-\frac{1}{2}\|\nabla_{\theta}\mathcal{L}^{\mathrm{truncated}}\|_2^2, d t d L truncated ≤ − 2 1 ∥ ∇ θ L truncated ∥ 2 2 ,
∥ θ ˙ ∥ 2 ≤ 3 2 ∥ ∇ θ L t r u n c a t e d ∥ 2 . \|\dot{\theta}\|_2\le\frac{3}{2}\|\nabla_{\theta}\mathcal{L}^{\mathrm{truncated}}\|_2. ∥ θ ˙ ∥ 2 ≤ 2 3 ∥ ∇ θ L truncated ∥ 2 .
Set t θ = t ρ ≤ t c r i t + 2 C 0 2 n 2 σ μ 2 t_{\theta}=t_{\rho}\le t_{\mathrm{crit}}+2C_0^2n^2\sigma_\mu^2 t θ = t ρ ≤ t crit + 2 C 0 2 n 2 σ μ 2 . Part (b) gives loss descent and the stated parameter bound on [ t c r i t , t θ ] [t_{\mathrm{crit}},t_{\theta}] [ t crit , t θ ] , and
∥ θ q ( t ) ∥ 2 ≤ B + O ( σ μ 2 ) + O ~ ( n − 1 ) + 2 C 0 log n log ( 1 + c n σ μ 2 ) = O ( 1 ) . \|\theta_q(t)\|_2\le B+O(\sigma_\mu^2)+\widetilde{O}(n^{-1})+\frac{2C_0}{\log n}\log(1+cn\sigma_\mu^2)=O(1). ∥ θ q ( t ) ∥ 2 ≤ B + O ( σ μ 2 ) + O ( n − 1 ) + log n 2 C 0 log ( 1 + c n σ μ 2 ) = O ( 1 ) .
Since ρ = O ( n − 1 ) \rho=O(n^{-1}) ρ = O ( n − 1 ) and L t r u n c a t e d ( w ˉ ( t θ ) ) ≤ L t r u n c a t e d ( w ˉ ( t c r i t ) ) \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\theta}))\le\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}})) L truncated ( w ˉ ( t θ )) ≤ L truncated ( w ˉ ( t crit )) , the exclusion in the proof of Lemma B.10 applies to a point of S \mathcal{S} S within distance ρ \rho ρ of w ˉ ( t θ ) \bar{w}(t_{\theta}) w ˉ ( t θ ) . Its columns are e k j e_{k_j} e k j or w ˉ ⋅ j ∗ \bar{w}^{*}_{\cdot j} w ˉ ⋅ j ∗ , and the triangle inequality gives the gate bound. Since ∥ e k j − w ˉ ⋅ j ∗ ∥ 2 = Σ k j k j ( j ) / ( n σ μ 2 + Σ k j k j ( j ) ) \|e_{k_j}-\bar{w}^{*}_{\cdot j}\|_2=\Sigma^{(j)}_{k_jk_j}/(n\sigma_\mu^2+\Sigma^{(j)}_{k_jk_j}) ∥ e k j − w ˉ ⋅ j ∗ ∥ 2 = Σ k j k j ( j ) / ( n σ μ 2 + Σ k j k j ( j ) ) ,
∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 1 ≤ 2 ( ρ + 2 Σ k j k j ( j ) n σ μ 2 + Σ k j k j ( j ) ) = O ( n − 1 ) . \|\bar{w}_{\cdot j}(t_{\theta})-e_{k_j}\|_1\le\sqrt{2}\left(\rho+\frac{2\Sigma^{(j)}_{k_jk_j}}{n\sigma_\mu^2+\Sigma^{(j)}_{k_jk_j}}\right)=O(n^{-1}). ∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 1 ≤ 2 ρ + n σ μ 2 + Σ k j k j ( j ) 2 Σ k j k j ( j ) = O ( n − 1 ) .
Risk. By Lemma F.6, E j [ ( g k j − μ ) 2 ] = O ( n − 1 ) \mathbb{E}_j[(g_{k_j}-\mu)^2]=O(n^{-1}) E j [( g k j − μ ) 2 ] = O ( n − 1 ) . For the 1-sub-Gaussian centered observations, E j [ max ℓ ∈ [ n ] ∣ X ℓ − μ ∣ 4 ] = O ( log 2 n ) \mathbb{E}_j[\max_{\ell\in[n]}|X_\ell-\mu|^4]=O(\log^2 n) E j [ max ℓ ∈ [ n ] ∣ X ℓ − μ ∣ 4 ] = O ( log 2 n ) . Apply Lemma 3.5 with i = k j i=k_j i = k j and max k ∥ θ k ( t θ ) ∥ 2 = O ( log n ) \max_k\|\theta_k(t_{\theta})\|_2=O(\log n) max k ∥ θ k ( t θ ) ∥ 2 = O ( log n ) :
E j [ ( μ ^ − μ ) 2 ] ≤ O ( n − 1 / 2 ) + O ( n − 1 ) ( σ μ 2 + O ( log n ) ) 1 / 2 = O ( n − 1 / 2 ) . \sqrt{\mathbb{E}_j[(\widehat{\mu}-\mu)^2]}\le O(n^{-1/2})+O(n^{-1})(\sigma_\mu^2+O(\log n))^{1/2}=O(n^{-1/2}). E j [( μ − μ ) 2 ] ≤ O ( n − 1/2 ) + O ( n − 1 ) ( σ μ 2 + O ( log n ) ) 1/2 = O ( n − 1/2 ) .
Hence L ( j ) ( θ ( t θ ) ) = O ( n − 1 ) \mathcal{L}^{(j)}(\theta(t_{\theta}))=O(n^{-1}) L ( j ) ( θ ( t θ )) = O ( n − 1 ) for each j j j , and L ( θ ( t θ ) ) = O ( n − 1 ) \mathcal{L}(\theta(t_{\theta}))=O(n^{-1}) L ( θ ( t θ )) = O ( n − 1 ) . Moreover, ∣ ∑ k w ˉ k j ( t θ ) − 1 ∣ ≤ ∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 1 = O ( n − 1 ) |\sum_k\bar{w}_{kj}(t_{\theta})-1|\le\|\bar{w}_{\cdot j}(t_{\theta})-e_{k_j}\|_1=O(n^{-1}) ∣ ∑ k w ˉ k j ( t θ ) − 1∣ ≤ ∥ w ˉ ⋅ j ( t θ ) − e k j ∥ 1 = O ( n − 1 ) with a fixed implied constant, and ∥ θ ( t θ ) ∥ 2 ≤ r \|\theta(t_{\theta})\|_2\le r ∥ θ ( t θ ) ∥ 2 ≤ r . Hence Lemma D.6 and m ( j ) ≥ m / 4 m^{(j)}\ge m/4 m ( j ) ≥ m /4 give
∣ L ^ m ( j ) ( j ) ( θ ( t θ ) ) − L ( j ) ( θ ( t θ ) ) ∣ = O ~ ( n − 1 + β m + n − 1 + 2 β m ) = O ( n − 3 / 2 ) , \left|\widehat{\mathcal{L}}_{m^{(j)}}^{(j)}(\theta(t_{\theta}))-\mathcal{L}^{(j)}(\theta(t_{\theta}))\right|=\widetilde{O}\left(\frac{n^{-1+\beta}}{\sqrt{m}}+\frac{n^{-1+2\beta}}{m}\right)=O(n^{-3/2}), L m ( j ) ( j ) ( θ ( t θ )) − L ( j ) ( θ ( t θ )) = O ( m n − 1 + β + m n − 1 + 2 β ) = O ( n − 3/2 ) ,
so L ^ m ( θ ( t θ ) ) ≤ max j L ^ m ( j ) ( j ) ( θ ( t θ ) ) = O ( n − 1 ) \widehat{\mathcal{L}}_m(\theta(t_{\theta}))\le\max_j\widehat{\mathcal{L}}_{m^{(j)}}^{(j)}(\theta(t_{\theta}))=O(n^{-1}) L m ( θ ( t θ )) ≤ max j L m ( j ) ( j ) ( θ ( t θ )) = O ( n − 1 ) . All concentration bounds are uniform over the ball of radius r r r , so they apply at the data-dependent time t θ t_{\theta} t θ .
Lemma D.11 (Loss barrier near the optimal stationary point). Fix λ \lambda λ and let σ μ 2 > 0 \sigma_\mu^2>0 σ μ 2 > 0 . Suppose the expert hierarchy of Definition B.1 holds and use Lemma B.7 and the truncated loss from Definition B.6. For each family j j j , choose the positive threshold
δ j = 1 16 n 2 min { σ μ 2 ( Σ k j k j ( j ) ) 2 , w ˉ k j j ∗ Σ k j k j ( j ) min k ≠ k j ( Σ k j k j ( j ) − Σ k k ( j ) ) } , \delta_j=\frac{1}{16n^2}\min\left\{\sigma_\mu^2\left(\Sigma^{(j)}_{k_jk_j}\right)^2,\ \bar{w}^{*}_{k_jj}\Sigma^{(j)}_{k_jk_j}\min_{k\ne k_j}\left(\Sigma^{(j)}_{k_jk_j}-\Sigma^{(j)}_{kk}\right)\right\}, δ j = 16 n 2 1 min { σ μ 2 ( Σ k j k j ( j ) ) 2 , w ˉ k j j ∗ Σ k j k j ( j ) k = k j min ( Σ k j k j ( j ) − Σ k k ( j ) ) } , and let δ = min j ∈ { G , A } δ j \delta=\min_{j\in\{G,A\}}\delta_j δ = min j ∈ { G , A } δ j .
Define the region
N δ = { w ˉ ∈ [ 0 , 1 ] 2 × 2 : L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ≤ δ } . N_{\delta}=\left\{\bar{w}\in[0,1]^{2\times2}:\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})\le\delta\right\}. N δ = { w ˉ ∈ [ 0 , 1 ] 2 × 2 : L truncated ( w ˉ ) − L truncated ( w ˉ ∗ ) ≤ δ } . Every point in N δ N_{\delta} N δ satisfies, for each j j j ,
∥ w ˉ ⋅ j − w ˉ ⋅ j ∗ ∥ 2 ≤ Σ k j k j ( j ) n . \|\bar{w}_{\cdot j}-\bar{w}^{*}_{\cdot j}\|_2\le\frac{\Sigma^{(j)}_{k_jk_j}}{n}. ∥ w ˉ ⋅ j − w ˉ ⋅ j ∗ ∥ 2 ≤ n Σ k j k j ( j ) . Moreover, for every w ˉ ∈ [ 0 , 1 ] 2 × 2 \bar{w}\in[0,1]^{2\times2} w ˉ ∈ [ 0 , 1 ] 2 × 2 and all sufficiently large n n n ,
max j [ ∣ ∑ q w ˉ q j ′ + ∑ q w ˉ q j − 1 ∣ ] ≲ n [ L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ] + 1 n σ μ 2 . (20) \max_j\left[\left|\sum_q\bar{w}'_{qj}+\sum_q\bar{w}_{qj}-1\right|\right]\lesssim n\left[\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})\right]+\frac{1}{n\sigma_\mu^2}. \tag*{(20)} j max [ q ∑ w ˉ q j ′ + q ∑ w ˉ q j − 1 ] ≲ n [ L truncated ( w ˉ ) − L truncated ( w ˉ ∗ ) ] + n σ μ 2 1 . (20)
with an implied constant depending only on Σ ( G ) \Sigma^{(\mathrm{G})} Σ ( G ) and Σ ( A ) \Sigma^{(\mathrm{A})} Σ ( A ) . The truncated gradient flow
w ˉ ˙ q k = − 1 2 w ˉ q k ′ ∑ j Z j k w ˉ q j ′ S q j ( w ˉ ) , Z j k = ⟨ z ˉ j , z ˉ k ⟩ , \dot{\bar{w}}_{qk}=-\frac{1}{2}\bar{w}_{qk}^{\prime}\sum_j Z_{jk}\bar{w}_{qj}^{\prime}S_{qj}(\bar{w}),\qquad Z_{jk}=\langle\bar{z}_j,\bar{z}_k\rangle, w ˉ ˙ q k = − 2 1 w ˉ q k ′ j ∑ Z j k w ˉ q j ′ S q j ( w ˉ ) , Z j k = ⟨ z ˉ j , z ˉ k ⟩ ,
cannot exit N δ N_\delta N δ once it enters it.
For the full population gradient flow θ ˙ = − ∇ θ L \dot{\theta}=-\nabla_\theta\mathcal{L} θ ˙ = − ∇ θ L at fixed λ \lambda λ , the same region cannot be exited after time t c r i t t_{\mathrm{crit}} t crit provided
L t r u n c a t e d ( w ˉ ( t c r i t ) ) − L t r u n c a t e d ( w ˉ ∗ ) ≤ δ / 4 \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}}))-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})\leq\delta/4 L truncated ( w ˉ ( t crit )) − L truncated ( w ˉ ∗ ) ≤ δ /4
and, for every θ \theta θ whose gates w ˉ \bar{w} w ˉ lie in N δ N_\delta N δ ,
∣ L ( θ ) − L ( θ ( t c r i t ) ) − L t r u n c a t e d ( w ˉ ) + L t r u n c a t e d ( w ˉ ( t c r i t ) ) ∣ ≤ δ / 4. \left|\mathcal{L}(\theta)-\mathcal{L}(\theta(t_{\mathrm{crit}}))-\mathcal{L}^{\mathrm{truncated}}(\bar{w})+\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}}))\right|\leq\delta/4. L ( θ ) − L ( θ ( t crit )) − L truncated ( w ˉ ) + L truncated ( w ˉ ( t crit )) ≤ δ /4.
The same statement holds for the empirical gradient flow with L \mathcal{L} L replaced by L ^ m \widehat{\mathcal{L}}_m L m in both the flow and this bound.
Proof. Since L t r u n c a t e d \mathcal{L}^{\mathrm{truncated}} L truncated is quadratic and S k j j ( w ˉ ∗ ) = 0 S_{k_jj}(\bar{w}^{*})=0 S k j j ( w ˉ ∗ ) = 0 , its expansion at w ˉ ∗ \bar{w}^{*} w ˉ ∗ is exact:
2 ( L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ) = ∑ j [ w ˉ k j ∗ n ∑ k ≠ k j ( Σ k j k j ( j ) − Σ k j k j ( j ) ) w ˉ k j + σ μ 2 2 ( ∑ k = 1 2 ( w ˉ k j − w ˉ k j ∗ ) ) 2 + 1 2 n ( w ˉ ⋅ j − w ˉ ⋅ j ∗ ) ⊤ Σ ( j ) ( w ˉ ⋅ j − w ˉ ⋅ j ∗ ) ] . \begin{aligned}
2(\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*}))
={}&\sum_j[\frac{\bar{w}_{k_j}^{*}}{n}\sum_{k\ne k_j}(\Sigma_{k_jk_j}^{(j)}-\Sigma_{k_jk_j}^{(j)})\bar{w}_{kj}\\
&+\frac{\sigma_\mu^2}{2}(\sum_{k=1}^{2}(\bar{w}_{kj}-\bar{w}_{kj}^{*}))^2\\
&+\frac{1}{2n}(\bar{w}_{\cdot j}-\bar{w}_{\cdot j}^{*})^\top\Sigma^{(j)}(\bar{w}_{\cdot j}-\bar{w}_{\cdot j}^{*})].
\end{aligned} 2 ( L truncated ( w ˉ ) − L truncated ( w ˉ ∗ )) = j ∑ [ n w ˉ k j ∗ k = k j ∑ ( Σ k j k j ( j ) − Σ k j k j ( j ) ) w ˉ k j + 2 σ μ 2 ( k = 1 ∑ 2 ( w ˉ k j − w ˉ k j ∗ ) ) 2 + 2 n 1 ( w ˉ ⋅ j − w ˉ ⋅ j ∗ ) ⊤ Σ ( j ) ( w ˉ ⋅ j − w ˉ ⋅ j ∗ )] .
Every term on the right is nonnegative by the expert hierarchy and positive semidefiniteness of the covariance matrices.
We first deduce (20). Bound each group of terms in the expansion by 2 [ L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ] 2[\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})] 2 [ L truncated ( w ˉ ) − L truncated ( w ˉ ∗ )] . Since w ˉ k j j ∗ ≥ 1 / 2 \bar{w}_{k_jj}^{*}\geq1/2 w ˉ k j j ∗ ≥ 1/2 for large n n n and the hierarchy gaps are positive constants, the first group gives ∑ k ≠ k j w ˉ k j ≲ n [ L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ] \sum_{k\ne k_j}\bar{w}_{kj}\lesssim n[\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})] ∑ k = k j w ˉ k j ≲ n [ L truncated ( w ˉ ) − L truncated ( w ˉ ∗ )] . The second gives
∣ ∑ k ( w ˉ k j − w ˉ k j ∗ ) ∣ ≤ 2 L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) σ μ 2 = 2 n [ L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ] ⋅ 1 n σ μ 2 ≤ n [ L t r u n c a t e d ( w ˉ ) − L t r u n c a t e d ( w ˉ ∗ ) ] + 1 n σ μ 2 \begin{aligned}
\left|\sum_k(\bar{w}_{kj}-\bar{w}_{kj}^{*})\right|\leq2\sqrt{\frac{\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})}{\sigma_\mu^2}} \\
&=2\sqrt{n[\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})]\cdot\frac{1}{n\sigma_\mu^2}} \\
&\leq n[\mathcal{L}^{\mathrm{truncated}}(\bar{w})-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})]+\frac{1}{n\sigma_\mu^2}
\end{aligned} k ∑ ( w ˉ k j − w ˉ k j ∗ ) ≤ 2 σ μ 2 L truncated ( w ˉ ) − L truncated ( w ˉ ∗ ) = 2 n [ L truncated ( w ˉ ) − L truncated ( w ˉ ∗ )] ⋅ n σ μ 2 1 ≤ n [ L truncated ( w ˉ ) − L truncated ( w ˉ ∗ )] + n σ μ 2 1
by the arithmetic–geometric mean inequality. As ∑ k w ˉ k j ∗ = w ˉ k j j ∗ \sum_k\bar{w}_{kj}^{*}=\bar{w}_{k_jj}^{*} ∑ k w ˉ k j ∗ = w ˉ k j j ∗ and 1 − w ˉ k j j ∗ = Σ k j k j ( j ) / ( n σ μ 2 + ∑ k Σ k j k j ( j ) ) ≲ ( n σ μ 2 ) − 1 1-\bar{w}_{k_jj}^{*}=\Sigma_{k_jk_j}^{(j)}/(n\sigma_\mu^2+\sum_k\Sigma_{k_jk_j}^{(j)})\lesssim(n\sigma_\mu^2)^{-1} 1 − w ˉ k j j ∗ = Σ k j k j ( j ) / ( n σ μ 2 + ∑ k Σ k j k j ( j ) ) ≲ ( n σ μ 2 ) − 1 , the triangle inequality bounds ∣ ∑ k w ˉ k j − 1 ∣ |\sum_k\bar{w}_{kj}-1| ∣ ∑ k w ˉ k j − 1∣ by the right-hand side of (20). Combining the same two bounds controls ∣ w ˉ k j j − w ˉ k j j ∗ ∣ |\bar{w}_{k_jj}-\bar{w}_{k_jj}^{*}| ∣ w ˉ k j j − w ˉ k j j ∗ ∣ and hence 1 − w ˉ k j j 1-\bar{w}_{k_jj} 1 − w ˉ k j j , so w ˉ k j j ∗ ≤ 1 − w ˉ k j j \bar{w}_{k_jj}^{*}\leq1-\bar{w}_{k_jj} w ˉ k j j ∗ ≤ 1 − w ˉ k j j and w ˉ q j ′ ≤ w ˉ q j \bar{w}_{qj}^{\prime}\leq\bar{w}_{qj} w ˉ q j ′ ≤ w ˉ q j for q ≠ k j q\ne k_j q = k j are bounded by the same quantity. This proves (20).
For each family j j j , the bound δ ≤ δ j \delta\leq\delta_j δ ≤ δ j gives, on N δ N_\delta N δ ,
∑ k ≠ k j w ˉ k j ≤ 2 n δ w ˉ k j j ∗ min k ≠ k j ( Σ k j k j ( j ) − Σ k j k j ( j ) ) ≤ Σ k j k j ( j ) 8 n , \sum_{k\ne k_j}\bar{w}_{kj}\leq\frac{2n\delta}{\bar{w}_{k_jj}^{*}\min_{k\ne k_j}(\Sigma_{k_jk_j}^{(j)}-\Sigma_{k_jk_j}^{(j)})}\leq\frac{\Sigma_{k_jk_j}^{(j)}}{8n}, k = k j ∑ w ˉ k j ≤ w ˉ k j j ∗ min k = k j ( Σ k j k j ( j ) − Σ k j k j ( j ) ) 2 n δ ≤ 8 n Σ k j k j ( j ) ,
and
∣ ∑ k = 1 2 ( w ˉ k j − w ˉ k j ∗ ) ∣ ≤ 4 δ σ μ 2 ≤ Σ k j k j ( j ) 2 n . \left|\sum_{k=1}^{2}(\bar{w}_{kj}-\bar{w}_{kj}^{*})\right|\leq\sqrt{\frac{4\delta}{\sigma_\mu^2}}\leq\frac{\Sigma_{k_jk_j}^{(j)}}{2n}. k = 1 ∑ 2 ( w ˉ k j − w ˉ k j ∗ ) ≤ σ μ 2 4 δ ≤ 2 n Σ k j k j ( j ) .
Consequently,
∥ w ˉ ⋅ j − w ˉ ⋅ j ∗ ∥ 2 ≤ ∣ w ˉ k j j − w ˉ k j j ∗ ∣ + ∑ k ≠ k j w ˉ k j ≤ ∣ ∑ k = 1 2 ( w ˉ k j − w ˉ k j ∗ ) ∣ + 2 ∑ k ≠ k j w ˉ k j ≤ 4 δ σ μ 2 + 4 n δ w ˉ k j j ∗ min k ≠ k j ( Σ k k ( j ) − Σ k j k j ( j ) ) ≤ 3 Σ k j k j ( j ) 4 n . \begin{aligned}
\left\|\bar{w}_{\cdot j}-\bar{w}^{*}_{\cdot j}\right\|_{2}\leq\left|\bar{w}_{k_jj}-\bar{w}^{*}_{k_jj}\right|+\sum_{k\ne k_j}\bar{w}_{kj} \\
&\leq\left|\sum_{k=1}^{2}\left(\bar{w}_{kj}-\bar{w}^{*}_{kj}\right)\right|+2\sum_{k\ne k_j}\bar{w}_{kj} \\
&\leq\sqrt{\frac{4\delta}{\sigma_{\mu}^{2}}+\frac{4n\delta}{\bar{w}^{*}_{k_jj}\min_{k\ne k_j}\left(\Sigma_{kk}^{(j)}-\Sigma_{k_jk_j}^{(j)}\right)}}\leq\frac{3\Sigma_{k_jk_j}^{(j)}}{4n}.
\end{aligned} w ˉ ⋅ j − w ˉ ⋅ j ∗ 2 ≤ w ˉ k j j − w ˉ k j j ∗ + k = k j ∑ w ˉ k j ≤ k = 1 ∑ 2 ( w ˉ k j − w ˉ k j ∗ ) + 2 k = k j ∑ w ˉ k j ≤ σ μ 2 4 δ + w ˉ k j j ∗ min k = k j ( Σ k k ( j ) − Σ k j k j ( j ) ) 4 n δ ≤ 4 n 3 Σ k j k j ( j ) .
The truncated flow preserves [ 0 , 1 ] 2 × 2 [0,1]^{2\times2} [ 0 , 1 ] 2 × 2 because w ˉ q k ′ = 0 \bar{w}'_{qk}=0 w ˉ q k ′ = 0 on each coordinate boundary. Moreover,
∂ L t r u n c a t e d ∂ w ˉ q j = S q j 2 , \frac{\partial\mathcal{L}^{\mathrm{truncated}}}{\partial\bar{w}_{qj}}=\frac{S_{qj}}{2}, ∂ w ˉ q j ∂ L truncated = 2 S q j ,
so
d d t L t r u n c a t e d ( w ˉ ( t ) ) = − 1 4 ∑ q = 1 2 ∥ ∑ j S q j ( w ˉ ) w ˉ q j ′ z ˉ j ∥ 2 2 ≤ 0. \frac{d}{dt}\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t))=-\frac{1}{4}\sum_{q=1}^{2}\left\|\sum_{j}S_{qj}(\bar{w})\bar{w}'_{qj}\bar{z}_{j}\right\|_{2}^{2}\leq0. d t d L truncated ( w ˉ ( t )) = − 4 1 q = 1 ∑ 2 j ∑ S q j ( w ˉ ) w ˉ q j ′ z ˉ j 2 2 ≤ 0.
Since λ \lambda λ is fixed, L t r u n c a t e d ( w ˉ ∗ ) \mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*}) L truncated ( w ˉ ∗ ) and δ \delta δ are constant. Hence the truncated flow cannot exit N δ N_{\delta} N δ .
For the full flow, a first exit would require a time t t t with L t r u n c a t e d ( w ˉ ( t ) ) − L t r u n c a t e d ( w ˉ ∗ ) = δ \mathcal{L}^{\mathrm{truncated}}(\bar{w}(t))-\mathcal{L}^{\mathrm{truncated}}(\bar{w}^{*})=\delta L truncated ( w ˉ ( t )) − L truncated ( w ˉ ∗ ) = δ . The assumed bound would then imply
L ( θ ( t ) ) − L ( θ ( t c r i t ) ) ≥ L t r u n c a t e d ( w ˉ ( t ) ) − L t r u n c a t e d ( w ˉ ( t c r i t ) ) − δ / 4 ≥ δ / 2 > 0 , \mathcal{L}(\theta(t))-\mathcal{L}(\theta(t_{\mathrm{crit}}))\geq\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t))-\mathcal{L}^{\mathrm{truncated}}(\bar{w}(t_{\mathrm{crit}}))-\delta/4\geq\delta/2>0, L ( θ ( t )) − L ( θ ( t crit )) ≥ L truncated ( w ˉ ( t )) − L truncated ( w ˉ ( t crit )) − δ /4 ≥ δ /2 > 0 ,
contradicting d L / d t = − ∥ ∇ θ L ∥ 2 2 ≤ 0 d\mathcal{L}/dt=-\|\nabla_{\theta}\mathcal{L}\|_{2}^{2}\leq0 d L / d t = − ∥ ∇ θ L ∥ 2 2 ≤ 0 . Replacing L \mathcal{L} L by L ^ m \hat{\mathcal{L}}_{m} L ^ m gives the empirical statement.
Proof of Corollary B.12
Proof of Corollary B.12. Since g 1 g_{1} g 1 is the sample mean at λ 1 = 0 \lambda_{1}=0 λ 1 = 0 , integrating the Gaussian gradient expansion in Lemma F.1 gives, uniformly for ∣ λ 1 ∣ ≤ 2 |\lambda_{1}|\leq2 ∣ λ 1 ∣ ≤ 2 ,
E G [ ( g 1 − μ ) 2 ] = cosh ( λ 1 2 ) + λ 1 2 sinh ( λ 1 2 ) n + O ( n − 2 ) . \mathbb{E}_{G}\left[(g_{1}-\mu)^{2}\right]=\frac{\cosh(\lambda_{1}^{2})+\lambda_{1}^{2}\sinh(\lambda_{1}^{2})}{n}+O(n^{-2}). E G [ ( g 1 − μ ) 2 ] = n cosh ( λ 1 2 ) + λ 1 2 sinh ( λ 1 2 ) + O ( n − 2 ) .
At t λ t_{\lambda} t λ , Lemma F.1, Lemma F.2, and Lemma F.3 give
E G [ ( g 1 − μ ) 2 ] = 1 + o ( 1 ) n , E A [ ( g 2 − μ ) 2 ] = { O ( ( n ∣ λ 2 ∣ ) − 1 ) , Uniform , O ( σ n 2 / n ) , Gaussian mixture , \mathbb{E}_{G}\left[(g_{1}-\mu)^{2}\right]=\frac{1+o(1)}{n},\qquad\mathbb{E}_{A}\left[(g_{2}-\mu)^{2}\right]=
\begin{cases}
O((n|\lambda_{2}|)^{-1}), & \text{Uniform},\\
O(\sigma_{n}^{2}/n), & \text{Gaussian mixture},
\end{cases} E G [ ( g 1 − μ ) 2 ] = n 1 + o ( 1 ) , E A [ ( g 2 − μ ) 2 ] = { O (( n ∣ λ 2 ∣ ) − 1 ) , O ( σ n 2 / n ) , Uniform , Gaussian mixture ,
since ∣ λ 1 ( t λ ) ∣ = o ( 1 ) |\lambda_{1}(t_{\lambda})|=o(1) ∣ λ 1 ( t λ ) ∣ = o ( 1 ) and e − 4 1 − σ n 2 ∣ λ 2 ∣ = σ n 2 e^{-4\sqrt{1-\sigma_{n}^{2}}|\lambda_{2}|}=\sigma_{n}^{2} e − 4 1 − σ n 2 ∣ λ 2 ∣ = σ n 2 for the mixture. The sample-maximum fourth moment is O ( 1 ) O(1) O ( 1 ) for Uniform data and O ( ( log n ) 2 ) O((\log n)^{2}) O (( log n ) 2 ) for Gaussian and Gaussian-mixture data. Apply Lemma 3.5 with i = 1 i=1 i = 1 for j = G j=G j = G and i = 2 i=2 i = 2 for j = A j=A j = A , and ∥ w ˉ ⋅ j − e i ∥ 1 = O ( n − 1 ) \|\bar{w}_{\cdot j}-e_i\|_{1}=O(n^{-1}) ∥ w ˉ ⋅ j − e i ∥ 1 = O ( n − 1 ) . Its proof gives ∥ μ ^ − g 1 ∥ L 2 ( P G ) = O ( log n / n ) = o ( n − 1 / 2 ) \|\hat{\mu}-g_{1}\|_{L^{2}(P_{G})}=O(\sqrt{\log n/n})=o(n^{-1/2}) ∥ μ ^ − g 1 ∥ L 2 ( P G ) = O ( log n / n ) = o ( n − 1/2 ) , so the triangle inequality in both directions preserves the Gaussian leading constant. In the Gaussian-mixture case, this discrepancy is of lower order than the expert risk, since
n − 2 log n σ n 2 / n ≤ n − ϵ log n = o ( 1 ) . \frac{n^{-2}\log n}{\sigma_{n}^{2}/n}\leq n^{-\epsilon}\log n=o(1). σ n 2 / n n − 2 log n ≤ n − ϵ log n = o ( 1 ) .
For the bounds at fixed μ \mu μ , the translation identities and the gate bound give
w k ( X + μ 1 ) = w k ( X ) , g k ( X + μ 1 ) = g k ( X ) + μ , w_k(\mathbf{X}+\mu\mathbf{1})=w_k(\mathbf{X}),\qquad g_k(\mathbf{X}+\mu\mathbf{1})=g_k(\mathbf{X})+\mu, w k ( X + μ 1 ) = w k ( X ) , g k ( X + μ 1 ) = g k ( X ) + μ ,
μ ^ ( X + μ 1 ) − μ = μ ^ ( X ) + μ ( ∑ k w k ( X ) − 1 ) , \widehat{\mu}(\mathbf{X}+\mu\mathbf{1})-\mu=\widehat{\mu}(\mathbf{X})+\mu\left(\sum_k w_k(\mathbf{X})-1\right), μ ( X + μ 1 ) − μ = μ ( X ) + μ ( k ∑ w k ( X ) − 1 ) ,
E X ∼ P 0 , j ⊗ n [ ( ∑ k w k ( X ) − 1 ) 2 ] ≤ E j [ ∥ w ( X ) − e i ∥ 1 2 ] ≤ C ∥ w ˉ ⋅ j − e i ∥ 1 2 = O ( n − 2 ) , \begin{aligned}
\mathbb{E}_{\mathbf{X}\sim P_{0,j}^{\otimes n}}\left[\left(\sum_k w_k(\mathbf{X})-1\right)^2\right]\leq\mathbb{E}_j\left[\lVert\mathbf{w}(\mathbf{X})-\mathbf{e}_i\rVert_1^2\right] \\
&\leq C\lVert\bar{\mathbf{w}}_{\cdot j}-\mathbf{e}_i\rVert_1^2=O(n^{-2}),
\end{aligned} E X ∼ P 0 , j ⊗ n ( k ∑ w k ( X ) − 1 ) 2 ≤ E j [ ∥ w ( X ) − e i ∥ 1 2 ] ≤ C ∥ w ˉ ⋅ j − e i ∥ 1 2 = O ( n − 2 ) ,
R j , n ( μ ^ ) = E X ∼ P 0 , j ⊗ n [ μ ^ ( X ) 2 ] R_{j,n}(\widehat{\mu})=\mathbb{E}_{\mathbf{X}\sim P_{0,j}^{\otimes n}}[\widehat{\mu}(\mathbf{X})^2] R j , n ( μ ) = E X ∼ P 0 , j ⊗ n [ μ ( X ) 2 ]
+ σ μ 2 E X ∼ P 0 , j ⊗ n [ ( ∑ k w k ( X ) − 1 ) 2 ] , \qquad+\sigma_\mu^2\mathbb{E}_{\mathbf{X}\sim P_{0,j}^{\otimes n}}\left[\left(\sum_k w_k(\mathbf{X})-1\right)^2\right], + σ μ 2 E X ∼ P 0 , j ⊗ n ( k ∑ w k ( X ) − 1 ) 2 ,
E X ∼ P μ , j ⊗ n [ ( μ ^ ( X ) − μ ) 2 ] ≤ 2 E X ∼ P 0 , j ⊗ n [ μ ^ ( X ) 2 ] \mathbb{E}_{\mathbf{X}\sim P_{\mu,j}^{\otimes n}}[(\widehat{\mu}(\mathbf{X})-\mu)^2]\leq2\mathbb{E}_{\mathbf{X}\sim P_{0,j}^{\otimes n}}[\widehat{\mu}(\mathbf{X})^2] E X ∼ P μ , j ⊗ n [( μ ( X ) − μ ) 2 ] ≤ 2 E X ∼ P 0 , j ⊗ n [ μ ( X ) 2 ]
+ 2 μ 2 E X ∼ P 0 , j ⊗ n [ ( ∑ k w k ( X ) − 1 ) 2 ] \qquad+2\mu^2\mathbb{E}_{\mathbf{X}\sim P_{0,j}^{\otimes n}}\left[\left(\sum_k w_k(\mathbf{X})-1\right)^2\right] + 2 μ 2 E X ∼ P 0 , j ⊗ n ( k ∑ w k ( X ) − 1 ) 2
≤ 2 R j , n ( μ ^ ) + C μ 2 n 2 , \leq2R_{j,n}(\widehat{\mu})+\frac{C\mu^2}{n^2}, ≤ 2 R j , n ( μ ) + n 2 C μ 2 ,
∑ k w k = 1 ⟹ E X ∼ P μ , j ⊗ n [ ( μ ^ ( X ) − μ ) 2 ] = R j , n ( μ ^ ) . \sum_k w_k=1\quad\Longrightarrow\quad\mathbb{E}_{\mathbf{X}\sim P_{\mu,j}^{\otimes n}}[(\widehat{\mu}(\mathbf{X})-\mu)^2]=R_{j,n}(\widehat{\mu}). k ∑ w k = 1 ⟹ E X ∼ P μ , j ⊗ n [( μ ( X ) − μ ) 2 ] = R j , n ( μ ) .
Proof of Corollary 3.2
Proof of Corollary 3.2. The population gates w ˉ ⋅ j \bar{\mathbf{w}}_{\cdot j} w ˉ ⋅ j depend on the data only through z ˉ j \bar{\mathbf{z}}_j z ˉ j , which does not depend on the context length. Hence max { ∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } = O ( n − 1 ) \max\{\lVert\bar{\mathbf{w}}_{\cdot G}-\mathbf{e}_1\rVert_1,\lVert\bar{\mathbf{w}}_{\cdot A}-\mathbf{e}_2\rVert_1\}=O(n^{-1}) max {∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } = O ( n − 1 ) and max q ∥ θ q ∥ 2 = O ( log n ) = O ( log n ′ ) \max_q\lVert\theta_q\rVert_2=O(\log n)=O(\log n') max q ∥ θ q ∥ 2 = O ( log n ) = O ( log n ′ ) at the trained parameters, and Lemma 3.5 applies with n ′ n' n ′ in place of n n n . The hypotheses of Lemma F.2 hold at length n ′ n' n ′ , since ∣ λ 2 ( t λ ) ∣ = n 1 − ϵ ≤ n ′ 1 − ϵ |\lambda_2(t_\lambda)|=n^{1-\epsilon}\leq n'^{1-\epsilon} ∣ λ 2 ( t λ ) ∣ = n 1 − ϵ ≤ n ′ 1 − ϵ , and those of Lemma F.3 hold since n ′ − 1 + ϵ ≤ n − 1 + ϵ ≤ σ n 2 n'^{-1+\epsilon}\leq n^{-1+\epsilon}\leq\sigma_n^2 n ′ − 1 + ϵ ≤ n − 1 + ϵ ≤ σ n 2 . The proof of Corollary B.12 with n ′ n' n ′ test observations then gives the claim, with sample-maximum fourth moment O ( 1 ) O(1) O ( 1 ) for Uniform data and O ( ( log n ′ ) 2 ) O((\log n')^2) O (( log n ′ ) 2 ) otherwise.
Proof of the softmax MoE part of Lemma 3.3
For the proof, write ϑ = θ 1 − θ 2 \vartheta=\theta_1-\theta_2 ϑ = θ 1 − θ 2 . The softmax MoE weights in (3) satisfy w 1 ( X ) = σ ( ⟨ z ( X ) , ϑ ⟩ ) w_1(\mathbf{X})=\sigma(\langle\mathbf{z}(\mathbf{X}),\vartheta\rangle) w 1 ( X ) = σ (⟨ z ( X ) , ϑ ⟩) and w 2 ( X ) = 1 − w 1 ( X ) w_2(\mathbf{X})=1-w_1(\mathbf{X}) w 2 ( X ) = 1 − w 1 ( X ) , with the same identities at z ˉ j \bar{\mathbf{z}}_j z ˉ j . Writing the loss as a function of ϑ \vartheta ϑ , the original population flow satisfies ϑ ˙ = − 2 ∇ ϑ L \dot{\vartheta}=-2\nabla_\vartheta\mathcal{L} ϑ ˙ = − 2 ∇ ϑ L and d d t ( θ 1 + θ 2 ) = 0 \frac{d}{dt}(\theta_1+\theta_2)=0 d t d ( θ 1 + θ 2 ) = 0 . The same identities hold for the empirical loss and for L s m \mathcal{L}^{\mathrm{sm}} L sm . Since λ \lambda λ is fixed in the first stage, ∣ λ k ( 0 ) ∣ ≤ 1 |\lambda_k(0)|\leq1 ∣ λ k ( 0 ) ∣ ≤ 1 and 0 < ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ 0<|\lambda_1(0)|<|\lambda_2(0)| 0 < ∣ λ 1 ( 0 ) ∣ < ∣ λ 2 ( 0 ) ∣ make expert 1 better in family G and expert 2 better in family A by Lemma B.2, Lemma B.3 and Lemma B.4 for sufficiently large n n n , as in Section B.3. The strict covariance gaps do not depend on n n n for the Gaussian and uniform families; for the Gaussian mixture, (37) converges as σ n → 0 \sigma_n\to0 σ n → 0 to sech 2 ( λ i ) sech 2 ( λ k ) \operatorname{sech}^2(\lambda_i)\operatorname{sech}^2(\lambda_k) sech 2 ( λ i ) sech 2 ( λ k ) , whose gaps are positive, so they are bounded below independently of n n n .
Proof of the softmax MoE part of Lemma 3.3. The gate and parameter bounds follow from the empirical part of Lemma E.2 with B = 1 B=1 B = 1 . Since θ 1 + θ 2 \theta_1+\theta_2 θ 1 + θ 2 is constant and bounded at initialization, the bound on ϑ \vartheta ϑ gives max k ∥ θ k ( t ) ∥ 2 = O ( log n ) \max_k\lVert\theta_k(t)\rVert_2=O(\log n) max k ∥ θ k ( t ) ∥ 2 = O ( log n ) throughout training of the router.
Lemma E.1 (Taylor expansion of the loss). Under the assumptions of Lemma 3.3 , for every fixed C 0 > 0 C_0>0 C 0 > 0 and all sufficiently large n n n ,
∣ L ( ϑ ) − L s m ( ϑ ) ∣ ≤ C ( 1 + ∥ ϑ ∥ 2 ) 4 n 3 / 2 , (21) |\mathcal{L}(\vartheta)-\mathcal{L}^{\mathrm{sm}}(\vartheta)|\leq\frac{C(1+\|\vartheta\|_2)^4}{n^{3/2}}, \tag*{(21)} ∣ L ( ϑ ) − L sm ( ϑ ) ∣ ≤ n 3/2 C ( 1 + ∥ ϑ ∥ 2 ) 4 , (21) ∥ ∇ ϑ L − ∇ ϑ L s m ∥ 2 ≤ C ( 1 + ∥ ϑ ∥ 2 ) 4 n 3 / 2 ∑ j w ˉ 1 j ′ , (22) \|\nabla_{\vartheta}\mathcal{L}-\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}}\|_2\leq\frac{C(1+\|\vartheta\|_2)^4}{n^{3/2}}\sum_j\bar{w}'_{1j}, \tag*{(22)} ∥ ∇ ϑ L − ∇ ϑ L sm ∥ 2 ≤ n 3/2 C ( 1 + ∥ ϑ ∥ 2 ) 4 j ∑ w ˉ 1 j ′ , (22) uniformly on ∥ ϑ ∥ 2 ≤ C 0 log n \|\vartheta\|_2\leq C_0\log n ∥ ϑ ∥ 2 ≤ C 0 log n , where L s m \mathcal{L}^{\mathrm{sm}} L sm is defined in (8) .
Proof. w 1 + w 2 = 1 w_1+w_2=1 w 1 + w 2 = 1 gives
μ ^ − μ = ∑ i = 1 2 w i ( g i − μ ) . \hat{\mu}-\mu=\sum_{i=1}^{2}w_i(g_i-\mu). μ ^ − μ = i = 1 ∑ 2 w i ( g i − μ ) .
Write Δ z = z − z ˉ j \Delta z=z-\bar{z}_j Δ z = z − z ˉ j as in Appendix § 13 . The empirical-moment expansions in Lemma F.6 and Lemma F.1 , together with the layer-normalization argument in Appendix § 13 , give
E j [ ( g i − μ ) ( g k − μ ) ] = Σ i k ( j ) n + O ( n − 3 / 2 ) , \mathbb{E}_j[(g_i-\mu)(g_k-\mu)]=\frac{\Sigma_{ik}^{(j)}}{n}+O(n^{-3/2}), E j [( g i − μ ) ( g k − μ )] = n Σ ik ( j ) + O ( n − 3/2 ) ,
E j [ ∣ g i − μ ∣ 4 ] = O ( n − 2 ) , E j [ ∥ Δ z ∥ 2 8 ] = O ( n − 4 ) , \mathbb{E}_j[|g_i-\mu|^4]=O(n^{-2}),\qquad\mathbb{E}_j[\|\Delta z\|_2^8]=O(n^{-4}), E j [ ∣ g i − μ ∣ 4 ] = O ( n − 2 ) , E j [ ∥Δ z ∥ 2 8 ] = O ( n − 4 ) ,
∥ E j [ ( g i − μ ) ( g k − μ ) Δ z ] ∥ 2 ≤ ( E j [ ∣ g i − μ ∣ 4 ] E j [ ∣ g k − μ ∣ 4 ] ) 1 / 4 E j [ ∥ Δ z ∥ 2 2 ] 1 / 2 = O ( n − 3 / 2 ) . \|\mathbb{E}_j[(g_i-\mu)(g_k-\mu)\Delta z]\|_2
\leq\left(\mathbb{E}_j[|g_i-\mu|^4]\mathbb{E}_j[|g_k-\mu|^4]\right)^{1/4}\mathbb{E}_j[\|\Delta z\|_2^2]^{1/2}
=O(n^{-3/2}). ∥ E j [( g i − μ ) ( g k − μ ) Δ z ] ∥ 2 ≤ ( E j [ ∣ g i − μ ∣ 4 ] E j [ ∣ g k − μ ∣ 4 ] ) 1/4 E j [ ∥Δ z ∥ 2 2 ] 1/2 = O ( n − 3/2 ) .
The exponential-moment bound in the proof of Lemma 3.5 and Hölder’s inequality give
E j [ e 8 ∣ ⟨ ϑ , Δ z ⟩ ∣ ] ≤ C , \mathbb{E}_j\left[e^{8|\langle\vartheta,\Delta z\rangle|}\right]\leq C, E j [ e 8∣ ⟨ ϑ , Δ z ⟩ ∣ ] ≤ C ,
E j [ ∣ g i − μ ∣ ∣ g k − μ ∣ ∥ Δ z ∥ 2 2 e 2 ∣ ⟨ ϑ , Δ z ⟩ ∣ ] ≤ ( E j [ ∣ g i − μ ∣ 4 ] E j [ ∣ g k − μ ∣ 4 ] ) 1 / 4 ⋅ ( E j [ ∥ Δ z ∥ 2 8 ] E j [ e 8 ∣ ⟨ ϑ , Δ z ⟩ ∣ ] ) 1 / 4 = O ( n − 2 ) . \mathbb{E}_j\left[|g_i-\mu||g_k-\mu|\|\Delta z\|_2^2e^{2|\langle\vartheta,\Delta z\rangle|}\right]
\leq\left(\mathbb{E}_j[|g_i-\mu|^4]\mathbb{E}_j[|g_k-\mu|^4]\right)^{1/4}
\cdot\left(\mathbb{E}_j[\|\Delta z\|_2^8]\mathbb{E}_j[e^{8|\langle\vartheta,\Delta z\rangle|}]\right)^{1/4}
=O(n^{-2}). E j [ ∣ g i − μ ∣∣ g k − μ ∣∥Δ z ∥ 2 2 e 2∣ ⟨ ϑ , Δ z ⟩ ∣ ] ≤ ( E j [ ∣ g i − μ ∣ 4 ] E j [ ∣ g k − μ ∣ 4 ] ) 1/4 ⋅ ( E j [ ∥Δ z ∥ 2 8 ] E j [ e 8∣ ⟨ ϑ , Δ z ⟩ ∣ ] ) 1/4 = O ( n − 2 ) .
Taylor expansion of the gate factors at z ˉ j \bar{z}_j z ˉ j gives
w i w k = w ˉ i j w ˉ k j + ∇ z ( w i w k ) ∣ z ˉ j T Δ z + O ( ( 1 + ∥ ϑ ∥ 2 ) 2 ∥ Δ z ∥ 2 2 ) , w_iw_k=\bar{w}_{ij}\bar{w}_{kj}+\left.\nabla_z(w_iw_k)\right|_{\bar{z}_j}^{\mathsf T}\Delta z+O\left((1+\|\vartheta\|_2)^2\|\Delta z\|_2^2\right), w i w k = w ˉ ij w ˉ k j + ∇ z ( w i w k ) ∣ z ˉ j T Δ z + O ( ( 1 + ∥ ϑ ∥ 2 ) 2 ∥Δ z ∥ 2 2 ) ,
w i w 1 ′ z = w ˉ i j w ˉ 1 j ′ z ˉ j + w ˉ i j w ˉ 1 j ′ Δ z + z ˉ j ∇ z ( w i w 1 ′ ) ∣ z ˉ j T Δ z + w ˉ 1 j ′ O ( ( 1 + ∥ ϑ ∥ 2 ) 2 e 2 ∣ ⟨ ϑ , Δ z ⟩ ∣ ∥ Δ z ∥ 2 2 ) , w_iw'_1z=\bar{w}_{ij}\bar{w}'_{1j}\bar{z}_j+\bar{w}_{ij}\bar{w}'_{1j}\Delta z+\left.\bar{z}_j\nabla_z(w_iw'_1)\right|_{\bar{z}_j}^{\mathsf T}\Delta z
+\bar{w}'_{1j}O\left((1+\|\vartheta\|_2)^2e^{2|\langle\vartheta,\Delta z\rangle|}\|\Delta z\|_2^2\right), w i w 1 ′ z = w ˉ ij w ˉ 1 j ′ z ˉ j + w ˉ ij w ˉ 1 j ′ Δ z + z ˉ j ∇ z ( w i w 1 ′ ) ∣ z ˉ j T Δ z + w ˉ 1 j ′ O ( ( 1 + ∥ ϑ ∥ 2 ) 2 e 2∣ ⟨ ϑ , Δ z ⟩ ∣ ∥Δ z ∥ 2 2 ) ,
where
∥ ∇ z ( w i w k ) ∣ z ˉ j ∥ 2 ≤ C ∥ ϑ ∥ 2 , ∥ ∇ z ( w i w 1 ′ ) ∣ z ˉ j ∥ 2 ≤ C w ˉ 1 j ′ ∥ ϑ ∥ 2 . \left\|\left.\nabla_z(w_iw_k)\right|_{\bar{z}_j}\right\|_2\leq C\|\vartheta\|_2,\qquad
\left\|\left.\nabla_z(w_iw'_1)\right|_{\bar{z}_j}\right\|_2\leq C\bar{w}'_{1j}\|\vartheta\|_2. ∇ z ( w i w k ) ∣ z ˉ j 2 ≤ C ∥ ϑ ∥ 2 , ∇ z ( w i w 1 ′ ) ∣ z ˉ j 2 ≤ C w ˉ 1 j ′ ∥ ϑ ∥ 2 .
Substituting these expansions yields
∇ ϑ L = 1 2 ∑ j E j [ ( ∑ i = 1 2 w i ( g i − μ ) ) ( g 1 − g 2 ) w 1 ′ z ] = 1 2 n ∑ j w ˉ 1 j ′ z ˉ j ∑ i = 1 2 w ˉ i j ( Σ i 1 ( j ) − Σ i 2 ( j ) ) + O ( ( 1 + ∥ ϑ ∥ 2 ) 4 n 3 / 2 ) ∑ j w ˉ 1 j ′ (23) \begin{aligned}
\nabla_{\vartheta}\mathcal{L}
=\frac{1}{2}\sum_j\mathbb{E}_j\left[\left(\sum_{i=1}^{2}w_i(g_i-\mu)\right)(g_1-g_2)w'_1z\right] \\
&=\frac{1}{2n}\sum_j\bar{w}'_{1j}\bar{z}_j\sum_{i=1}^{2}\bar{w}_{ij}\left(\Sigma_{i1}^{(j)}-\Sigma_{i2}^{(j)}\right)
+O\left(\frac{(1+\|\vartheta\|_2)^4}{n^{3/2}}\right)\sum_j\bar{w}'_{1j} \tag*{(23)}
\end{aligned} ∇ ϑ L = 2 1 j ∑ E j [ ( i = 1 ∑ 2 w i ( g i − μ ) ) ( g 1 − g 2 ) w 1 ′ z ] = 2 n 1 j ∑ w ˉ 1 j ′ z ˉ j i = 1 ∑ 2 w ˉ ij ( Σ i 1 ( j ) − Σ i 2 ( j ) ) + O ( n 3/2 ( 1 + ∥ ϑ ∥ 2 ) 4 ) j ∑ w ˉ 1 j ′ (23)
= ∇ ϑ L s m ( ϑ ) + O ( ( 1 + ∥ ϑ ∥ 2 ) 4 n 3 / 2 ) ∑ j w ˉ 1 j ′ , (24) =\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}}(\vartheta)+O\left(\frac{(1+\|\vartheta\|_2)^4}{n^{3/2}}\right)\sum_j\bar{w}'_{1j}, \tag*{(24)} = ∇ ϑ L sm ( ϑ ) + O ( n 3/2 ( 1 + ∥ ϑ ∥ 2 ) 4 ) j ∑ w ˉ 1 j ′ , (24)
L ( ϑ ) = 1 4 ∑ j E j [ ( ∑ i = 1 2 w i ( g i − μ ) ) 2 ] = 1 4 n ∑ j ∑ i , k w ˉ i j w ˉ k j Σ i k ( j ) + O ( ( 1 + ∥ ϑ ∥ 2 ) 4 n 3 / 2 ) = L s m ( ϑ ) + O ( ( 1 + ∥ ϑ ∥ 2 ) 4 n 3 / 2 ) . \begin{aligned}
\mathcal{L}(\vartheta)=\frac{1}{4}\sum_j\mathbb{E}_j\left[\left(\sum_{i=1}^{2}w_i(g_i-\mu)\right)^2\right] \\
&=\frac{1}{4n}\sum_j\sum_{i,k}\bar{w}_{ij}\bar{w}_{kj}\Sigma_{ik}^{(j)}
+O\left(\frac{(1+\|\vartheta\|_2)^4}{n^{3/2}}\right) \\
&=\mathcal{L}^{\mathrm{sm}}(\vartheta)+O\left(\frac{(1+\|\vartheta\|_2)^4}{n^{3/2}}\right).
\end{aligned} L ( ϑ ) = 4 1 j ∑ E j ( i = 1 ∑ 2 w i ( g i − μ ) ) 2 = 4 n 1 j ∑ i , k ∑ w ˉ ij w ˉ k j Σ ik ( j ) + O ( n 3/2 ( 1 + ∥ ϑ ∥ 2 ) 4 ) = L sm ( ϑ ) + O ( n 3/2 ( 1 + ∥ ϑ ∥ 2 ) 4 ) .
Lemma E.2 (Convergence of the softmax router). Under the assumptions of Lemma 3.3, consider the population flow ϑ ˙ = − 2 ∇ ϑ L \dot{\vartheta}=-2\nabla_{\vartheta}\mathcal{L} ϑ ˙ = − 2 ∇ ϑ L with the expert parameters fixed. For every fixed B > 0 B>0 B > 0 and all sufficiently large n n n , there is a finite time t ϑ = O ( n B + 1 ) t_{\vartheta}=\mathcal{O}(n^{B+1}) t ϑ = O ( n B + 1 ) such that
max { ∥ w ˉ ⋅ G ( t ϑ ) − e 1 ∥ 1 , ∥ w ˉ ⋅ A ( t ϑ ) − e 2 ∥ 1 } = O ( n − B ) , sup 0 ≤ t ≤ t ϑ ∥ ϑ ( t ) ∥ 2 = O ( log n ) . \max\{\|\bar{w}_{\cdot G}(t_{\vartheta})-e_1\|_1,\|\bar{w}_{\cdot A}(t_{\vartheta})-e_2\|_1\}=\mathcal{O}(n^{-B}),\qquad\sup_{0\leq t\leq t_{\vartheta}}\|\vartheta(t)\|_2=\mathcal{O}(\log n). max { ∥ w ˉ ⋅ G ( t ϑ ) − e 1 ∥ 1 , ∥ w ˉ ⋅ A ( t ϑ ) − e 2 ∥ 1 } = O ( n − B ) , 0 ≤ t ≤ t ϑ sup ∥ ϑ ( t ) ∥ 2 = O ( log n ) . The reduced flow ϑ ˙ = − 2 ∇ ϑ L s m \dot{\vartheta}=-2\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}} ϑ ˙ = − 2 ∇ ϑ L sm satisfies w ˉ ( t ) → I 2 \bar{w}(t)\to I_2 w ˉ ( t ) → I 2 as t → ∞ t\to\infty t → ∞ . Under the sample-size conditions of Lemma 3.3, the same finite-time bounds hold for ϑ ˙ = − 2 ∇ ϑ L ^ m \dot{\vartheta}=-2\nabla_{\vartheta}\widehat{\mathcal{L}}_m ϑ ˙ = − 2 ∇ ϑ L m with probability at least 1 − 1 / n 1-1/n 1 − 1/ n .
Proof. In time s = t / n s=t/n s = t / n , the reduced gate flow is the flow of Lemma D.8, with time multiplied by four. Its hypotheses hold since Z G G = Z A A = 1 Z_{GG}=Z_{AA}=1 Z GG = Z AA = 1 and 0 ≤ Z G A < 1 0\leq Z_{GA}<1 0 ≤ Z G A < 1 by Lemma F.5, which also bounds λ min ( Z ) \lambda_{\min}(Z) λ m i n ( Z ) below by a positive constant independent of n n n . The reduced convergence argument there, using avoidance and loss monotonicity, gives w ˉ r e d u c e d ( s ) → I 2 \bar{w}^{\mathrm{reduced}}(s)\to I_2 w ˉ reduced ( s ) → I 2 and fixed S , κ > 0 S,\kappa>0 S , κ > 0 such that
n L s m ( ϑ r e d u c e d ( S ) ) ≤ min w ˉ s u b o p t i m a l n L s m ( w ˉ s u b o p t i m a l ) − 3 κ . (25) n\mathcal{L}^{\mathrm{sm}}(\vartheta^{\mathrm{reduced}}(S))\leq\min_{\bar{w}^{\mathrm{suboptimal}}}n\mathcal{L}^{\mathrm{sm}}(\bar{w}^{\mathrm{suboptimal}})-3\kappa. \tag*{(25)} n L sm ( ϑ reduced ( S )) ≤ w ˉ suboptimal min n L sm ( w ˉ suboptimal ) − 3 κ . (25)
where the minimum is over the three incorrect corners and ϑ r e d u c e d ( 0 ) = ϑ ( 0 ) \vartheta^{\mathrm{reduced}}(0)=\vartheta(0) ϑ reduced ( 0 ) = ϑ ( 0 ) .
The rescaled vector field is uniformly Lipschitz on a bounded neighborhood of ϑ r e d u c e d ( [ 0 , S ] ) \vartheta^{\mathrm{reduced}}([0,S]) ϑ reduced ([ 0 , S ]) , so Lemma E.1 and Gronwall’s inequality give
sup 0 ≤ s ≤ S ∥ ϑ ( n s ) − ϑ r e d u c e d ( s ) ∥ 2 ≤ C S n . (26) \sup_{0\leq s\leq S}\|\vartheta(ns)-\vartheta^{\mathrm{reduced}}(s)\|_2\leq\frac{C_S}{\sqrt{n}} . \tag*{(26)} 0 ≤ s ≤ S sup ∥ ϑ ( n s ) − ϑ reduced ( s ) ∥ 2 ≤ n C S . (26)
This prevents exit from that neighborhood for sufficiently large n n n , gives ∥ ϑ ( n S ) ∥ 2 = O ( 1 ) \|\vartheta(nS)\|_2=\mathcal{O}(1) ∥ ϑ ( n S ) ∥ 2 = O ( 1 ) , and transfers (25) to
n L s m ( ϑ ( n S ) ) ≤ min w ˉ s u b o p t i m a l n L s m ( w ˉ s u b o p t i m a l ) − 2 κ . (27) n\mathcal{L}^{\mathrm{sm}}(\vartheta(nS))\leq\min_{\bar{w}^{\mathrm{suboptimal}}}n\mathcal{L}^{\mathrm{sm}}(\bar{w}^{\mathrm{suboptimal}})-2\kappa. \tag*{(27)} n L sm ( ϑ ( n S )) ≤ w ˉ suboptimal min n L sm ( w ˉ suboptimal ) − 2 κ . (27)
On this sublevel set, w ˉ 1 G \bar{w}_{1G} w ˉ 1 G and w ˉ 2 A \bar{w}_{2A} w ˉ 2 A are bounded below by a positive constant, since the minimum on each face w ˉ 1 G = 0 \bar{w}_{1G}=0 w ˉ 1 G = 0 and w ˉ 2 A = 0 \bar{w}_{2A}=0 w ˉ 2 A = 0 is attained at an incorrect corner. The strict hierarchy and Z ≻ 0 Z\succ0 Z ≻ 0 therefore give
∥ ∇ ϑ L s m ∥ 2 ≳ 1 n ∑ j w ˉ 1 j ′ ≳ L s m − L s m ( I 2 ) , (28) \|\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}}\|_2\gtrsim\frac{1}{n}\sum_j\bar{w}'_{1j}\gtrsim\mathcal{L}^{\mathrm{sm}}-\mathcal{L}^{\mathrm{sm}}(I_2), \tag*{(28)} ∥ ∇ ϑ L sm ∥ 2 ≳ n 1 j ∑ w ˉ 1 j ′ ≳ L sm − L sm ( I 2 ) , (28)
max { ∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } ≤ C n [ L s m − L s m ( I 2 ) ] . (29) \max\{\|\bar{w}_{\cdot G}-e_1\|_1,\|\bar{w}_{\cdot A}-e_2\|_1\}\leq Cn[\mathcal{L}^{\mathrm{sm}}-\mathcal{L}^{\mathrm{sm}}(I_2)]. \tag*{(29)} max { ∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } ≤ C n [ L sm − L sm ( I 2 )] . (29)
By Lemma E.1, while ∥ ϑ ∥ 2 ≤ C 0 log n \|\vartheta\|_2\leq C_0\log n ∥ ϑ ∥ 2 ≤ C 0 log n ,
∥ ∇ ϑ ( L − L s m ) ∥ 2 ∥ ∇ ϑ L s m ∥ 2 ≤ C ( 1 + ∥ ϑ ∥ 2 ) 4 n ≤ 1 2 (30) \frac{\|\nabla_{\vartheta}(\mathcal{L}-\mathcal{L}^{\mathrm{sm}})\|_2}{\|\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}}\|_2}\leq\frac{C(1+\|\vartheta\|_2)^4}{\sqrt{n}}\leq\frac{1}{2} \tag*{(30)} ∥ ∇ ϑ L sm ∥ 2 ∥ ∇ ϑ ( L − L sm ) ∥ 2 ≤ n C ( 1 + ∥ ϑ ∥ 2 ) 4 ≤ 2 1 (30)
for sufficiently large n n n , hence
d d t L s m ≤ − ∥ ∇ ϑ L s m ∥ 2 2 ≤ − c [ L s m − L s m ( I 2 ) ] 2 , (31) \frac{\mathrm{d}}{\mathrm{d}t}\mathcal{L}^{\mathrm{sm}}\leq-\|\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}}\|_2^2\leq-c[\mathcal{L}^{\mathrm{sm}}-\mathcal{L}^{\mathrm{sm}}(I_2)]^2, \tag*{(31)} d t d L sm ≤ − ∥ ∇ ϑ L sm ∥ 2 2 ≤ − c [ L sm − L sm ( I 2 ) ] 2 , (31)
∥ ϑ ˙ ∥ 2 ≤ 3 ∥ ∇ ϑ L s m ∥ 2 . \|\dot{\vartheta}\|_2\leq3\|\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}}\|_2. ∥ ϑ ˙ ∥ 2 ≤ 3∥ ∇ ϑ L sm ∥ 2 .
These bounds preserve (27) and, by the parameter-travel calculation in Lemma D.10, give
∥ ϑ ( t ) − ϑ ( n S ) ∥ 2 ≤ C log L s m ( ϑ ( n S ) ) − L s m ( I 2 ) L s m ( ϑ ( t ) ) − L s m ( I 2 ) ≤ C B log n + C (32) \|\vartheta(t)-\vartheta(nS)\|_2\leq C\log\frac{\mathcal{L}^{\mathrm{sm}}(\vartheta(nS))-\mathcal{L}^{\mathrm{sm}}(I_2)}{\mathcal{L}^{\mathrm{sm}}(\vartheta(t))-\mathcal{L}^{\mathrm{sm}}(I_2)}\leq CB\log n+C \tag*{(32)} ∥ ϑ ( t ) − ϑ ( n S ) ∥ 2 ≤ C log L sm ( ϑ ( t )) − L sm ( I 2 ) L sm ( ϑ ( n S )) − L sm ( I 2 ) ≤ C B log n + C (32)
until the excess loss first reaches n − B − 1 n^{-B-1} n − B − 1 . Choosing C 0 C_0 C 0 larger than this coefficient prevents exit, and integrating (31) gives attainment by t ϑ = n S + O ( n B + 1 ) t_{\vartheta}=nS+\mathcal{O}(n^{B+1}) t ϑ = n S + O ( n B + 1 ) ; if the target already holds at n S nS n S , take t ϑ = n S t_{\vartheta}=nS t ϑ = n S . The gate bound follows from (29).
For empirical flow, apply Lemma D.4 with β = min { ϵ , 1 } / 4 \beta=\min\{\epsilon,1\}/4 β = min { ϵ , 1 } /4 to the sigmoid parameters ( ϑ , − ϑ ) (\vartheta,-\vartheta) ( ϑ , − ϑ ) and subtract the two gradient blocks. Since w ˉ 1 j + w ˉ 2 j = 1 \bar{w}_{1j}+\bar{w}_{2j}=1 w ˉ 1 j + w ˉ 2 j = 1 , the normalization-error term vanishes. Conditioning on the family counts as in Section D.3.5, and using the classwise bound ∥ ∇ ϑ L ( j ) ∥ 2 ≤ C w ~ 1 j / n \lVert\nabla_{\vartheta}\mathcal{L}^{(j)}\rVert_{2}\le C\widetilde{w}_{1j}/n ∥ ∇ ϑ L ( j ) ∥ 2 ≤ C w 1 j / n from (23) , gives, with probability at least 1 − 1 / n 1-1/n 1 − 1/ n , uniformly on ∥ ϑ ∥ 2 ≤ C 0 log n \lVert\vartheta\rVert_{2}\le C_{0}\log n ∥ ϑ ∥ 2 ≤ C 0 log n ,
∥ ∇ ϑ ( L ^ m − L ) ∥ 2 ≤ O ~ ( n − 1 / 2 + β m ) ∑ j w ~ 1 j . \lVert\nabla_{\vartheta}(\widehat{\mathcal{L}}_{m}-\mathcal{L})\rVert_{2}\le\widetilde{O}\left(\frac{n^{-1/2+\beta}}{\sqrt{m}}\right)\sum_{j}\widetilde{w}_{1j}. ∥ ∇ ϑ ( L m − L ) ∥ 2 ≤ O ( m n − 1/2 + β ) j ∑ w 1 j .
On [ 0 , S ] [0,S] [ 0 , S ] , (26) consequently holds with right-hand side O ( n − 1 / 2 ) + O ~ ( n 1 / 2 + β / m ) = o ( 1 ) O(n^{-1/2})+\widetilde{O}(n^{1/2+\beta}/\sqrt{m})=o(1) O ( n − 1/2 ) + O ( n 1/2 + β / m ) = o ( 1 ) , as in Section D.3.5, which preserves (27) . On that sublevel set, (28) gives
∥ ∇ ϑ ( L ^ m − L s m ) ∥ 2 ∥ ∇ ϑ L s m ∥ 2 ≤ C ( 1 + ∥ ϑ ∥ 2 ) 4 n + O ~ ( n 1 / 2 + β m ) ≤ 1 2 . \frac{\lVert\nabla_{\vartheta}(\widehat{\mathcal{L}}_{m}-\mathcal{L}^{\mathrm{sm}})\rVert_{2}}{\lVert\nabla_{\vartheta}\mathcal{L}^{\mathrm{sm}}\rVert_{2}}
\le\frac{C(1+\lVert\vartheta\rVert_{2})^{4}}{\sqrt{n}}+\widetilde{O}\left(\frac{n^{1/2+\beta}}{\sqrt{m}}\right)\le\frac{1}{2}. ∥ ∇ ϑ L sm ∥ 2 ∥ ∇ ϑ ( L m − L sm ) ∥ 2 ≤ n C ( 1 + ∥ ϑ ∥ 2 ) 4 + O ( m n 1/2 + β ) ≤ 2 1 .
Thus (31) and (32) also hold for ϑ ˙ = − 2 ∇ ϑ L ^ m \dot{\vartheta}=-2\nabla_{\vartheta}\widehat{\mathcal{L}}_{m} ϑ ˙ = − 2 ∇ ϑ L m , giving the same stopping-time and parameter bounds.
Attention-expert dynamics
Proof of Lemma 3.4
Proof of Lemma 3.4. Since g k g_k g k is even in λ k \lambda_k λ k , it suffices to consider λ 2 ( t θ ) > 0 \lambda_2(t_{\theta})>0 λ 2 ( t θ ) > 0 . For sufficiently large n n n , the uniform event in Lemma F.4 has probability at least 1 − η 1-\eta 1 − η . On this event, the vector field points inward at λ 1 = ± 2 \lambda_1=\pm2 λ 1 = ± 2 and λ 2 \lambda_2 λ 2 increases, so the flow stays in the stated ranges of λ 1 , λ 2 \lambda_1,\lambda_2 λ 1 , λ 2 until the first target time. Throughout this interval,
λ ˙ 2 ≥ { 1 / ( C n λ 2 2 ) , Uniform , e − 4 1 − σ n 2 λ 2 / ( C n ) , Gaussian mixture . \dot{\lambda}_2\ge
\begin{cases}
1/(Cn\lambda_2^2), & \text{Uniform},\\
e^{-4\sqrt{1-\sigma_n^2}\lambda_2}/(Cn), & \text{Gaussian mixture}.
\end{cases} λ ˙ 2 ≥ { 1/ ( C n λ 2 2 ) , e − 4 1 − σ n 2 λ 2 / ( C n ) , Uniform , Gaussian mixture .
Integration of λ 2 2 d λ 2 \lambda_2^2\,d\lambda_2 λ 2 2 d λ 2 or e 4 1 − σ n 2 λ 2 d λ 2 e^{4\sqrt{1-\sigma_n^2}\lambda_2}\,d\lambda_2 e 4 1 − σ n 2 λ 2 d λ 2 , respectively, gives the asserted finite times. The initial loss bound in Lemma F.4 and d L ^ m / d t = − ∥ λ ˙ ∥ 2 2 d\widehat{\mathcal{L}}_m/dt=-\lVert\dot{\lambda}\rVert_2^2 d L m / d t = − ∥ λ ˙ ∥ 2 2 give
∣ λ 2 ( t λ ) − λ 2 ( t θ ) ∣ 2 ≤ ( t λ − t θ ) ∫ t θ t λ ∥ λ ˙ ( t ) ∥ 2 2 d t ≤ C ( t λ − t θ ) n . \lvert\lambda_2(t_{\lambda})-\lambda_2(t_{\theta})\rvert^2\le(t_{\lambda}-t_{\theta})\int_{t_{\theta}}^{t_{\lambda}}\lVert\dot{\lambda}(t)\rVert_2^2\,dt\le\frac{C(t_{\lambda}-t_{\theta})}{n}. ∣ λ 2 ( t λ ) − λ 2 ( t θ ) ∣ 2 ≤ ( t λ − t θ ) ∫ t θ t λ ∥ λ ˙ ( t ) ∥ 2 2 d t ≤ n C ( t λ − t θ ) .
Both target values diverge, so ( t λ − t θ ) / n → ∞ (t_{\lambda}-t_{\theta})/n\to\infty ( t λ − t θ ) / n → ∞ . For every fixed δ ∈ ( 0 , 1 ) \delta\in(0,1) δ ∈ ( 0 , 1 ) , the uniform λ 1 \lambda_1 λ 1 gradient expansion in Lemma F.4 gives sgn ( λ 1 ) ∂ λ 1 L ^ m ≥ δ 3 / n \operatorname{sgn}(\lambda_1)\partial_{\lambda_1}\widehat{\mathcal{L}}_m\ge\delta^3/n sgn ( λ 1 ) ∂ λ 1 L m ≥ δ 3 / n whenever δ ≤ ∣ λ 1 ∣ ≤ 2 \delta\le\lvert\lambda_1\rvert\le2 δ ≤ ∣ λ 1 ∣ ≤ 2 , for sufficiently large n n n . Thus ∣ λ 1 ∣ \lvert\lambda_1\rvert ∣ λ 1 ∣ enters [ 0 , δ ] [0,\delta] [ 0 , δ ] within 2 n / δ 3 2n/\delta^3 2 n / δ 3 time after t θ t_{\theta} t θ and cannot leave before t λ t_{\lambda} t λ . Since δ \delta δ is arbitrary, ∣ λ 1 ( t λ ) ∣ = o ( 1 ) \lvert\lambda_1(t_{\lambda})\rvert=o(1) ∣ λ 1 ( t λ )∣ = o ( 1 ) .
Expert-parameter gradients
Throughout this subsection the data follow Definition 2.1, and in the Gaussian-mixture case we assume
n − 1 + ϵ ≤ σ n 2 , σ n 2 = o ( 1 ) n^{-1+\epsilon}\le\sigma_n^2,\qquad\sigma_n^2=o(1) n − 1 + ϵ ≤ σ n 2 , σ n 2 = o ( 1 )
for a constant ϵ > 0 \epsilon>0 ϵ > 0 independent of n n n . Fix C < ∞ C<\infty C < ∞ , p ≥ 2 p\ge2 p ≥ 2 and, for Uniform data, ϵ ∈ ( 0 , 1 ) \epsilon\in(0,1) ϵ ∈ ( 0 , 1 ) independently of n n n . In the next three lemmas, the covariance Σ g \Sigma_g Σ g is evaluated under the indicated distribution. Constants depend on ϵ \epsilon ϵ , C C C , p p p , and the gradient inequalities hold for sufficiently large n n n .
Lemma F.1 (Expert moments and normal gradients). For q ∈ [ 2 ] q\in[2] q ∈ [ 2 ] and j ∈ { G , A } j\in\{\mathrm{G},\mathrm{A}\} j ∈ { G , A } , uniformly for ∣ λ q ∣ ≤ 2 \lvert\lambda_q\rvert\le2 ∣ λ q ∣ ≤ 2 ,
∥ g q − μ ∥ L p ( P j ) + ∥ ∂ g q ∂ λ q ∥ L p ( P j ) ≤ C p n − 1 / 2 . \lVert g_q-\mu\rVert_{L^p(P_j)}+\left\lVert\frac{\partial g_q}{\partial\lambda_q}\right\rVert_{L^p(P_j)}\le C_p n^{-1/2}. ∥ g q − μ ∥ L p ( P j ) + ∂ λ q ∂ g q L p ( P j ) ≤ C p n − 1/2 . Uniformly for ∣ λ 1 ∣ ≤ 2 \lvert\lambda_1\rvert\le2 ∣ λ 1 ∣ ≤ 2 ,
E G [ ( g 1 − μ ) ∂ g 1 ∂ λ 1 ] = 1 2 n d d λ 1 Σ g ( λ 1 , λ 1 ) + O ( n − 2 ) . \mathbb{E}_{\mathrm{G}}\left[(g_1-\mu)\frac{\partial g_1}{\partial\lambda_1}\right]=\frac{1}{2n}\frac{d}{d\lambda_1}\Sigma_g(\lambda_1,\lambda_1)+O(n^{-2}). E G [ ( g 1 − μ ) ∂ λ 1 ∂ g 1 ] = 2 n 1 d λ 1 d Σ g ( λ 1 , λ 1 ) + O ( n − 2 ) . At λ 1 = ± 2 \lambda_1=\pm2 λ 1 = ± 2 , this gives
sgn ( λ 1 ) E G [ ( g 1 − μ ) ∂ g 1 ∂ λ 1 ] ≥ C − 1 / n . \operatorname{sgn}(\lambda_1)\mathbb{E}_{\mathrm{G}}\left[(g_1-\mu)\frac{\partial g_1}{\partial\lambda_1}\right]\ge C^{-1}/n. sgn ( λ 1 ) E G [ ( g 1 − μ ) ∂ λ 1 ∂ g 1 ] ≥ C − 1 / n .
Proof. With ξ i = X i − μ \xi_i = X_i - \mu ξ i = X i − μ from Definition 2.1 and the population moment ratios from Lemma F.7, the linear terms for h ( X , λ ) − μ − m j ( λ ) h(X,\lambda)-\mu-m_j(\lambda) h ( X , λ ) − μ − m j ( λ ) and ∂ h ( X , λ ) ∂ λ − m j ′ ( λ ) \frac{\partial h(X,\lambda)}{\partial\lambda}-m'_j(\lambda) ∂ λ ∂ h ( X , λ ) − m j ′ ( λ ) are the sample averages of
e λ ξ i M Y ( λ ) ( ξ i − m j ( λ ) ) , e λ ξ i M Y ( λ ) ( ( ξ i − m j ( λ ) ) 2 − m j ′ ( λ ) ) , (33) \frac{e^{\lambda\xi_i}}{M_Y(\lambda)}(\xi_i-m_j(\lambda)),\qquad
\frac{e^{\lambda\xi_i}}{M_Y(\lambda)}\left((\xi_i-m_j(\lambda))^2-m'_j(\lambda)\right), \tag*{(33)} M Y ( λ ) e λ ξ i ( ξ i − m j ( λ )) , M Y ( λ ) e λ ξ i ( ( ξ i − m j ( λ ) ) 2 − m j ′ ( λ ) ) , (33)
respectively. The second expression is the derivative of the first with respect to λ \lambda λ . Pairing at ± λ q \pm\lambda_q ± λ q cancels the population means, since m j ( − λ ) = − m j ( λ ) m_j(-\lambda)=-m_j(\lambda) m j ( − λ ) = − m j ( λ ) and m j ′ ( − λ ) = m j ′ ( λ ) m'_j(-\lambda)=m'_j(\lambda) m j ′ ( − λ ) = m j ′ ( λ ) . The covariance of the paired linear terms is therefore ( 2 n ) − 1 d Σ g ( λ q , λ q ) / d λ q (2n)^{-1}d\Sigma_g(\lambda_q,\lambda_q)/d\lambda_q ( 2 n ) − 1 d Σ g ( λ q , λ q ) / d λ q . For ∣ λ q ∣ ≤ 2 |\lambda_q|\le2 ∣ λ q ∣ ≤ 2 , the moment summands have uniformly bounded fixed-order moments and population denominators bounded below. Expansion of the ratios gives the stated L p L^p L p bounds in both contexts. Outside a fixed neighborhood of the population moments, higher moment bounds and the sample maximum control the contribution.
For Gaussian data, let
V i = ( e ν ξ i C ν , ξ i e ν ξ i C ν , ξ i 2 e ν ξ i C ν ) ν = λ q , − λ q , V n = 1 n ∑ i V i , μ V = E j [ V i ] , V_i=\left(\frac{e^{\nu\xi_i}}{C_\nu},\frac{\xi_i e^{\nu\xi_i}}{C_\nu},\frac{\xi_i^2e^{\nu\xi_i}}{C_\nu}\right)_{\nu=\lambda_q,-\lambda_q},\qquad
V_n=\frac{1}{n}\sum_i V_i,\qquad\mu_V=\mathbb{E}_j[V_i], V i = ( C ν e ν ξ i , C ν ξ i e ν ξ i , C ν ξ i 2 e ν ξ i ) ν = λ q , − λ q , V n = n 1 i ∑ V i , μ V = E j [ V i ] ,
where C ν = e ν 2 / 2 C_\nu=e^{\nu^2/2} C ν = e ν 2 /2 . The normalized population denominators are 1, and all fixed-order moments of V i V_i V i are uniformly bounded. Write f ( V ) f(V) f ( V ) for the product ( g q − μ ) ∂ g q ∂ λ q (g_q-\mu)\frac{\partial g_q}{\partial\lambda_q} ( g q − μ ) ∂ λ q ∂ g q expressed in these moments and Δ V n = V n − μ V \Delta V_n=V_n-\mu_V Δ V n = V n − μ V . Since f ( μ V ) = 0 f(\mu_V)=0 f ( μ V ) = 0 and ∇ f ( μ V ) = 0 \nabla f(\mu_V)=0 ∇ f ( μ V ) = 0 , Taylor expansion gives
f ( V n ) = 1 2 Δ V n T ∇ 2 f ( μ V ) Δ V n + 1 6 ∇ 3 f ( μ V ) Δ V n ⊗ 3 + R 4 , n . f(V_n)=\frac{1}{2}\Delta V_n^{\mathsf T}\nabla^2f(\mu_V)\Delta V_n+\frac{1}{6}\nabla^3f(\mu_V)\Delta V_n^{\otimes3}+R_{4,n}. f ( V n ) = 2 1 Δ V n T ∇ 2 f ( μ V ) Δ V n + 6 1 ∇ 3 f ( μ V ) Δ V n ⊗ 3 + R 4 , n .
Independence and centering give
E j [ 1 2 Δ V n T ∇ 2 f ( μ V ) Δ V n ] = 1 2 n d d λ q Σ g ( λ q , λ q ) , \mathbb{E}_j\left[\frac{1}{2}\Delta V_n^{\mathsf T}\nabla^2f(\mu_V)\Delta V_n\right]
=\frac{1}{2n}\frac{d}{d\lambda_q}\Sigma_g(\lambda_q,\lambda_q), E j [ 2 1 Δ V n T ∇ 2 f ( μ V ) Δ V n ] = 2 n 1 d λ q d Σ g ( λ q , λ q ) ,
E j [ Δ V n ⊗ 3 ] = O ( n − 2 ) , E j [ ∥ Δ V n ∥ 4 2 ] = O ( n − 2 ) . \mathbb{E}_j[\Delta V_n^{\otimes3}]=O(n^{-2}),\qquad
\mathbb{E}_j[\|\Delta V_n\|_4^2]=O(n^{-2}). E j [ Δ V n ⊗ 3 ] = O ( n − 2 ) , E j [ ∥Δ V n ∥ 4 2 ] = O ( n − 2 ) .
Bounded derivatives near μ V \mu_V μ V give E j [ ∣ R 4 , n ∣ ] = O ( n − 2 ) \mathbb{E}_j[|R_{4,n}|]=O(n^{-2}) E j [ ∣ R 4 , n ∣ ] = O ( n − 2 ) there. Outside that neighborhood, use higher moments and
∣ g q − μ ∣ ≤ max i ∣ ξ i ∣ , ∣ ∂ g q ∂ λ q ∣ ≤ C max i ∣ ξ i ∣ 2 . |g_q-\mu|\le\max_i|\xi_i|,\qquad
\left|\frac{\partial g_q}{\partial\lambda_q}\right|\le C\max_i|\xi_i|^2. ∣ g q − μ ∣ ≤ i max ∣ ξ i ∣ , ∂ λ q ∂ g q ≤ C i max ∣ ξ i ∣ 2 .
For Gaussian data, the covariance formula gives
1 2 n d d λ 1 Σ g ( λ 1 , λ 1 ) = λ 1 n [ 2 sinh ( λ 1 2 ) + λ 1 2 cosh ( λ 1 2 ) ] . \frac{1}{2n}\frac{d}{d\lambda_1}\Sigma_g(\lambda_1,\lambda_1)
=\frac{\lambda_1}{n}\left[2\sinh(\lambda_1^2)+\lambda_1^2\cosh(\lambda_1^2)\right]. 2 n 1 d λ 1 d Σ g ( λ 1 , λ 1 ) = n λ 1 [ 2 sinh ( λ 1 2 ) + λ 1 2 cosh ( λ 1 2 ) ] .
The claimed sign at λ 1 = ± 2 \lambda_1=\pm2 λ 1 = ± 2 follows.
Lemma F.2 (Uniform expert moments and gradients). Uniformly for C − 1 ≤ λ 2 ≤ n 1 − ϵ C^{-1}\le\lambda_2\le n^{1-\epsilon} C − 1 ≤ λ 2 ≤ n 1 − ϵ ,
∥ g 2 − μ ∥ L p ( P U ) ≤ C p n λ 2 , \|g_2-\mu\|_{L^p(P_U)}\le\frac{C_p}{\sqrt{n\lambda_2}}, ∥ g 2 − μ ∥ L p ( P U ) ≤ n λ 2 C p ,
∥ ∂ g 2 ∂ λ 2 ∥ L p ( P U ) ≤ C p n λ 2 3 , \left\|\frac{\partial g_2}{\partial\lambda_2}\right\|_{L^p(P_U)}
\le\frac{C_p}{\sqrt{n\lambda_2^3}}, ∂ λ 2 ∂ g 2 L p ( P U ) ≤ n λ 2 3 C p ,
E U [ ( g 2 − μ ) ∂ g 2 ∂ λ 2 ] = 1 2 n d d λ 2 Σ g ( λ 2 , λ 2 ) + O ( 1 n 3 / 2 λ 2 3 / 2 ) ≤ − 1 C n λ 2 2 . \mathbb{E}_U\left[(g_2-\mu)\frac{\partial g_2}{\partial\lambda_2}\right]
=\frac{1}{2n}\frac{d}{d\lambda_2}\Sigma_g(\lambda_2,\lambda_2)
+O\left(\frac{1}{n^{3/2}\lambda_2^{3/2}}\right)
\le-\frac{1}{Cn\lambda_2^2}. E U [ ( g 2 − μ ) ∂ λ 2 ∂ g 2 ] = 2 n 1 d λ 2 d Σ g ( λ 2 , λ 2 ) + O ( n 3/2 λ 2 3/2 1 ) ≤ − C n λ 2 2 1 .
Proof. With ξ i = X i − μ \xi_i=X_i-\mu ξ i = X i − μ as in the proof of Lemma F.1,
E U [ e λ 2 ( ξ i − 3 ) ] = 1 − e − 2 3 λ 2 2 3 λ 2 = Θ ( λ 2 − 1 ) , \mathbb{E}_U[e^{\lambda_2(\xi_i-\sqrt{3})}]
=\frac{1-e^{-2\sqrt{3}\lambda_2}}{2\sqrt{3}\lambda_2}
=\Theta(\lambda_2^{-1}), E U [ e λ 2 ( ξ i − 3 ) ] = 2 3 λ 2 1 − e − 2 3 λ 2 = Θ ( λ 2 − 1 ) ,
∥ 1 n ∑ i e λ 2 ( ξ i − 3 ) E U [ e λ 2 ( ξ i − 3 ) ] − 1 ∥ L p ( P U ) ≤ C p λ 2 / n . \left\|\frac{\frac{1}{n}\sum_i e^{\lambda_2(\xi_i-\sqrt{3})}}{\mathbb{E}_U[e^{\lambda_2(\xi_i-\sqrt{3})}]}-1\right\|_{L^p(P_U)}
\le C_p\sqrt{\lambda_2/n}. E U [ e λ 2 ( ξ i − 3 ) ] n 1 ∑ i e λ 2 ( ξ i − 3 ) − 1 L p ( P U ) ≤ C p λ 2 / n .
The linear terms for the centered ratio and its derivative, given by (33), have L p L^p L p norms O ( ( n λ 2 ) − 1 / 2 ) O((n\lambda_2)^{-1/2}) O (( n λ 2 ) − 1/2 ) and O ( ( n λ 2 3 ) − 1 / 2 ) O((n\lambda_2^3)^{-1/2}) O (( n λ 2 3 ) − 1/2 ) , respectively. These follow by integrating the bounded functions e − λ 2 u e^{-\lambda_2 u} e − λ 2 u times powers of u u u over 0 ≤ u ≤ 2 3 0 \le u \le2\sqrt{3} 0 ≤ u ≤ 2 3 , and applying the moment bounds for independent averages. Dividing by one plus the relative denominator fluctuation leaves remainders O ( n − 1 ) O(n^{-1}) O ( n − 1 ) and O ( ( n λ 2 ) − 1 ) O((n\lambda_2)^{-1}) O (( n λ 2 ) − 1 ) , respectively. For the derivative, the additional squared linear numerator has the latter order as well. The denominator lies outside a fixed relative neighborhood of its expectation with probability at most C exp ( − n / ( C λ 2 ) ) C\exp(-n/(C\lambda_2)) C exp ( − n / ( C λ 2 )) , by Bernstein’s inequality. Since n / λ 2 ≥ n ϵ n/\lambda_2 \ge n^\epsilon n / λ 2 ≥ n ϵ , this event contributes less than any inverse power of n n n to the stated moments. The product remainders are bounded by
C ( 1 n n λ 2 3 + 1 n λ 2 n λ 2 + 1 n λ 2 ) ≤ C n 3 / 2 λ 2 3 / 2 . C\left(\frac{1}{n\sqrt{n\lambda_2^3}}+\frac{1}{n\lambda_2\sqrt{n\lambda_2}}+\frac{1}{n\lambda_2}\right)\le\frac{C}{n^{3/2}\lambda_2^{3/2}}. C ( n n λ 2 3 1 + n λ 2 n λ 2 1 + n λ 2 1 ) ≤ n 3/2 λ 2 3/2 C .
The Uniform covariance and its derivative in Lemma F.11 satisfy
− d d λ 2 Σ g ( λ 2 , λ 2 ) = 3 4 λ 2 2 + O ( λ 2 2 e − 2 3 λ 2 ) ( λ 2 → ∞ ) . -\frac{d}{d\lambda_2}\Sigma_g(\lambda_2,\lambda_2)=\frac{\sqrt{3}}{4\lambda_2^2}+O\left(\lambda_2^2e^{-2\sqrt{3}\lambda_2}\right)\qquad(\lambda_2\to\infty). − d λ 2 d Σ g ( λ 2 , λ 2 ) = 4 λ 2 2 3 + O ( λ 2 2 e − 2 3 λ 2 ) ( λ 2 → ∞ ) .
Positivity and continuity on [ C − 1 , ∞ ) [C^{-1},\infty) [ C − 1 , ∞ ) therefore give
inf λ 2 ≥ C − 1 ( − λ 2 2 d d λ 2 Σ g ( λ 2 , λ 2 ) ) > 0 , n − 3 / 2 λ 2 − 3 / 2 1 / ( n λ 2 2 ) = λ 2 / n = o ( 1 ) . \inf_{\lambda_2\ge C^{-1}}\left(-\lambda_2^2\frac{d}{d\lambda_2}\Sigma_g(\lambda_2,\lambda_2)\right)>0,\qquad\frac{n^{-3/2}\lambda_2^{-3/2}}{1/(n\lambda_2^2)}=\sqrt{\lambda_2/n}=o(1). λ 2 ≥ C − 1 inf ( − λ 2 2 d λ 2 d Σ g ( λ 2 , λ 2 ) ) > 0 , 1/ ( n λ 2 2 ) n − 3/2 λ 2 − 3/2 = λ 2 / n = o ( 1 ) .
Lemma F.3 (Gaussian-mixture expert moments and gradients). Assume n − 1 + ϵ ≤ σ n 2 n^{-1+\epsilon}\le\sigma_n^2 n − 1 + ϵ ≤ σ n 2 and σ n 2 = o ( 1 ) \sigma_n^2=o(1) σ n 2 = o ( 1 ) for a fixed ϵ > 0 \epsilon>0 ϵ > 0 . Uniformly for C − 1 ≤ λ 2 ≤ log ( 1 / σ n 2 ) / ( 4 1 − σ n 2 ) C^{-1}\le\lambda_2\le\log(1/\sigma_n^2)/(4\sqrt{1-\sigma_n^2}) C − 1 ≤ λ 2 ≤ log ( 1/ σ n 2 ) / ( 4 1 − σ n 2 ) ,
E M [ ( g 2 − μ ) 2 ] = Σ g ( λ 2 , λ 2 ) n + O ( n − 2 ) , \mathbb{E}_{\mathrm{M}}[(g_2-\mu)^2]=\frac{\Sigma_g(\lambda_2,\lambda_2)}{n}+O(n^{-2}), E M [( g 2 − μ ) 2 ] = n Σ g ( λ 2 , λ 2 ) + O ( n − 2 ) , E M [ ( g 2 − μ ) ∂ g 2 ∂ λ 2 ] = 1 2 n d d λ 2 Σ g ( λ 2 , λ 2 ) + O ( n − 2 ) ≤ − e − 4 1 − σ n 2 λ 2 C n , \mathbb{E}_{\mathrm{M}}\left[(g_2-\mu)\frac{\partial g_2}{\partial\lambda_2}\right]=\frac{1}{2n}\frac{d}{d\lambda_2}\Sigma_g(\lambda_2,\lambda_2)+O(n^{-2})\le-\frac{e^{-4\sqrt{1-\sigma_n^2}\lambda_2}}{Cn}, E M [ ( g 2 − μ ) ∂ λ 2 ∂ g 2 ] = 2 n 1 d λ 2 d Σ g ( λ 2 , λ 2 ) + O ( n − 2 ) ≤ − C n e − 4 1 − σ n 2 λ 2 , with
∥ g 2 − μ ∥ L p ( P M ) + ∥ ∂ g 2 ∂ λ 2 ∥ L p ( P M ) ≤ C p ( 1 + λ 2 ) C ( σ n + e − 2 1 − σ n 2 λ 2 n + 1 n ) . \lVert g_2-\mu\rVert_{L^p(\mathbb{P}_{\mathrm{M}})}+\left\lVert\frac{\partial g_2}{\partial\lambda_2}\right\rVert_{L^p(\mathbb{P}_{\mathrm{M}})}
\le C_p(1+\lambda_2)^C\left(\frac{\sigma_n+e^{-2\sqrt{1-\sigma_n^2}\lambda_2}}{\sqrt{n}}+\frac{1}{n}\right). ∥ g 2 − μ ∥ L p ( P M ) + ∂ λ 2 ∂ g 2 L p ( P M ) ≤ C p ( 1 + λ 2 ) C ( n σ n + e − 2 1 − σ n 2 λ 2 + n 1 ) .
Proof. Use V i V_i V i from the proof of Lemma F.1, with j = M j=\mathrm{M} j = M and q = 2 q=2 q = 2 and C ν = e 1 − σ n 2 ∣ ν ∣ + σ n 2 ν 2 / 2 C_\nu=e^{\sqrt{1-\sigma_n^2}|\nu|+\sigma_n^2\nu^2/2} C ν = e 1 − σ n 2 ∣ ν ∣ + σ n 2 ν 2 /2 . For ξ i = 1 − σ n 2 S i + σ n G i \xi_i=\sqrt{1-\sigma_n^2}S_i+\sigma_n G_i ξ i = 1 − σ n 2 S i + σ n G i ,
E M [ e ν ξ i C ν ] = e − 1 − σ n 2 ∣ ν ∣ cosh ( 1 − σ n 2 ν ) ∈ [ 1 / 2 , 1 ] , \mathbb{E}_{\mathrm{M}}\left[\frac{e^{\nu\xi_i}}{C_\nu}\right]=e^{-\sqrt{1-\sigma_n^2}|\nu|}\cosh\left(\sqrt{1-\sigma_n^2}\nu\right)\in[1/2,1], E M [ C ν e ν ξ i ] = e − 1 − σ n 2 ∣ ν ∣ cosh ( 1 − σ n 2 ν ) ∈ [ 1/2 , 1 ] ,
E M [ ( e ξ i C ν ) p ] = e − p 1 − σ n 2 ∣ ν ∣ cosh ( p 1 − σ n 2 ν ) e ( p 2 − p ) σ n 2 ν 2 / 2 ≤ e ( p 2 − p ) σ n 2 ν 2 / 2 . \mathbb{E}_{\mathrm{M}}\left[\left(\frac{e^{\xi_i}}{C_\nu}\right)^p\right]=e^{-p\sqrt{1-\sigma_n^2}|\nu|}\cosh\left(p\sqrt{1-\sigma_n^2}\nu\right)e^{(p^2-p)\sigma_n^2\nu^2/2}\le e^{(p^2-p)\sigma_n^2\nu^2/2}. E M [ ( C ν e ξ i ) p ] = e − p 1 − σ n 2 ∣ ν ∣ cosh ( p 1 − σ n 2 ν ) e ( p 2 − p ) σ n 2 ν 2 /2 ≤ e ( p 2 − p ) σ n 2 ν 2 /2 .
Including the polynomial factors by Gaussian tilting preserves boundedness because σ n λ 2 = O ( σ n log ( 1 / σ n 2 ) ) = o ( 1 ) \sigma_n\lambda_2=O(\sigma_n\log(1/\sigma_n^2))=o(1) σ n λ 2 = O ( σ n log ( 1/ σ n 2 )) = o ( 1 ) . The Taylor expansion in the proof of Lemma F.1, applied to ( g 2 − μ ) ∂ g 2 ∂ λ 2 (g_2-\mu)\frac{\partial g_2}{\partial\lambda_2} ( g 2 − μ ) ∂ λ 2 ∂ g 2 and ( g 2 − μ ) 2 (g_2-\mu)^2 ( g 2 − μ ) 2 , gives the two covariance expansions.
For the Gaussian mixture, (37) gives
Σ g ( λ 2 , λ 2 ) = σ n 2 + ( 1 − σ n 2 ) sech 4 ( 1 − σ n 2 λ 2 ) + O ( σ n 4 ( 1 + λ 2 ) 4 ) , \Sigma_g(\lambda_2,\lambda_2)=\sigma_n^2+(1-\sigma_n^2)\operatorname{sech}^4\left(\sqrt{1-\sigma_n^2}\lambda_2\right)+O\left(\sigma_n^4(1+\lambda_2)^4\right), Σ g ( λ 2 , λ 2 ) = σ n 2 + ( 1 − σ n 2 ) sech 4 ( 1 − σ n 2 λ 2 ) + O ( σ n 4 ( 1 + λ 2 ) 4 ) ,
d d λ 2 Σ g ( λ 2 , λ 2 ) = − 4 ( 1 − σ n 2 ) 3 / 2 sech 4 ( 1 − σ n 2 λ 2 ) tanh ( 1 − σ n 2 λ 2 ) + O ( σ n 4 ( 1 + λ 2 ) 5 ) . \frac{d}{d\lambda_2}\Sigma_g(\lambda_2,\lambda_2)=-4(1-\sigma_n^2)^{3/2}\operatorname{sech}^4\left(\sqrt{1-\sigma_n^2}\lambda_2\right)\tanh\left(\sqrt{1-\sigma_n^2}\lambda_2\right)+O\left(\sigma_n^4(1+\lambda_2)^5\right). d λ 2 d Σ g ( λ 2 , λ 2 ) = − 4 ( 1 − σ n 2 ) 3/2 sech 4 ( 1 − σ n 2 λ 2 ) tanh ( 1 − σ n 2 λ 2 ) + O ( σ n 4 ( 1 + λ 2 ) 5 ) .
Since e − 4 1 − σ n 2 λ 2 ≥ σ n 2 e^{-4\sqrt{1-\sigma_n^2}\lambda_2}\ge\sigma_n^2 e − 4 1 − σ n 2 λ 2 ≥ σ n 2 ,
σ n 4 ( 1 + λ 2 ) 5 e − 4 1 − σ n 2 λ 2 ≤ σ n 2 ( 1 + λ 2 ) 5 ≤ C σ n 2 ( 1 + log ( 1 / σ n 2 ) ) 5 = o ( 1 ) , \frac{\sigma_n^4(1+\lambda_2)^5}{e^{-4\sqrt{1-\sigma_n^2}\lambda_2}}\le\sigma_n^2(1+\lambda_2)^5\le C\sigma_n^2(1+\log(1/\sigma_n^2))^5=o(1), e − 4 1 − σ n 2 λ 2 σ n 4 ( 1 + λ 2 ) 5 ≤ σ n 2 ( 1 + λ 2 ) 5 ≤ C σ n 2 ( 1 + log ( 1/ σ n 2 ) ) 5 = o ( 1 ) ,
n − 2 e − 4 1 − σ n 2 λ 2 / n ≤ ( n σ n 2 ) − 1 ≤ n − ϵ = o ( 1 ) . \frac{n^{-2}}{e^{-4\sqrt{1-\sigma_n^2}\lambda_2}/n}\le(n\sigma_n^2)^{-1}\le n^{-\epsilon}=o(1). e − 4 1 − σ n 2 λ 2 / n n − 2 ≤ ( n σ n 2 ) − 1 ≤ n − ϵ = o ( 1 ) .
For the refined moment bounds, substitute ξ i = 1 − σ n 2 S i + σ n G i \xi_i=\sqrt{1-\sigma_n^2}S_i+\sigma_nG_i ξ i = 1 − σ n 2 S i + σ n G i in the linear terms of (33) . At σ n = 0 \sigma_n=0 σ n = 0 their paired values are bounded by C e − 2 1 − σ n 2 λ 2 2 Ce^{-2\sqrt{1-\sigma_n^2}\lambda_2^2} C e − 2 1 − σ n 2 λ 2 2 . The difference for σ n > 0 \sigma_n>0 σ n > 0 has L p L^p L p norm at most C p ( 1 + λ 2 2 ) C σ n C_p(1+\lambda_2^2)C\sigma_n C p ( 1 + λ 2 2 ) C σ n , by Gaussian moments and σ n λ 2 = o ( 1 ) \sigma_n\lambda_2=o(1) σ n λ 2 = o ( 1 ) . Averaging the centered linear terms gives the factor n − 1 / 2 n^{-1/2} n − 1/2 , and the ratio remainders are O ( n − 1 ) O(n^{-1}) O ( n − 1 ) in L p L^p L p .
Lemma F.4 (Empirical gradients with fixed gating parameters). Assume the data model of Definition 2.1 and fix C < ∞ C<\infty C < ∞ and η ∈ ( 0 , 1 ) \eta\in(0,1) η ∈ ( 0 , 1 ) independently of n n n . For Uniform data, also fix ϵ > 0 \epsilon>0 ϵ > 0 . For Gaussian-mixture data, fix ϵ > 0 \epsilon>0 ϵ > 0 and assume n − 1 + ϵ ≤ σ n 2 n^{-1+\epsilon}\leq\sigma_n^2 n − 1 + ϵ ≤ σ n 2 and σ n = o ( 1 ) \sigma_n=o(1) σ n = o ( 1 ) . Consider ( θ , λ ) (\theta,\lambda) ( θ , λ ) satisfying
max { ∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } ≤ C / n , max q ∥ θ q ∥ 2 ≤ C log n , ∣ λ 1 ∣ ≤ 2 , \max\{\lVert\bar{w}_{\cdot G}-e_1\rVert_1,\lVert\bar{w}_{\cdot A}-e_2\rVert_1\}\leq C/n,\qquad\max_q\lVert\theta_q\rVert_2\leq C\log n,\qquad\lvert\lambda_1\rvert\leq2, max {∥ w ˉ ⋅ G − e 1 ∥ 1 , ∥ w ˉ ⋅ A − e 2 ∥ 1 } ≤ C / n , q max ∥ θ q ∥ 2 ≤ C log n , ∣ λ 1 ∣ ≤ 2 , with C − 1 ≤ λ 2 ≤ n 1 − ϵ C^{-1}\leq\lambda_2\leq n^{1-\epsilon} C − 1 ≤ λ 2 ≤ n 1 − ϵ for Uniform data and C − 1 ≤ λ 2 ≤ log ( 1 / σ n 2 ) / ( 4 1 − σ n 2 ) C^{-1}\leq\lambda_2\leq\log(1/\sigma_n^2)/(4\sqrt{1-\sigma_n^2}) C − 1 ≤ λ 2 ≤ log ( 1/ σ n 2 ) / ( 4 1 − σ n 2 ) for the mixture. For m = Ω ~ ( n 1 + ϵ ) m=\widetilde{\Omega}(n^{1+\epsilon}) m = Ω ( n 1 + ϵ ) independent training tasks and sufficiently large n n n , with probability at least 1 − η 1-\eta 1 − η , uniformly over this class,
∂ L ^ m ∂ λ 2 ≤ { − 1 / ( C n λ 2 2 ) , Uniform , − e − 4 1 − σ n 2 λ 2 2 / ( C n ) , Gaussian mixture . \frac{\partial\widehat{L}_m}{\partial\lambda_2}\leq
\begin{cases}
-1/(Cn\lambda_2^2), & \text{Uniform},\\
-e^{-4}\sqrt{1-\sigma_n^2}\lambda_2^2/(Cn), & \text{Gaussian mixture}.
\end{cases} ∂ λ 2 ∂ L m ≤ { − 1/ ( C n λ 2 2 ) , − e − 4 1 − σ n 2 λ 2 2 / ( C n ) , Uniform , Gaussian mixture . On the same event, uniformly over all ( θ , λ ) (\theta,\lambda) ( θ , λ ) satisfying the bounds above,
∂ L ^ m ∂ λ 1 = λ 1 2 n [ 2 sinh ( λ 1 2 ) + λ 1 2 cosh ( λ 1 2 ) ] + O ( n − 3 / 2 + o ( 1 ) ) . \frac{\partial\widehat{L}_m}{\partial\lambda_1}
=\frac{\lambda_1}{2n}\left[2\sinh(\lambda_1^2)+\lambda_1^2\cosh(\lambda_1^2)\right]+O(n^{-3/2+o(1)}). ∂ λ 1 ∂ L m = 2 n λ 1 [ 2 sinh ( λ 1 2 ) + λ 1 2 cosh ( λ 1 2 ) ] + O ( n − 3/2 + o ( 1 ) ) . On the same event, L ^ m ( θ , λ ) ≤ C / n \widehat{L}_m(\theta,\lambda)\leq C/n L m ( θ , λ ) ≤ C / n whenever also λ 2 ≤ 1 \lambda_2\leq1 λ 2 ≤ 1 . Constants may depend on ϵ \epsilon ϵ , C C C , d d d , and ω \omega ω .
Proof. For every fixed p ≥ 2 p\geq2 p ≥ 2 , the feature moment bounds and the sigmoid inequalities in the proof of Lemma 3.5 give
∥ 1 − w 1 ∥ L p ( P G ) + ∥ w 2 ∥ L p ( P G ) + ∥ 1 − w 2 ∥ L p ( P A ) + ∥ w 1 ∥ L p ( P A ) ≤ C p / n , \lVert1-w_1\rVert_{L^p(P_G)}+\lVert w_2\rVert_{L^p(P_G)}+\lVert1-w_2\rVert_{L^p(P_A)}+\lVert w_1\rVert_{L^p(P_A)}\leq C_p/n, ∥ 1 − w 1 ∥ L p ( P G ) + ∥ w 2 ∥ L p ( P G ) + ∥ 1 − w 2 ∥ L p ( P A ) + ∥ w 1 ∥ L p ( P A ) ≤ C p / n ,
∥ w k − w ˉ k j ∥ L p ( P j ) ≤ C p log n / n 3 / 2 . \lVert w_k-\bar{w}_{kj}\rVert_{L^p(P_j)}\leq C_p\log n/n^{3/2}. ∥ w k − w ˉ k j ∥ L p ( P j ) ≤ C p log n / n 3/2 .
For q , k ∈ [ 2 ] q,k\in[2] q , k ∈ [ 2 ] , the fixed ω \omega ω give
∂ w k ( X ) ∂ λ q = w k ( X ) ( 1 − w k ( X ) ) ⟨ θ k , ∂ z ( X ) ∂ λ q ⟩ = 0 , \frac{\partial w_k(\mathbf{X})}{\partial\lambda_q}=w_k(\mathbf{X})(1-w_k(\mathbf{X}))\left\langle\theta_k,\frac{\partial z(\mathbf{X})}{\partial\lambda_q}\right\rangle=0, ∂ λ q ∂ w k ( X ) = w k ( X ) ( 1 − w k ( X )) ⟨ θ k , ∂ λ q ∂ z ( X ) ⟩ = 0 ,
∂ h ( X , λ ) ∂ λ = ∑ i X i 2 e λ X i ∑ i e λ X i − h ( X , λ ) 2 , \frac{\partial h(\mathbf{X},\lambda)}{\partial\lambda}
=\frac{\sum_i X_i^2e^{\lambda X_i}}{\sum_i e^{\lambda X_i}}-h(\mathbf{X},\lambda)^2, ∂ λ ∂ h ( X , λ ) = ∑ i e λ X i ∑ i X i 2 e λ X i − h ( X , λ ) 2 ,
∂ g q ( X ) ∂ λ q = 1 2 ( ∂ h ( X , λ ) ∂ λ ∣ λ = λ q − ∂ h ( X , λ ) ∂ λ ∣ λ = − λ q ) , \frac{\partial g_q(\mathbf{X})}{\partial\lambda_q}
=\frac{1}{2}\left(\left.\frac{\partial h(\mathbf{X},\lambda)}{\partial\lambda}\right|_{\lambda=\lambda_q}
-\left.\frac{\partial h(\mathbf{X},\lambda)}{\partial\lambda}\right|_{\lambda=-\lambda_q}\right), ∂ λ q ∂ g q ( X ) = 2 1 ( ∂ λ ∂ h ( X , λ ) λ = λ q − ∂ λ ∂ h ( X , λ ) λ = − λ q ) ,
∂ μ ^ ( X ) ∂ λ q = w q ( X ) ∂ g q ( X ) ∂ λ q . \frac{\partial\widehat{\mu}(\mathbf{X})}{\partial\lambda_q}
=w_q(\mathbf{X})\frac{\partial g_q(\mathbf{X})}{\partial\lambda_q}. ∂ λ q ∂ μ ( X ) = w q ( X ) ∂ λ q ∂ g q ( X ) .
Consequently,
∂ ∂ λ q 1 2 ( μ ^ − μ ) 2 = ( μ ^ − μ ) w q ∂ g q ∂ λ q = [ ∑ k w k ( g k − μ ) + μ ( ∑ k w k − 1 ) ] w q ∂ g q ∂ λ q , \begin{aligned}
\frac{\partial}{\partial\lambda_q}\frac{1}{2}(\widehat{\mu}-\mu)^2
=(\widehat{\mu}-\mu)w_q\frac{\partial g_q}{\partial\lambda_q} \\
&=\left[\sum_k w_k(g_k-\mu)+\mu\left(\sum_k w_k-1\right)\right]w_q\frac{\partial g_q}{\partial\lambda_q},
\end{aligned} ∂ λ q ∂ 2 1 ( μ − μ ) 2 = ( μ − μ ) w q ∂ λ q ∂ g q = [ k ∑ w k ( g k − μ ) + μ ( k ∑ w k − 1 ) ] w q ∂ λ q ∂ g q ,
∂ L ^ m ∂ λ q = 1 m ∑ b = 1 m ( μ ^ ( X b ) − μ b ) w q ( X b ) ∂ g q ( X b ) ∂ λ q . \frac{\partial\widehat{L}_m}{\partial\lambda_q}
=\frac{1}{m}\sum_{b=1}^m(\widehat{\mu}(\mathbf{X}_b)-\mu_b)w_q(\mathbf{X}_b)\frac{\partial g_q(\mathbf{X}_b)}{\partial\lambda_q}. ∂ λ q ∂ L m = m 1 b = 1 ∑ m ( μ ( X b ) − μ b ) w q ( X b ) ∂ λ q ∂ g q ( X b ) .
Since the gates and centered experts are independent of μ \mu μ ,
E j [ μ ( ∑ k w k − 1 ) w q ∂ g q ∂ λ q ] = E [ μ ] E j [ ( ∑ k w k − 1 ) w q ∂ g q ∂ λ q ] = 0 , \mathbb{E}_j\left[\mu\left(\sum_k w_k-1\right)w_q\frac{\partial g_q}{\partial\lambda_q}\right]
=\mathbb{E}[\mu]\mathbb{E}_j\left[\left(\sum_k w_k-1\right)w_q\frac{\partial g_q}{\partial\lambda_q}\right]=0, E j [ μ ( k ∑ w k − 1 ) w q ∂ λ q ∂ g q ] = E [ μ ] E j [ ( k ∑ w k − 1 ) w q ∂ λ q ∂ g q ] = 0 ,
∂ L ∂ λ q = 1 2 ∑ j ∑ k E j [ w q w k ( g k − μ ) ∂ g q ∂ λ q ] . \frac{\partial\mathcal{L}}{\partial\lambda_q}
=\frac{1}{2}\sum_j\sum_k\mathbb{E}_j\left[w_qw_k(g_k-\mu)\frac{\partial g_q}{\partial\lambda_q}\right]. ∂ λ q ∂ L = 2 1 j ∑ k ∑ E j [ w q w k ( g k − μ ) ∂ λ q ∂ g q ] .
For λ > 0 \lambda> 0 λ > 0 and u ≥ 0 u \ge0 u ≥ 0 ,
∑ i : max ℓ X ℓ − X i ≥ u e λ X i ∑ ℓ e λ X ℓ ≤ min { 1 , n e − λ u } . \sum_{i:\max_{\ell} X_{\ell}-X_i\ge u}\frac{e^{\lambda X_i}}{\sum_{\ell}e^{\lambda X_{\ell}}}\le\min\{1,ne^{-\lambda u}\}. i : m a x ℓ X ℓ − X i ≥ u ∑ ∑ ℓ e λ X ℓ e λ X i ≤ min { 1 , n e − λ u } .
0 ≤ ∂ h ( X , λ ) ∂ λ = ∑ i e λ X i ∑ ℓ e λ X ℓ ( X i − h ( X , λ ) ) 2 ≤ ∑ i e λ X i ∑ ℓ e λ X ℓ ( max ℓ X ℓ − X i ) 2 ≤ ∫ 0 ∞ 2 u min { 1 , n e − λ u } d u ≤ C ( 1 + log n ) 2 λ 2 . \begin{aligned}
0\le\frac{\partial h(\mathbf{X},\lambda)}{\partial\lambda}=\sum_i\frac{e^{\lambda X_i}}{\sum_{\ell}e^{\lambda X_{\ell}}}(X_i-h(\mathbf{X},\lambda))^2 \\
&\le\sum_i\frac{e^{\lambda X_i}}{\sum_{\ell}e^{\lambda X_{\ell}}}(\max_{\ell}X_{\ell}-X_i)^2 \\
&\le\int_0^\infty2u\min\{1,ne^{-\lambda u}\}\,du\le\frac{C(1+\log n)^2}{\lambda^2}.
\end{aligned} 0 ≤ ∂ λ ∂ h ( X , λ ) = i ∑ ∑ ℓ e λ X ℓ e λ X i ( X i − h ( X , λ ) ) 2 ≤ i ∑ ∑ ℓ e λ X ℓ e λ X i ( ℓ max X ℓ − X i ) 2 ≤ ∫ 0 ∞ 2 u min { 1 , n e − λ u } d u ≤ λ 2 C ( 1 + log n ) 2 .
Applying the same bound to − X -\mathbf{X} − X gives
∣ ∂ g q ( X ) ∂ λ q ∣ ≤ C ( 1 + log n ) 2 λ q 2 . \left|\frac{\partial g_q(\mathbf{X})}{\partial\lambda_q}\right|\le\frac{C(1+\log n)^2}{\lambda_q^2}. ∂ λ q ∂ g q ( X ) ≤ λ q 2 C ( 1 + log n ) 2 .
For Uniform data, the gate moment bounds, Hölder’s inequality, and Lemma F.2 give
∣ E U [ ∂ ∂ λ 2 1 2 ( μ ^ − μ ) 2 ] − E U [ ( g 2 − μ ) ∂ g 2 ∂ λ 2 ] ∣ = ∣ E U [ ( ( w 2 2 − 1 ) ( g 2 − μ ) + w 1 w 2 ( g 1 − μ ) ) ∂ g 2 ∂ λ 2 ] ∣ ≤ C n ( 1 n λ 2 1 n λ 2 3 + 1 n 1 n λ 2 3 ) = C ( 1 n 2 λ 2 2 + 1 n 2 λ 2 3 / 2 ) . \begin{aligned}
\left|\mathbb{E}_{\mathrm{U}}\left[\frac{\partial}{\partial\lambda_2}\frac{1}{2}(\hat{\mu}-\mu)^2\right]-\mathbb{E}_{\mathrm{U}}\left[(g_2-\mu)\frac{\partial g_2}{\partial\lambda_2}\right]\right| \\
&=\left|\mathbb{E}_{\mathrm{U}}\left[\left((w_2^2-1)(g_2-\mu)+w_1w_2(g_1-\mu)\right)\frac{\partial g_2}{\partial\lambda_2}\right]\right| \\
&\le\frac{C}{n}\left(\frac{1}{\sqrt{n\lambda_2}} \frac{1}{\sqrt{n\lambda_2^3}}+\frac{1}{\sqrt n}\frac{1}{\sqrt{n\lambda_2^3}}\right)=C\left(\frac{1}{n^2\lambda_2^2}+\frac{1}{n^2\lambda_2^{3/2}}\right).
\end{aligned} E U [ ∂ λ 2 ∂ 2 1 ( μ ^ − μ ) 2 ] − E U [ ( g 2 − μ ) ∂ λ 2 ∂ g 2 ] = E U [ ( ( w 2 2 − 1 ) ( g 2 − μ ) + w 1 w 2 ( g 1 − μ ) ) ∂ λ 2 ∂ g 2 ] ≤ n C ( n λ 2 1 n λ 2 3 1 + n 1 n λ 2 3 1 ) = C ( n 2 λ 2 2 1 + n 2 λ 2 3/2 1 ) .
In family G, the same bounds give
∣ ∑ k E G [ w 2 w k ( g k − μ ) ∂ g 2 ∂ λ 2 ] ∣ ≤ C ( 1 + log n ) C n 3 / 2 λ 2 2 . \left|\sum_k\mathbb{E}_{\mathrm{G}}\left[w_2w_k(g_k-\mu)\frac{\partial g_2}{\partial\lambda_2}\right]\right|\le\frac{C(1+\log n)^C}{n^{3/2}\lambda_2^2}. k ∑ E G [ w 2 w k ( g k − μ ) ∂ λ 2 ∂ g 2 ] ≤ n 3/2 λ 2 2 C ( 1 + log n ) C .
Consequently,
∂ L ∂ λ 2 ≤ − 1 C n λ 2 2 . \frac{\partial\mathcal{L}}{\partial\lambda_2}\le-\frac{1}{Cn\lambda_2^2}. ∂ λ 2 ∂ L ≤ − C n λ 2 2 1 .
For the Gaussian mixture, Lemma F.3 gives
∣ E M [ ( ( w 2 2 − 1 ) ( g 2 − μ ) + w 1 w 2 ( g 1 − μ ) ) ∂ g 2 ∂ λ 2 ] ∣ ≤ C ( 1 + log n ) C n 2 . \left|\mathbb{E}_{\mathrm{M}}\left[\left((w_2^2-1)(g_2-\mu)+w_1w_2(g_1-\mu)\right)\frac{\partial g_2}{\partial\lambda_2}\right]\right|\le\frac{C(1+\log n)^C}{n^2}. E M [ ( ( w 2 2 − 1 ) ( g 2 − μ ) + w 1 w 2 ( g 1 − μ ) ) ∂ λ 2 ∂ g 2 ] ≤ n 2 C ( 1 + log n ) C .
In family G, symmetry gives
E G [ g 1 − μ ] = E G [ ∂ g 2 ∂ λ 2 ] = 0. \mathbb{E}_{\mathrm{G}}[g_1-\mu]=\mathbb{E}_{\mathrm{G}}\left[\frac{\partial g_2}{\partial\lambda_2}\right]=0. E G [ g 1 − μ ] = E G [ ∂ λ 2 ∂ g 2 ] = 0.
Integration by parts and Cauchy–Schwarz give
∣ E G [ ( g 1 − μ ) ∂ g 2 ∂ λ 2 ] ∣ ≤ ∥ max i ∣ ∂ g 1 ∂ X i ∣ ∥ L 2 ( P G ) ∥ ∑ i ∂ 2 g 2 ∂ X i ∂ λ 2 ∥ L 2 ( P G ) . \left|\mathbb{E}_{\mathrm{G}}\left[(g_1-\mu)\frac{\partial g_2}{\partial\lambda_2}\right]\right|\le\left\|\max_i\left|\frac{\partial g_1}{\partial X_i}\right|\right\|_{L^2(\mathbb{P}_{\mathrm{G}})}\left\|\sum_i\frac{\partial^2 g_2}{\partial X_i\partial\lambda_2}\right\|_{L^2(\mathbb{P}_{\mathrm{G}})}. E G [ ( g 1 − μ ) ∂ λ 2 ∂ g 2 ] ≤ i max ∂ X i ∂ g 1 L 2 ( P G ) i ∑ ∂ X i ∂ λ 2 ∂ 2 g 2 L 2 ( P G ) .
Differentiating
∂ h ( X , λ ) ∂ X i = e λ X i ∑ ℓ e λ X ℓ ( 1 + λ ( X i − h ( X , λ ) ) ) \frac{\partial h(\mathbf{X},\lambda)}{\partial X_i}=\frac{e^{\lambda X_i}}{\sum_{\ell}e^{\lambda X_{\ell}}}(1+\lambda(X_i-h(\mathbf{X},\lambda))) ∂ X i ∂ h ( X , λ ) = ∑ ℓ e λ X ℓ e λ X i ( 1 + λ ( X i − h ( X , λ )))
gives
∥ max i ∣ ∂ g 1 ∂ X i ∣ ∥ L 2 ( P G ) ≤ 1 n ∥ C ( 1 + max i ∣ X i − μ ∣ ) e C max i ∣ X i − μ ∣ ∥ L 2 ( P G ) = n − 1 + o ( 1 ) , \left\|\max_i\left|\frac{\partial g_1}{\partial X_i}\right|\right\|_{L^2(\mathbb{P}_{\mathrm{G}})}\le\frac{1}{n}\left\|C(1+\max_i|X_i-\mu|)e^{C\max_i|X_i-\mu|}\right\|_{L^2(\mathbb{P}_{\mathrm{G}})}=n^{-1+o(1)}, i max ∂ X i ∂ g 1 L 2 ( P G ) ≤ n 1 C ( 1 + i max ∣ X i − μ ∣ ) e C m a x i ∣ X i − μ ∣ L 2 ( P G ) = n − 1 + o ( 1 ) ,
∥ ∑ i ∂ 2 g 2 ∂ X i ∂ λ 2 ∥ L 2 ( P G ) ≤ C ( 1 + λ 2 ) ∥ ( 1 + max i ∣ X i − μ ∣ ) 2 ∥ L 2 ( P G ) ≤ C ( 1 + log n ) 2 . \left\|\sum_i\frac{\partial^2 g_2}{\partial X_i\partial\lambda_2}\right\|_{L^2(\mathbb{P}_{\mathrm{G}})}\le C(1+\lambda_2)\left\|(1+\max_i|X_i-\mu|)^2\right\|_{L^2(\mathbb{P}_{\mathrm{G}})}\le C(1+\log n)^2. i ∑ ∂ X i ∂ λ 2 ∂ 2 g 2 L 2 ( P G ) ≤ C ( 1 + λ 2 ) ( 1 + i max ∣ X i − μ ∣ ) 2 L 2 ( P G ) ≤ C ( 1 + log n ) 2 .
Using the gate moment bounds,
∣ ∑ k E G [ w 2 w k ( g k − μ ) ∂ g 2 ∂ λ 2 ] ∣ ≤ C n ∣ E G [ ( g 1 − μ ) ∂ g 2 ∂ λ 2 ] ∣ + C log n n 3 / 2 n − 1 / 2 + o ( 1 ) + n − 2 + o ( 1 ) ≤ n − 2 + o ( 1 ) . \begin{aligned}
\left|\sum_k \mathbb{E}_{\mathrm{G}}\left[w_2w_k(g_k-\mu)\frac{\partial g_2}{\partial\lambda_2}\right]\right|\leq\frac{C}{n}\left|\mathbb{E}_{\mathrm{G}}\left[(g_1-\mu)\frac{\partial g_2}{\partial\lambda_2}\right]\right|+\frac{C\log n}{n^{3/2}}n^{-1/2+o(1)}+n^{-2+o(1)} \\
&\leq n^{-2+o(1)}.
\end{aligned} k ∑ E G [ w 2 w k ( g k − μ ) ∂ λ 2 ∂ g 2 ] ≤ n C E G [ ( g 1 − μ ) ∂ λ 2 ∂ g 2 ] + n 3/2 C log n n − 1/2 + o ( 1 ) + n − 2 + o ( 1 ) ≤ n − 2 + o ( 1 ) .
It follows that
∂ L ∂ λ 2 ≤ − e − 4 1 − σ n 2 λ 2 C n + n − 2 + o ( 1 ) ≤ − e − 4 1 − σ n 2 λ 2 2 C n . \frac{\partial\mathcal{L}}{\partial\lambda_2}\leq-\frac{e^{-4\sqrt{1-\sigma_n^2}\lambda_2}}{Cn}+n^{-2+o(1)}\leq-\frac{e^{-4\sqrt{1-\sigma_n^2}\lambda_2}}{2Cn}. ∂ λ 2 ∂ L ≤ − C n e − 4 1 − σ n 2 λ 2 + n − 2 + o ( 1 ) ≤ − 2 C n e − 4 1 − σ n 2 λ 2 .
The same estimates, including the mean term, give
∥ ∂ ∂ λ 2 1 2 ( μ ^ − μ ) 2 ∥ L p ( P j ) ≤ { C p ( 1 + log n ) C n λ 2 2 , Uniform, j ∈ { G , U } , n − 1 + o ( 1 ) ( σ n 2 + e − 4 1 − σ n 2 λ 2 ) , Gaussian mixture, j = M , n − 3 / 2 + o ( 1 ) , Gaussian mixture, j = G . \left\|\frac{\partial}{\partial\lambda_2}\frac{1}{2}(\hat{\mu}-\mu)^2\right\|_{L^p(\mathbb{P}_j)}
\leq
\begin{cases}
\dfrac{C_p(1+\log n)^C}{n\lambda_2^2}, & \text{Uniform, }j\in\{\mathrm{G},\mathrm{U}\},\\
n^{-1+o(1)}(\sigma_n^2+e^{-4\sqrt{1-\sigma_n^2}\lambda_2}), & \text{Gaussian mixture, }j=\mathrm{M},\\
n^{-3/2+o(1)}, & \text{Gaussian mixture, }j=\mathrm{G}.
\end{cases} ∂ λ 2 ∂ 2 1 ( μ ^ − μ ) 2 L p ( P j ) ≤ ⎩ ⎨ ⎧ n λ 2 2 C p ( 1 + log n ) C , n − 1 + o ( 1 ) ( σ n 2 + e − 4 1 − σ n 2 λ 2 ) , n − 3/2 + o ( 1 ) , Uniform, j ∈ { G , U } , Gaussian mixture, j = M , Gaussian mixture, j = G .
For m = Ω ~ ( n 1 + ϵ ) m=\widetilde{\Omega}(n^{1+\epsilon}) m = Ω ( n 1 + ϵ ) independent tasks and sufficiently large n n n , the moment inequality for centered independent sums and the preceding bounds give, for every fixed β > 0 \beta>0 β > 0 , uniformly on any fixed polynomial-size net in ( θ , λ ) (\theta,\lambda) ( θ , λ ) , with probability at least 1 − η / 4 1-\eta/4 1 − η /4 ,
∣ ∂ L ^ m ∂ λ 2 − ∂ L ∂ λ 2 ∣ ≤ 1 m { n β n λ 2 2 , Uniform , n − 1 + β ( σ n 2 + e − 4 1 − σ n 2 λ 2 ) + n − 3 / 2 + β , Gaussian mixture . \left|\frac{\partial\hat{\mathcal{L}}_m}{\partial\lambda_2}-\frac{\partial\mathcal{L}}{\partial\lambda_2}\right|
\leq\frac{1}{\sqrt{m}}
\begin{cases}
\dfrac{n^\beta}{n\lambda_2^2}, & \text{Uniform},\\
n^{-1+\beta}(\sigma_n^2+e^{-4\sqrt{1-\sigma_n^2}\lambda_2})+n^{-3/2+\beta}, & \text{Gaussian mixture}.
\end{cases} ∂ λ 2 ∂ L ^ m − ∂ λ 2 ∂ L ≤ m 1 ⎩ ⎨ ⎧ n λ 2 2 n β , n − 1 + β ( σ n 2 + e − 4 1 − σ n 2 λ 2 ) + n − 3/2 + β , Uniform , Gaussian mixture .
For a net with at most n C n^C n C points, choose p > 2 ( C + 1 ) / β p>2(C+1)/\beta p > 2 ( C + 1 ) / β . Markov’s inequality and a union bound give
P (the preceding bound fails at some net point) ≤ C p n C n − p β / 2 ≤ C p / n . \mathbb{P}\text{ (the preceding bound fails at some net point)}\leq C_p n^C n^{-p\beta/2}\leq C_p/n. P (the preceding bound fails at some net point) ≤ C p n C n − pβ /2 ≤ C p / n .
Since ∥ z ∥ 2 = 1 \lVert z\rVert_2=1 ∥ z ∥ 2 = 1 and z z z is independent of λ \lambda λ ,
sup θ , λ ∥ ∇ ( θ , λ ) [ ( μ ^ − μ ) w q ∂ g q ∂ λ q ] ∥ 2 ≤ C ( 1 + ∣ μ ∣ + max i ∣ X i − μ ∣ ) 4 . \sup_{\theta,\lambda}\left\|\nabla_{(\theta,\lambda)}\left[(\hat{\mu}-\mu)w_q\frac{\partial g_q}{\partial\lambda_q}\right]\right\|_2\leq C(1+|\mu|+\max_i|X_i-\mu|)^4. θ , λ sup ∇ ( θ , λ ) [ ( μ ^ − μ ) w q ∂ λ q ∂ g q ] 2 ≤ C ( 1 + ∣ μ ∣ + i max ∣ X i − μ ∣ ) 4 .
The expectation of the right hand side is O ( ( 1 + log n ) 2 ) O((1+\log n)^2) O (( 1 + log n ) 2 ) , so Markov’s inequality gives, for sufficiently large n n n , with probability at least 1 − η / 4 1-\eta/4 1 − η /4 ,
1 m ∑ b = 1 m ( 1 + ∣ μ b ∣ + max ℓ ∈ [ n ] ∣ X b ℓ − μ b ∣ ) 4 ≤ n . \frac{1}{m}\sum_{b=1}^m(1+|\mu_b|+\max_{\ell\in[n]}|\mathbf{X}_{b\ell}-\mu_b|)^4\leq n. m 1 b = 1 ∑ m ( 1 + ∣ μ b ∣ + ℓ ∈ [ n ] max ∣ X b ℓ − μ b ∣ ) 4 ≤ n .
( θ , λ ) (\theta,\lambda) ( θ , λ ) has 2 d + 2 2d+2 2 d + 2 coordinates with ranges of polynomial length. A net of sufficiently fine inverse-polynomial mesh therefore extends the gradient inequalities to the full stated domain. Choose β < min { 1 / 4 , ϵ / 2 } \beta<\min\{1/4,\epsilon/2\} β < min { 1/4 , ϵ /2 } . Relative to the respective population gradient lower bounds, the empirical errors are at most
{ C n − 1 / 2 − ϵ / 2 + β , Uniform , C ( n − 1 / 2 − ϵ / 2 + β + n − 3 ϵ / 2 + β ) , Gaussian mixture , \begin{cases}
Cn^{-1/2-\epsilon/2+\beta}, & \text{Uniform},\\
C\left(n^{-1/2-\epsilon/2+\beta}+n^{-3\epsilon/2+\beta}\right), & \text{Gaussian mixture},
\end{cases} { C n − 1/2 − ϵ /2 + β , C ( n − 1/2 − ϵ /2 + β + n − 3 ϵ /2 + β ) , Uniform , Gaussian mixture ,
which tend to zero.
Uniformly for ∣ λ 1 ∣ ≤ 2 |\lambda_1|\leq2 ∣ λ 1 ∣ ≤ 2 , the gate moment bounds, Lemma F.1, and ∣ g 2 − μ ∣ ≤ max i ∣ X i − μ ∣ |g_2-\mu|\leq\max_i|X_i-\mu| ∣ g 2 − μ ∣ ≤ max i ∣ X i − μ ∣ give
∥ ( μ ^ − μ ) w 1 ∂ g 1 ∂ λ 1 ∥ L p ( P j ) ≤ C p / n . \left\|(\hat{\mu}-\mu)w_1\frac{\partial g_1}{\partial\lambda_1}\right\|_{L^p(\mathbb{P}_j)}\leq C_p/n. ( μ ^ − μ ) w 1 ∂ λ 1 ∂ g 1 L p ( P j ) ≤ C p / n .
Hölder’s inequality bounds the population error, while Markov’s inequality and a union bound on the parameter net above bound the empirical error at the net points. Extending between net points using the derivative bound above gives, for sufficiently large n n n , with probability at least 1 − η / 4 1-\eta/4 1 − η /4 , uniformly over all ( θ , λ ) (\theta,\lambda) ( θ , λ ) satisfying the bounds in Lemma F.4,
∣ ∂ L ∂ λ 1 − 1 2 E G [ ( g 1 − μ ) ∂ g 1 ∂ λ 1 ] ∣ + ∣ ∂ L ^ m ∂ λ 1 − ∂ L ∂ λ 1 ∣ ≤ n − 3 / 2 + o ( 1 ) . \left|\frac{\partial\mathcal{L}}{\partial\lambda_1}-\frac{1}{2}\mathbb{E}_{\mathrm{G}}\left[(g_1-\mu)\frac{\partial g_1}{\partial\lambda_1}\right]\right|+\left|\frac{\partial\hat{\mathcal{L}}_m}{\partial\lambda_1}-\frac{\partial\mathcal{L}}{\partial\lambda_1}\right|\leq n^{-3/2+o(1)}. ∂ λ 1 ∂ L − 2 1 E G [ ( g 1 − μ ) ∂ λ 1 ∂ g 1 ] + ∂ λ 1 ∂ L ^ m − ∂ λ 1 ∂ L ≤ n − 3/2 + o ( 1 ) .
The Gaussian gradient formula in Lemma F.1 proves the expansion. When also λ 2 ≤ 1 \lambda_2 \le1 λ 2 ≤ 1 , the bounded-parameter expert moments and the gate moment bounds give ∥ ( μ ^ − μ ) 2 ∥ L p ( P j ) ≤ C p / n \lVert(\hat{\mu}-\mu)^2\rVert_{L_p(P_j)} \le C_p/n ∥( μ ^ − μ ) 2 ∥ L p ( P j ) ≤ C p / n . Applying the same net argument to the loss gives L ^ m ≤ C / n \hat{L}_m \le C/n L ^ m ≤ C / n uniformly over these parameters, for sufficiently large n n n , with probability at least 1 − η / 4 1-\eta/4 1 − η /4 . A union bound gives all conclusions jointly with probability at least 1 − η 1-\eta 1 − η .
Geometry of z
Lemma F.5 (Geometry of z). Let d ≥ 3 d \ge3 d ≥ 3 and sample ω \omega ω as in Definition 2.2. Recall m j m_j m j , ϕ ˉ j \bar{\phi}_j ϕ ˉ j , and z ˉ j \bar{z}_j z ˉ j from § 3.1 , with m j ( 0 ) = 0 m_j(0)=0 m j ( 0 ) = 0 by continuity, and let Z j k = ⟨ z ˉ j , z ˉ k ⟩ Z_{jk}=\langle\bar{z}_j,\bar{z}_k\rangle Z j k = ⟨ z ˉ j , z ˉ k ⟩ . Explicitly,
m G ( a ) = a , m_{\mathrm{G}}(a)=a, m G ( a ) = a , m A ( a ) = 3 coth ( 3 a ) − 1 / a (uniform alternative), m_{\mathrm{A}}(a)=\sqrt{3}\coth(\sqrt{3}a)-1/a \qquad\text{(uniform alternative),} m A ( a ) = 3 coth ( 3 a ) − 1/ a (uniform alternative), m A ( a ) = σ n 2 a + 1 − σ n 2 tanh ( 1 − σ n 2 a ) (Gaussian-mixture alternative). m_{\mathrm{A}}(a)=\sigma_n^2a+\sqrt{1-\sigma_n^2}\tanh\left(\sqrt{1-\sigma_n^2}a\right) \qquad\text{(Gaussian-mixture alternative).} m A ( a ) = σ n 2 a + 1 − σ n 2 tanh ( 1 − σ n 2 a ) (Gaussian-mixture alternative). Then, almost surely over ω \omega ω ,
∥ P d ϕ ˉ j ∥ 2 > 0 , Z G G = Z A A = 1 , 0 < Z G A < 1. \lVert P_d\bar{\phi}_j\rVert_2>0,\qquad Z_{\mathrm{GG}}=Z_{\mathrm{AA}}=1,\qquad0<Z_{\mathrm{GA}}<1. ∥ P d ϕ ˉ j ∥ 2 > 0 , Z GG = Z AA = 1 , 0 < Z GA < 1. In particular Z ≻ 0 Z\succ0 Z ≻ 0 , Z G A ≥ 0 Z_{\mathrm{GA}}\ge0 Z GA ≥ 0 , and Z G A < min { Z G G , Z A A } Z_{\mathrm{GA}}<\min\{Z_{\mathrm{GG}},Z_{\mathrm{AA}}\} Z GA < min { Z GG , Z AA } . For the uniform alternative these quantities do not depend on n n n . For the Gaussian-mixture alternative they depend on n n n only through σ n \sigma_n σ n , and if σ n → 0 \sigma_n\to0 σ n → 0 then, almost surely, Z G A Z_{\mathrm{GA}} Z GA converges to a limit strictly below one. Consequently, λ min ( Z ) \lambda_{\min}(Z) λ m i n ( Z ) is bounded below by a positive constant independent of n n n , for all sufficiently large n n n .
Proof. Let M j ( a ) = E j [ e a ( X − μ ) ] M_j(a)=\mathbb{E}_j[e^{a(X-\mu)}] M j ( a ) = E j [ e a ( X − μ ) ] , which is finite for every a a a because the centered observations are 1-sub-Gaussian. Then m j = ( log M j ) ′ m_j=(\log M_j)' m j = ( log M j ) ′ and m j ′ ( a ) = Var ( Y a ) > 0 m_j'(a)=\operatorname{Var}(Y_a)>0 m j ′ ( a ) = Var ( Y a ) > 0 , where Y a Y_a Y a denotes the centered observation tilted by a a a . Hence, each m j m_j m j is strictly increasing on R \mathbb{R} R . The displayed formulas are the cumulant generating functions of N ( 0 , 1 ) \mathcal{N}(0,1) N ( 0 , 1 ) , of Unif [ − 3 , 3 ] \operatorname{Unif}[-\sqrt{3},\sqrt{3}] Unif [ − 3 , 3 ] , and of the mixture in Lemma F.14, differentiated once.
The ω r \omega_r ω r are almost surely distinct, so strict monotonicity makes the entries of ϕ ˉ j \bar{\phi}_j ϕ ˉ j distinct. In particular, they are not all equal and P d ϕ ˉ j ≠ 0 P_d\bar{\phi}_j\ne0 P d ϕ ˉ j = 0 . This proves the first claim, makes z ˉ j \bar{z}_j z ˉ j well defined, and gives Z j j = ∥ z ˉ j ∥ 2 2 = 1 Z_{jj}=\lVert\bar{z}_j\rVert_2^2=1 Z j j = ∥ z ˉ j ∥ 2 2 = 1 .
For the lower bound, write m ˉ j = d − 1 ∑ r m j ( ω r ) \bar{m}_j=d^{-1}\sum_r m_j(\omega_r) m ˉ j = d − 1 ∑ r m j ( ω r ) and use the identity
⟨ P d ϕ ˉ G , P d ϕ ˉ A ⟩ = ∑ r = 1 d ( m G ( ω r ) − m ˉ G ) ( m A ( ω r ) − m ˉ A ) = 1 2 d ∑ r , r ′ = 1 d ( m G ( ω r ) − m G ( ω r ′ ) ) ( m A ( ω r ) − m A ( ω r ′ ) ) . \begin{aligned}
\langle P_d\bar{\phi}_{\mathrm{G}},P_d\bar{\phi}_{\mathrm{A}}\rangle=\sum_{r=1}^{d}\left(m_{\mathrm{G}}(\omega_r)-\bar{m}_{\mathrm{G}}\right)\left(m_{\mathrm{A}}(\omega_r)-\bar{m}_{\mathrm{A}}\right) \\
&=\frac{1}{2d}\sum_{r,r'=1}^{d}\left(m_{\mathrm{G}}(\omega_r)-m_{\mathrm{G}}(\omega_{r'})\right)\left(m_{\mathrm{A}}(\omega_r)-m_{\mathrm{A}}(\omega_{r'})\right).
\end{aligned} ⟨ P d ϕ ˉ G , P d ϕ ˉ A ⟩ = r = 1 ∑ d ( m G ( ω r ) − m ˉ G ) ( m A ( ω r ) − m ˉ A ) = 2 d 1 r , r ′ = 1 ∑ d ( m G ( ω r ) − m G ( ω r ′ ) ) ( m A ( ω r ) − m A ( ω r ′ ) ) .
Both m G m_{\mathrm{G}} m G and m A m_{\mathrm{A}} m A are strictly increasing, so every summand with ω r ≠ ω r ′ \omega_r\ne\omega_{r'} ω r = ω r ′ is strictly positive and the rest vanish. Since the ω r \omega_r ω r are almost surely distinct and d ≥ 2 d\ge2 d ≥ 2 , the sum is strictly positive, whence Z G A > 0 Z_{\mathrm{GA}}>0 Z GA > 0 .
For the upper bound, Cauchy–Schwarz gives Z G A ≤ 1 Z_{\mathrm{GA}}\le1 Z GA ≤ 1 with equality only if P d ϕ ˉ A P_d\bar{\phi}_{\mathrm{A}} P d ϕ ˉ A is a nonnegative multiple of P d ϕ ˉ G P_d\bar{\phi}_{\mathrm{G}} P d ϕ ˉ G , that is, only if there exist α , β ∈ R \alpha,\beta\in\mathbb{R} α , β ∈ R with
m A ( ω r ) = α ω r + β for every r ∈ [ d ] , m_{\mathrm{A}}(\omega_r)=\alpha\omega_r+\beta\qquad\text{for every }r\in[d], m A ( ω r ) = α ω r + β for every r ∈ [ d ] ,
using m G ( a ) = a m_{\mathrm{G}}(a)=a m G ( a ) = a . In both cases m A m_{\mathrm{A}} m A is real analytic on R \mathbb{R} R and is not affine there: for the uniform alternative m U ′ ′ ( a ) = a − 2 − 3 csch 2 ( 3 a ) m_{\mathrm{U}}''(a)=a^{-2}-3\operatorname{csch}^{2}(\sqrt{3}a) m U ′′ ( a ) = a − 2 − 3 csch 2 ( 3 a ) is nonconstant, and for the mixture m M ′ ′ ( a ) = − 2 ( 1 − σ n 2 ) 3 / 2 sech 2 ( 1 − σ n 2 a ) tanh ( 1 − σ n 2 a ) m_{\mathrm{M}}''(a)=-2(1-\sigma_n^2)^{3/2}\operatorname{sech}^{2}(\sqrt{1-\sigma_n^2}a)\tanh(\sqrt{1-\sigma_n^2}a) m M ′′ ( a ) = − 2 ( 1 − σ n 2 ) 3/2 sech 2 ( 1 − σ n 2 a ) tanh ( 1 − σ n 2 a ) vanishes only at a = 0 a=0 a = 0 . Condition on ( ω 1 , ω 2 ) (\omega_1,\omega_2) ( ω 1 , ω 2 ) with ω 1 ≠ ω 2 \omega_1\ne\omega_2 ω 1 = ω 2 , which determines α , β \alpha,\beta α , β . The remaining requirement is that ω 3 \omega_3 ω 3 be a zero of a m A ( a ) − α a − β m_{\mathrm{A}}(a)-\alpha a-\beta m A ( a ) − α a − β , a real-analytic function that is not identically zero and therefore has at most countably many zeros in R \mathbb{R} R . As d ≥ 3 d\ge3 d ≥ 3 and ω 3 \omega_3 ω 3 is independent of ( ω 1 , ω 2 ) (\omega_1,\omega_2) ( ω 1 , ω 2 ) with a density, this event has probability zero. Hence Z G A < 1 Z_{\mathrm{GA}}<1 Z GA < 1 almost surely, and λ min ( Z ) = 1 − Z G A > 0 \lambda_{\min}(Z)=1-Z_{\mathrm{GA}}>0 λ m i n ( Z ) = 1 − Z GA > 0 .
Only m A m_{\mathrm{A}} m A depends on n n n , and only through σ n \sigma_n σ n in the Gaussian-mixture case. If σ n → 0 \sigma_n\to0 σ n → 0 then m M ( ω r ) → tanh ( ω r ) m_{\mathrm{M}}(\omega_r)\to\tanh(\omega_r) m M ( ω r ) → tanh ( ω r ) for each of the finitely many sampled coordinates r ∈ [ d ] r\in[d] r ∈ [ d ] , so Z G A Z_{\mathrm{GA}} Z GA converges to the value obtained from tanh \tanh tanh , which is strictly below one by the same argument because tanh \tanh tanh is real analytic and not affine. Hence Z G A Z_{\mathrm{GA}} Z GA is bounded away from one, and λ min ( Z ) \lambda_{\min}(Z) λ m i n ( Z ) away from zero, for all sufficiently large n n n , with constants depending only on ω \omega ω .
Expert covariance
Lemma F.6 (Expert covariance approximation). Here, Σ \Sigma Σ is the covariance obtained from the multivariate delta method. Y Y Y is sub-Gaussian.
E [ n ( ∑ i = 1 n exp ( λ k Y i ) Y i ∑ i = 1 n exp ( λ k Y i ) − E [ exp ( λ k Y ) Y ] E [ exp ( λ k Y ) ] ) 2 − Σ k k ] = O ( 1 n ) (34) \mathbb{E}\left[n\left(\frac{\sum_{i=1}^{n}\exp(\lambda_kY_i)Y_i}{\sum_{i=1}^{n}\exp(\lambda_kY_i)}-\frac{\mathbb{E}[\exp(\lambda_kY)Y]}{\mathbb{E}[\exp(\lambda_kY)]}\right)^2-\Sigma_{kk}\right]=O\left(\frac{1}{n}\right) \tag*{(34)} E [ n ( ∑ i = 1 n exp ( λ k Y i ) ∑ i = 1 n exp ( λ k Y i ) Y i − E [ exp ( λ k Y )] E [ exp ( λ k Y ) Y ] ) 2 − Σ k k ] = O ( n 1 ) (34) Proof. Set
a = E [ e λ k Y Y ] E [ e λ k Y ] , B i = e λ k Y i , A i = B i ( Y i − a ) , B ∗ = E [ B i ] , a=\frac{\mathbb{E}[e^{\lambda_kY}Y]}{\mathbb{E}[e^{\lambda_kY}]},\qquad B_i=e^{\lambda_kY_i},\qquad A_i=B_i(Y_i-a),\qquad B^*=\mathbb{E}[B_i], a = E [ e λ k Y ] E [ e λ k Y Y ] , B i = e λ k Y i , A i = B i ( Y i − a ) , B ∗ = E [ B i ] , and write A n = n − 1 ∑ i A i A_n=n^{-1}\sum_i A_i A n = n − 1 ∑ i A i and B n = n − 1 ∑ i B i B_n=n^{-1}\sum_i B_i B n = n − 1 ∑ i B i . Then E [ A i ] = 0 \mathbb{E}[A_i]=0 E [ A i ] = 0 and the expression inside the expectation in (34) is n ( A n / B n ) 2 n(A_n/B_n)^2 n ( A n / B n ) 2 . Taylor’s theorem gives
B n − 2 = ( B ∗ ) − 2 − 2 ( B ∗ ) − 3 ( B n − B ∗ ) + 3 B ~ − 4 ( B n − B ∗ ) 2 , (35) B_n^{-2}=(B^*)^{-2}-2(B^*)^{-3}(B_n-B^*)+3\widetilde{B}^{-4}(B_n-B^*)^2, \tag*{(35)} B n − 2 = ( B ∗ ) − 2 − 2 ( B ∗ ) − 3 ( B n − B ∗ ) + 3 B − 4 ( B n − B ∗ ) 2 , (35) where B ~ \widetilde{B} B lies between B n B_n B n and B ∗ B^* B ∗ . The constant term in (35) contributes
n E [ A n 2 ] ( B ∗ ) 2 = Var ( e λ k Y ( Y − a ) ) E [ e λ k Y ] 2 = Σ k k . \frac{n\mathbb{E}[A_n^2]}{(B^*)^2}=\frac{\operatorname{Var}(e^{\lambda_kY}(Y-a))}{\mathbb{E}[e^{\lambda_kY}]^2}=\Sigma_{kk}. ( B ∗ ) 2 n E [ A n 2 ] = E [ e λ k Y ] 2 Var ( e λ k Y ( Y − a )) = Σ k k . For the linear term, independence and centering leave only coincident indices, so
− 2 n ( B ∗ ) 3 E [ A n 2 ( B n − B ∗ ) ] = − 2 n ( B ∗ ) 3 E [ A 1 2 ( B 1 − B ∗ ) ] = O ( n − 1 ) . -\frac{2n}{(B^*)^3}\mathbb{E}\left[A_n^2(B_n-B^*)\right]=-\frac{2}{n(B^*)^3}\mathbb{E}\left[A_1^2(B_1-B^*)\right]=O(n^{-1}). − ( B ∗ ) 3 2 n E [ A n 2 ( B n − B ∗ ) ] = − n ( B ∗ ) 3 2 E [ A 1 2 ( B 1 − B ∗ ) ] = O ( n − 1 ) . It remains to bound the quadratic remainder. Because B ~ \widetilde{B} B lies between two positive numbers, B ~ − 8 ≤ B n − 8 + ( B ∗ ) − 8 \widetilde{B}^{-8}\le B_n^{-8}+(B^*)^{-8} B − 8 ≤ B n − 8 + ( B ∗ ) − 8 . Jensen’s inequality gives B n ≥ e λ k Y ‾ n B_n\ge e^{\lambda_k\overline{Y}_n} B n ≥ e λ k Y n , and sub-Gaussianity therefore implies
E [ B ~ − 8 ] ≤ E [ e − 8 λ k Y ‾ n ] + ( B ∗ ) − 8 = O ( 1 ) . \mathbb{E}[\widetilde{B}^{-8}]\le\mathbb{E}[e^{-8\lambda_k\overline{Y}_n}]+(B^*)^{-8}=O(1). E [ B − 8 ] ≤ E [ e − 8 λ k Y n ] + ( B ∗ ) − 8 = O ( 1 ) . The variables A i A_i A i and B i B_i B i have moments of every fixed order, and the standard moment bound for centered i.i.d. averages yields
E [ A n 8 ] = O ( n − 4 ) , E [ ( B n − B ∗ ) 8 ] = O ( n − 4 ) . \mathbb{E}[A_n^8]=O(n^{-4}),\qquad\mathbb{E}[(B_n-B^*)^8]=O(n^{-4}). E [ A n 8 ] = O ( n − 4 ) , E [( B n − B ∗ ) 8 ] = O ( n − 4 ) . Hölder’s inequality with exponents 2 , 4 , 4 2,4,4 2 , 4 , 4 now gives
3 n E [ B ~ − 4 A n 2 ( B n − B ∗ ) 2 ] ≤ 3 n E [ B ~ − 8 ] 1 / 2 E [ A n 8 ] 1 / 4 E [ ( B n − B ∗ ) 8 ] 1 / 4 3n\mathbb{E}\left[\widetilde{B}^{-4}A_n^2(B_n-B^*)^2\right]\le3n\mathbb{E}[\widetilde{B}^{-8}]^{1/2}\mathbb{E}[A_n^8]^{1/4}\mathbb{E}[(B_n-B^*)^8]^{1/4} 3 n E [ B − 4 A n 2 ( B n − B ∗ ) 2 ] ≤ 3 n E [ B − 8 ] 1/2 E [ A n 8 ] 1/4 E [( B n − B ∗ ) 8 ] 1/4 = O ( n − 1 ) . =O(n^{-1}). = O ( n − 1 ) . Combining the three terms proves (34).
Expert hierarchy
The goal of this section is to verify the expert hierarchy of Definition B.1 for Gaussian, uniform and Gaussian-mixture data.
We denote the moment generating function as
M Y ( λ ) = E [ exp ( λ Y ) ] . M_Y(\lambda)=\mathbb{E}[\exp(\lambda Y)]. M Y ( λ ) = E [ exp ( λY )] .
Lemma F.7 (Asymptotic normality). *This lemma concerns the full stacked vector ( λ 1 , − λ 1 , λ 2 , − λ 2 , ω 1 , … , ω d ) ∈ R 4 + d (\lambda_1,-\lambda_1,\lambda_2,-\lambda_2,\omega_1,\ldots,\omega_d)\in\mathbb{R}^{4+d} ( λ 1 , − λ 1 , λ 2 , − λ 2 , ω 1 , … , ω d ) ∈ R 4 + d . For readability, index this stacked vector by λ 1 , … , λ 4 + d \lambda_1,\ldots,\lambda_{4+d} λ 1 , … , λ 4 + d within this lemma only. Let Y 1 , … , Y n ∼ i . i . d . Q j Y_1,\ldots,Y_n\overset{\mathrm{i.i.d.}}{\sim}Q_j Y 1 , … , Y n ∼ i.i.d. Q j . Recall the one-sided attention output h h h
from (1). Write h ( Y ) = ( h ( Y , λ 1 ) , … , h ( Y , λ 4 + d ) ) T \mathbf{h}(\mathbf{Y}) = (h(\mathbf{Y}, \lambda_1), \ldots, h(\mathbf{Y}, \lambda_{4+d}))^{\mathsf{T}} h ( Y ) = ( h ( Y , λ 1 ) , … , h ( Y , λ 4 + d ) ) T for these stacked head outputs. For λ = ( λ 1 , … , λ 4 + d ) \lambda= (\lambda_1, \ldots, \lambda_{4+d}) λ = ( λ 1 , … , λ 4 + d ) ,
n ( h ( Y ) − m j ( λ ) ) → d N ( 0 , Σ h ) \sqrt{n}\left(\mathbf{h}(\mathbf{Y}) - m_j(\lambda)\right) \xrightarrow{d} \mathcal{N}(0, \Sigma_h) n ( h ( Y ) − m j ( λ ) ) d N ( 0 , Σ h )
where m j ( λ ) m_j(\lambda) m j ( λ ) is the vector with components m j ( λ k ) = M Y ′ ( λ k ) M Y ( λ k ) m_j(\lambda_k) = \frac{M_Y'(\lambda_k)}{M_Y(\lambda_k)} m j ( λ k ) = M Y ( λ k ) M Y ′ ( λ k ) . The covariance matrix Σ h \Sigma_h Σ h is given by:
Σ h ( λ k , λ l ) = M Y ′ ′ ( λ k + λ l ) − ( m j ( λ k ) + m j ( λ l ) ) M Y ′ ( λ k + λ l ) + m j ( λ k ) m j ( λ l ) M Y ( λ k + λ l ) M Y ( λ k ) M Y ( λ l ) . \Sigma_h(\lambda_k,\lambda_l) = \frac{M_Y''(\lambda_k+\lambda_l) - \left(m_j(\lambda_k)+m_j(\lambda_l)\right)M_Y'(\lambda_k+\lambda_l) + m_j(\lambda_k)m_j(\lambda_l)M_Y(\lambda_k+\lambda_l)}{M_Y(\lambda_k)M_Y(\lambda_l)}. Σ h ( λ k , λ l ) = M Y ( λ k ) M Y ( λ l ) M Y ′′ ( λ k + λ l ) − ( m j ( λ k ) + m j ( λ l ) ) M Y ′ ( λ k + λ l ) + m j ( λ k ) m j ( λ l ) M Y ( λ k + λ l ) .
Proof. By the law of large numbers, as n → ∞ n \to\infty n → ∞ , the sample averages converge to expectations:
h ( Y , λ ) → a . s . E [ Y e λ Y ] E [ e λ Y ] = M Y ′ ( λ ) M Y ( λ ) = m j ( λ ) . h(\mathbf{Y},\lambda) \xrightarrow{\mathrm{a.s.}} \frac{\mathbb{E}[Y e^{\lambda Y}]}{\mathbb{E}[e^{\lambda Y}]} = \frac{M_Y'(\lambda)}{M_Y(\lambda)} = m_j(\lambda). h ( Y , λ ) a.s. E [ e λY ] E [ Y e λY ] = M Y ( λ ) M Y ′ ( λ ) = m j ( λ ) .
To find the asymptotic variance, we use the multivariate delta method. Let V i ( λ ) = ( Y i e λ Y i e λ Y i ) V_i(\lambda) = \begin{pmatrix} Y_i e^{\lambda Y_i} \\ e^{\lambda Y_i} \end{pmatrix} V i ( λ ) = ( Y i e λ Y i e λ Y i ) . By the central limit theorem, n ( V ‾ − E [ V ] ) → d N ( 0 , Σ V ) \sqrt{n}(\overline{V} - \mathbb{E}[V]) \xrightarrow{d} \mathcal{N}(0,\Sigma_V) n ( V − E [ V ]) d N ( 0 , Σ V ) . Define the mapping ϕ ( u , v ) = u v \phi(u,v) = \frac{u}{v} ϕ ( u , v ) = v u . The gradient is:
∇ ϕ ( u , v ) = ( 1 / v − u / v 2 ) . \nabla\phi(u,v) = \begin{pmatrix} 1/v \\ -u/v^2 \end{pmatrix}. ∇ ϕ ( u , v ) = ( 1/ v − u / v 2 ) .
Evaluated at the expectations ( u , v ) = ( M Y ′ ( λ ) , M Y ( λ ) ) (u,v) = (M_Y'(\lambda), M_Y(\lambda)) ( u , v ) = ( M Y ′ ( λ ) , M Y ( λ )) , the gradient is:
∇ ϕ = 1 M Y ( λ ) ( 1 − m j ( λ ) ) . \nabla\phi= \frac{1}{M_Y(\lambda)}\begin{pmatrix} 1 \\ -m_j(\lambda) \end{pmatrix}. ∇ ϕ = M Y ( λ ) 1 ( 1 − m j ( λ ) ) .
The linear approximation (influence function) for the estimator at λ \lambda λ is:
IF i ( λ ) = ∇ ϕ T ( V i ( λ ) − E [ V i ( λ ) ] ) = e λ Y i M Y ( λ ) ( Y i − m j ( λ ) ) . \operatorname{IF}_i(\lambda) = \nabla\phi^{\mathsf{T}}(V_i(\lambda) - \mathbb{E}[V_i(\lambda)]) = \frac{e^{\lambda Y_i}}{M_Y(\lambda)}(Y_i - m_j(\lambda)). IF i ( λ ) = ∇ ϕ T ( V i ( λ ) − E [ V i ( λ )]) = M Y ( λ ) e λ Y i ( Y i − m j ( λ )) .
The asymptotic covariance between the estimators at λ k \lambda_k λ k and λ l \lambda_l λ l is the covariance of their respective influence functions:
Σ h ( λ k , λ l ) = Cov ( IF ( λ k ) , IF ( λ l ) ) = E [ IF ( λ k ) IF ( λ l ) ] = E [ ( e λ k Y M Y ( λ k ) ( Y − m j ( λ k ) ) ) ( e λ l Y M Y ( λ l ) ( Y − m j ( λ l ) ) ) ] . \begin{aligned}
\Sigma_h(\lambda_k,\lambda_l) = \operatorname{Cov}(\operatorname{IF}(\lambda_k),\operatorname{IF}(\lambda_l)) = \mathbb{E}[\operatorname{IF}(\lambda_k)\operatorname{IF}(\lambda_l)] \\
&= \mathbb{E}\left[\left(\frac{e^{\lambda_k Y}}{M_Y(\lambda_k)}(Y-m_j(\lambda_k))\right)\left(\frac{e^{\lambda_l Y}}{M_Y(\lambda_l)}(Y-m_j(\lambda_l))\right)\right].
\end{aligned} Σ h ( λ k , λ l ) = Cov ( IF ( λ k ) , IF ( λ l )) = E [ IF ( λ k ) IF ( λ l )] = E [ ( M Y ( λ k ) e λ k Y ( Y − m j ( λ k )) ) ( M Y ( λ l ) e λ l Y ( Y − m j ( λ l )) ) ] .
Expanding yields
Σ h ( λ k , λ l ) = 1 M Y ( λ k ) M Y ( λ l ) E [ e ( λ k + λ l ) Y ( Y − m j ( λ k ) ) ( Y − m j ( λ l ) ) ] = 1 M Y ( λ k ) M Y ( λ l ) E [ e ( λ k + λ l ) Y ( Y 2 − Y ( m j ( λ k ) + m j ( λ l ) ) + m j ( λ k ) m j ( λ l ) ) ] . \begin{aligned}
\Sigma_h(\lambda_k,\lambda_l) = \frac{1}{M_Y(\lambda_k)M_Y(\lambda_l)}\mathbb{E}\left[e^{(\lambda_k+\lambda_l)Y}(Y-m_j(\lambda_k))(Y-m_j(\lambda_l))\right] \\
&= \frac{1}{M_Y(\lambda_k)M_Y(\lambda_l)}\mathbb{E}\left[e^{(\lambda_k+\lambda_l)Y}\left(Y^2-Y(m_j(\lambda_k)+m_j(\lambda_l))+m_j(\lambda_k)m_j(\lambda_l)\right)\right].
\end{aligned} Σ h ( λ k , λ l ) = M Y ( λ k ) M Y ( λ l ) 1 E [ e ( λ k + λ l ) Y ( Y − m j ( λ k )) ( Y − m j ( λ l )) ] = M Y ( λ k ) M Y ( λ l ) 1 E [ e ( λ k + λ l ) Y ( Y 2 − Y ( m j ( λ k ) + m j ( λ l )) + m j ( λ k ) m j ( λ l ) ) ] .
Using the property that E [ Y k e t Y ] = M Y ( k ) ( t ) \mathbb{E}[Y^k e^{tY}] = M_Y^{(k)}(t) E [ Y k e t Y ] = M Y ( k ) ( t ) , we obtain the final expression.
Gaussian expert covariance
Lemma F.8 (Gaussian distribution). If Y ∼ N ( 0 , 1 ) Y \sim\mathcal{N}(0,1) Y ∼ N ( 0 , 1 ) , then M Y ( t ) = e t 2 / 2 M_Y(t) = e^{t^2/2} M Y ( t ) = e t 2 /2 ,
m G ( λ ) = λ , m_G(\lambda) = \lambda, m G ( λ ) = λ , Σ h ( λ k , λ l ) = ( 1 + λ k λ l ) e λ k λ l . \Sigma_h(\lambda_k,\lambda_l) = (1+\lambda_k\lambda_l)e^{\lambda_k\lambda_l}. Σ h ( λ k , λ l ) = ( 1 + λ k λ l ) e λ k λ l .
Proof. Let Y ∼ N ( 0 , 1 ) Y \sim\mathcal{N}(0,1) Y ∼ N ( 0 , 1 ) . The moment generating function is M Y ( t ) = e t 2 / 2 M_Y(t) = e^{t^2/2} M Y ( t ) = e t 2 /2 . The first two derivatives are:
M Y ′ ( t ) = t e t 2 / 2 = t M Y ( t ) , M_Y'(t) = t e^{t^2/2} = tM_Y(t), M Y ′ ( t ) = t e t 2 /2 = t M Y ( t ) ,
M Y ′ ′ ( t ) = ( 1 + t 2 ) e t 2 / 2 = ( 1 + t 2 ) M Y ( t ) . M_Y''(t) = (1+t^2)e^{t^2/2} = (1+t^2)M_Y(t). M Y ′′ ( t ) = ( 1 + t 2 ) e t 2 /2 = ( 1 + t 2 ) M Y ( t ) .
The mean function is m G ( λ ) = M Y ′ ( λ ) / M Y ( λ ) = λ m_G(\lambda)=M_Y'(\lambda)/M_Y(\lambda)=\lambda m G ( λ ) = M Y ′ ( λ ) / M Y ( λ ) = λ . We apply the general covariance formula from Lemma F.7 :
Σ h ( λ k , λ l ) = M Y ′ ′ ( λ k + λ l ) − ( m G ( λ k ) + m G ( λ l ) ) M Y ′ ( λ k + λ l ) + m G ( λ k ) m G ( λ l ) M Y ( λ k + λ l ) M Y ( λ k ) M Y ( λ l ) . \Sigma_h(\lambda_k,\lambda_l)=\frac{M_Y''(\lambda_k+\lambda_l)-(m_G(\lambda_k)+m_G(\lambda_l))M_Y'(\lambda_k+\lambda_l)+m_G(\lambda_k)m_G(\lambda_l)M_Y(\lambda_k+\lambda_l)}{M_Y(\lambda_k)M_Y(\lambda_l)}. Σ h ( λ k , λ l ) = M Y ( λ k ) M Y ( λ l ) M Y ′′ ( λ k + λ l ) − ( m G ( λ k ) + m G ( λ l )) M Y ′ ( λ k + λ l ) + m G ( λ k ) m G ( λ l ) M Y ( λ k + λ l ) .
Substituting the derivatives and m G ( λ ) = λ m_G(\lambda)=\lambda m G ( λ ) = λ :
M Y ′ ′ ( λ k + λ l ) − ( m G ( λ k ) + m G ( λ l ) ) M Y ′ ( λ k + λ l ) + m G ( λ k ) m G ( λ l ) M Y ( λ k + λ l ) = ( 1 + ( λ k + λ l ) 2 ) M Y ( λ k + λ l ) − ( λ k + λ l ) 2 M Y ( λ k + λ l ) + λ k λ l M Y ( λ k + λ l ) = M Y ( λ k + λ l ) [ 1 + ( λ k + λ l ) 2 − ( λ k + λ l ) 2 + λ k λ l ] = M Y ( λ k + λ l ) ( 1 + λ k λ l ) . \begin{aligned}
&M_Y''(\lambda_k+\lambda_l)-(m_G(\lambda_k)+m_G(\lambda_l))M_Y'(\lambda_k+\lambda_l)+m_G(\lambda_k)m_G(\lambda_l)M_Y(\lambda_k+\lambda_l)\\
&=(1+(\lambda_k+\lambda_l)^2)M_Y(\lambda_k+\lambda_l)-(\lambda_k+\lambda_l)^2M_Y(\lambda_k+\lambda_l)+\lambda_k\lambda_lM_Y(\lambda_k+\lambda_l)\\
&=M_Y(\lambda_k+\lambda_l)\left[1+(\lambda_k+\lambda_l)^2-(\lambda_k+\lambda_l)^2+\lambda_k\lambda_l\right]\\
&=M_Y(\lambda_k+\lambda_l)(1+\lambda_k\lambda_l).
\end{aligned} M Y ′′ ( λ k + λ l ) − ( m G ( λ k ) + m G ( λ l )) M Y ′ ( λ k + λ l ) + m G ( λ k ) m G ( λ l ) M Y ( λ k + λ l ) = ( 1 + ( λ k + λ l ) 2 ) M Y ( λ k + λ l ) − ( λ k + λ l ) 2 M Y ( λ k + λ l ) + λ k λ l M Y ( λ k + λ l ) = M Y ( λ k + λ l ) [ 1 + ( λ k + λ l ) 2 − ( λ k + λ l ) 2 + λ k λ l ] = M Y ( λ k + λ l ) ( 1 + λ k λ l ) .
Dividing by the denominator M Y ( λ k ) M Y ( λ l ) = e λ k 2 / 2 e λ l 2 / 2 M_Y(\lambda_k)M_Y(\lambda_l)=e^{\lambda_k^2/2}e^{\lambda_l^2/2} M Y ( λ k ) M Y ( λ l ) = e λ k 2 /2 e λ l 2 /2 :
Σ h ( λ k , λ l ) = ( 1 + λ k λ l ) e ( λ k + λ l ) 2 / 2 e ( λ k 2 + λ l 2 ) / 2 = ( 1 + λ k λ l ) exp ( λ k 2 + 2 λ k λ l + λ l 2 − λ k 2 − λ l 2 2 ) = ( 1 + λ k λ l ) e λ k λ l . \begin{aligned}
\Sigma_h(\lambda_k,\lambda_l)&=(1+\lambda_k\lambda_l)\frac{e^{(\lambda_k+\lambda_l)^2/2}}{e^{(\lambda_k^2+\lambda_l^2)/2}}\\
&=(1+\lambda_k\lambda_l)\exp\left(\frac{\lambda_k^2+2\lambda_k\lambda_l+\lambda_l^2-\lambda_k^2-\lambda_l^2}{2}\right)\\
&=(1+\lambda_k\lambda_l)e^{\lambda_k\lambda_l}.
\end{aligned} Σ h ( λ k , λ l ) = ( 1 + λ k λ l ) e ( λ k 2 + λ l 2 ) /2 e ( λ k + λ l ) 2 /2 = ( 1 + λ k λ l ) exp ( 2 λ k 2 + 2 λ k λ l + λ l 2 − λ k 2 − λ l 2 ) = ( 1 + λ k λ l ) e λ k λ l .
Definition F.9 (Symmetrized expert covariance). Recall g k ( X ) = 1 2 ( h ( X , λ k ) + h ( X , − λ k ) ) g_k(\mathbf{X})=\frac{1}{2}(h(\mathbf{X},\lambda_k)+h(\mathbf{X},-\lambda_k)) g k ( X ) = 2 1 ( h ( X , λ k ) + h ( X , − λ k )) . For a , b ∈ R a,b\in\mathbb{R} a , b ∈ R , the asymptotic covariance of h ( ⋅ , a ) h(\cdot,a) h ( ⋅ , a ) and h ( ⋅ , − a ) h(\cdot,-a) h ( ⋅ , − a ) ’s symmetrization against the analogous pair at b b b is denoted Σ g ( a , b ) \Sigma_g(a,b) Σ g ( a , b ) . Since each Q j Q_j Q j is symmetric about the origin, it follows from the linearity of the influence functions that:
Σ g ( a , b ) = 1 2 ( Σ h ( a , b ) + Σ h ( a , − b ) ) (36) \Sigma_g(a,b)=\frac{1}{2}\left(\Sigma_h(a,b)+\Sigma_h(a,-b)\right) \tag*{(36)} Σ g ( a , b ) = 2 1 ( Σ h ( a , b ) + Σ h ( a , − b ) ) (36) where Σ h ( ⋅ , ⋅ ) \Sigma_h(\cdot,\cdot) Σ h ( ⋅ , ⋅ ) is the one-sided covariance defined in Lemma F.7 .
Uniform expert covariance
Lemma F.10 (Uniform distribution). If Y ∼ Unif [ − 3 , 3 ] Y\sim\operatorname{Unif}[-\sqrt{3},\sqrt{3}] Y ∼ Unif [ − 3 , 3 ] , then
m U ( λ ) = 3 coth ( 3 λ ) − 1 λ , m_U(\lambda)=\sqrt{3}\coth(\sqrt{3}\lambda)-\frac{1}{\lambda}, m U ( λ ) = 3 coth ( 3 λ ) − λ 1 , and
Σ h ( λ k , λ l ) = 2 3 λ k λ l { coth ( 3 λ k ) + coth ( 3 λ l ) } ( λ k + λ l ) 3 − 3 { λ k 2 csch 2 ( 3 λ k ) + λ l 2 csch 2 ( 3 λ l ) } ( λ k + λ l ) 2 . \Sigma_h(\lambda_k,\lambda_l)=\frac{2\sqrt{3}\lambda_k\lambda_l\{\coth(\sqrt{3}\lambda_k)+\coth(\sqrt{3}\lambda_l)\}}{(\lambda_k+\lambda_l)^3}
-\frac{3\{\lambda_k^2\operatorname{csch}^2(\sqrt{3}\lambda_k)+\lambda_l^2\operatorname{csch}^2(\sqrt{3}\lambda_l)\}}{(\lambda_k+\lambda_l)^2}. Σ h ( λ k , λ l ) = ( λ k + λ l ) 3 2 3 λ k λ l { coth ( 3 λ k ) + coth ( 3 λ l )} − ( λ k + λ l ) 2 3 { λ k 2 csch 2 ( 3 λ k ) + λ l 2 csch 2 ( 3 λ l )} . Proof. Put a = 3 a=\sqrt{3} a = 3 . The moment generating function and its tilted mean are
M Y ( λ ) = sinh ( a λ ) a λ , m U ( λ ) = M Y ′ ( λ ) M Y ( λ ) = a coth ( a λ ) − 1 λ , M_Y(\lambda)=\frac{\sinh(a\lambda)}{a\lambda},\qquad m_U(\lambda)=\frac{M_Y'(\lambda)}{M_Y(\lambda)}=a\coth(a\lambda)-\frac{1}{\lambda}, M Y ( λ ) = aλ sinh ( aλ ) , m U ( λ ) = M Y ( λ ) M Y ′ ( λ ) = a coth ( aλ ) − λ 1 , with m U ′ ( λ ) = − a 2 csch 2 ( a λ ) + λ − 2 m_U'(\lambda)=-a^2\operatorname{csch}^2(a\lambda)+\lambda^{-2} m U ′ ( λ ) = − a 2 csch 2 ( aλ ) + λ − 2 . The general covariance identity from Lemma F.7 can be written
Σ h ( λ k , λ l ) = M Y ( λ k + λ l ) M Y ( λ k ) M Y ( λ l ) [ m U ′ ( λ k + λ l ) + { m U ( λ k + λ l ) − m U ( λ k ) } { m U ( λ k + λ l ) − m U ( λ l ) } ] . \Sigma_h(\lambda_k,\lambda_l)=\frac{M_Y(\lambda_k+\lambda_l)}{M_Y(\lambda_k)M_Y(\lambda_l)}\left[m_U'(\lambda_k+\lambda_l)+\{m_U(\lambda_k+\lambda_l)-m_U(\lambda_k)\}\{m_U(\lambda_k+\lambda_l)-m_U(\lambda_l)\}\right]. Σ h ( λ k , λ l ) = M Y ( λ k ) M Y ( λ l ) M Y ( λ k + λ l ) [ m U ′ ( λ k + λ l ) + { m U ( λ k + λ l ) − m U ( λ k )} { m U ( λ k + λ l ) − m U ( λ l )} ] . Substitute the displayed formulas for M Y M_Y M Y , m U m_U m U , m U ′ m_U' m U ′ and use
sinh ( a ( λ k + λ l ) ) sinh ( a λ k ) sinh ( a λ l ) = coth ( a λ k ) + coth ( a λ l ) . \frac{\sinh(a(\lambda_k+\lambda_l))}{\sinh(a\lambda_k)\sinh(a\lambda_l)}=\coth(a\lambda_k)+\coth(a\lambda_l). sinh ( a λ k ) sinh ( a λ l ) sinh ( a ( λ k + λ l )) = coth ( a λ k ) + coth ( a λ l ) . Collecting the rational and hyperbolic terms gives exactly the stated expression.
Lemma F.11 (Monotonicity for uniform distribution). Let Y ∼ Unif [ − 3 , 3 ] Y \sim\operatorname{Unif}[-\sqrt{3},\sqrt{3}] Y ∼ Unif [ − 3 , 3 ] . Then Σ g ( λ , λ ) \Sigma_g(\lambda,\lambda) Σ g ( λ , λ ) is strictly decreasing in ∣ λ ∣ |\lambda| ∣ λ ∣ .
Proof. For t = 3 λ > 0 t=\sqrt{3}\lambda>0 t = 3 λ > 0 , Lemma F.10 and symmetry give
Σ g ( t / 3 , t / 3 ) = 3 4 ( coth t t − csch 2 t ) + 1 2 t 2 csch 2 t [ 1 − 3 ( coth t − 1 t ) 2 ] . \Sigma_g(t/\sqrt{3},t/\sqrt{3})=\frac{3}{4}\left(\frac{\coth t}{t}-\operatorname{csch}^{2}t\right)+\frac{1}{2}t^{2}\operatorname{csch}^{2}t\left[1-3\left(\coth t-\frac{1}{t}\right)^{2}\right]. Σ g ( t / 3 , t / 3 ) = 4 3 ( t coth t − csch 2 t ) + 2 1 t 2 csch 2 t [ 1 − 3 ( coth t − t 1 ) 2 ] . − 64 t 2 sinh 5 t d d t Σ g ( t / 3 , t / 3 ) = 3 cosh ( 5 t ) − ( 9 + 120 t 2 + 32 t 4 ) cosh ( 3 t ) -64t^{2}\sinh^{5}t\frac{d}{dt}\Sigma_g(t/\sqrt{3},t/\sqrt{3})
=3\cosh(5t)-(9+120t^{2}+32t^{4})\cosh(3t) − 64 t 2 sinh 5 t d t d Σ g ( t / 3 , t / 3 ) = 3 cosh ( 5 t ) − ( 9 + 120 t 2 + 32 t 4 ) cosh ( 3 t ) + ( 6 + 120 t 2 − 352 t 4 ) cosh t + ( 12 t + 128 t 3 ) sinh ( 3 t ) \qquad+(6+120t^{2}-352t^{4})\cosh t+(12t+128t^{3})\sinh(3t) + ( 6 + 120 t 2 − 352 t 4 ) cosh t + ( 12 t + 128 t 3 ) sinh ( 3 t ) + ( − 36 t + 384 t 3 ) sinh t = ∑ m ≥ 0 A m t m . \qquad+(-36t+384t^{3})\sinh t=\sum_{m\geq0}A_m t^m. + ( − 36 t + 384 t 3 ) sinh t = m ≥ 0 ∑ A m t m . A 0 = A 2 = A 4 = A 6 = 0 , A 2 k + 1 = 0 ( k ≥ 0 ) , A_0=A_2=A_4=A_6=0,\qquad A_{2k+1}=0\quad(k\geq0), A 0 = A 2 = A 4 = A 6 = 0 , A 2 k + 1 = 0 ( k ≥ 0 ) , Table F.11.
For even m ≥ 20 m\geq20 m ≥ 20 , dropping positive terms and bounding falling factorials by powers gives
m ! A m 5 m ≥ 3 − ( 3 5 ) m ( 9 + 40 3 m 2 + 32 81 m 4 ) − 352 m 4 + 36 m 5 m . \frac{m!A_m}{5^m}\geq3-\left(\frac{3}{5}\right)^m\left(9+\frac{40}{3}m^2+\frac{32}{81}m^4\right)-\frac{352m^4+36m}{5^m}. 5 m m ! A m ≥ 3 − ( 5 3 ) m ( 9 + 3 40 m 2 + 81 32 m 4 ) − 5 m 352 m 4 + 36 m . Each subtracted term decreases for m ≥ 20 m\geq20 m ≥ 20 , since its ratio at consecutive integers is at most
3 5 ( m + 1 m ) 4 ≤ 3 5 ( 21 20 ) 4 = 583443 800000 < 1. \frac{3}{5}\left(\frac{m+1}{m}\right)^4\leq\frac{3}{5}\left(\frac{21}{20}\right)^4=\frac{583443}{800000}<1. 5 3 ( m m + 1 ) 4 ≤ 5 3 ( 20 21 ) 4 = 800000 583443 < 1. Thus
m ! A m 5 m ≥ 3 − 239026832372329 95367431640625 > 1 3 , d d t Σ g ( t / 3 , t / 3 ) < 0 ( t > 0 ) . \frac{m!A_m}{5^m}\geq3-\frac{239026832372329}{95367431640625}>\frac{1}{3},\qquad\frac{d}{dt}\Sigma_g(t/\sqrt{3},t/\sqrt{3})<0\quad(t>0). 5 m m ! A m ≥ 3 − 95367431640625 239026832372329 > 3 1 , d t d Σ g ( t / 3 , t / 3 ) < 0 ( t > 0 ) . Evenness and continuity at zero give the claim.
Lemma F.12 (Symmetrized cross-covariance for uniform distribution). Let Y ∼ Unif [ − 3 , 3 ] Y\sim\operatorname{Unif}[-\sqrt{3},\sqrt{3}] Y ∼ Unif [ − 3 , 3 ] and λ 1 , λ 2 ∈ R \lambda_1,\lambda_2\in\mathbb{R} λ 1 , λ 2 ∈ R . Then, with the right-hand side interpreted by continuity when λ 1 λ 2 = 0 \lambda_1\lambda_2=0 λ 1 λ 2 = 0 or λ 1 = ± λ 2 \lambda_1=\pm\lambda_2 λ 1 = ± λ 2 ,
Σ g ( λ 1 , λ 2 ) = 3 λ 1 λ 2 [ coth ( 3 λ 1 ) + coth ( 3 λ 2 ) ( λ 1 + λ 2 ) 3 − coth ( 3 λ 1 ) − coth ( 3 λ 2 ) ( λ 1 − λ 2 ) 3 ] \Sigma_g(\lambda_1,\lambda_2)=\sqrt{3}\lambda_1\lambda_2\left[\frac{\coth(\sqrt{3}\lambda_1)+\coth(\sqrt{3}\lambda_2)}{(\lambda_1+\lambda_2)^3}-\frac{\coth(\sqrt{3}\lambda_1)-\coth(\sqrt{3}\lambda_2)}{(\lambda_1-\lambda_2)^3}\right] Σ g ( λ 1 , λ 2 ) = 3 λ 1 λ 2 [ ( λ 1 + λ 2 ) 3 coth ( 3 λ 1 ) + coth ( 3 λ 2 ) − ( λ 1 − λ 2 ) 3 coth ( 3 λ 1 ) − coth ( 3 λ 2 ) ] − 3 2 [ λ 1 2 csch 2 ( 3 λ 1 ) + λ 2 2 csch 2 ( 3 λ 2 ) ] \qquad-\frac{3}{2}\left[\lambda_1^2\operatorname{csch}^{2}(\sqrt{3}\lambda_1)+\lambda_2^2\operatorname{csch}^{2}(\sqrt{3}\lambda_2)\right] − 2 3 [ λ 1 2 csch 2 ( 3 λ 1 ) + λ 2 2 csch 2 ( 3 λ 2 ) ] × [ 1 ( λ 1 + λ 2 ) 2 + 1 ( λ 1 − λ 2 ) 2 ] . \qquad\times\left[\frac{1}{(\lambda_1+\lambda_2)^2}+\frac{1}{(\lambda_1-\lambda_2)^2}\right]. × [ ( λ 1 + λ 2 ) 2 1 + ( λ 1 − λ 2 ) 2 1 ] . Proof. By symmetry, Σ g ( λ 1 , λ 2 ) = 1 2 { Σ h ( λ 1 , λ 2 ) + Σ h ( λ 1 , − λ 2 ) } \Sigma_g(\lambda_1,\lambda_2)=\frac{1}{2}\{\Sigma_h(\lambda_1,\lambda_2)+\Sigma_h(\lambda_1,-\lambda_2)\} Σ g ( λ 1 , λ 2 ) = 2 1 { Σ h ( λ 1 , λ 2 ) + Σ h ( λ 1 , − λ 2 )} . Substitute the formula in Lemma F.10 and use coth ( − x ) = − coth ( x ) \coth(-x)=-\coth(x) coth ( − x ) = − coth ( x ) and csch 2 ( − x ) = csch 2 ( x ) \operatorname{csch}^{2}(-x)=\operatorname{csch}^{2}(x) csch 2 ( − x ) = csch 2 ( x ) . Collecting the common terms gives the displayed expression. Continuity of the covariance formula in Lemma F.7 gives the stated extensions. For λ 1 = ± λ 2 \lambda_1=\pm\lambda_2 λ 1 = ± λ 2 , evenness gives the self-variance Σ g ( λ 1 , λ 1 ) \Sigma_g(\lambda_1,\lambda_1) Σ g ( λ 1 , λ 1 ) .
Corollary F.13 (Expert hierarchy for the uniform distribution). For the Uniform distribution and λ i ∈ [ − 1 , 1 ] \lambda_i\in[-1,1] λ i ∈ [ − 1 , 1 ] , Σ g \Sigma_g Σ g satisfies the expert hierarchy of Definition B.1 .
Proof. Σ g \Sigma_g Σ g is even in each argument, so it suffices to treat 0 ≤ λ 1 < λ 2 ≤ 1 0 \le\lambda_1 < \lambda_2 \le1 0 ≤ λ 1 < λ 2 ≤ 1 . Write
M Y ( λ ) = sinh ( 3 λ ) 3 λ , χ λ ( x ) = M Y ( λ ) x cosh ( λ x ) − M Y ′ ( λ ) sinh ( λ x ) , M_Y(\lambda)=\frac{\sinh(\sqrt{3}\lambda)}{\sqrt{3}\lambda},\qquad\chi_\lambda(x)=M_Y(\lambda)x\cosh(\lambda x)-M_Y'(\lambda)\sinh(\lambda x), M Y ( λ ) = 3 λ sinh ( 3 λ ) , χ λ ( x ) = M Y ( λ ) x cosh ( λ x ) − M Y ′ ( λ ) sinh ( λ x ) ,
with continuous extensions at zero. For $u>0,
d d u ( u coth u ) = sinh ( 2 u ) − 2 u 2 sinh 2 u > 0 , \frac{d}{du}(u\coth u)=\frac{\sinh(2u)-2u}{2\sinh^2 u}>0, d u d ( u coth u ) = 2 sinh 2 u sinh ( 2 u ) − 2 u > 0 ,
2 u 3 − d d u ( u coth u ) = 2 u cosh ( 2 u ) + 4 u − 3 sinh ( 2 u ) 6 sinh 2 u = 1 6 sinh 2 u ∑ k ≥ 2 2 2 k + 1 ( 2 k − 2 ) ( 2 k + 1 ) ! u 2 k + 1 > 0. \begin{aligned}
\frac{2u}{3}-\frac{d}{du}(u\coth u)=\frac{2u\cosh(2u)+4u-3\sinh(2u)}{6\sinh^2 u} \\
&=\frac{1}{6\sinh^2 u}\sum_{k\ge2}\frac{2^{2k+1}(2k-2)}{(2k+1)!}u^{2k+1}>0.
\end{aligned} 3 2 u − d u d ( u coth u ) = 6 sinh 2 u 2 u cosh ( 2 u ) + 4 u − 3 sinh ( 2 u ) = 6 sinh 2 u 1 k ≥ 2 ∑ ( 2 k + 1 )! 2 2 k + 1 ( 2 k − 2 ) u 2 k + 1 > 0.
Hence
lim t ↓ 0 t coth t = 1 , 0 < s coth s − t coth t < s 2 − t 2 3 ( 0 ≤ t < s ) . \lim_{t\downarrow0}t\coth t=1,\qquad0<s\coth s-t\coth t<\frac{s^2-t^2}{3}\qquad(0\le t<s). t ↓ 0 lim t coth t = 1 , 0 < s coth s − t coth t < 3 s 2 − t 2 ( 0 ≤ t < s ) .
For 0 < x < 3 0<x<\sqrt{3} 0 < x < 3 and 0 < λ ≤ 1 0<\lambda\le1 0 < λ ≤ 1 ,
χ λ ( x ) M Y ( λ ) 2 = sinh ( λ x ) λ M Y ( λ ) [ 1 − 3 λ coth ( 3 λ ) + λ x coth ( λ x ) ] > sinh ( λ x ) λ M Y ( λ ) ( 1 − λ 2 ) ≥ 0 , \begin{aligned}
\frac{\chi_\lambda(x)}{M_Y(\lambda)^2}
=\frac{\sinh(\lambda x)}{\lambda M_Y(\lambda)}
\left[1-\sqrt{3}\lambda\coth(\sqrt{3}\lambda)+\lambda x\coth(\lambda x)\right] \\
&>\frac{\sinh(\lambda x)}{\lambda M_Y(\lambda)}(1-\lambda^2)\ge0,
\end{aligned} M Y ( λ ) 2 χ λ ( x ) = λ M Y ( λ ) sinh ( λ x ) [ 1 − 3 λ coth ( 3 λ ) + λ x coth ( λ x ) ] > λ M Y ( λ ) sinh ( λ x ) ( 1 − λ 2 ) ≥ 0 ,
∂ ∂ λ χ λ ( x ) M Y ( λ ) 2 = sinh ( λ x ) λ 2 M Y ( λ ) [ λ 2 ( x 2 − 3 ) + 2 { 3 λ coth ( 3 λ ) − 1 } × { 3 λ coth ( 3 λ ) − λ x coth ( λ x ) } ] ≤ − ( 3 − x 2 ) sinh ( λ x ) M Y ( λ ) ( 1 − 2 λ 2 3 ) < 0. \begin{aligned}
\frac{\partial}{\partial\lambda}\frac{\chi_\lambda(x)}{M_Y(\lambda)^2}
=\frac{\sinh(\lambda x)}{\lambda^2M_Y(\lambda)}
\left[\lambda^2(x^2-3)+2\{\sqrt{3}\lambda\coth(\sqrt{3}\lambda)-1\}
\times\{\sqrt{3}\lambda\coth(\sqrt{3}\lambda)-\lambda x\coth(\lambda x)\}\right] \\
&\le-\frac{(3-x^2)\sinh(\lambda x)}{M_Y(\lambda)}
\left(1-\frac{2\lambda^2}{3}\right)<0.
\end{aligned} ∂ λ ∂ M Y ( λ ) 2 χ λ ( x ) = λ 2 M Y ( λ ) sinh ( λ x ) [ λ 2 ( x 2 − 3 ) + 2 { 3 λ coth ( 3 λ ) − 1 } × { 3 λ coth ( 3 λ ) − λ x coth ( λ x )} ] ≤ − M Y ( λ ) ( 3 − x 2 ) sinh ( λ x ) ( 1 − 3 2 λ 2 ) < 0.
Using χ 0 ( x ) = x \chi_0(x)=x χ 0 ( x ) = x , oddness in x x x , and Lemma F.7,
Σ g ( λ 2 , λ 2 ) = 1 3 ∫ 0 3 χ λ 2 ( x ) 2 M Y ( λ 2 ) 4 d x < 1 3 ∫ 0 3 χ λ 2 ( x ) χ λ 1 ( x ) M Y ( λ 2 ) 2 M Y ( λ 1 ) 2 d x = Σ g ( λ 1 , λ 2 ) < 1 3 ∫ 0 3 χ λ 1 ( x ) 2 M Y ( λ 1 ) 4 d x = Σ g ( λ 1 , λ 1 ) . \begin{aligned}
\Sigma_g(\lambda_2,\lambda_2)=\frac{1}{\sqrt{3}}\int_0^{\sqrt{3}}\frac{\chi_{\lambda_2}(x)^2}{M_Y(\lambda_2)^4}\,dx \\
&<\frac{1}{\sqrt{3}}\int_0^{\sqrt{3}}\frac{\chi_{\lambda_2}(x)\chi_{\lambda_1}(x)}{M_Y(\lambda_2)^2M_Y(\lambda_1)^2}\,dx=\Sigma_g(\lambda_1,\lambda_2) \\
&<\frac{1}{\sqrt{3}}\int_0^{\sqrt{3}}\frac{\chi_{\lambda_1}(x)^2}{M_Y(\lambda_1)^4}\,dx=\Sigma_g(\lambda_1,\lambda_1).
\end{aligned} Σ g ( λ 2 , λ 2 ) = 3 1 ∫ 0 3 M Y ( λ 2 ) 4 χ λ 2 ( x ) 2 d x < 3 1 ∫ 0 3 M Y ( λ 2 ) 2 M Y ( λ 1 ) 2 χ λ 2 ( x ) χ λ 1 ( x ) d x = Σ g ( λ 1 , λ 2 ) < 3 1 ∫ 0 3 M Y ( λ 1 ) 4 χ λ 1 ( x ) 2 d x = Σ g ( λ 1 , λ 1 ) .
Taking λ 1 = λ 2 \lambda_1=\lambda_2 λ 1 = λ 2 above also gives d d λ Σ g ( λ , λ ) < 0 \frac{d}{d\lambda}\Sigma_g(\lambda,\lambda)<0 d λ d Σ g ( λ , λ ) < 0 on ( 0 , 1 ) (0,1) ( 0 , 1 ) . Lemma F.11 is needed for the larger λ \lambda λ reached in the second stage, where the hierarchy itself fails and no bounded-range argument applies.
Gaussian-mixture expert covariance
We now give the analogous proof for the Gaussian mixture in Definition 2.1 . Write a n = 1 − σ n 2 a_n=\sqrt{1-\sigma_n^2} a n = 1 − σ n 2 . The centered observation has the representation Y = D a n S + σ n G Y \mathrel{\overset{D}{=}} a_nS+\sigma_nG Y = D a n S + σ n G , where S S S is Rademacher, G G G is standard Gaussian, and S , G S,G S , G are independent. Thus Y Y Y has mean zero and variance one.
Lemma F.14 (Mixture moments).
M Y ( t ) = e σ n 2 t 2 / 2 cosh ( a n t ) , M_Y(t)=e^{\sigma_n^2t^2/2}\cosh(a_nt), M Y ( t ) = e σ n 2 t 2 /2 cosh ( a n t ) ,
m M ( t ) = σ n 2 t + a n tanh ( a n t ) , m_M(t)=\sigma_n^2t+a_n\tanh(a_nt), m M ( t ) = σ n 2 t + a n tanh ( a n t ) ,
m M ′ ( t ) = σ n 2 + a n 2 sech 2 ( a n t ) . m_M'(t)=\sigma_n^2+a_n^2\operatorname{sech}^2(a_nt). m M ′ ( t ) = σ n 2 + a n 2 sech 2 ( a n t ) .
Moreover, Y Y Y is 1-sub-Gaussian.
Proof. Independence of S S S and G G G gives
M Y ( t ) = E [ e t a n S ] E [ e t σ n G ] = cosh ( a n t ) e σ n 2 t 2 / 2 . M_Y(t)=\mathbb{E}[e^{t a_n S}]\mathbb{E}[e^{t\sigma_n G}]=\cosh(a_n t)e^{\sigma_n^2t^2/2}. M Y ( t ) = E [ e t a n S ] E [ e t σ n G ] = cosh ( a n t ) e σ n 2 t 2 /2 .
Differentiating log M Y \log M_Y log M Y twice gives m M ( t ) = M Y ′ ( t ) / M Y ( t ) m_M(t)=M_Y'(t)/M_Y(t) m M ( t ) = M Y ′ ( t ) / M Y ( t ) and m M ′ ( t ) = M Y ′ ′ ( t ) / M Y ( t ) − m M ( t ) 2 m_M'(t)=M_Y''(t)/M_Y(t)-m_M(t)^2 m M ′ ( t ) = M Y ′′ ( t ) / M Y ( t ) − m M ( t ) 2 . Finally, cosh ( a n t ) ≤ e a n 2 t 2 / 2 \cosh(a_n t)\le e^{a_n^2t^2/2} cosh ( a n t ) ≤ e a n 2 t 2 /2 gives M Y ( t ) ≤ e t 2 / 2 M_Y(t)\le e^{t^2/2} M Y ( t ) ≤ e t 2 /2 .
Lemma F.15 (Gaussian mixture expert covariance).
Σ h ( λ k , λ l ) = M Y ( λ k + λ l ) M Y ( λ k ) M Y ( λ l ) [ m M ′ ( λ k + λ l ) + ( m M ( λ k + λ l ) − m M ( λ k ) ) ( m M ( λ k + λ l ) − m M ( λ l ) ) ] . \Sigma_h(\lambda_k,\lambda_l)=\frac{M_Y(\lambda_k+\lambda_l)}{M_Y(\lambda_k)M_Y(\lambda_l)}\left[m_M'(\lambda_k+\lambda_l)+(m_M(\lambda_k+\lambda_l)-m_M(\lambda_k))(m_M(\lambda_k+\lambda_l)-m_M(\lambda_l))\right]. Σ h ( λ k , λ l ) = M Y ( λ k ) M Y ( λ l ) M Y ( λ k + λ l ) [ m M ′ ( λ k + λ l ) + ( m M ( λ k + λ l ) − m M ( λ k )) ( m M ( λ k + λ l ) − m M ( λ l )) ] . Writing Σ g ( λ k , λ l ) = 1 2 { Σ h ( λ k , λ l ) + Σ h ( λ k , − λ l ) } \Sigma_g(\lambda_k,\lambda_l)=\frac{1}{2}\{\Sigma_h(\lambda_k,\lambda_l)+\Sigma_h(\lambda_k,-\lambda_l)\} Σ g ( λ k , λ l ) = 2 1 { Σ h ( λ k , λ l ) + Σ h ( λ k , − λ l )} ,
Σ g ( λ k , λ l ) = cosh ( σ n 2 λ k λ l ) [ a n 2 sech 2 ( a n λ k ) sech 2 ( a n λ l ) + σ n 2 + σ n 4 λ k λ l tanh ( a n λ k ) tanh ( a n λ l ) ] + sinh ( σ n 2 λ k λ l ) [ σ n 2 tanh ( a n λ k ) tanh ( a n λ l ) + σ n 4 λ k λ l + σ n 2 a n { λ k sech 2 ( a n λ k ) tanh ( a n λ l ) + λ l sech 2 ( a n λ l ) tanh ( a n λ k ) } ] . (37) \begin{aligned}
\Sigma_g(\lambda_k,\lambda_l)={}&\cosh(\sigma_n^2\lambda_k\lambda_l)\left[a_n^2\operatorname{sech}^2(a_n\lambda_k)\operatorname{sech}^2(a_n\lambda_l)+\sigma_n^2\right.\\
&\left.\qquad+\sigma_n^4\lambda_k\lambda_l\tanh(a_n\lambda_k)\tanh(a_n\lambda_l)\right]\\
&+\sinh(\sigma_n^2\lambda_k\lambda_l)\left[\sigma_n^2\tanh(a_n\lambda_k)\tanh(a_n\lambda_l)+\sigma_n^4\lambda_k\lambda_l\right.\\
&\left.\qquad+\sigma_n^2a_n\{\lambda_k\operatorname{sech}^2(a_n\lambda_k)\tanh(a_n\lambda_l)+\lambda_l\operatorname{sech}^2(a_n\lambda_l)\tanh(a_n\lambda_k)\}\right]. \tag*{(37)}
\end{aligned} Σ g ( λ k , λ l ) = cosh ( σ n 2 λ k λ l ) [ a n 2 sech 2 ( a n λ k ) sech 2 ( a n λ l ) + σ n 2 + σ n 4 λ k λ l tanh ( a n λ k ) tanh ( a n λ l ) ] + sinh ( σ n 2 λ k λ l ) [ σ n 2 tanh ( a n λ k ) tanh ( a n λ l ) + σ n 4 λ k λ l + σ n 2 a n { λ k sech 2 ( a n λ k ) tanh ( a n λ l ) + λ l sech 2 ( a n λ l ) tanh ( a n λ k )} ] . (37) In particular, Σ g ( λ k , 0 ) = σ n 2 + a n 2 sech 2 ( a n λ k ) \Sigma_g(\lambda_k,0)=\sigma_n^2+a_n^2\operatorname{sech}^2(a_n\lambda_k) Σ g ( λ k , 0 ) = σ n 2 + a n 2 sech 2 ( a n λ k ) and Σ g ( 0 , 0 ) = 1 \Sigma_g(0,0)=1 Σ g ( 0 , 0 ) = 1 .
Proof. The formula for Σ h \Sigma_h Σ h is Lemma F.7 rewritten using Lemma F.14, exactly as in the uniform case. Exponentially tilting a n S + σ n G a_nS+\sigma_nG a n S + σ n G by λ k + λ l \lambda_k+\lambda_l λ k + λ l shifts the Gaussian mean by σ n 2 ( λ k + λ l ) \sigma_n^2(\lambda_k+\lambda_l) σ n 2 ( λ k + λ l ) and tilts the Rademacher probabilities. For S ∈ { − 1 , 1 } S\in\{-1,1\} S ∈ { − 1 , 1 } ,
e a n λ k S cosh ( a n λ k ) ( a n S − a n tanh ( a n λ k ) ) = a n sech 2 ( a n λ k ) S . \frac{e^{a_n\lambda_kS}}{\cosh(a_n\lambda_k)}(a_nS-a_n\tanh(a_n\lambda_k))=a_n\operatorname{sech}^2(a_n\lambda_k)S. cosh ( a n λ k ) e a n λ k S ( a n S − a n tanh ( a n λ k )) = a n sech 2 ( a n λ k ) S . Substitution gives
Σ h ( λ k , λ l ) = e σ n 2 λ k λ l [ a n 2 sech 2 ( a n λ k ) sech 2 ( a n λ l ) + ( σ n 2 + σ n 4 λ k λ l ) { 1 + tanh ( a n λ k ) tanh ( a n λ l ) } + σ n 2 a n { λ k sech 2 ( a n λ k ) tanh ( a n λ l ) + λ l sech 2 ( a n λ l ) tanh ( a n λ k ) } ] . \begin{aligned}
\Sigma_h(\lambda_k,\lambda_l)={}&e^{\sigma_n^2\lambda_k\lambda_l}\left[a_n^2\operatorname{sech}^2(a_n\lambda_k)\operatorname{sech}^2(a_n\lambda_l)\right.\\
&\left.\qquad+(\sigma_n^2+\sigma_n^4\lambda_k\lambda_l)\{1+\tanh(a_n\lambda_k)\tanh(a_n\lambda_l)\}\right.\\
&\left.\qquad+\sigma_n^2a_n\{\lambda_k\operatorname{sech}^2(a_n\lambda_k)\tanh(a_n\lambda_l)+\lambda_l\operatorname{sech}^2(a_n\lambda_l)\tanh(a_n\lambda_k)\}\right].
\end{aligned} Σ h ( λ k , λ l ) = e σ n 2 λ k λ l [ a n 2 sech 2 ( a n λ k ) sech 2 ( a n λ l ) + ( σ n 2 + σ n 4 λ k λ l ) { 1 + tanh ( a n λ k ) tanh ( a n λ l )} + σ n 2 a n { λ k sech 2 ( a n λ k ) tanh ( a n λ l ) + λ l sech 2 ( a n λ l ) tanh ( a n λ k )} ] . Averaging this expression with its value at − λ l -\lambda_l − λ l and using the definitions of cosh and sinh gives (37).
Lemma F.16 (Expert hierarchy for the Gaussian mixture). For every fixed 0 < δ < 1 0<\delta<1 0 < δ < 1 there exists σ δ > 0 \sigma_\delta>0 σ δ > 0 such that, for all 0 < σ n < σ δ < 1 / 2 0<\sigma_n<\sigma_\delta<1/\sqrt{2} 0 < σ n < σ δ < 1/ 2 and
0 ≤ ∣ λ 1 ∣ < ∣ λ 2 ∣ ≤ L max = ( 1 − δ ) log ( 1 / σ n ) , 0\leq|\lambda_1|<|\lambda_2|\leq L_{\max}=(1-\delta)\log(1/\sigma_n), 0 ≤ ∣ λ 1 ∣ < ∣ λ 2 ∣ ≤ L m a x = ( 1 − δ ) log ( 1/ σ n ) , we have
Σ g ( λ 2 , λ 2 ) < Σ g ( λ 2 , λ 1 ) < Σ g ( λ 1 , λ 1 ) . \Sigma_g(\lambda_2,\lambda_2)<\Sigma_g(\lambda_2,\lambda_1)<\Sigma_g(\lambda_1,\lambda_1). Σ g ( λ 2 , λ 2 ) < Σ g ( λ 2 , λ 1 ) < Σ g ( λ 1 , λ 1 ) . Quantitatively,
min { Σ g ( λ 2 , λ 1 ) − Σ g ( λ 2 , λ 2 ) , Σ g ( λ 1 , λ 1 ) − Σ g ( λ 2 , λ 1 ) } ≥ e − 4 L max 8 ( 1 + L max ) ( λ 2 2 − λ 1 2 ) . \min\{\Sigma_g(\lambda_2,\lambda_1)-\Sigma_g(\lambda_2,\lambda_2),\Sigma_g(\lambda_1,\lambda_1)-\Sigma_g(\lambda_2,\lambda_1)\}\geq\frac{e^{-4L_{\max}}}{8(1+L_{\max})}(\lambda_2^2-\lambda_1^2). min { Σ g ( λ 2 , λ 1 ) − Σ g ( λ 2 , λ 2 ) , Σ g ( λ 1 , λ 1 ) − Σ g ( λ 2 , λ 1 )} ≥ 8 ( 1 + L m a x ) e − 4 L m a x ( λ 2 2 − λ 1 2 ) . Thus the expert hierarchy of Definition B.1 holds throughout [ − L max , L max ] [-L_{\max},L_{\max}] [ − L m a x , L m a x ] , and L max → ∞ L_{\max}\to\infty L m a x → ∞ as σ n ↓ 0 \sigma_n\downarrow0 σ n ↓ 0 for any fixed δ \delta δ .
Proof. Write u = λ 2 2 u=\lambda_2^2 u = λ 2 2 , v = λ 1 2 v=\lambda_1^2 v = λ 1 2 , and separate
Σ g ( u , v ) = a n 2 sech 2 ( a n u ) sech 2 ( a n v ) + σ n 2 + R σ n ( u , v ) . \Sigma_g(\sqrt{u},\sqrt{v})=a_n^2\operatorname{sech}^2(a_n\sqrt{u})\operatorname{sech}^2(a_n\sqrt{v})+\sigma_n^2+R_{\sigma_n}(u,v). Σ g ( u , v ) = a n 2 sech 2 ( a n u ) sech 2 ( a n v ) + σ n 2 + R σ n ( u , v ) .
For L ≥ 1 L\geq1 L ≥ 1 and 0 ≤ u , v ≤ L 2 0\leq u,v\leq L^2 0 ≤ u , v ≤ L 2 , expanding (37), using cosh t − 1 ≤ t 2 e t / 2 \cosh t-1\leq t^2e^t/2 cosh t − 1 ≤ t 2 e t /2 and 1 ≤ sinh ( t ) / t ≤ e t 1\leq\sinh(t)/t\leq e^t 1 ≤ sinh ( t ) / t ≤ e t , and bounding the resulting derivatives gives a universal C C C such that
∣ ∂ u R σ n ( u , v ) ∣ + ∣ ∂ v R σ n ( u , v ) ∣ ≤ C σ n 4 ( 1 + L ) 9 e σ n 2 L 2 . \left|\partial_uR_{\sigma_n}(u,v)\right|+\left|\partial_vR_{\sigma_n}(u,v)\right|\leq C\sigma_n^4(1+L)^9e^{\sigma_n^2L^2}. ∣ ∂ u R σ n ( u , v ) ∣ + ∣ ∂ v R σ n ( u , v ) ∣ ≤ C σ n 4 ( 1 + L ) 9 e σ n 2 L 2 .
For the dominant term, a n 4 ≥ 1 / 4 a_n^4\geq1/4 a n 4 ≥ 1/4 , sech t ≥ e − t \operatorname{sech}t\geq e^{-t} sech t ≥ e − t , and tanh ( t ) / t ≥ 1 / ( 1 + t ) \tanh(t)/t\geq1/(1+t) tanh ( t ) / t ≥ 1/ ( 1 + t ) imply
− ∂ ∂ u { a n 2 sech 2 ( a n u ) sech 2 ( a n v ) } = a n 4 tanh ( a n u ) a n u sech 2 ( a n u ) sech 2 ( a n v ) ≥ e − 4 L 4 ( 1 + L ) . \begin{aligned}
-\frac{\partial}{\partial u}\left\{a_n^2\operatorname{sech}^2(a_n\sqrt{u})\operatorname{sech}^2(a_n\sqrt{v})\right\} \\
&=a_n^4\frac{\tanh(a_n\sqrt{u})}{a_n\sqrt{u}}\operatorname{sech}^2(a_n\sqrt{u})\operatorname{sech}^2(a_n\sqrt{v}) \\
&\geq\frac{e^{-4L}}{4(1+L)}.
\end{aligned} − ∂ u ∂ { a n 2 sech 2 ( a n u ) sech 2 ( a n v ) } = a n 4 a n u tanh ( a n u ) sech 2 ( a n u ) sech 2 ( a n v ) ≥ 4 ( 1 + L ) e − 4 L .
Hence ∂ u Σ g ( u , v ) ≤ − e − 4 L / { 8 ( 1 + L ) } \partial_u\Sigma_g(\sqrt{u},\sqrt{v})\leq-e^{-4L}/\{8(1+L)\} ∂ u Σ g ( u , v ) ≤ − e − 4 L / { 8 ( 1 + L )} , and symmetrically in v v v , whenever
8 C σ n 4 ( 1 + L ) 9 e 4 L + σ n 2 L 2 ≤ 1. 8C\sigma_n^4(1+L)^9e^{4L+\sigma_n^2L^2}\leq1. 8 C σ n 4 ( 1 + L ) 9 e 4 L + σ n 2 L 2 ≤ 1.
This condition holds at L = L max = ( 1 − δ ) log ( 1 / σ n ) L=L_{\max}=(1-\delta)\log(1/\sigma_n) L = L m a x = ( 1 − δ ) log ( 1/ σ n ) for sufficiently small σ n \sigma_n σ n , since σ n 4 e 4 L max = σ n 4 δ → 0 \sigma_n^4e^{4L_{\max}}=\sigma_n^{4\delta}\to0 σ n 4 e 4 L m a x = σ n 4 δ → 0 . Integrating the derivative bounds in one coordinate between λ 1 2 \lambda_1^2 λ 1 2 and λ 2 2 \lambda_2^2 λ 2 2 gives both quantitative gaps and hence the strict hierarchy.
Concentration bounds
Softmax concentration
Lemma F.17 (Concentration of softmax). Let Y 1 , … , Y n Y_1,\ldots,Y_n Y 1 , … , Y n be independent copies of a mean-zero 1-sub-Gaussian variable Y Y Y , and fix λ ∈ R \lambda\in\mathbb{R} λ ∈ R and an integer k ≥ 1 k\geq1 k ≥ 1 . There are constants C ( λ ) , C 2 ( λ ) > 0 C(\lambda),C_2(\lambda)>0 C ( λ ) , C 2 ( λ ) > 0 , depending only on λ , k \lambda,k λ , k , such that, for 0 < M ≤ 1 0<M\leq1 0 < M ≤ 1 and R ≥ 1 R\geq1 R ≥ 1 with P ( ∣ Y ∣ > R ) ≤ M 2 C 2 ( λ ) \mathbb{P}(|Y|>R)\leq M^2C_2(\lambda) P ( ∣ Y ∣ > R ) ≤ M 2 C 2 ( λ ) ,
P ( ∣ ∑ i = 1 n e λ Y i Y i k ∑ i = 1 n e λ Y i − E [ Y k e λ Y ] E [ e λ Y ] ∣ ≥ M C ( λ ) ) ≤ 2 n e − R 2 / 2 + 4 exp ( − n M 2 32 R 2 k e 2 R ∣ λ ∣ ) . \mathbb{P}\left(\left|\frac{\sum_{i=1}^n e^{\lambda Y_i}Y_i^k}{\sum_{i=1}^n e^{\lambda Y_i}}-\frac{\mathbb{E}[Y^ke^{\lambda Y}]}{\mathbb{E}[e^{\lambda Y}]}\right|\geq MC(\lambda)\right)\leq2ne^{-R^2/2}+4\exp\left(-\frac{nM^2}{32R^{2k}e^{2R|\lambda|}}\right). P ( ∑ i = 1 n e λ Y i ∑ i = 1 n e λ Y i Y i k − E [ e λY ] E [ Y k e λY ] ≥ M C ( λ ) ) ≤ 2 n e − R 2 /2 + 4 exp ( − 32 R 2 k e 2 R ∣ λ ∣ n M 2 ) . Proof. Set A i = Y i k e λ Y i 1 { ∣ Y i ∣ ≤ R } A_i=Y_i^ke^{\lambda Y_i}\mathbf{1}_{\{|Y_i|\leq R\}} A i = Y i k e λ Y i 1 { ∣ Y i ∣ ≤ R } and B i = e λ Y i 1 { ∣ Y i ∣ ≤ R } B_i=e^{\lambda Y_i}\mathbf{1}_{\{|Y_i|\leq R\}} B i = e λ Y i 1 { ∣ Y i ∣ ≤ R } , and write A n = n − 1 ∑ i A i A_n=n^{-1}\sum_i A_i A n = n − 1 ∑ i A i , B n = n − 1 ∑ i B i B_n=n^{-1}\sum_i B_i B n = n − 1 ∑ i B i , A ∗ = E [ Y k e λ Y ] A^*=\mathbb{E}[Y^ke^{\lambda Y}] A ∗ = E [ Y k e λY ] , and B ∗ = E [ e λ Y ] ≥ 1 B^*=\mathbb{E}[e^{\lambda Y}]\geq1 B ∗ = E [ e λY ] ≥ 1 . The A i A_i A i are independent, as are the B i B_i B i , and satisfy ∣ A i ∣ ≤ R k e R ∣ λ ∣ |A_i|\leq R^ke^{R|\lambda|} ∣ A i ∣ ≤ R k e R ∣ λ ∣ and 0 ≤ B i ≤ e R ∣ λ ∣ 0\leq B_i\leq e^{R|\lambda|} 0 ≤ B i ≤ e R ∣ λ ∣ . The second moments of Y k e λ Y Y^ke^{\lambda Y} Y k e λY and e λ Y e^{\lambda Y} e λY are bounded in terms of λ , k \lambda,k λ , k by the sub-Gaussian assumption. Cauchy–Schwarz and a sufficiently small C 2 ( λ ) C_2(\lambda) C 2 ( λ ) give ∣ E A n − A ∗ ∣ , ∣ E B n − B ∗ ∣ ≤ M / 4 |\mathbb{E}A_n-A^*|,|\mathbb{E}B_n-B^*|\leq M/4 ∣ E A n − A ∗ ∣ , ∣ E B n − B ∗ ∣ ≤ M /4 . Hoeffding’s inequality therefore gives ∣ A n − A ∗ ∣ , ∣ B n − B ∗ ∣ ≤ M / 2 |A_n-A^*|,|B_n-B^*|\leq M/2 ∣ A n − A ∗ ∣ , ∣ B n − B ∗ ∣ ≤ M /2 , except with probability at most 4 exp ( − n M 2 / ( 32 R 2 k e 2 R ∣ λ ∣ ) ) 4\exp(-nM^2/(32R^{2k}e^{2R|\lambda|})) 4 exp ( − n M 2 / ( 32 R 2 k e 2 R ∣ λ ∣ )) . On this event, B n ≥ 1 / 2 B_n\geq1/2 B n ≥ 1/2 , so
∣ A n B n − A ∗ B ∗ ∣ ≤ ∣ A n − A ∗ ∣ B n + ∣ A ∗ ∣ ∣ B n − B ∗ ∣ B n B ∗ ≤ M ( 1 + ∣ A ∗ ∣ ) . (38) \left|\frac{A_n}{B_n}-\frac{A^*}{B^*}\right|\leq\frac{|A_n-A^*|}{B_n}+\frac{|A^*||B_n-B^*|}{B_nB^*}\leq M(1+|A^*|). \tag*{(38)} B n A n − B ∗ A ∗ ≤ B n ∣ A n − A ∗ ∣ + B n B ∗ ∣ A ∗ ∣∣ B n − B ∗ ∣ ≤ M ( 1 + ∣ A ∗ ∣ ) . (38) The sub-Gaussian moment bound allows C ( λ ) > 1 + ∣ A ∗ ∣ C(\lambda)>1+|A^*| C ( λ ) > 1 + ∣ A ∗ ∣ to be chosen depending only on λ , k \lambda,k λ , k . Finally, P ( max i ∣ Y i ∣ > R ) ≤ 2 n e − R 2 / 2 \mathbb{P}(\max_i|Y_i|>R)\leq2ne^{-R^2/2} P ( max i ∣ Y i ∣ > R ) ≤ 2 n e − R 2 /2 , and outside this event the truncated and original ratios agree.
Additional results
Lemma G.1 (Lyapunov exit time). Consider x ˙ = f ( x ) \dot{x}=f(x) x ˙ = f ( x ) and a region R R R . Suppose W W W is locally Lipschitz, W ( x ) > C W(x)>C W ( x ) > C on R R R , and d d t W ( x ( t ) ) ≤ − γ < 0 \frac{d}{dt}W(x(t))\leq-\gamma<0 d t d W ( x ( t )) ≤ − γ < 0 almost everywhere while x ( t ) ∈ R x(t)\in R x ( t ) ∈ R . If x ( 0 ) ∈ R x(0)\in R x ( 0 ) ∈ R and the solution exists up to exit, then its first exit time is at most
t ∗ = W ( x ( 0 ) ) − C γ . t^*=\frac{W(x(0))-C}{\gamma}. t ∗ = γ W ( x ( 0 )) − C . Moreover, W ( x ( t ) ) ≤ W ( x ( 0 ) ) W(x(t))\leq W(x(0)) W ( x ( t )) ≤ W ( x ( 0 )) until exit.
Proof. While the trajectory remains in R R R ,
C < W ( x ( t ) ) ≤ W ( x ( 0 ) ) − γ t . C < W(x(t)) \le W(x(0))-\gamma t. C < W ( x ( t )) ≤ W ( x ( 0 )) − γ t .
At t = t ⋆ t=t^\star t = t ⋆ these inequalities contradict each other.
Theorem G.2 (Tikhonov’s theorem). Consider
ε r ˙ = f ( r , y ) , y ˙ = g ( r , y ) , ( r ( 0 ) , y ( 0 ) ) = ( r 0 , y 0 ) . \varepsilon\dot{r}=f(r,y),\qquad\dot{y}=g(r,y),\qquad(r(0),y(0))=(r_0,y_0). ε r ˙ = f ( r , y ) , y ˙ = g ( r , y ) , ( r ( 0 ) , y ( 0 )) = ( r 0 , y 0 ) . Let N 0 \mathcal{N}_0 N 0 be open and r ⋆ r^\star r ⋆ be a twice continuously differentiable function on N 0 \mathcal{N}_0 N 0 with f ( r ⋆ ( y ) , y ) = 0 f(r^\star(y),y)=0 f ( r ⋆ ( y ) , y ) = 0 and graph contained in an open set N \mathcal{N} N . Assume that, for every ( r , y ) ∈ N (r,y)\in\mathcal{N} ( r , y ) ∈ N with y ∈ N 0 y\in\mathcal{N}_0 y ∈ N 0 , the line segment from ( r ⋆ ( y ) , y ) (r^\star(y),y) ( r ⋆ ( y ) , y ) to ( r , y ) (r,y) ( r , y ) lies in N \mathcal{N} N . Assume that f f f , g g g and their derivatives through order two are uniformly bounded in N \mathcal{N} N , and that all eigenvalues of ∂ r f ( r ⋆ ( y ) , y ) \partial_r f(r^\star(y),y) ∂ r f ( r ⋆ ( y ) , y ) have real parts at most − a 0 < 0 -a_0<0 − a 0 < 0 , uniformly for y ∈ N 0 y\in\mathcal{N}_0 y ∈ N 0 . Let
y ˙ 0 = g ( r ⋆ ( y 0 ) , y 0 ) , y 0 ( 0 ) = y 0 , \dot{y}^0=g(r^\star(y^0),y^0),\qquad y^0(0)=y_0, y ˙ 0 = g ( r ⋆ ( y 0 ) , y 0 ) , y 0 ( 0 ) = y 0 , and let L g > 0 L_g>0 L g > 0 be a Lipschitz constant for y ↦ g ( r ⋆ ( y ) , y ) y\mapsto g(r^\star(y),y) y ↦ g ( r ⋆ ( y ) , y ) on N 0 \mathcal{N}_0 N 0 . There exist ε 0 , c 0 , … , c 4 , κ 0 > 0 \varepsilon_0,c_0,\ldots,c_4,\kappa_0>0 ε 0 , c 0 , … , c 4 , κ 0 > 0 such that, for 0 < ε < ε 0 0<\varepsilon<\varepsilon_0 0 < ε < ε 0 and ( r 0 , y 0 ) ∈ N (r_0,y_0)\in\mathcal{N} ( r 0 , y 0 ) ∈ N with ∥ r 0 − r ⋆ ( y 0 ) ∥ 2 < c 0 \lVert r_0-r^\star(y_0)\rVert_2<c_0 ∥ r 0 − r ⋆ ( y 0 ) ∥ 2 < c 0 ,
∥ r ( s ) − r ⋆ ( y ( s ) ) ∥ 2 ≤ c 1 ε + c 2 ∥ r 0 − r ⋆ ( y 0 ) ∥ 2 e − κ 0 s / ε , \lVert r(s)-r^\star(y(s))\rVert_2\le c_1\varepsilon+c_2\lVert r_0-r^\star(y_0)\rVert_2e^{-\kappa_0s/\varepsilon}, ∥ r ( s ) − r ⋆ ( y ( s )) ∥ 2 ≤ c 1 ε + c 2 ∥ r 0 − r ⋆ ( y 0 ) ∥ 2 e − κ 0 s / ε , ∥ y ( s ) − y 0 ( s ) ∥ 2 ≤ c 3 ε e L g s + c 4 ∥ r 0 − r ⋆ ( y 0 ) ∥ 2 e − κ 0 s / ε , \lVert y(s)-y^0(s)\rVert_2\le c_3\varepsilon e^{L_gs}+c_4\lVert r_0-r^\star(y_0)\rVert_2e^{-\kappa_0s/\varepsilon}, ∥ y ( s ) − y 0 ( s ) ∥ 2 ≤ c 3 ε e L g s + c 4 ∥ r 0 − r ⋆ ( y 0 ) ∥ 2 e − κ 0 s / ε , for all s ≥ 0 s\ge0 s ≥ 0 such that ( r ( u ) , y ( u ) ) ∈ N (r(u),y(u))\in\mathcal{N} ( r ( u ) , y ( u )) ∈ N and y ( u ) , y 0 ( u ) ∈ N 0 y(u),y^0(u)\in\mathcal{N}_0 y ( u ) , y 0 ( u ) ∈ N 0 for 0 ≤ u ≤ s 0\le u\le s 0 ≤ u ≤ s .
Proof. See Berglund (2001, Theorem 4.1.2).
Lower bound for the Gaussian mixture
Proposition H.1 (Gaussian and uniform benchmarks). For the variance-one Gaussian location family, R G , n ⋆ = n − 1 R^\star_{G,n}=n^{-1} R G , n ⋆ = n − 1 , attained by the sample mean. For the uniform location family, R U , n ⋆ ≍ n − 2 R^\star_{U,n}\asymp n^{-2} R U , n ⋆ ≍ n − 2 , and the sample mid-range has risk
E μ , U [ ( X ( 1 ) + X ( n ) 2 − μ ) 2 ] = 6 ( n + 1 ) ( n + 2 ) . \mathbb{E}_{\mu,U}\left[\left(\frac{X_{(1)}+X_{(n)}}{2}-\mu\right)^2\right]=\frac{6}{(n+1)(n+2)}. E μ , U [ ( 2 X ( 1 ) + X ( n ) − μ ) 2 ] = ( n + 1 ) ( n + 2 ) 6 . The sample mean instead has risk n − 1 n^{-1} n − 1 under either family.
Proof. See [27 Theorem 3.5] or [36 Section 2] .
Gaussian-mixture benchmark
Lemma H.2 (Fisher information and lower bounds for the location). For known σ n ∈ ( 0 , 1 ) \sigma_n\in(0,1) σ n ∈ ( 0 , 1 ) , the observations have density
f μ ( x ) = 1 2 π σ n exp ( − ( x − μ ) 2 + 1 − σ n 2 2 σ n 2 ) cosh ( 1 − σ n 2 ( x − μ ) σ n 2 ) , (39) f_\mu(x)=\frac{1}{\sqrt{2\pi}\sigma_n}\exp\left(-\frac{(x-\mu)^2+1-\sigma_n^2}{2\sigma_n^2}\right)\cosh\left(\frac{\sqrt{1-\sigma_n^2}(x-\mu)}{\sigma_n^2}\right), \tag*{(39)} f μ ( x ) = 2 π σ n 1 exp ( − 2 σ n 2 ( x − μ ) 2 + 1 − σ n 2 ) cosh ( σ n 2 1 − σ n 2 ( x − μ ) ) , (39) a n d t h e F i s h e r i n f o r m a t i o n i n o n e o b s e r v a t i o n i s and the Fisher information in one observation is an d t h e F i s h er in f or ma t i o nin o n eo b ser v a t i o ni s I_{\sigma_n}=\frac{1}{\sigma_n^2}-\frac{1-\sigma_n^2}{\sigma_n^4}\mathbb{E}\left[\left.\operatorname{sech}^2\left(\frac{\sqrt{1-\sigma_n^2}(X-\mu)}{\sigma_n^2}\right)\right|\mu\right].
{#eq:40}
As σ n ↓ 0 \sigma_n\downarrow0 σ n ↓ 0 ,
I σ n = 1 σ n 2 [ 1 − π 2 1 − σ n 2 σ n e − ( 1 − σ n 2 ) / ( 2 σ n 2 ) ( 1 + O ( σ n 2 ) ) ] . (40) I_{\sigma_n}=\frac{1}{\sigma_n^2}\left[1-\sqrt{\frac{\pi}{2}}\frac{\sqrt{1-\sigma_n^2}}{\sigma_n}e^{-(1-\sigma_n^2)/(2\sigma_n^2)}\left(1+O(\sigma_n^2)\right)\right]. \tag*{(40)} I σ n = σ n 2 1 [ 1 − 2 π σ n 1 − σ n 2 e − ( 1 − σ n 2 ) / ( 2 σ n 2 ) ( 1 + O ( σ n 2 ) ) ] . (40) By the Cramér–Rao inequality, every unbiased estimator of μ \mu μ based on n n n i.i.d. observations satisfies
Var μ ( μ ^ ) ≥ 1 n I σ n ∼ σ n 2 n as σ n ↓ 0. (41) \operatorname{Var}_\mu(\widehat{\mu})\ge\frac{1}{nI_{\sigma_n}}\sim\frac{\sigma_n^2}{n}\qquad\text{as }\sigma_n\downarrow0. \tag*{(41)} Var μ ( μ ) ≥ n I σ n 1 ∼ n σ n 2 as σ n ↓ 0. (41) R M , n ⋆ ≥ σ n 2 n . R^\star_{M,n}\ge\frac{\sigma_n^2}{n}. R M , n ⋆ ≥ n σ n 2 .
Proof. Differentiating (39) with respect to μ \mu μ gives
∂ ∂ μ log f μ ( x ) = x − μ − 1 − σ n 2 tanh ( 1 − σ n 2 ( x − μ ) / σ n 2 ) σ n 2 , \frac{\partial}{\partial\mu}\log f_\mu(x)=\frac{x-\mu-\sqrt{1-\sigma_n^2}\tanh\left(\sqrt{1-\sigma_n^2}(x-\mu)/\sigma_n^2\right)}{\sigma_n^2}, ∂ μ ∂ log f μ ( x ) = σ n 2 x − μ − 1 − σ n 2 tanh ( 1 − σ n 2 ( x − μ ) / σ n 2 ) ,
∂ 2 ∂ μ 2 log f μ ( x ) = − 1 σ n 2 + 1 − σ n 2 σ n 4 sech 2 ( 1 − σ n 2 ( x − μ ) σ n 2 ) . \frac{\partial^2}{\partial\mu^2}\log f_\mu(x)=-\frac{1}{\sigma_n^2}+\frac{1-\sigma_n^2}{\sigma_n^4}\operatorname{sech}^2\left(\frac{\sqrt{1-\sigma_n^2}(x-\mu)}{\sigma_n^2}\right). ∂ μ 2 ∂ 2 log f μ ( x ) = − σ n 2 1 + σ n 4 1 − σ n 2 sech 2 ( σ n 2 1 − σ n 2 ( x − μ ) ) .
Thus I σ n = − E [ ∂ 2 ∂ μ 2 log f μ ( X ) ∣ μ ] I_{\sigma_n}=-\mathbb{E}\left[\frac{\partial^2}{\partial\mu^2}\log f_\mu(X)\mid\mu\right] I σ n = − E [ ∂ μ 2 ∂ 2 log f μ ( X ) ∣ μ ] , proving (40).
Substituting u = 1 − σ n 2 ( x − μ ) / σ n 2 u=\sqrt{1-\sigma_n^2}(x-\mu)/\sigma_n^2 u = 1 − σ n 2 ( x − μ ) / σ n 2 gives
E [ sech 2 ( 1 − σ n 2 ( X − μ ) σ n 2 ) ∣ μ ] = σ n 1 − σ n 2 2 π e − ( 1 − σ n 2 ) / ( 2 σ n 2 ) ∫ R e − σ n 2 u 2 / ( 2 ( 1 − σ n 2 ) ) sech u d u = π 2 σ n 1 − σ n 2 e − ( 1 − σ n 2 ) / ( 2 σ n 2 ) ( 1 + O ( σ n 2 ) ) . \begin{aligned}
\mathbb{E}\left[\left.\operatorname{sech}^2\left(\frac{\sqrt{1-\sigma_n^2}(X-\mu)}{\sigma_n^2}\right)\right|\mu\right]=\frac{\sigma_n}{\sqrt{1-\sigma_n^2}\sqrt{2\pi}}e^{-(1-\sigma_n^2)/(2\sigma_n^2)}\int_{\mathbb{R}}e^{-\sigma_n^2u^2/(2(1-\sigma_n^2))}\operatorname{sech}u\,du \\
&=\sqrt{\frac{\pi}{2}}\frac{\sigma_n}{\sqrt{1-\sigma_n^2}}e^{-(1-\sigma_n^2)/(2\sigma_n^2)}\left(1+O(\sigma_n^2)\right).
\end{aligned} E [ sech 2 ( σ n 2 1 − σ n 2 ( X − μ ) ) μ ] = 1 − σ n 2 2 π σ n e − ( 1 − σ n 2 ) / ( 2 σ n 2 ) ∫ R e − σ n 2 u 2 / ( 2 ( 1 − σ n 2 )) sech u d u = 2 π 1 − σ n 2 σ n e − ( 1 − σ n 2 ) / ( 2 σ n 2 ) ( 1 + O ( σ n 2 ) ) .
The last equality follows from ∫ R sech u d u = π \int_{\mathbb{R}}\operatorname{sech}u\,du=\pi ∫ R sech u d u = π , ∫ R u 2 sech u d u < ∞ \int_{\mathbb{R}}u^2\operatorname{sech}u\,du<\infty ∫ R u 2 sech u d u < ∞ , and 0 ≤ 1 − e − t ≤ t 0\leq1-e^{-t}\leq t 0 ≤ 1 − e − t ≤ t for t ≥ 0 t\geq0 t ≥ 0 . Thus, we obtain (40) .
For the last bound, reveal the mixture component labels and subtract the corresponding offsets, leaving n n n independent N ( μ , σ n 2 ) \mathcal{N}(\mu,\sigma_n^2) N ( μ , σ n 2 ) observations conditional on μ \mu μ . Revealing the labels cannot increase the location-minimax risk:
R M , n ∗ ≥ inf μ ~ sup μ ∈ R E X ∼ N ( μ , σ n 2 ) ⊗ n [ ( μ ~ ( X ) − μ ) 2 ] = σ n 2 n . R^*_{M,n}\geq\inf_{\widetilde{\mu}}\sup_{\mu\in\mathbb{R}}\mathbb{E}_{X\sim\mathcal{N}(\mu,\sigma_n^2)^{\otimes n}}\left[(\widetilde{\mu}(X)-\mu)^2\right]=\frac{\sigma_n^2}{n}. R M , n ∗ ≥ μ inf μ ∈ R sup E X ∼ N ( μ , σ n 2 ) ⊗ n [ ( μ ( X ) − μ ) 2 ] = n σ n 2 .
See Proposition H.1.
Additional experiments
Joint-training setup. We provide further training details for Figure 2 and Figure 3 . The joint-training experiments below use the same setup unless stated otherwise. We train the architecture of Definition 2.2 with both softmax MoE and GLU gates, updating θ \theta θ and λ \lambda λ jointly while keeping ω \omega ω fixed. We use m = 8000 m=8000 m = 8000 fixed training tasks with contexts of length n = 150 n=150 n = 150 from Definition 2.1 , with σ μ 2 = 0.5 \sigma_\mu^2=0.5 σ μ 2 = 0.5 , K = 2 K=2 K = 2 , and d = 10 d=10 d = 10 . Each gradient-descent step uses all m m m training tasks, with constant step sizes 20 for θ \theta θ and 100 for λ \lambda λ , for 600,000 steps. We initialize θ k ( 0 ) ∼ N ( 0 , 0.25 2 I d ) \theta_k(0)\sim\mathcal{N}(0,0.25^2I_d) θ k ( 0 ) ∼ N ( 0 , 0.2 5 2 I d ) and sample the fixed gating queries ω r ∼ N ( 0 , 1 ) \omega_r\sim\mathcal{N}(0,1) ω r ∼ N ( 0 , 1 ) independently. We draw the initial expert parameters independently and uniformly from [ 0 , 1.9 ] [0,1.9] [ 0 , 1.9 ] , rejecting draws with separation below 0.6 and ordering them by magnitude. Each joint-training experiment uses ten independent runs and 200 validation tasks per family in each run. In the joint-training plots, experts are relabeled so that expert 1 is assigned to Gaussian contexts at the end of training. Curves show medians, and shaded regions span the minimum and maximum across runs.
Figure 2. Softmax MoE, joint training with the uniform alternative. Left: ( w ˉ 1 G , w ˉ 1 A ) (\bar{w}_{1\mathrm{G}},\bar{w}_{1\mathrm{A}}) ( w ˉ 1 G , w ˉ 1 A ) across runs, colored by iteration. Middle: median ∣ λ 1 ∣ \lvert\lambda_1\rvert ∣ λ 1 ∣ and ∣ λ 2 ∣ \lvert\lambda_2\rvert ∣ λ 2 ∣ , where thin lines are individual runs. Right: median validation error of μ ^ \hat{\mu} μ ^ on Gaussian and uniform contexts, with the sample mean and sample mid-range as references. Shading spans all ten runs.
Figure 3. GLU, joint training with the uniform alternative, with panels and conventions as in Figure 2 .
Joint training, Gaussian-mixture alternative
Figure 4 and Figure 5 repeat Figure 2 and Figure 3 with the Gaussian-mixture alternative and σ n 2 = 0.05 \sigma_n^2=0.05 σ n 2 = 0.05 . The gates move toward w ˉ ≈ I 2 \bar{w}\approx I_2 w ˉ ≈ I 2 and ∣ λ 1 ∣ |\lambda_1| ∣ λ 1 ∣ decreases to zero, as with the uniform alternative. Unlike with the uniform alternative, ∣ λ 2 ∣ |\lambda_2| ∣ λ 2 ∣ settles near 2, above the stopping target log ( 1 / σ n 2 ) / ( 4 1 − σ n 2 ) ≈ 0.77 \log(1/\sigma_n^2)/(4\sqrt{1-\sigma_n^2})\approx0.77 log ( 1/ σ n 2 ) / ( 4 1 − σ n 2 ) ≈ 0.77 of Lemma 3.4 . On Gaussian-mixture contexts, both architectures improve on the sample mean but remain above the component-mean error and the lower bound of Lemma H.2. The component mean assigns observations to components according to their position relative to the sample mean, subtracts the corresponding offset ± 1 − σ n 2 \pm\sqrt{1-\sigma_n^2} ± 1 − σ n 2 , and averages the resulting values.
Figure 4. Softmax MoE, joint training with the Gaussian-mixture alternative, as in Figure 2. The dashed line in the middle panel marks log ( 1 / σ n 2 ) / ( 4 1 − σ n 2 ) \log(1/\sigma_n^2)/(4\sqrt{1-\sigma_n^2}) log ( 1/ σ n 2 ) / ( 4 1 − σ n 2 ) .
Figure 5. GLU, joint training with the Gaussian-mixture alternative, as in Figure 3. The dashed line in the middle panel marks log ( 1 / σ n 2 ) / ( 4 1 − σ n 2 ) \log(1/\sigma_n^2)/(4\sqrt{1-\sigma_n^2}) log ( 1/ σ n 2 ) / ( 4 1 − σ n 2 ) .
Joint training: gating dynamics
Figures 6 and 7 show the GLU gates and normalization error during joint training. After an initial transient, the normalization error falls to about 10 − 2 10^{-2} 1 0 − 2 before substantial family-specific selection develops. The gates then move toward w ˉ ≈ I 2 \bar{w} \approx I_2 w ˉ ≈ I 2 , with less complete selection and greater variation across runs for the uniform alternative.
Figure 6. GLU, joint training with the uniform alternative: population gates w ˉ k j \bar{w}_{kj} w ˉ k j (left) and normalization error ∣ w ˉ 1 j + w ˉ 2 j − 1 ∣ |\bar{w}_{1j}+\bar{w}_{2j}-1| ∣ w ˉ 1 j + w ˉ 2 j − 1∣ (right). Curves show medians, and shading spans all ten runs.
Figure 7. GLU, joint training with the Gaussian-mixture alternative, with panels and conventions as in Figure 6.
Stagewise training
We train the GLU with Definition 2.3, using the uniform alternative with σ μ 2 = 0.05 \sigma_{\mu}^{2}=0.05 σ μ 2 = 0.05 and n = 500 n=500 n = 500 . The values of m m m , K K K , d d d , the initialization, and the numbers of runs and validation tasks are as in the joint-training setup above. In the first stage, we minimize L ^ m \hat{L}_m L ^ m over θ \theta θ using 20,000,000 gradient-descent steps with step size 100. In the second stage, we minimize L ^ m \hat{L}_m L ^ m over λ \lambda λ using 300,000 gradient-descent steps with step size 1000.
First stage: critical manifold. Figure 8 shows ( w ˉ 1 j , w ˉ 2 j ) (\bar{w}_{1j},\bar{w}_{2j}) ( w ˉ 1 j , w ˉ 2 j ) during the first stage for Gaussian (j = G j=\mathrm{G} j = G ) and uniform (j = U j=\mathrm{U} j = U ) contexts. The population gates first approach w ˉ 1 j + w ˉ 2 j ≈ 1 \bar{w}_{1j}+\bar{w}_{2j}\approx1 w ˉ 1 j + w ˉ 2 j ≈ 1 , before substantial specialization toward e 1 e_1 e 1 and e 2 e_2 e 2 for Gaussian and uniform contexts, respectively.
Figure 8. First stage with the uniform alternative: ( w ˉ 1 j , w ˉ 2 j ) (\bar{w}_{1j},\bar{w}_{2j}) ( w ˉ 1 j , w ˉ 2 j ) for Gaussian (left) and uniform (right) contexts across runs, colored by iteration. The dashed line is the critical manifold w ˉ 1 j + w ˉ 2 j = 1 \bar{w}_{1j}+\bar{w}_{2j}=1 w ˉ 1 j + w ˉ 2 j = 1 .
Per-expert accuracy. Figure 9 shows E j [ ( g k − μ ) 2 ] \mathbb{E}_j[(g_k-\mu)^2] E j [( g k − μ ) 2 ] for both experts and E j [ ( μ ^ − μ ) 2 ] \mathbb{E}_j[(\hat{\mu}-\mu)^2] E j [( μ ^ − μ ) 2 ] on validation tasks. In the first stage, λ \lambda λ is fixed, so the expert errors are constant and only the gating changes the error of μ ^ \hat{\mu} μ ^ . On Gaussian contexts, expert 1 and μ ^ \hat{\mu} μ ^ stay near the sample-mean error. On uniform contexts, the errors of expert 2 and μ ^ \hat{\mu} μ ^ decrease further in the second stage toward the sample mid-range error. Although expert 2 becomes worse on Gaussian contexts during this stage, the error of μ ^ \hat{\mu} μ ^ remains approximately unchanged since w ˉ 2 G ≈ 0 \bar{w}_{2\mathrm{G}}\approx0 w ˉ 2 G ≈ 0 after the first stage. The Gaussian-mixture results are in § 18 .§ 4 .
Figure 9. Uniform alternative: validation error of each expert g k g_k g k and of μ ^ \hat{\mu} μ ^ on Gaussian (left) and uniform (right) contexts, with the sample mean and sample mid-range as references. The vertical line marks t θ t_\theta t θ .
Stagewise training, Gaussian-mixture alternative
We use the same Gaussian-mixture alternative as in the joint-training experiments, with the stagewise setup of § 18 .§ 3 . Figure 10 repeats the uniform errors for comparison with Figure 12 . In both cases, training the experts in the second stage reduces the alternative-family error while leaving the Gaussian error approximately unchanged. For the mixture, the error remains above the component-mean error and the lower bound of Lemma H.2. Figure 11 shows the first-stage gates moving toward the appropriate expert for each family, with a residual normalization error as in Figure 8 .
Figure 10. Uniform alternative: validation error of each expert g k g_k g k and of μ ^ \hat{\mu} μ ^ on Gaussian (left) and uniform (right) contexts, repeated for comparison with Figure 12. The vertical line marks t θ t_\theta t θ .
Figure 11. First stage with the Gaussian-mixture alternative: ( w ˉ 1 j , w ˉ 2 j ) (\bar{w}_{1j}, \bar{w}_{2j}) ( w ˉ 1 j , w ˉ 2 j ) for Gaussian (left) and Gaussian-mixture (right) contexts across runs, colored by iteration. The dashed line is the critical manifold w ˉ 1 j + w ˉ 2 j = 1 \bar{w}_{1j} + \bar{w}_{2j} = 1 w ˉ 1 j + w ˉ 2 j = 1 .
Figure 12. Gaussian-mixture alternative: validation error of each expert g k g_k g k and of μ ^ \hat{\mu} μ ^ on Gaussian (left) and Gaussian-mixture (right) contexts. The vertical line marks t θ t_\theta t θ .
Relaxed architecture
We train ten attention parameters, whose attention outputs serve both as gating features and as inputs to the experts. The attention outputs are not centered or normalized. Each expert and each gate logit is a learned linear function of the ten attention outputs. We use the uniform alternative and train with SGD with n = 200 n = 200 n = 200 , m = 8,000 m = 8{,}000 m = 8 , 000 , learning rate 10 10 10 , K = 10 K = 10 K = 10 , and σ μ 2 = 0.1 \sigma_\mu^2 = 0.1 σ μ 2 = 0.1 , and train all parameters jointly for 15,000 epochs. Each experiment uses five independent runs and 2,000 held-out validation tasks. Figure 13 shows end-to-end training of this less constrained architecture. The Gaussian validation error stays near the sample-mean error, while the uniform validation error falls well below it toward the sample mid-range error.
Figure 13. Less constrained architecture, end-to-end training with the uniform alternative. Left: training loss. Middle and right: validation error on Gaussian and uniform contexts, with the sample mean and sample mid-range as references.
Role of LayerNorm
LayerNorm enforces the condition Z G A < min { Z G G , Z A A } Z_{GA} < \min\{Z_{GG}, Z_{AA}\} Z G A < min { Z GG , Z AA } used in Lemma D.8 . In our experiments, convergence is also observed without LayerNorm. Figure 14 illustrates the reduced flow studied in that lemma with and without LayerNorm. For the convergence argument, it would suffice to establish convergence to the optimal assignment from a region containing the reduced initial states at t c r i t t_{\mathrm{crit}} t crit , with a margin for the approximation errors. Since the gates are initialized near 1 / 2 1/2 1/2 , a neighborhood of ( w ˉ 1 G , w ˉ 1 A ) = ( 1 / 2 , 1 / 2 ) (\bar{w}_{1G}, \bar{w}_{1A}) = (1/2, 1/2) ( w ˉ 1 G , w ˉ 1 A ) = ( 1/2 , 1/2 ) containing these states could suffice. The stream plot suggests convergence from such a central region without LayerNorm. Under the strict expert hierarchy and Z G A > Z A A > 0 Z_{GA} > Z_{AA} > 0 Z G A > Z AA > 0 , the reduced flow nevertheless has a region converging to the suboptimal corner ( 0 , 0 ) (0, 0) ( 0 , 0 ) : sufficiently close to this corner, when w ˉ 1 G / w ˉ 1 A \bar{w}_{1G}/\bar{w}_{1A} w ˉ 1 G / w ˉ 1 A is sufficiently small, both coordinates and their ratio decrease, keeping the trajectory in this region and forcing both coordinates to zero. This does not preclude convergence from the central region.
Figure 14. Stream plots of the reduced flow studied in Lemma D.8. Left: population features with LayerNorm. Right: uncentered population features at μ = 0 \mu= 0 μ = 0 without LayerNorm.
Extended related work
In-context learning of statistical procedures. Prior-data fitted networks (PFNs) train transformers on synthetic tasks to approximate Bayesian prediction in context ([31 ] ). Their adaptation to tabular data has produced models that perform strongly on standardized benchmarks, particularly for small and medium datasets ([18 , 19 , 16 , 44 ] ). Related pretrained models estimate heterogeneous treatment effects, survival curves, mutual information, and Poisson means ([3 , 35 , 34 , 41 ] ), and amortized simulation-based inference likewise maps simulated datasets to parameters ([13 ] ). Most of these systems target prediction at a query point. These works demonstrate that pretraining can produce effective predictors and parameter estimators. Our focus is on how gradient-based pretraining learns an estimator with rates that depend on the unknown family.
Statistical theory of pretrained predictors. Constructive and empirical analyses study which algorithms trained transformers implement in context [1 , 12 , 29 ] . Bai et al. [2 ] construct transformers that select among base algorithms, either by testing summary statistics of the context or by validating candidates on a held-out split, with guarantees for the empirical risk minimizer. Kim et al. (2024) show that a deep network followed by linear attention attains minimax rates for nonparametric regression over a known function class, and argue that representations fixed after pretraining limit adaptivity. Wakayama & Suzuki [43 ] and Ma et al. [30 ] analyze pretrained transformers as approximations to Bayesian posterior predictors [see also 32 ] . In particular, Ma et al. [30 ] use posterior contraction to obtain rates that adapt to unknown smoothness and effective dimension. Cannella et al. [10 ] establish near-optimal regret for an idealized pretrained Bayes estimator in Poisson empirical Bayes, with concurrent guarantees for nonparametric Bayes estimators in the Gaussian case [22 ] . These results show that the empirical risk minimizer, or an idealized Bayes predictor, can be adaptive. They do not follow the training trajectory, and they treat the adaptive map as a black box. In our model, adaptation is carried by an identifiable internal parameter, the attention scale of each expert, which moves the estimator across a family of estimators.
Training dynamics of attention. A complementary line analyzes how gradient-based training shapes attention on in-context tasks, including linear attention for linear regression [47 b] , softmax attention [20 ] , mean-field dynamics (Kim & Suzuki, 2024), and learning of low-dimensional structure [33 ] . Closest to our analysis, Chen et al. [11 ] show that gradient flow on multi-head softmax attention allocates each head to one task of a multi-task linear regression, after warm-up and emergence phases. There, the task handled by each head is a fixed coordinate block determined by the task structure and the initialization. Here, the family varies across contexts and must be inferred from each sample, so specialization must be paired with learned routing. They also find that concentrated attention is suboptimal for noisy linear tasks, whereas the irregular uniform family calls for attention concentrated on the extremes. For the GLU, our gating dynamics separate into fast normalization and slow selection, which we analyze with Tikhonov’s theorem [5 ] .
Adaptive estimation. In statistics, an estimator is adaptive over a collection of models if, for each model, it attains the rate achievable when that model is known [28 , 15 , 42 ] . Location estimation provides a classical parametric instance: for symmetric densities with finite Fisher information, the location can be estimated asymptotically as efficiently without knowing the shape as with it [39 , 4 , 40 , 6 , 7 ] . Differences in rate between location families instead arise from irregularity: the uniform family has parameter-dependent support and admits the faster rate n − 2 n^{-2} n − 2 [21 ] . Classical adaptive location estimators estimate the score function and apply a one-step correction, whereas the procedure learned here selects a point in a family of exponentially tilted averages.
Set architectures, gating, and mixtures of experts. Deep Sets [45 ] and Set Transformers [26 ] provide architectures for functions of unordered data, and our model is a small Set Transformer specialized to scalar estimation. Its second layer is either a softmax mixture of experts [23 , 38 ] or a gated linear unit [14 , 37 ] . Comparing the two isolates the effect of enforcing a statistical constraint, namely normalization of the expert weights and hence exact translation equivariance, versus learning it. Bu et al. [9 ] analyze how gradient-based training learns to retrieve task concepts from context. They show that training on question answer data enables this behavior, whereas training on their in-context demonstration distributions can fail. Their results concern factual recall, while we study how learned routing and expert specialization yield family-specific estimation rates.