Introduction
How does SGD navigate symmetry-induced flat directions in neural network loss landscapes? Previous works have proposed a range of perspectives on this inductive bias, from effective regularizers ((Li et al., 2022; Ziyin et al., 2025b)) and equilibrium balance conditions ((Ziyin et al., 2025a,b)), to manifold diffusion ((Pashakhanloo and Koulakov, 2023)) and sparsifying collapse ([3 ] ). However, it remains unclear what determines the direction and endpoint of SGD motion along continuous symmetry orbits. Here, we study a solvable model—undercomplete linear autoencoders—in which we can give a precise answer to this question in the specific case of scale symmetries. We show that in this setting solution geometry selects a preferred direction for drift along scale-symmetry directions, and solve for its slow dynamics.
© 2026 F. Pashakhanloo & J.A. Zavatone-Veth.
Undercomplete solution geometry results in directed scale drift
We consider a tractable toy setting: linear autoencoders
f ( x ) = W U x (1) f(x)=WUx \tag*{(1)} f ( x ) = W U x (1)
with encoder weights U ∈ R k × d U\in\mathbb{R}^{k\times d} U ∈ R k × d and decoder weights W ∈ R d × k W\in\mathbb{R}^{d\times k} W ∈ R d × k . We train these models to minimize an L 2 L^2 L 2 reconstruction loss L = 1 2 E x [ ∥ f ( x ) − x ∥ 2 ] L=\frac{1}{2}\mathbb{E}_x[\lVert f(x)-x\rVert^2] L = 2 1 E x [∥ f ( x ) − x ∥ 2 ] , assuming zero-mean data x ∈ R d x\in\mathbb{R}^d x ∈ R d with covariance Σ = E [ x x T ] \Sigma=\mathbb{E}[xx^\mathsf{T}] Σ = E [ x x T ] . Our focus is on the undercomplete regime k < d k<d k < d , where exact reconstruction is impossible if Σ \Sigma Σ is of full rank.
These networks have a GL ( k ) \operatorname{GL}(k) GL ( k ) symmetry group that preserves the function output: mapping ( W , U ) ↦ ( W A , A − 1 U ) (W,U)\mapsto(WA,A^{-1}U) ( W , U ) ↦ ( W A , A − 1 U ) for A ∈ GL ( k ) A\in\operatorname{GL}(k) A ∈ GL ( k ) leaves f ( x ) f(x) f ( x ) invariant. Under gradient flow, it is well-known that the Noether charge
Q = W T W − U U T ∈ R k × k (2) Q=W^\mathsf{T}W-UU^\mathsf{T}\in\mathbb{R}^{k\times k} \tag*{(2)} Q = W T W − U U T ∈ R k × k (2)
corresponding to this symmetry is conserved, i.e., ∂ t Q = 0 \partial_t Q=0 ∂ t Q = 0 (App. § 9 ; (Tanaka and Kunin, 2021; Kunin et al., 2021)). Q Q Q measures imbalances in the incoming and outgoing weights for each latent neuron. In contrast, under SGD with learning rate η \eta η and loss L ^ t = 1 2 E x ∼ B t [ ∥ f ( x ) − x ∥ 2 ] \hat{L}_t=\frac{1}{2}\mathbb{E}_{x\sim B_t}[\lVert f(x)-x\rVert^2] L ^ t = 2 1 E x ∼ B t [∥ f ( x ) − x ∥ 2 ] for a minibatch B t B_t B t of size B B B and covariance Σ ^ t \hat{\Sigma}_t Σ ^ t , Q Q Q evolves as
Q t + 1 = Q t + η 2 [ ( ∇ W L ^ t ) T ( ∇ W L ^ t ) − ( ∇ U L ^ t ) ( ∇ U L ^ t ) T ] (3) Q_{t+1}=Q_t+\eta^2\left[(\nabla_W\hat{L}_t)^\mathsf{T}(\nabla_W\hat{L}_t)-(\nabla_U\hat{L}_t)(\nabla_U\hat{L}_t)^\mathsf{T}\right] \tag*{(3)} Q t + 1 = Q t + η 2 [ ( ∇ W L ^ t ) T ( ∇ W L ^ t ) − ( ∇ U L ^ t ) ( ∇ U L ^ t ) T ] (3)
Therefore, SGD will generically break the symmetry, as has been noted in general terms in prior works (Tanaka and Kunin, 2021; Kunin et al., 2021; Ziyin et al., 2025a).
We now specialize to undercomplete autoencoders, for which (3) simplifies substantially. Let Σ \Sigma Σ have eigenvalues λ 1 ≥ λ 2 ≥ ⋯ ≥ λ d ≥ 0 \lambda_1 \ge\lambda_2 \ge\cdots\ge\lambda_d \ge0 λ 1 ≥ λ 2 ≥ ⋯ ≥ λ d ≥ 0 with a strict spectral gap λ k > λ k + 1 \lambda_k > \lambda_{k+1} λ k > λ k + 1 separating the k k k -principal subspace from the remaining directions, and let P ∈ R k × d P \in\mathbb{R}^{k \times d} P ∈ R k × d be an orthogonal projection to the principal subspace, with P P T = I k PP^{\mathsf{T}} = I_k P P T = I k . Then, the global loss minima form the manifold ( W , U ) = ( P T A , A − 1 P ) (W,U) = (P^{\mathsf{T}}A,A^{-1}P) ( W , U ) = ( P T A , A − 1 P ) for A ∈ GL ( k ) A \in\operatorname{GL}(k) A ∈ GL ( k ) ; in this sense linear autoencoders learn to implement PCA by projecting their inputs to the principal subspace [2 ] (Kunin et al. 2019; Pashakhanloo 2025).
We next come to the key geometric fact. On the PCA solution manifold, the residual r = ( W U − I d ) x r = (WU-I_d)x r = ( W U − I d ) x for an arbitrary datapoint x x x lies entirely in the complement of the principal subspace, as I d − W U = I d − P P T ≡ P ⊥ I_d-WU = I_d-PP^{\mathsf{T}} \equiv P_{\perp} I d − W U = I d − P P T ≡ P ⊥ projects to the complement. This forces ∇ U L ^ t = 0 \nabla_U \widehat{L}_t = 0 ∇ U L t = 0 to be identically zero, while ∇ W L ^ t = − P ⊥ Σ ^ t P T A t − T \nabla_W \widehat{L}_t = -P_{\perp}\widehat{\Sigma}_tP^{\mathsf{T}}A_t^{-\mathsf{T}} ∇ W L t = − P ⊥ Σ t P T A t − T depends on the product of in- and out-of-subspace fluctuations, and does not vanish (App. § 9 ). Thus,
Q t + 1 − Q t = η 2 ( ∇ W L ^ t ) T ( ∇ W L ^ t ) ⪰ 0 (4) Q_{t+1}-Q_t = \eta^2(\nabla_W \widehat{L}_t)^{\mathsf{T}}(\nabla_W \widehat{L}_t) \succeq0 \tag*{(4)} Q t + 1 − Q t = η 2 ( ∇ W L t ) T ( ∇ W L t ) ⪰ 0 (4)
on the PCA solution manifold; Q Q Q evolves in a preferred direction within the cone of PSD matrices. This is a directional bias towards decoder-heavy weights, as can be seen by considering the scalar charge q = tr ( Q ) = ∥ W ∥ F 2 − ∥ U ∥ F 2 q = \operatorname{tr}(Q) = \lVert W\rVert_F^2-\lVert U\rVert_F^2 q = tr ( Q ) = ∥ W ∥ F 2 − ∥ U ∥ F 2 associated with global rescalings ( W , U ) ↦ ( a W , a − 1 U ) (W,U) \mapsto(aW,a^{-1}U) ( W , U ) ↦ ( aW , a − 1 U ) for a > 0 a > 0 a > 0 (Figure 1 A). No noise-balanced equilibrium, where the two terms in (3) cancel on average (Ziyin et al., 2025a), is possible. In contrast, for an expansive autoencoder perfect reconstruction is possible, meaning that there is not a fundamental geometric reason for directed drift (Figure 1 A). We now analyze the scale dynamics.
Figure 1. (A) Continual minibatch training drives scale imbalance in linear autoencoders. Frobenius norms of decoder and encoder weights, ∥ W ∥ F \lVert W\rVert_F ∥ W ∥ F and ∥ U ∥ F \lVert U\rVert_F ∥ U ∥ F , for contractive and expansive autoencoders, respectively (see App. F and Figure S1 for additional details). (B) Scale growth in a contractive linear autoencoder for different learning rates (η \eta η ) and minibatch size (B B B ). s 1 = ( W T W ) 11 s_1=(W^\mathsf{T}W)_{11} s 1 = ( W T W ) 11 is the dominant scale. Theory predictions are based on Eq. (6) . (C) Anisotropic scale growth in a contractive autoencoder. Different scale modes, s i = ( W T W ) i i s_i=(W^\mathsf{T}W)_{ii} s i = ( W T W ) ii , grow at different rates. Theory predictions are based on Eq. (6) . (D–F) Edge of Stability phenomenon driven by imbalancing dynamics. (D) Scale growth and saturation for different modes. (E) Sequential saturation of eigenvalues. (F) Saturation as a function of the inverse of the learning rate and comparison to theory.
Effective scale dynamics
We can derive a simple set of effective dynamics that allow us to predict the anisotropic growth in decoder scale. Under SGD with minibatch size B B B , changes to the balancing matrix Q Q Q accumulate over T s l o w ∼ B / η 2 T_{\mathrm{slow}} \sim B/\eta^2 T slow ∼ B / η 2 steps, which is slow relative to the T f a s t ∼ 1 / η T_{\mathrm{fast}} \sim1/\eta T fast ∼ 1/ η steps over which fluctuations away from the solution manifold relax back towards it, as T f a s t / T s l o w ∼ η / B ≪ 1 T_{\mathrm{fast}}/T_{\mathrm{slow}} \sim\eta/B \ll1 T fast / T slow ∼ η / B ≪ 1 when η \eta η is small (see App. C for details). By leveraging this separation of timescales, we show in App. C that the dynamics of the matrix S = A T A S = A^{\mathsf{T}}A S = A T A summarizing the scale degrees of freedom are given in the small-learning-rate limit η ↓ 0 \eta\downarrow0 η ↓ 0 by the flow
∂ τ S + S − 1 ∂ τ S S − 1 = S − 1 / 2 C S − 1 / 2 , (5) \partial_{\tau}S + S^{-1}\partial_{\tau}SS^{-1} = S^{-1/2}CS^{-1/2}, \tag*{(5)} ∂ τ S + S − 1 ∂ τ S S − 1 = S − 1/2 C S − 1/2 , (5)
where C = E [ ∥ x ∥ ∥ 2 x ∥ x ∥ T ] C = \mathbb{E}[\lVert x_{\parallel}\rVert^2x_{\parallel}x_{\parallel}^{\mathsf{T}}] C = E [∥ x ∥ ∥ 2 x ∥ x ∥ T ] is defined in terms of x ∥ = P x x_{\parallel} = Px x ∥ = P x and x ⊥ = ( I d − P T P ) x x_{\perp} = (I_d-P^{\mathsf{T}}P)x x ⊥ = ( I d − P T P ) x . If S ( τ = 0 ) S(\tau=0) S ( τ = 0 ) and C C C commute, then this matrix differential equation can be solved analytically. Working in a basis where S = diag ( s 1 , … , s k ) S = \operatorname{diag}(s_1,\ldots,s_k) S = diag ( s 1 , … , s k ) and C = diag ( c 1 , … , c k ) C = \operatorname{diag}(c_1,\ldots,c_k) C = diag ( c 1 , … , c k ) , we have the solution
s a ( τ ) = W [ s a ( 0 ) 2 exp ( s a ( 0 ) 2 + 2 c a τ ) ] , a ∈ [ k ] , (6) s_a(\tau) = \sqrt{W\left[s_a(0)^2\exp\left(s_a(0)^2+2c_a\tau\right)\right]}, \qquad a \in[k], \tag*{(6)} s a ( τ ) = W [ s a ( 0 ) 2 exp ( s a ( 0 ) 2 + 2 c a τ ) ] , a ∈ [ k ] , (6)
where W ( ⋅ ) W(\cdot) W ( ⋅ ) is the principal branch of the Lambert W W W -function (DLMF). Therefore, we expect anisotropic rates of growth along the different scale directions. In the Gaussian case, we have c a = λ a ∑ j = k + 1 d λ j c_a = \lambda_a\sum_{j=k+1}^{d}\lambda_j c a = λ a ∑ j = k + 1 d λ j , i.e., the rate of growth along the a a a -th direction is determined by the population variance along that direction multiplied by the total variance outside of the principal subspace. The fact that scale drift is driven by the coupling between within-subspace and out-of-subspace directions mirrors Pashakhanloo (2025)’s finding that this same coupling governs the rate of drift along symmetry directions corresponding to rotations rather than re-scalings. This effective model produces excellent agreement with simulations at small but finite stepsize (Figure 1 C).
Sharpness and the edge of stability
Naïvely, these effective dynamics suggest that the scales should grow indefinitely. However, this cannot be the case: indefinite scale growth would destabilize the underlying discrete SGD dynamics. In particular, the assumption that the dynamics relax stably back to the PCA manifold will fail if the eigenvalues μ \mu μ of the population Hessian become too large—that is, if η μ \eta\mu η μ exceeds some threshold κ > 0 \kappa> 0 κ > 0 , which for full-batch GD would be exactly equal to 2 (Cohen et al., [4 ] ). For S = diag ( s 1 , … , s k ) S = \operatorname{diag}(s_1,\ldots,s_k) S = diag ( s 1 , … , s k ) with ordered entries s 1 > s 2 > ⋯ > s k s_1 > s_2 > \cdots> s_k s 1 > s 2 > ⋯ > s k , we show in Appendix C that the Hessian of the population loss has dangerous modes μ 11 ∥ > μ 12 ∥ > ⋯ > μ 1 k ∥ \mu^{\parallel}_{11} > \mu^{\parallel}_{12} > \cdots> \mu^{\parallel}_{1k} μ 11 ∥ > μ 12 ∥ > ⋯ > μ 1 k ∥ given by μ 1 a ∥ = λ 1 ( s 1 − 1 + s a ) \mu^{\parallel}_{1a} = \lambda_1(s_1^{-1} + s_a) μ 1 a ∥ = λ 1 ( s 1 − 1 + s a ) for a ∈ [ k ] a \in[k] a ∈ [ k ] . Therefore, as the scales increase anisotropically, the curvature along each of these modes will increase until it hits the threshold η μ 1 a ∥ = κ \eta\mu^{\parallel}_{1a} = \kappa η μ 1 a ∥ = κ at which the underlying discrete dynamics become unstable. Thus, we predict that all scales will eventually saturate at a common value given by s a = κ η λ 1 + O ( η ) s_a = \frac{\kappa}{\eta\lambda_1} + O(\eta) s a = η λ 1 κ + O ( η ) . We show that this prediction is consistent with simulations, with κ ≃ 2 \kappa\simeq2 κ ≃ 2 , in Figure 1 D-F.
Consistent with the parameterization-dependence of the Euclidean Hessian (Dinh et al., [7 ] ), not all notions of sharpness increase with scale. Most simply, considering global re-scalings with S = s I k S = sI_k S = s I k , the Hessian on the PCA manifold has trace tr ( H ) = d s ∑ j = 1 k λ j + k s ∑ j = 1 d λ j \operatorname{tr}(H) = \frac{d}{s}\sum_{j=1}^{k}\lambda_j + ks\sum_{j=1}^{d}\lambda_j tr ( H ) = s d ∑ j = 1 k λ j + k s ∑ j = 1 d λ j , which is minimized at s ⋆ 2 = ( 1 k ∑ j = 1 k λ j ) / ( 1 d ∑ j = 1 d λ j ) ≥ 1 s_\star^2 = \left(\frac{1}{k}\sum_{j=1}^{k}\lambda_j\right)\big/\left(\frac{1}{d}\sum_{j=1}^{d}\lambda_j\right) \ge1 s ⋆ 2 = ( k 1 ∑ j = 1 k λ j ) / ( d 1 ∑ j = 1 d λ j ) ≥ 1 (Appendix B). More strikingly, Andreyev and Beneventano [1 ] proposed a measure of “batch sharpness” that they suggest increases up to a threshold over SGD training; we show in Appendix D that this measure is decreasing in global scale on the PCA manifold. Moreover, we can prove that, for Gaussian data and a balanced initialization, their simplified “modified batch sharpness” measure is strictly decreasing under the effective dynamics, even as the population Hessian sharpens.
Generalization to homogeneous nonlinear autoencoders
Introducing nonlinear activation functions breaks the GL ( k ) \operatorname{GL}(k) GL ( k ) symmetry of linear autoencoders. For homogeneous activation functions like ReLU, a neuron-wise scaling symmetry remains, with A A A now being a diagonal matrix with positive diagonal entries rather than a general element of GL ( k ) \operatorname{GL}(k) GL ( k ) (Appendix § 13 ). Our preliminary results suggest that undercomplete ReLU autoencoders show a similar directed drift towards decoder-heavy weights (Figure S2 ). We leave an in-depth investigation of the geometric basis for this bias to future work.
Figure S2. Continual minibatch training drives scale imbalance in homogeneous autoencoders. (A) Validation loss for contractive and expansive ReLU autoencoders during online training with random initialization at the onset. (B) Scale imbalance is measured by q q q as defined in Eq. (E.3). In this case we have a decoder weight matrix W W W and an encoder weight matrix U U U , so q = ∥ W ∥ F 2 − ∥ U ∥ F 2 q = \lVert W\rVert_{F}^{2} - \lVert U\rVert_{F}^{2} q = ∥ W ∥ F 2 − ∥ U ∥ F 2 . (C,D) Frobenius norms of decoder and encoder weights, ∥ W ∥ F \lVert W\rVert_{F} ∥ W ∥ F and ∥ U ∥ F \lVert U\rVert_{F} ∥ U ∥ F , for expansive and contractive ReLU autoencoders, respectively (see §F for experimental details).
Discussion
We have shown that undercomplete linear autoencoders trained with SGD display directed scale drift towards decoder-heavy weights. The endpoint of this drift is selected not by an equilibrium statistical mechanism like balancing of gradient noise (Ziyin et al., 2025a), but instead dynamically by the fact that scale drift increases curvature up to the point where the solution would become unstable.
From a broader optimization perspective, this resembles the general phenomenon of progressive sharpening in full-batch gradient descent, which posits that the top eigenvalues of the Hessian increase sequentially over training up to the stability threshold, after which they remain near the edge of stability [4 , 5 , 6 ] . How to precisely define the edge of stability in the stochastic setting remains an active area of research [1 , 10 ] . What is notable in our setting is the fact that the edge of stability is reached purely through a slow effective drift along a manifold of functionally-equivalent solutions, after the PCA solution manifold is reached. Therefore, progressive sharpening need not reflect continued learning of the function. Whether and how this phenomenology transfers to other optimization settings is an interesting direction for future work.
Acknowledgments
F.P. was supported by the Harvard Center for Brain Science (CBS)-NTT Fellowship Program on the Physics of Intelligence. J.A.Z.-V. and this research were supported by the Office of the Director of the NIH under Award Number DP5OD037354, and additionally by a Junior Fellowship from the Harvard Society of Fellows.
Declaration of LLM Usage
The development of this research did not involve LLMs in its core aspects. However, we used LLMs (OpenAI’s Codex) to generate codes for the simulations results presented here. We subsequently checked the generated code and plots.
Linear autoencoder basics
Here, we give a detailed discussion of the basic setup for linear autoencoders. Recall that the basic model architecture is
f ( x ) = W U x , (7) f(x) = W U x, \tag*{(7)} f ( x ) = W U x , (7)
where U ∈ R k × d U \in\mathbb{R}^{k \times d} U ∈ R k × d and W ∈ R d × k W \in\mathbb{R}^{d \times k} W ∈ R d × k . From the definition of the model, we can see that there is a G L ( k ) \mathrm{GL}(k) GL ( k ) symmetry: the function output is invariant under transformations of the weights of the form
( W , U ) ↦ ( W A , A − 1 U ) , A ∈ G L ( k ) . (8) (W, U) \mapsto(W A, A^{-1} U), \quad A \in\mathrm{GL}(k). \tag*{(8)} ( W , U ) ↦ ( W A , A − 1 U ) , A ∈ GL ( k ) . (8)
Associated with this symmetry is the Noether charge (Kunin et al., 2021; Tanaka and Kunin, 2021)
Q = W T W − U U T . (9) Q = W^{\mathsf{T}} W - U U^{\mathsf{T}}. \tag*{(9)} Q = W T W − U U T . (9)
Population loss and gradient flow
For a set of data with population covariance E [ x x T ] = Σ \mathbb{E}[x x^{\mathsf{T}}] = \Sigma E [ x x T ] = Σ , the population reconstruction loss is
L = 1 2 E x [ ∥ f ( x ) − x ∥ 2 ] = 1 2 E x tr [ ( W U − I d ) x x T ( W U − I d ) T ] (10) L = \frac{1}{2}\mathbb{E}_{x}[\lVert f(x) - x \rVert^{2}] = \frac{1}{2}\mathbb{E}_{x}\operatorname{tr}[(W U - I_d)x x^{\mathsf{T}}(W U - I_d)^{\mathsf{T}}] \tag*{(10)} L = 2 1 E x [∥ f ( x ) − x ∥ 2 ] = 2 1 E x tr [( W U − I d ) x x T ( W U − I d ) T ] (10)
= 1 2 tr [ ( W U − I d ) Σ ( W U − I d ) T ] . (11) = \frac{1}{2}\operatorname{tr}[(W U - I_d)\Sigma(W U - I_d)^{\mathsf{T}}]. \tag*{(11)} = 2 1 tr [( W U − I d ) Σ ( W U − I d ) T ] . (11)
Under population gradient flow, the parameters then evolve as
∂ t W = − ∇ W L = − ( W U − I d ) Σ U T (12) \partial_t W = -\nabla_W L = -(W U - I_d)\Sigma U^{\mathsf{T}} \tag*{(12)} ∂ t W = − ∇ W L = − ( W U − I d ) Σ U T (12)
∂ t U = − ∇ U L = − W T ( W U − I d ) Σ . (13) \partial_t U = -\nabla_U L = -W^{\mathsf{T}}(W U - I_d)\Sigma. \tag*{(13)} ∂ t U = − ∇ U L = − W T ( W U − I d ) Σ. (13)
The charge Q = W T W − U U T Q = W^{\mathsf{T}}W - UU^{\mathsf{T}} Q = W T W − U U T is conserved under these dynamics:
∂ t Q = ( ∂ t W ) T W + W T ∂ t W − ( ∂ t U ) U T − U ( ∂ t U ) T = 0 , (14) \partial_t Q = (\partial_t W)^{\mathsf{T}}W + W^{\mathsf{T}}\partial_t W - (\partial_t U)U^{\mathsf{T}} - U(\partial_t U)^{\mathsf{T}} = 0, \tag*{(14)} ∂ t Q = ( ∂ t W ) T W + W T ∂ t W − ( ∂ t U ) U T − U ( ∂ t U ) T = 0 , (14)
as we can see that W T ∂ t W = ( ∂ t U ) U T W^{\mathsf{T}}\partial_t W = (\partial_t U)U^{\mathsf{T}} W T ∂ t W = ( ∂ t U ) U T .
Minibatch stochastic gradient descent
Now consider stochastic gradient descent with minibatch size B B B . Let the matrix of data in the minibatch at time t t t be X t ∈ R d × B X_t \in\mathbb{R}^{d \times B} X t ∈ R d × B , and
Σ ^ t = 1 B X t X t T (15) \hat{\Sigma}_t = \frac{1}{B}X_tX_t^{\mathsf{T}} \tag*{(15)} Σ ^ t = B 1 X t X t T (15)
be the empirical covariance of the minibatch. Then, the minibatch loss is
L ^ t = 1 2 tr [ ( W U − I d ) Σ ^ t ( W U − I d ) T ] , (16) \hat{L}_t = \frac{1}{2}\operatorname{tr}[(W U - I_d)\hat{\Sigma}_t(W U - I_d)^{\mathsf{T}}], \tag*{(16)} L ^ t = 2 1 tr [( W U − I d ) Σ ^ t ( W U − I d ) T ] , (16)
so the minibatch gradients are
∇ W L ^ t = ( W t U t − I d ) Σ ^ t U t T (17) \nabla_W \hat{L}_t = (W_t U_t - I_d)\hat{\Sigma}_t U_t^{\mathsf{T}} \tag*{(17)} ∇ W L ^ t = ( W t U t − I d ) Σ ^ t U t T (17)
∇ U L ^ t = W t T ( W t U t − I d ) Σ ^ t . (18) \nabla_U \hat{L}_t = W_t^{\mathsf{T}}(W_t U_t - I_d)\hat{\Sigma}_t. \tag*{(18)} ∇ U L ^ t = W t T ( W t U t − I d ) Σ ^ t . (18)
and the update to the parameters is
W t + 1 = W t − η ∇ W L ^ t = W t − η ( W t U t − I d ) Σ ^ t U t T (19) W_{t+1} = W_t - \eta\nabla_W \hat{L}_t = W_t - \eta(W_t U_t - I_d)\hat{\Sigma}_t U_t^{\mathsf{T}} \tag*{(19)} W t + 1 = W t − η ∇ W L ^ t = W t − η ( W t U t − I d ) Σ ^ t U t T (19)
U t + 1 = U t − η ∇ U L ^ t = U t − η W t T ( W t U t − I d ) Σ ^ t . (20) U_{t+1} = U_t - \eta\nabla_U \hat{L}_t = U_t - \eta W_t^{\mathsf{T}}(W_t U_t - I_d)\hat{\Sigma}_t. \tag*{(20)} U t + 1 = U t − η ∇ U L ^ t = U t − η W t T ( W t U t − I d ) Σ ^ t . (20)
Using the fact that W t T ∇ W L ^ t = ( ∇ U L ^ t ) U T W_t^{\mathsf{T}}\nabla_{W}\widehat{L}_t=(\nabla_{U}\widehat{L}_t)U^{\mathsf{T}} W t T ∇ W L t = ( ∇ U L t ) U T , we find that the corresponding update to the balancing matrix Q t = W t T W t − U t U t T Q_t=W_t^{\mathsf{T}}W_t-U_tU_t^{\mathsf{T}} Q t = W t T W t − U t U t T is
Q t + 1 − Q t = η 2 ( ( ∇ W L ^ t ) T ( ∇ W L ^ t ) − ( ∇ U L ^ t ) ( ∇ U L ^ t ) T ) . (21) Q_{t+1}-Q_t=\eta^2\left((\nabla_W\widehat{L}_t)^{\mathsf{T}}(\nabla_W\widehat{L}_t)-(\nabla_U\widehat{L}_t)(\nabla_U\widehat{L}_t)^{\mathsf{T}}\right). \tag*{(21)} Q t + 1 − Q t = η 2 ( ( ∇ W L t ) T ( ∇ W L t ) − ( ∇ U L t ) ( ∇ U L t ) T ) . (21)
Substituting in the definition of ∇ W L ^ t \nabla_W\widehat{L}_t ∇ W L t and ∇ U L ^ t \nabla_U\widehat{L}_t ∇ U L t in terms of Σ ^ t \widehat{\Sigma}_t Σ t , and defining the residual
R t = ( W t U t − I d ) X t , (22) R_t=(W_tU_t-I_d)X_t, \tag*{(22)} R t = ( W t U t − I d ) X t , (22)
we can re-write this as
Q t + 1 = Q t + η 2 B 2 ( U t X t R t T R t X t T U t T − W t T R t X t X t T R t T W t ) . (23) Q_{t+1}=Q_t+\frac{\eta^2}{B^2}\left(U_tX_tR_t^{\mathsf{T}}R_tX_t^{\mathsf{T}}U_t^{\mathsf{T}}-W_t^{\mathsf{T}}R_tX_tX_t^{\mathsf{T}}R_t^{\mathsf{T}}W_t\right). \tag*{(23)} Q t + 1 = Q t + B 2 η 2 ( U t X t R t T R t X t T U t T − W t T R t X t X t T R t T W t ) . (23)
PCA solutions
Our interest is in PCA-type solutions ([2 ] (Kunin et al. 2019; Pashakhanloo 2025))
( W , U ) = ( P T A , A − 1 P ) , (24) (W,U)=(P^{\mathsf{T}}A,A^{-1}P), \tag*{(24)} ( W , U ) = ( P T A , A − 1 P ) , (24)
where P ∈ R k × d P\in\mathbb{R}^{k\times d} P ∈ R k × d is an orthogonal projection P P T = I k PP^{\mathsf{T}}=I_k P P T = I k and A ∈ GL ( k ) A\in\operatorname{GL}(k) A ∈ GL ( k ) includes the symmetry degrees of freedom. For such a solution,
I d − W U = I d − P T P = P ⊥ (25) I_d-WU=I_d-P^{\mathsf{T}}P=P_{\perp} \tag*{(25)} I d − W U = I d − P T P = P ⊥ (25)
is a projection onto the orthogonal complement of the span of P T P^{\mathsf{T}} P T . As a result,
W T ( W U − I d ) = A T P ( P T P − I d ) = A T ( P − P ) = 0 (26) W^{\mathsf{T}}(WU-I_d)=A^{\mathsf{T}}P(P^{\mathsf{T}}P-I_d)=A^{\mathsf{T}}(P-P)=0 \tag*{(26)} W T ( W U − I d ) = A T P ( P T P − I d ) = A T ( P − P ) = 0 (26)
as P P T = I k PP^{\mathsf{T}}=I_k P P T = I k , meaning that
∇ U L ^ t = 0 (27) \nabla_U\widehat{L}_t=0 \tag*{(27)} ∇ U L t = 0 (27)
on the PCA solution manifold. Importantly, this is a statement that the gradient is identically zero on the solution manifold. In contrast,
∇ W L ^ t = ( W t U t − I d ) Σ ^ t U t T = ( P T P − I d ) Σ ^ t P T A t − T (28) \nabla_W\widehat{L}_t=(W_tU_t-I_d)\widehat{\Sigma}_tU_t^{\mathsf{T}}=(P^{\mathsf{T}}P-I_d)\widehat{\Sigma}_tP^{\mathsf{T}}A_t^{-\mathsf{T}} \tag*{(28)} ∇ W L t = ( W t U t − I d ) Σ t U t T = ( P T P − I d ) Σ t P T A t − T (28)
is not identically zero. Indeed, if we introduce the decomposition
X t = P T X t , ∥ + X t , ⊥ (29) X_t=P^{\mathsf{T}}X_{t,\parallel}+X_{t,\perp} \tag*{(29)} X t = P T X t , ∥ + X t , ⊥ (29)
such that
P X t = X t , ∥ and P ⊥ X t = X t , ⊥ , (30) PX_t=X_{t,\parallel}\quad\text{and}\quad P_{\perp}X_t=X_{t,\perp}, \tag*{(30)} P X t = X t , ∥ and P ⊥ X t = X t , ⊥ , (30)
we find that
∇ W L ^ t = − 1 B X t , ⊥ X t , ∥ T A t − T . (31) \nabla_W\widehat{L}_t=-\frac{1}{B}X_{t,\perp}X_{t,\parallel}^{\mathsf{T}}A_t^{-\mathsf{T}}. \tag*{(31)} ∇ W L t = − B 1 X t , ⊥ X t , ∥ T A t − T . (31)
Together, this leads to
Q t + 1 − Q t = η 2 ( ∇ W L ^ t ) T ( ∇ W L ^ t ) = η 2 B 2 A t − 1 X t , ∥ X t , ⊥ T X t , ⊥ X t , ∥ T A t − T ⪰ 0 (32) Q_{t+1}-Q_t=\eta^2(\nabla_W\widehat{L}_t)^{\mathsf{T}}(\nabla_W\widehat{L}_t)=\frac{\eta^2}{B^2}A_t^{-1}X_{t,\parallel}X_{t,\perp}^{\mathsf{T}}X_{t,\perp}X_{t,\parallel}^{\mathsf{T}}A_t^{-\mathsf{T}}\succeq0 \tag*{(32)} Q t + 1 − Q t = η 2 ( ∇ W L t ) T ( ∇ W L t ) = B 2 η 2 A t − 1 X t , ∥ X t , ⊥ T X t , ⊥ X t , ∥ T A t − T ⪰ 0 (32)
on the PCA solution manifold.
Spectrum of the linear autoencoder Hessian
We now derive the Hessian of the linear autoencoder reconstruction loss. This computation largely parallels previous Hessian computations by Baldi and Hornik [2 ] ; Pashakhanloo and Koulakov (2023); Pashakhanloo (2025).
Our general assumption on the data is that
E [ x ] = 0 and E [ x x T ] = Σ , (33) \mathbb{E}[x]=0\quad\text{and}\quad\mathbb{E}[xx^{\mathsf{T}}]=\Sigma, \tag*{(33)} E [ x ] = 0 and E [ x x T ] = Σ , (33)
where Σ \Sigma Σ has an orthogonal eigendecomposition
Σ = ∑ i = 1 d λ i v i v i T , (34) \Sigma= \sum_{i=1}^{d} \lambda_i v_i v_i^{\mathsf{T}}, \tag*{(34)} Σ = i = 1 ∑ d λ i v i v i T , (34)
with λ 1 ≥ λ 2 ≥ ⋯ ≥ λ d ≥ 0 \lambda_1 \ge\lambda_2 \ge\cdots\ge\lambda_d \ge0 λ 1 ≥ λ 2 ≥ ⋯ ≥ λ d ≥ 0 and v i T v j = δ i j v_i^{\mathsf{T}}v_j = \delta_{ij} v i T v j = δ ij . Without loss of generality, we may assume that the eigenvectors v i v_i v i are the standard Euclidean basis vectors; we will impose this assumption when convenient. We will also often assume that the eigenvalues satisfy spectral gap conditions of the form λ k > λ k + 1 \lambda_k > \lambda_{k+1} λ k > λ k + 1 for some fixed k k k ; this is required for the k k k -principal subspace to be well-defined.
Warm-up: Computing the top PC
As a warm-up, consider the case k = 1 k = 1 k = 1 , in which we want to compute the top principal component. Then, the loss is
L = 1 2 E x ∥ w w T x − x ∥ 2 = 1 2 tr [ ( w w T − I d ) Σ ( w w T − I d ) ] (35) L = \frac{1}{2}\mathbb{E}_x\lVert w w^{\mathsf{T}}x - x\rVert^2 = \frac{1}{2}\operatorname{tr}[(w w^{\mathsf{T}} - I_d)\Sigma(w w^{\mathsf{T}} - I_d)] \tag*{(35)} L = 2 1 E x ∥ w w T x − x ∥ 2 = 2 1 tr [( w w T − I d ) Σ ( w w T − I d )] (35)
= 1 2 ∥ w ∥ 2 ( u T Σ u ) − u T Σ u + 1 2 tr ( Σ ) , (36) = \frac{1}{2}\lVert w\rVert^2(u^{\mathsf{T}}\Sigma u) - u^{\mathsf{T}}\Sigma u + \frac{1}{2}\operatorname{tr}(\Sigma), \tag*{(36)} = 2 1 ∥ w ∥ 2 ( u T Σ u ) − u T Σ u + 2 1 tr ( Σ ) , (36)
from which we can easily see the Hessian is
H = ( ( u T Σ u ) I d 2 u w T Σ − Σ 2 Σ u w T − Σ ∥ w ∥ 2 Σ ) . (37) H =
\begin{pmatrix}
(u^{\mathsf{T}}\Sigma u)I_d & 2uw^{\mathsf{T}}\Sigma- \Sigma\\
2\Sigma uw^{\mathsf{T}} - \Sigma& \lVert w\rVert^2\Sigma
\end{pmatrix}. \tag*{(37)} H = ( ( u T Σ u ) I d 2Σ u w T − Σ 2 u w T Σ − Σ ∥ w ∥ 2 Σ ) . (37)
Consider a general PCA-type solution for some fixed i ∈ [ d ] i \in[d] i ∈ [ d ] and a scale factor s > 0 s > 0 s > 0 :
w = s 1 / 2 v i , u = s − 1 / 2 v i , (38) w = s^{1/2}v_i,\qquad u = s^{-1/2}v_i, \tag*{(38)} w = s 1/2 v i , u = s − 1/2 v i , (38)
which projects the data onto the i i i -th principal direction. Then, the Hessian becomes
H = ( λ i s − 1 I d λ i v i v i T − ∑ j ≠ i λ j v j v j T λ i v i v i T − ∑ j ≠ i λ j v j v j T s ∑ j λ j v j v j T ) . (39) H =
\begin{pmatrix}
\lambda_i s^{-1}I_d & \lambda_i v_i v_i^{\mathsf{T}} - \sum_{j\ne i}\lambda_j v_j v_j^{\mathsf{T}} \\
\lambda_i v_i v_i^{\mathsf{T}} - \sum_{j\ne i}\lambda_j v_j v_j^{\mathsf{T}} & s\sum_j\lambda_j v_j v_j^{\mathsf{T}}
\end{pmatrix}. \tag*{(39)} H = ( λ i s − 1 I d λ i v i v i T − ∑ j = i λ j v j v j T λ i v i v i T − ∑ j = i λ j v j v j T s ∑ j λ j v j v j T ) . (39)
As a result, if we expand a general perturbation as
\begin{pmatrix}
\delta w\\
\delta u
\end{pmatrix}
=
\begin{pmatrix}
\sum_{j=1}^{d}\alpha_j v_j\\
\sum_{j=1}^{d}\beta_j v_j
\end{pmatrix}, \tag*{(40)}\end{pmatrix}
we have the expansion
\begin{pmatrix}
\delta w\\
\delta u
\end{pmatrix}^{\mathsf{T}}
H
\begin{pmatrix}
\delta w\\
\delta u
\end{pmatrix}
=
\sum_{j=1}^{d}
\begin{pmatrix}
\alpha_j\\
\beta_j
\end{pmatrix}^{\mathsf{T}}
H_j
\begin{pmatrix}
\alpha_j\\
\beta_j
\end{pmatrix}, \tag*{(41)}\end{pmatrix}
where
H i = λ i ( s − 1 1 1 s ) (42) H_i = \lambda_i
\begin{pmatrix}
s^{-1} & 1\\
1 & s
\end{pmatrix} \tag*{(42)} H i = λ i ( s − 1 1 1 s ) (42)
and, for j ≠ i j \ne i j = i ,
H j = ( λ i s − 1 − λ j − λ j − λ j s λ j ) . (43) H_j =
\begin{pmatrix}
\lambda_i s^{-1} - \lambda_j & -\lambda_j\\
-\lambda_j & s\lambda_j
\end{pmatrix}. \tag*{(43)} H j = ( λ i s − 1 − λ j − λ j − λ j s λ j ) . (43)
This means that we may equivalently write
\begin{pmatrix}
H_1 & & \\
& H_2 & \\
& & \ddots
\end{pmatrix}
\begin{pmatrix}
\alpha_1\\
\beta_1\\
\alpha_2\\
\beta_2\\
\vdots
\end{pmatrix}. \tag*{(44)}\end{pmatrix}
in these coordinates. This means that we can diagonalize the full Hessian by diagonalizing the 2 × 2 2 \times2 2 × 2 blocks.
The block H i H_i H i , which corresponds to fluctuations in the principal subspace, has eigenvalue μ i , − = 0 \mu_{i,-}=0 μ i , − = 0 , corresponding to the scale symmetry and the eigenvector
1 s + s − 1 ( s 1 / 2 − s − 1 / 2 ) (45) \frac{1}{\sqrt{s+s^{-1}}}\begin{pmatrix} s^{1/2} \\ -s^{-1/2} \end{pmatrix} \tag*{(45)} s + s − 1 1 ( s 1/2 − s − 1/2 ) (45)
and
μ i , + = λ i ( s + s − 1 ) , (46) \mu_{i,+}=\lambda_i(s+s^{-1}), \tag*{(46)} μ i , + = λ i ( s + s − 1 ) , (46)
corresponding to the eigenvector
1 s + s − 1 ( s 1 / 2 s − 1 / 2 ) . (47) \frac{1}{\sqrt{s+s^{-1}}}\begin{pmatrix} s^{1/2} \\ s^{-1/2} \end{pmatrix}. \tag*{(47)} s + s − 1 1 ( s 1/2 s − 1/2 ) . (47)
For j ≠ i j \ne i j = i , we have that
det H j = λ j ( λ i − λ j ) , (48) \det H_j=\lambda_j(\lambda_i-\lambda_j), \tag*{(48)} det H j = λ j ( λ i − λ j ) , (48)
and eigenvalues
μ j , ± = λ i s − 1 + λ j s ± ( λ i s − 1 + λ j s ) 2 − 4 λ j ( λ i − λ j ) 2 (49) \mu_{j,\pm}=\frac{\lambda_i s^{-1}+\lambda_j s\pm\sqrt{(\lambda_i s^{-1}+\lambda_j s)^2-4\lambda_j(\lambda_i-\lambda_j)}}{2} \tag*{(49)} μ j , ± = 2 λ i s − 1 + λ j s ± ( λ i s − 1 + λ j s ) 2 − 4 λ j ( λ i − λ j ) (49)
corresponding to eigenvectors
1 λ j 2 + ( μ j , ± − λ i s − 1 ) 2 ( − λ j μ j , ± − λ i s − 1 ) . (50) \frac{1}{\sqrt{\lambda_j^2+(\mu_{j,\pm}-\lambda_i s^{-1})^2}}
\begin{pmatrix}
-\lambda_j \\
\mu_{j,\pm}-\lambda_i s^{-1}
\end{pmatrix}. \tag*{(50)} λ j 2 + ( μ j , ± − λ i s − 1 ) 2 1 ( − λ j μ j , ± − λ i s − 1 ) . (50)
This allows us to see several things. First, the Hessian is positive-semidefinite only if λ i ≥ λ j \lambda_i \ge\lambda_j λ i ≥ λ j for all j ≠ i j \ne i j = i , and positive-definite on the orthogonal complement of the direction corresponding to the scaling symmetry only if λ i > λ j > 0 \lambda_i > \lambda_j > 0 λ i > λ j > 0 . This is what we expect from the PCA solution.
We now consider the effect of rescaling. First, it is clear that μ i , + = λ i ( s + s − 1 ) \mu_{i,+}=\lambda_i(s+s^{-1}) μ i , + = λ i ( s + s − 1 ) is always increased by breaking the scale balance, but it behaves identically irrespective of whether the solution is decoder-heavy or encoder-heavy.
Now, for j ≠ i j \ne i j = i , we have
μ j , ± = λ i 2 [ s − 1 + λ ~ j s ± ( s − 1 + λ ~ j s ) 2 − 4 λ ~ j ( 1 − λ ~ j ) ] (51) \mu_{j,\pm}=\frac{\lambda_i}{2}\left[s^{-1}+\widetilde{\lambda}_j s\pm\sqrt{\left(s^{-1}+\widetilde{\lambda}_j s\right)^2-4\widetilde{\lambda}_j(1-\widetilde{\lambda}_j)}\right] \tag*{(51)} μ j , ± = 2 λ i [ s − 1 + λ j s ± ( s − 1 + λ j s ) 2 − 4 λ j ( 1 − λ j ) ] (51)
after factoring out λ i > 0 \lambda_i>0 λ i > 0 and defining
λ ~ j = λ j λ i . (52) \widetilde{\lambda}_j=\frac{\lambda_j}{\lambda_i}. \tag*{(52)} λ j = λ i λ j . (52)
Assuming λ ~ j > 0 \widetilde{\lambda}_j>0 λ j > 0 , the function
t ( s ) = 1 λ i tr ( H j ) = s − 1 + λ ~ j s (53) t(s)=\frac{1}{\lambda_i}\operatorname{tr}(H_j)=s^{-1}+\widetilde{\lambda}_j s \tag*{(53)} t ( s ) = λ i 1 tr ( H j ) = s − 1 + λ j s (53)
has a unique minimum over s > 0 s>0 s > 0 at
s ⋆ = λ ~ j − 1 / 2 , (54) s_\star=\widetilde{\lambda}_j^{-1/2}, \tag*{(54)} s ⋆ = λ j − 1/2 , (54)
where it takes the value t ( s ⋆ ) = 2 λ ~ j 1 / 2 t(s_\star)=2\widetilde{\lambda}_j^{1/2} t ( s ⋆ ) = 2 λ j 1/2 . From this, we find that μ j , + \mu_{j,+} μ j , + decreases in s s s on ( 0 , λ ~ j − 1 / 2 ) (0,\widetilde{\lambda}_j^{-1/2}) ( 0 , λ j − 1/2 ) , has a global minimum at s ⋆ = λ ~ j − 1 / 2 s_\star=\widetilde{\lambda}_j^{-1/2} s ⋆ = λ j − 1/2 where it takes value
μ j , + ∣ s ⋆ = λ ~ j − 1 / 2 = λ i ( λ ~ j 1 / 2 + λ ~ j ) . (55) \left.\mu_{j,+}\right|_{s_\star=\widetilde{\lambda}_j^{-1/2}}=\lambda_i(\widetilde{\lambda}_j^{1/2}+\widetilde{\lambda}_j). \tag*{(55)} μ j , + ∣ s ⋆ = λ j − 1/2 = λ i ( λ j 1/2 + λ j ) . (55)
and increases on ( λ ~ j − 1 / 2 , ∞ ) (\tilde{\lambda}_j^{-1/2},\infty) ( λ ~ j − 1/2 , ∞ ) . Analogously, μ j , − \mu_{j,-} μ j , − increases on ( 0 , λ ~ j − 1 / 2 ) (0,\tilde{\lambda}_j^{-1/2}) ( 0 , λ ~ j − 1/2 ) , has a global maximum at s ⋆ = λ ~ j − 1 / 2 s_\star=\tilde{\lambda}_j^{-1/2} s ⋆ = λ ~ j − 1/2 where it takes value
μ j , − ∣ s ⋆ = λ ~ j − 1 / 2 = λ i ( λ ~ j 1 / 2 − λ ~ j ) , (56) \left.\mu_{j,-}\right|_{s_\star=\tilde{\lambda}_j^{-1/2}}=\lambda_i(\tilde{\lambda}_j^{1/2}-\tilde{\lambda}_j), \tag*{(56)} μ j , − ∣ s ⋆ = λ ~ j − 1/2 = λ i ( λ ~ j 1/2 − λ ~ j ) , (56)
and decreases on ( λ ~ j − 1 / 2 , ∞ ) (\tilde{\lambda}_j^{-1/2},\infty) ( λ ~ j − 1/2 , ∞ ) . This shows that changing the scale has, in general, a rather non-obvious effect on the spectrum of the Hessian, even in this simple case.
We now prove several statements about the ordering of the eigenvalues. To do so, we first derive several preliminary results. Let
μ ± ( λ ) = 1 2 [ s − 1 + λ s ± ( s − 1 + λ s ) 2 − 4 λ ( 1 − λ ) ] (57) \mu_{\pm}(\lambda)=\frac{1}{2}\left[s^{-1}+\lambda s\pm\sqrt{(s^{-1}+\lambda s)^2-4\lambda(1-\lambda)}\right] \tag*{(57)} μ ± ( λ ) = 2 1 [ s − 1 + λ s ± ( s − 1 + λ s ) 2 − 4 λ ( 1 − λ ) ] (57)
be functions defining the normalized eigenvalues, with s > 0 s>0 s > 0 fixed and λ ∈ [ 0 , 1 ] \lambda\in[0,1] λ ∈ [ 0 , 1 ] . By inspection, we have μ ± ( λ ) ≥ 0 \mu_{\pm}(\lambda)\ge0 μ ± ( λ ) ≥ 0 for all λ ∈ [ 0 , 1 ] \lambda\in[0,1] λ ∈ [ 0 , 1 ] .
First consider μ + ( λ ) \mu_{+}(\lambda) μ + ( λ ) . At the boundaries, we have
μ + ( λ = 0 ) = s − 1 and μ + ( λ = 1 ) = s + s − 1 . (58) \mu_{+}(\lambda=0)=s^{-1}\qquad\text{and}\qquad\mu_{+}(\lambda=1)=s+s^{-1}. \tag*{(58)} μ + ( λ = 0 ) = s − 1 and μ + ( λ = 1 ) = s + s − 1 . (58)
Moreover, differentiating in λ \lambda λ , we have
μ + ′ ( λ ) = 1 2 ( s + ( s 2 + 4 ) λ − 1 ( s − 1 + λ s ) 2 − 4 λ ( 1 − λ ) ) , (59) \mu_{+}'(\lambda)=\frac{1}{2}\left(s+\frac{(s^2+4)\lambda-1}{\sqrt{(s^{-1}+\lambda s)^2-4\lambda(1-\lambda)}}\right), \tag*{(59)} μ + ′ ( λ ) = 2 1 ( s + ( s − 1 + λ s ) 2 − 4 λ ( 1 − λ ) ( s 2 + 4 ) λ − 1 ) , (59)
which is positive on the interval λ ∈ ( 0 , 1 ) \lambda\in(0,1) λ ∈ ( 0 , 1 ) for any s s s . To show this, consider two cases. First, if the numerator of the fraction inside the square brackets is non-negative, than the result is immediate. If the numerator is negative, then we must have
0 < s 2 [ ( s − 1 + λ s ) 2 − 4 λ ( 1 − λ ) ] − [ ( s 2 + 4 ) λ − 1 ] 2 = 4 λ [ 2 − ( s 2 + 4 ) λ ] . (60) 0<s^2[(s^{-1}+\lambda s)^2-4\lambda(1-\lambda)]-[(s^2+4)\lambda-1]^2=4\lambda[2-(s^2+4)\lambda]. \tag*{(60)} 0 < s 2 [( s − 1 + λ s ) 2 − 4 λ ( 1 − λ )] − [( s 2 + 4 ) λ − 1 ] 2 = 4 λ [ 2 − ( s 2 + 4 ) λ ] . (60)
But, for the numerator to be negative, we must have λ < 1 / ( s 2 + 4 ) \lambda<1/(s^2+4) λ < 1/ ( s 2 + 4 ) , meaning that 2 − ( s 2 + 4 ) λ > 1 2-(s^2+4)\lambda>1 2 − ( s 2 + 4 ) λ > 1 , and thus that the desired inequality is in fact satisfied.
Now consider μ − ( λ ) \mu_{-}(\lambda) μ − ( λ ) . At the boundaries, we see that
μ − ( λ = 0 ) = μ − ( λ = 1 ) = 0. (61) \mu_{-}(\lambda=0)=\mu_{-}(\lambda=1)=0. \tag*{(61)} μ − ( λ = 0 ) = μ − ( λ = 1 ) = 0. (61)
By differentiating, we find that μ − ( λ ) \mu_{-}(\lambda) μ − ( λ ) has a unique maximum in λ \lambda λ at
λ ⋆ = 2 s 2 + 4 , (62) \lambda_{\star}=\frac{2}{s^2+4}, \tag*{(62)} λ ⋆ = s 2 + 4 2 , (62)
where it takes value
μ − ( λ ⋆ ) = s s 2 + 4 . (63) \mu_{-}(\lambda_{\star})=\frac{s}{s^2+4}. \tag*{(63)} μ − ( λ ⋆ ) = s 2 + 4 s . (63)
Note that for any s > 0 s>0 s > 0 ,
s s 2 + 4 < s − 1 , (64) \frac{s}{s^2+4}<s^{-1}, \tag*{(64)} s 2 + 4 s < s − 1 , (64)
as upon multiplying through by s ( s 2 + 4 ) s(s^2+4) s ( s 2 + 4 ) this is equivalent to the inequality s 2 < s 2 + 4 s^2<s^2+4 s 2 < s 2 + 4 .
Therefore, assuming that i = 1 i=1 i = 1 is the unique maximal eigenvalue, we conclude three things about the functions μ ± ( λ ) \mu_{\pm}(\lambda) μ ± ( λ ) : μ + ( λ ) \mu_{+}(\lambda) μ + ( λ ) is monotonically increasing, μ − ( λ ) \mu_{-}(\lambda) μ − ( λ ) is non-monotonic, and we have the strict uniform-bound separation
0 ≤ μ − ( λ ) ≤ s s 2 + 4 < s − 1 ≤ μ + ( λ ′ ) ≤ s + s − 1 (65) 0\le\mu_{-}(\lambda)\le\frac{s}{s^2+4}<s^{-1}\le\mu_{+}(\lambda')\le s+s^{-1} \tag*{(65)} 0 ≤ μ − ( λ ) ≤ s 2 + 4 s < s − 1 ≤ μ + ( λ ′ ) ≤ s + s − 1 (65)
for any pair λ , λ ′ ∈ [ 0 , 1 ] \lambda,\lambda'\in[0,1] λ , λ ′ ∈ [ 0 , 1 ] .
With this lemma in hand, we find that for any pair ( j , k ) ∈ [ d ] 2 (j,k)\in[d]^2 ( j , k ) ∈ [ d ] 2 such that λ j > λ k \lambda_j>\lambda_k λ j > λ k , the corresponding upper-branch eigenvalues of the Hessian satisfy
μ j , + > μ k , + . (66) \mu_{j,+}>\mu_{k,+}. \tag*{(66)} μ j , + > μ k , + . (66)
Moreover, we have a strict separation between the two branches: for any pair ( j , k ) (j,k) ( j , k ) we have that
1 λ i μ j , − ≤ s s 2 + 4 < s − 1 ≤ 1 λ i μ k , + . (67) \frac{1}{\lambda_i}\mu_{j,-} \le\frac{s}{s^2+4} < s^{-1} \le\frac{1}{\lambda_i}\mu_{k,+}. \tag*{(67)} λ i 1 μ j , − ≤ s 2 + 4 s < s − 1 ≤ λ i 1 μ k , + . (67)
However, the lower-branch eigenvalues μ j , − \mu_{j,-} μ j , − are not ordered simply by the corresponding eigenvalues λ j \lambda_j λ j of Σ \Sigma Σ . We remark that this result guarantees strong separation of bands when s < 1 s<1 s < 1 , but allows the gap to in principle become small when s ≫ 1 s\gg1 s ≫ 1 .
As a result, assuming that i = 1 i=1 i = 1 is the index of the maximum eigenvalue, the leading eigenvalue of the Hessian is always μ i , + = λ i ( s + s − 1 ) \mu_{i,+}=\lambda_i(s+s^{-1}) μ i , + = λ i ( s + s − 1 ) . Thus, the leading eigenvalue is minimized by the balanced solution, and in this sense balancing minimizes sharpness. However, it does not favor imbalance in a particular direction, as it is invariant under s ↦ 1 / s s\mapsto1/s s ↦ 1/ s . Asymmetric effects on the Hessian therefore must come from lower eigenvalues, which are divided into two non-interlacing bands.
One way to capture the asymmetry is through the trace of the Hessian:
tr ( H ) = tr ( H i ) + ∑ j ≠ i tr ( H j ) (68) \operatorname{tr}(H)=\operatorname{tr}(H_i)+\sum_{j\ne i}\operatorname{tr}(H_j) \tag*{(68)} tr ( H ) = tr ( H i ) + j = i ∑ tr ( H j ) (68)
= λ i ( s + s − 1 ) + ∑ j ≠ i ( λ j s + λ i s − 1 ) (69) =\lambda_i(s+s^{-1})+\sum_{j\ne i}(\lambda_js+\lambda_is^{-1}) \tag*{(69)} = λ i ( s + s − 1 ) + j = i ∑ ( λ j s + λ i s − 1 ) (69)
= tr ( Σ ) s + d λ i s − 1 . (70) =\operatorname{tr}(\Sigma)s+d\lambda_is^{-1}. \tag*{(70)} = tr ( Σ ) s + d λ i s − 1 . (70)
We can then see that the trace is invariant under s ↦ 1 / s s\mapsto1/s s ↦ 1/ s only if λ i = λ j \lambda_i=\lambda_j λ i = λ j for all j j j , i.e., if all the eigenvalues of Σ \Sigma Σ are identical. Otherwise, we have the strict inequality
d λ i > tr ( Σ ) , (71) d\lambda_i>\operatorname{tr}(\Sigma), \tag*{(71)} d λ i > tr ( Σ ) , (71)
which means that the trace of the Hessian increases more as one moves towards a encoder-heavy solution (s < 1 s<1 s < 1 ) as compared to a decoder-heavy solution (s > 1 s>1 s > 1 ). We note that tr ( H ) \operatorname{tr}(H) tr ( H ) is minimized by taking
s ⋆ = ( tr ( Σ ) d λ i ) − 1 / 2 ≥ 1 ; (72) s_\star=\left(\frac{\operatorname{tr}(\Sigma)}{d\lambda_i}\right)^{-1/2}\ge1; \tag*{(72)} s ⋆ = ( d λ i tr ( Σ ) ) − 1/2 ≥ 1 ; (72)
it is decreasing on ( 0 , s ⋆ ) (0,s_\star) ( 0 , s ⋆ ) and increasing on ( s ⋆ , ∞ ) (s_\star,\infty) ( s ⋆ , ∞ ) . This means that in the sense of tr ( H ) \operatorname{tr}(H) tr ( H ) , decoder-heavy solutions can be flatter than encoder-heavy solutions or even balanced solutions.
Hessian spectrum for a general undercomplete linear autoencoder
We now consider a general undercomplete linear autoencoder with k > 1 k>1 k > 1 . We will find that the Hessian has a similar structure to the k = 1 k=1 k = 1 case—being divided into sectors corresponding to within-principal-subspace and out-of-subspace fluctuations.
Recall that the loss, after averaging over some set of examples with E [ x ] = 0 \mathbb{E}[x]=0 E [ x ] = 0 and E [ x x T ] = Σ \mathbb{E}[xx^{\mathsf T}]=\Sigma E [ x x T ] = Σ , is
L ( W , U ) = E x 1 2 ∥ W U x − x ∥ 2 = 1 2 tr [ ( W U − I d ) Σ ( U T W T − I d ) ] . (73) L(W,U)=\mathbb{E}_x\frac{1}{2}\lVert WUx-x\rVert^2=\frac{1}{2}\operatorname{tr}[(WU-I_d)\Sigma(U^{\mathsf T}W^{\mathsf T}-I_d)]. \tag*{(73)} L ( W , U ) = E x 2 1 ∥ W U x − x ∥ 2 = 2 1 tr [( W U − I d ) Σ ( U T W T − I d )] . (73)
Consider a generic point ( W , U ) (W,U) ( W , U ) , and perturb this point to ( W + δ W , U + δ U ) (W+\delta W,U+\delta U) ( W + δ W , U + δ U ) . Then,
L ( W + δ W , U + δ U ) = 1 2 tr [ ( W U + W δ U + δ W U + δ W δ U − I d ) Σ × ( U T W T + δ U T W T + U T δ W T + δ U T δ W T − I d ) ] . (74) \begin{aligned}
L(W+\delta W,U+\delta U)
&= \frac{1}{2}\operatorname{tr}\bigl[(WU+W\delta U+\delta WU+\delta W\delta U-I_d)\Sigma\\
&\qquad\qquad\times(U^{\mathsf{T}}W^{\mathsf{T}}+\delta U^{\mathsf{T}}W^{\mathsf{T}}+U^{\mathsf{T}}\delta W^{\mathsf{T}}+\delta U^{\mathsf{T}}\delta W^{\mathsf{T}}-I_d)\bigr]. \tag*{(74)}
\end{aligned} L ( W + δ W , U + δ U ) = 2 1 tr [ ( W U + W δ U + δ W U + δ W δ U − I d ) Σ × ( U T W T + δ U T W T + U T δ W T + δ U T δ W T − I d ) ] . (74)
= L ( W , U ) + tr [ ( W δ U + δ W U ) Σ ( W U − I d ) T ] + 1 2 tr [ ( W δ U + δ W U ) Σ ( δ U T W T + U T δ W T ) ] + tr [ ( δ W δ U ) Σ ( W U − I d ) T ] + cubic and quartic terms . (75) \begin{aligned}
&=L(W,U)+\operatorname{tr}\bigl[(W\delta U+\delta WU)\Sigma(WU-I_d)^{\mathsf{T}}\bigr] \\
&\quad+\frac{1}{2}\operatorname{tr}\bigl[(W\delta U+\delta WU)\Sigma(\delta U^{\mathsf{T}}W^{\mathsf{T}}+U^{\mathsf{T}}\delta W^{\mathsf{T}})\bigr] \\
&\quad+\operatorname{tr}\bigl[(\delta W\delta U)\Sigma(WU-I_d)^{\mathsf{T}}\bigr] \\
&\quad+\text{cubic and quartic terms}. \tag*{(75)}
\end{aligned} = L ( W , U ) + tr [ ( W δ U + δ W U ) Σ ( W U − I d ) T ] + 2 1 tr [ ( W δ U + δ W U ) Σ ( δ U T W T + U T δ W T ) ] + tr [ ( δ W δ U ) Σ ( W U − I d ) T ] + cubic and quartic terms . (75)
As a result, viewing the Hessian as a quadratic form acting on the perturbation ( δ W , δ U ) (\delta W,\delta U) ( δ W , δ U ) , we have
H ( δ W , δ U ) = tr [ ( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] + 2 tr [ ( δ W δ U ) Σ ( W U − I d ) T ] . (76) H(\delta W,\delta U)=\operatorname{tr}\bigl[(W\delta U+\delta WU)\Sigma(W\delta U+\delta WU)^{\mathsf{T}}\bigr]+2\operatorname{tr}\bigl[(\delta W\delta U)\Sigma(WU-I_d)^{\mathsf{T}}\bigr]. \tag*{(76)} H ( δ W , δ U ) = tr [ ( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] + 2 tr [ ( δ W δ U ) Σ ( W U − I d ) T ] . (76)
Now, we specialize to a rank-k k k undercomplete PCA-type solution, with
W = P T A , (77) W=P^{\mathsf{T}}A, \tag*{(77)} W = P T A , (77)
U = A − 1 P , (78) U=A^{-1}P, \tag*{(78)} U = A − 1 P , (78)
where A A A is a general invertible matrix and P ∈ R k × d P\in\mathbb{R}^{k\times d} P ∈ R k × d is a projection matrix satisfying P P T = I k PP^{\mathsf{T}}=I_k P P T = I k . Specifically, we assume that that P P P projects onto the eigenspace spanned by the top k k k eigenvectors, assuming that it is unique (i.e., that λ k > λ k + 1 \lambda_k>\lambda_{k+1} λ k > λ k + 1 ).
Choose coordinates for the input space such that Σ \Sigma Σ is diagonal, and then for the latent space such that
P = ( I k 0 ) . (79) P=(I_k\ \ 0). \tag*{(79)} P = ( I k 0 ) . (79)
In these coordinates, decompose the perturbations as
δ W = ( δ W ∥ δ W ⊥ ) and δ U = ( δ U ∥ δ U ⊥ ) , (80) \delta W=\begin{pmatrix}\delta W_{\parallel}\\ \delta W_{\perp}\end{pmatrix}
\quad\text{and}\quad
\delta U=(\delta U_{\parallel}\ \ \delta U_{\perp}), \tag*{(80)} δ W = ( δ W ∥ δ W ⊥ ) and δ U = ( δ U ∥ δ U ⊥ ) , (80)
where
δ W ∥ , δ U ∥ ∈ R k × k and δ W ⊥ T , δ U ⊥ ∈ R k × ( d − k ) . (81) \delta W_{\parallel},\delta U_{\parallel}\in\mathbb{R}^{k\times k}
\quad\text{and}\quad
\delta W_{\perp}^{\mathsf{T}},\delta U_{\perp}\in\mathbb{R}^{k\times(d-k)}. \tag*{(81)} δ W ∥ , δ U ∥ ∈ R k × k and δ W ⊥ T , δ U ⊥ ∈ R k × ( d − k ) . (81)
With this choice of coordinates,
W δ U + δ W U = ( A 0 ) ( δ U ∥ δ U ⊥ ) + ( δ W ∥ δ W ⊥ ) ( A − 1 0 ) (82) W\delta U+\delta WU=
\begin{pmatrix}A\\0\end{pmatrix}
(\delta U_{\parallel}\ \ \delta U_{\perp})
+
\begin{pmatrix}\delta W_{\parallel}\\\delta W_{\perp}\end{pmatrix}
(A^{-1}\ \ 0) \tag*{(82)} W δ U + δ W U = ( A 0 ) ( δ U ∥ δ U ⊥ ) + ( δ W ∥ δ W ⊥ ) ( A − 1 0 ) (82)
= ( δ W ∥ A − 1 + A δ U ∥ A δ U ⊥ δ W ⊥ A − 1 0 ) . (83) =
\begin{pmatrix}
\delta W_{\parallel}A^{-1}+A\delta U_{\parallel} & A\delta U_{\perp}\\
\delta W_{\perp}A^{-1} & 0
\end{pmatrix}. \tag*{(83)} = ( δ W ∥ A − 1 + A δ U ∥ δ W ⊥ A − 1 A δ U ⊥ 0 ) . (83)
Then, letting Λ + = diag ( λ 1 , … , λ k ) \Lambda_{+}=\operatorname{diag}(\lambda_1,\ldots,\lambda_k) Λ + = diag ( λ 1 , … , λ k ) and Λ − = diag ( λ k + 1 , … , λ d ) \Lambda_{-}=\operatorname{diag}(\lambda_{k+1},\ldots,\lambda_d) Λ − = diag ( λ k + 1 , … , λ d ) , we have
tr [ ( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] (84) \operatorname{tr}\left[(W\delta U+\delta WU)\Sigma(W\delta U+\delta WU)^{\mathsf{T}}\right] \tag*{(84)} tr [ ( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] (84)
= tr [ ( δ W ∥ A − 1 + A δ U ∥ A δ U ⊥ δ W ⊥ A − 1 0 ) ( Λ + 0 0 Λ − ) ( ( δ W ∥ A − 1 + A δ U ∥ ) T ( δ W ⊥ A − 1 ) T ( A δ U ⊥ ) T 0 ) ] (85) =\operatorname{tr}\left[
\begin{pmatrix}
\delta W_{\parallel}A^{-1}+A\delta U_{\parallel} & A\delta U_{\perp}\\
\delta W_{\perp}A^{-1} & 0
\end{pmatrix}
\begin{pmatrix}
\Lambda_{+} & 0\\
0 & \Lambda_{-}
\end{pmatrix}
\begin{pmatrix}
(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})^{\mathsf{T}} & (\delta W_{\perp}A^{-1})^{\mathsf{T}}\\
(A\delta U_{\perp})^{\mathsf{T}} & 0
\end{pmatrix}
\right] \tag*{(85)} = tr [ ( δ W ∥ A − 1 + A δ U ∥ δ W ⊥ A − 1 A δ U ⊥ 0 ) ( Λ + 0 0 Λ − ) ( ( δ W ∥ A − 1 + A δ U ∥ ) T ( A δ U ⊥ ) T ( δ W ⊥ A − 1 ) T 0 ) ] (85)
= tr [ ( δ W ∥ A − 1 + A δ U ∥ A δ U ⊥ δ W ⊥ A − 1 0 ) ( Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T Λ + ( δ W ⊥ A − 1 ) T Λ − ( A δ U ⊥ ) T 0 ) ] (86) =\operatorname{tr}\left[
\begin{pmatrix}
\delta W_{\parallel}A^{-1}+A\delta U_{\parallel} & A\delta U_{\perp}\\
\delta W_{\perp}A^{-1} & 0
\end{pmatrix}
\begin{pmatrix}
\Lambda_{+}(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})^{\mathsf{T}} & \Lambda_{+}(\delta W_{\perp}A^{-1})^{\mathsf{T}}\\
\Lambda_{-}(A\delta U_{\perp})^{\mathsf{T}} & 0
\end{pmatrix}
\right] \tag*{(86)} = tr [ ( δ W ∥ A − 1 + A δ U ∥ δ W ⊥ A − 1 A δ U ⊥ 0 ) ( Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T Λ − ( A δ U ⊥ ) T Λ + ( δ W ⊥ A − 1 ) T 0 ) ] (86)
= tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T ] + tr [ A δ U ⊥ Λ − ( A δ U ⊥ ) T ] + tr [ δ W ⊥ A − 1 Λ + A − T δ W ⊥ T ] (87) =\operatorname{tr}\left[(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})\Lambda_{+}(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})^{\mathsf{T}}\right]
+\operatorname{tr}\left[A\delta U_{\perp}\Lambda_{-}(A\delta U_{\perp})^{\mathsf{T}}\right]
+\operatorname{tr}\left[\delta W_{\perp}A^{-1}\Lambda_{+}A^{-\mathsf{T}}\delta W_{\perp}^{\mathsf{T}}\right] \tag*{(87)} = tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T ] + tr [ A δ U ⊥ Λ − ( A δ U ⊥ ) T ] + tr [ δ W ⊥ A − 1 Λ + A − T δ W ⊥ T ] (87)
and, as
Σ ( W U − I d ) T = ( 0 0 0 − Λ − ) , (88) \Sigma(WU-I_d)^{\mathsf{T}}=
\begin{pmatrix}
0 & 0\\
0 & -\Lambda_{-}
\end{pmatrix}, \tag*{(88)} Σ ( W U − I d ) T = ( 0 0 0 − Λ − ) , (88)
tr [ ( δ W δ U ) Σ ( W U − I d ) T ] = − tr [ δ W ⊥ δ U ⊥ Λ − ] . (89) \operatorname{tr}\left[(\delta W\delta U)\Sigma(WU-I_d)^{\mathsf{T}}\right]
=-\operatorname{tr}\left[\delta W_{\perp}\delta U_{\perp}\Lambda_{-}\right]. \tag*{(89)} tr [ ( δ W δ U ) Σ ( W U − I d ) T ] = − tr [ δ W ⊥ δ U ⊥ Λ − ] . (89)
Therefore, the Hessian decomposes into two independent quadratic forms
H ( δ W , δ U ) = H ∥ ( δ W ∥ , δ U ∥ ) + H ⊥ ( δ W ⊥ , δ U ⊥ ) , (90) H(\delta W,\delta U)=H_{\parallel}(\delta W_{\parallel},\delta U_{\parallel})+H_{\perp}(\delta W_{\perp},\delta U_{\perp}), \tag*{(90)} H ( δ W , δ U ) = H ∥ ( δ W ∥ , δ U ∥ ) + H ⊥ ( δ W ⊥ , δ U ⊥ ) , (90)
with
H ∥ ( δ W ∥ , δ U ∥ ) = tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T ] (91) H_{\parallel}(\delta W_{\parallel},\delta U_{\parallel})
=\operatorname{tr}\left[(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})\Lambda_{+}(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})^{\mathsf{T}}\right] \tag*{(91)} H ∥ ( δ W ∥ , δ U ∥ ) = tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T ] (91)
determined by within-subspace fluctuations, and
H ⊥ ( δ W ⊥ , δ U ⊥ ) = tr [ A δ U ⊥ Λ − δ U ⊥ T A T ] + tr [ δ W ⊥ A − 1 Λ + A − T δ W ⊥ T ] − 2 tr [ δ W ⊥ δ U ⊥ Λ − ] (92) H_{\perp}(\delta W_{\perp},\delta U_{\perp})
=\operatorname{tr}\left[A\delta U_{\perp}\Lambda_{-}\delta U_{\perp}^{\mathsf{T}}A^{\mathsf{T}}\right]
+\operatorname{tr}\left[\delta W_{\perp}A^{-1}\Lambda_{+}A^{-\mathsf{T}}\delta W_{\perp}^{\mathsf{T}}\right]
-2\operatorname{tr}\left[\delta W_{\perp}\delta U_{\perp}\Lambda_{-}\right] \tag*{(92)} H ⊥ ( δ W ⊥ , δ U ⊥ ) = tr [ A δ U ⊥ Λ − δ U ⊥ T A T ] + tr [ δ W ⊥ A − 1 Λ + A − T δ W ⊥ T ] − 2 tr [ δ W ⊥ δ U ⊥ Λ − ] (92)
determined by out-of-subspace fluctuations. We can therefore diagonalize each separately.
First, consider the out-of-subspace fluctuations. Using the vectorization convention
tr ( A T B ) = vec ( A ) T vec ( B ) , vec ( A B C ) = ( C T ⊗ A ) vec ( B ) , (93) \operatorname{tr}(A^{\mathsf{T}}B)=\operatorname{vec}(A)^{\mathsf{T}}\operatorname{vec}(B),\qquad
\operatorname{vec}(ABC)=(C^{\mathsf{T}}\otimes A)\operatorname{vec}(B), \tag*{(93)} tr ( A T B ) = vec ( A ) T vec ( B ) , vec ( A B C ) = ( C T ⊗ A ) vec ( B ) , (93)
we can write the three relevant terms as
tr [ A δ U ⊥ Λ − δ U ⊥ T A T ] = vec ( δ U ⊥ ) T ( Λ − ⊗ A T A ) vec ( δ U ⊥ ) (94) \operatorname{tr}\left[A\delta U_{\perp}\Lambda_{-}\delta U_{\perp}^{\mathsf{T}}A^{\mathsf{T}}\right]
=\operatorname{vec}(\delta U_{\perp})^{\mathsf{T}}(\Lambda_{-}\otimes A^{\mathsf{T}}A)\operatorname{vec}(\delta U_{\perp}) \tag*{(94)} tr [ A δ U ⊥ Λ − δ U ⊥ T A T ] = vec ( δ U ⊥ ) T ( Λ − ⊗ A T A ) vec ( δ U ⊥ ) (94)
tr [ δ W ⊥ A − 1 Λ + A − T δ W ⊥ T ] = vec ( δ W ⊥ T ) T ( I d − k ⊗ A − 1 Λ + A − T ) vec ( δ W ⊥ T ) (95) \operatorname{tr}\left[\delta W_{\perp}A^{-1}\Lambda_{+}A^{-\mathsf{T}}\delta W_{\perp}^{\mathsf{T}}\right]
=\operatorname{vec}(\delta W_{\perp}^{\mathsf{T}})^{\mathsf{T}}(I_{d-k}\otimes A^{-1}\Lambda_{+}A^{-\mathsf{T}})\operatorname{vec}(\delta W_{\perp}^{\mathsf{T}}) \tag*{(95)} tr [ δ W ⊥ A − 1 Λ + A − T δ W ⊥ T ] = vec ( δ W ⊥ T ) T ( I d − k ⊗ A − 1 Λ + A − T ) vec ( δ W ⊥ T ) (95)
tr [ δ W ⊥ δ U ⊥ Λ − ] = vec ( δ W ⊥ T ) T ( Λ − ⊗ I k ) vec ( δ U ⊥ ) , (96) \operatorname{tr}\left[\delta W_{\perp}\delta U_{\perp}\Lambda_{-}\right]
=\operatorname{vec}(\delta W_{\perp}^{\mathsf{T}})^{\mathsf{T}}(\Lambda_{-}\otimes I_k)\operatorname{vec}(\delta U_{\perp}), \tag*{(96)} tr [ δ W ⊥ δ U ⊥ Λ − ] = vec ( δ W ⊥ T ) T ( Λ − ⊗ I k ) vec ( δ U ⊥ ) , (96)
hence
H ⊥ ( δ W ⊥ , δ U ⊥ ) = ( vec ( δ W ⊥ T ) vec ( δ U ⊥ ) ) T ( I d − k ⊗ A − 1 Λ + A − T − Λ − ⊗ I k − Λ − ⊗ I k Λ − ⊗ A T A ) ( vec ( δ W ⊥ T ) vec ( δ U ⊥ ) ) . (97) H_{\perp}(\delta W_{\perp},\delta U_{\perp})=
\begin{pmatrix}
\operatorname{vec}(\delta W_{\perp}^{\mathsf{T}})\\
\operatorname{vec}(\delta U_{\perp})
\end{pmatrix}^{\mathsf{T}}
\begin{pmatrix}
I_{d-k}\otimes A^{-1}\Lambda_{+}A^{-\mathsf{T}} & -\Lambda_{-}\otimes I_k\\
-\Lambda_{-}\otimes I_k & \Lambda_{-}\otimes A^{\mathsf{T}}A
\end{pmatrix}
\begin{pmatrix}
\operatorname{vec}(\delta W_{\perp}^{\mathsf{T}})\\
\operatorname{vec}(\delta U_{\perp})
\end{pmatrix}. \tag*{(97)} H ⊥ ( δ W ⊥ , δ U ⊥ ) = ( vec ( δ W ⊥ T ) vec ( δ U ⊥ ) ) T ( I d − k ⊗ A − 1 Λ + A − T − Λ − ⊗ I k − Λ − ⊗ I k Λ − ⊗ A T A ) ( vec ( δ W ⊥ T ) vec ( δ U ⊥ ) ) . (97)
We can then see that there is a further splitting into eigenproblems for the 2 k × 2 k 2k\times2k 2 k × 2 k block matrices
\begin{pmatrix}
A^{-1}\Lambda_{+}A^{-\mathsf{T}}-\lambda_j I_k & -\lambda_j I_k\\
-\lambda_j I_k & \lambda_j A^{\mathsf{T}}A
\end{pmatrix}, \tag*{(98)}\end{pmatrix}
for each j ∈ { k + 1 , … , d } j\in\{k+1,\ldots,d\} j ∈ { k + 1 , … , d } . This generalizes our result from the k = 1 k=1 k = 1 case before.
We now at last come to H ∥ H_{\parallel} H ∥ . Expanding out all of the terms,
H ∥ = tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T ] (99) H_{\parallel}=\operatorname{tr}\left[(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})\Lambda_{+}(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})^{\mathsf T}\right] \tag*{(99)} H ∥ = tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( δ W ∥ A − 1 + A δ U ∥ ) T ] (99)
= tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( A − T δ W ∥ T + δ U ∥ T A T ) ] (100) =\operatorname{tr}\left[(\delta W_{\parallel}A^{-1}+A\delta U_{\parallel})\Lambda_{+}(A^{-\mathsf T}\delta W_{\parallel}^{\mathsf T}+\delta U_{\parallel}^{\mathsf T}A^{\mathsf T})\right] \tag*{(100)} = tr [ ( δ W ∥ A − 1 + A δ U ∥ ) Λ + ( A − T δ W ∥ T + δ U ∥ T A T ) ] (100)
= tr [ δ W ∥ A − 1 Λ + A − T δ W ∥ T + δ W ∥ A − 1 Λ + δ U ∥ T A T + A δ U ∥ Λ + A − T δ W ∥ T + A δ U ∥ Λ + δ U ∥ T A T ] (101) =\operatorname{tr}\left[\delta W_{\parallel}A^{-1}\Lambda_{+}A^{-\mathsf T}\delta W_{\parallel}^{\mathsf T}+\delta W_{\parallel}A^{-1}\Lambda_{+}\delta U_{\parallel}^{\mathsf T}A^{\mathsf T}+A\delta U_{\parallel}\Lambda_{+}A^{-\mathsf T}\delta W_{\parallel}^{\mathsf T}+A\delta U_{\parallel}\Lambda_{+}\delta U_{\parallel}^{\mathsf T}A^{\mathsf T}\right] \tag*{(101)} = tr [ δ W ∥ A − 1 Λ + A − T δ W ∥ T + δ W ∥ A − 1 Λ + δ U ∥ T A T + A δ U ∥ Λ + A − T δ W ∥ T + A δ U ∥ Λ + δ U ∥ T A T ] (101)
= vec ( δ W ∥ ) T ( A − 1 Λ + A − T ⊗ I k ) vec ( δ W ∥ ) + 2 vec ( δ W ∥ ) T ( A − 1 Λ + ⊗ A ) vec ( δ U ∥ ) + vec ( δ U ∥ ) T ( Λ + ⊗ A T A ) vec ( δ U ∥ ) , (102) =\operatorname{vec}(\delta W_{\parallel})^{\mathsf T}(A^{-1}\Lambda_{+}A^{-\mathsf T}\otimes I_k)\operatorname{vec}(\delta W_{\parallel})+2\operatorname{vec}(\delta W_{\parallel})^{\mathsf T}(A^{-1}\Lambda_{+}\otimes A)\operatorname{vec}(\delta U_{\parallel})
+\operatorname{vec}(\delta U_{\parallel})^{\mathsf T}(\Lambda_{+}\otimes A^{\mathsf T}A)\operatorname{vec}(\delta U_{\parallel}), \tag*{(102)} = vec ( δ W ∥ ) T ( A − 1 Λ + A − T ⊗ I k ) vec ( δ W ∥ ) + 2 vec ( δ W ∥ ) T ( A − 1 Λ + ⊗ A ) vec ( δ U ∥ ) + vec ( δ U ∥ ) T ( Λ + ⊗ A T A ) vec ( δ U ∥ ) , (102)
which means that
H ∥ ( δ W ∥ , δ U ∥ ) = ( vec ( δ W ∥ ) vec ( δ U ∥ ) ) T ( A − 1 Λ + A − T ⊗ I k A − 1 Λ + ⊗ A Λ + A − T ⊗ A T Λ + ⊗ A T A ) ( vec ( δ W ∥ ) vec ( δ U ∥ ) ) , (103) H_{\parallel}(\delta W_{\parallel},\delta U_{\parallel})=
\begin{pmatrix}
\operatorname{vec}(\delta W_{\parallel})\\
\operatorname{vec}(\delta U_{\parallel})
\end{pmatrix}^{\mathsf T}
\begin{pmatrix}
A^{-1}\Lambda_{+}A^{-\mathsf T}\otimes I_k&A^{-1}\Lambda_{+}\otimes A\\
\Lambda_{+}A^{-\mathsf T}\otimes A^{\mathsf T}&\Lambda_{+}\otimes A^{\mathsf T}A
\end{pmatrix}
\begin{pmatrix}
\operatorname{vec}(\delta W_{\parallel})\\
\operatorname{vec}(\delta U_{\parallel})
\end{pmatrix}, \tag*{(103)} H ∥ ( δ W ∥ , δ U ∥ ) = ( vec ( δ W ∥ ) vec ( δ U ∥ ) ) T ( A − 1 Λ + A − T ⊗ I k Λ + A − T ⊗ A T A − 1 Λ + ⊗ A Λ + ⊗ A T A ) ( vec ( δ W ∥ ) vec ( δ U ∥ ) ) , (103)
and thus the remaining eigenvalues are determined by the spectrum of the 2 k 2 × 2 k 2 2k^2\times2k^2 2 k 2 × 2 k 2 matrix
\begin{pmatrix}
A^{-1}\Lambda_{+}A^{-\mathsf T}\otimes I_k&A^{-1}\Lambda_{+}\otimes A\\
\Lambda_{+}A^{-\mathsf T}\otimes A^{\mathsf T}&\Lambda_{+}\otimes A^{\mathsf T}A
\end{pmatrix}. \tag*{(104)}\end{pmatrix}
We note that we can factorize this matrix as J T J J^{\mathsf T}J J T J , where
J = ( Λ + 1 / 2 A − T ⊗ I k Λ + 1 / 2 ⊗ A ) ∈ R k 2 × 2 k 2 . (105) J=\left(\Lambda_{+}^{1/2}A^{-\mathsf T}\otimes I_k\quad\Lambda_{+}^{1/2}\otimes A\right)\in\mathbb{R}^{k^2\times2k^2}. \tag*{(105)} J = ( Λ + 1/2 A − T ⊗ I k Λ + 1/2 ⊗ A ) ∈ R k 2 × 2 k 2 . (105)
This exposes the fact that H ∥ H_{\parallel} H ∥ has k 2 k^2 k 2 zero modes, which come from solutions to
δ W ∥ A − 1 + A δ U ∥ = 0 , (106) \delta W_{\parallel}A^{-1}+A\delta U_{\parallel}=0, \tag*{(106)} δ W ∥ A − 1 + A δ U ∥ = 0 , (106)
and thus result from the internal symmetry. Noting that
J J T = Λ + 1 / 2 ( A A T ) − 1 Λ + 1 / 2 ⊗ I k + Λ + ⊗ A A T (107) JJ^{\mathsf T}=\Lambda_{+}^{1/2}(AA^{\mathsf T})^{-1}\Lambda_{+}^{1/2}\otimes I_k+\Lambda_{+}\otimes AA^{\mathsf T} \tag*{(107)} J J T = Λ + 1/2 ( A A T ) − 1 Λ + 1/2 ⊗ I k + Λ + ⊗ A A T (107)
is positive-definite assuming A A A is invertible, the non-zero eigenvalues in this sector are determined by the eigenvalues of this k 2 × k 2 k^2\times k^2 k 2 × k 2 matrix.
Therefore, in the end, we find that the eigenvalues of H H H split into sectors: one k 2 k^2 k 2 -dimensional sector determined by the eigenvalues of
Λ + 1 / 2 ( A A T ) − 1 Λ + 1 / 2 ⊗ I k + Λ + ⊗ A A T , (108) \Lambda_{+}^{1/2}(AA^{\mathsf T})^{-1}\Lambda_{+}^{1/2}\otimes I_k+\Lambda_{+}\otimes AA^{\mathsf T}, \tag*{(108)} Λ + 1/2 ( A A T ) − 1 Λ + 1/2 ⊗ I k + Λ + ⊗ A A T , (108)
one 2 k 2k 2 k -dimensional sector determined by the eigenvalues of
( A − 1 Λ + A − T − λ j I k − λ j I k λ j A T A ) (109) \begin{pmatrix}
A^{-1}\Lambda_{+}A^{-\mathsf T}&-\lambda_j I_k\\
-\lambda_j I_k&\lambda_j A^{\mathsf T}A \tag*{(109)}
\end{pmatrix} ( A − 1 Λ + A − T − λ j I k − λ j I k λ j A T A ) (109)
for each j ∈ { k + 1 , … , d } j\in\{k+1,\ldots,d\} j ∈ { k + 1 , … , d } (giving d − k d-k d − k sectors in all), and a remaining sector of k 2 k^2 k 2 zero modes. This gives, in all k 2 + k 2 + 2 k ( d − k ) = 2 k d k^2+k^2+2k(d-k)=2kd k 2 + k 2 + 2 k ( d − k ) = 2 k d eigenvalues, as we expect. We note that, as its lower two blocks commute, we have
det ( A − 1 Λ + A − T − λ j I k − λ j I k λ j A T A ) = det ( λ j A − 1 Λ + A − T A T A − λ j 2 I k ) (110) \det\begin{pmatrix}
A^{-1}\Lambda_{+}A^{-\mathsf T}&-\lambda_j I_k\\
-\lambda_j I_k&\lambda_j A^{\mathsf T}A
\end{pmatrix}
=\det(\lambda_j A^{-1}\Lambda_{+}A^{-\mathsf T}A^{\mathsf T}A-\lambda_j^2 I_k) \tag*{(110)} det ( A − 1 Λ + A − T − λ j I k − λ j I k λ j A T A ) = det ( λ j A − 1 Λ + A − T A T A − λ j 2 I k ) (110)
= det ( λ j A − 1 Λ + A − λ j 2 I k ) (111) =\det(\lambda_j A^{-1}\Lambda_{+}A-\lambda_j^2 I_k) \tag*{(111)} = det ( λ j A − 1 Λ + A − λ j 2 I k ) (111)
= λ j k ∏ i = 1 k ( λ i − λ j ) (112) =\lambda_j^k\prod_{i=1}^{k}(\lambda_i-\lambda_j) \tag*{(112)} = λ j k i = 1 ∏ k ( λ i − λ j ) (112)
upon applying the Weinstein–Aronszajn identity in passing to the third line. This shows that the Hessian on each of these sectors is positive-definite if
λ i > λ j i ∈ { 1 , … , k } , j ∈ { k + 1 , … , d } . (113) \lambda_i>\lambda_j\qquad i\in\{1,\ldots,k\},\ j\in\{k+1,\ldots,d\}. \tag*{(113)} λ i > λ j i ∈ { 1 , … , k } , j ∈ { k + 1 , … , d } . (113)
We can then compute that, in general, the Hessian has trace
tr ( H ) = tr [ Λ + 1 / 2 ( A A T ) − 1 Λ + 1 / 2 ⊗ I k + Λ + ⊗ A A T ] + ∑ j = k + 1 d tr ( A − 1 Λ + A − T − λ j I k − λ j I k − λ j I k λ j A T A ) (114) \operatorname{tr}(H)=\operatorname{tr}\left[\Lambda_{+}^{1/2}(AA^{\mathsf T})^{-1}\Lambda_{+}^{1/2}\otimes I_k+\Lambda_{+}\otimes AA^{\mathsf T}\right]+\sum_{j=k+1}^{d}\operatorname{tr}\begin{pmatrix}A^{-1}\Lambda_{+}A^{-\mathsf T}-\lambda_jI_k&-\lambda_jI_k\\-\lambda_jI_k&\lambda_jA^{\mathsf T}A\end{pmatrix} \tag*{(114)} tr ( H ) = tr [ Λ + 1/2 ( A A T ) − 1 Λ + 1/2 ⊗ I k + Λ + ⊗ A A T ] + j = k + 1 ∑ d tr ( A − 1 Λ + A − T − λ j I k − λ j I k − λ j I k λ j A T A ) (114)
= d tr [ Λ + ( A A T ) − 1 ] + tr ( Σ ) tr ( A A T ) . (115) =d\operatorname{tr}\left[\Lambda_{+}(AA^{\mathsf T})^{-1}\right]+\operatorname{tr}(\Sigma)\operatorname{tr}(AA^{\mathsf T}). \tag*{(115)} = d tr [ Λ + ( A A T ) − 1 ] + tr ( Σ ) tr ( A A T ) . (115)
With the gauge-fixing A = S 1 / 2 A=S^{1/2} A = S 1/2 ,
tr ( H ) = d tr ( Λ + S − 1 ) + tr ( Σ ) tr ( S ) . (116) \operatorname{tr}(H)=d\operatorname{tr}(\Lambda_{+}S^{-1})+\operatorname{tr}(\Sigma)\operatorname{tr}(S). \tag*{(116)} tr ( H ) = d tr ( Λ + S − 1 ) + tr ( Σ ) tr ( S ) . (116)
Though the eigenvalues in general depend on A A A in full detail, there is an important case in which they simplify. Suppose that we fix the positive gauge
A = S 1 / 2 , S = diag ( s 1 , … , s k ) , (117) A=S^{1/2},\qquad S=\operatorname{diag}(s_1,\ldots,s_k), \tag*{(117)} A = S 1/2 , S = diag ( s 1 , … , s k ) , (117)
with
s 1 ≥ s 2 ≥ ⋯ ≥ s k ≥ 1 , λ 1 ≥ λ 2 ≥ ⋯ ≥ λ k > 0. (118) s_1\ge s_2\ge\cdots\ge s_k\ge1,\qquad\lambda_1\ge\lambda_2\ge\cdots\ge\lambda_k>0. \tag*{(118)} s 1 ≥ s 2 ≥ ⋯ ≥ s k ≥ 1 , λ 1 ≥ λ 2 ≥ ⋯ ≥ λ k > 0. (118)
matching the ordering of the eigenvalues. These assumptions will be satisfied in the effective model we derive later. Then, the non-zero eigenvalues in the within-subspace sector are
μ a b ∥ = λ a ( s b + 1 s a ) , a , b ∈ [ k ] , (119) \mu^{\parallel}_{ab}=\lambda_a\left(s_b+\frac{1}{s_a}\right),\qquad a,b\in[k], \tag*{(119)} μ ab ∥ = λ a ( s b + s a 1 ) , a , b ∈ [ k ] , (119)
together with the k 2 k^2 k 2 zero modes coming from the internal G L ( k ) GL(k) G L ( k ) symmetry. For each fixed a a a ,
μ a 1 ∥ ≥ μ a 2 ∥ ≥ ⋯ ≥ μ a k ∥ , (120) \mu^{\parallel}_{a1}\ge\mu^{\parallel}_{a2}\ge\cdots\ge\mu^{\parallel}_{ak}, \tag*{(120)} μ a 1 ∥ ≥ μ a 2 ∥ ≥ ⋯ ≥ μ ak ∥ , (120)
since
μ a b ∥ − μ a d ∥ = λ a ( s b − s d ) . (121) \mu^{\parallel}_{ab}-\mu^{\parallel}_{ad}=\lambda_a(s_b-s_d). \tag*{(121)} μ ab ∥ − μ a d ∥ = λ a ( s b − s d ) . (121)
Moreover, the diagonal is ordered:
μ 11 ∥ ≥ μ 22 ∥ ≥ ⋯ ≥ μ k k ∥ , (122) \mu^{\parallel}_{11}\ge\mu^{\parallel}_{22}\ge\cdots\ge\mu^{\parallel}_{kk}, \tag*{(122)} μ 11 ∥ ≥ μ 22 ∥ ≥ ⋯ ≥ μ k k ∥ , (122)
because s ↦ s + s − 1 s\mapsto s+s^{-1} s ↦ s + s − 1 is increasing on [ 1 , ∞ ) [1,\infty) [ 1 , ∞ ) .
For the out-of-subspace sector, each pair a ≤ k < j a\le k<j a ≤ k < j gives a 2 × 2 2\times2 2 × 2 block
H a j ⊥ = ( λ a / s a − λ j − λ j λ j s a ) . (123) H^{\perp}_{aj}=\begin{pmatrix}\lambda_a/s_a&-\lambda_j\\-\lambda_j&\lambda_js_a\end{pmatrix}. \tag*{(123)} H aj ⊥ = ( λ a / s a − λ j − λ j λ j s a ) . (123)
Following our analysis in the k = 1 k=1 k = 1 case, its eigenvalues are
μ a j , ± = 1 2 [ λ a s a + λ j s a ± ( λ a s a + λ j s a ) 2 − 4 λ j ( λ a − λ j ) ] . (124) \mu_{aj,\pm}=\frac{1}{2}\left[\frac{\lambda_a}{s_a}+\lambda_js_a\pm\sqrt{\left(\frac{\lambda_a}{s_a}+\lambda_js_a\right)^2-4\lambda_j(\lambda_a-\lambda_j)}\right]. \tag*{(124)} μ aj , ± = 2 1 s a λ a + λ j s a ± ( s a λ a + λ j s a ) 2 − 4 λ j ( λ a − λ j ) . (124)
Since μ a j , + ≤ tr H a j ⊥ \mu_{aj,+}\le\operatorname{tr}H^{\perp}_{aj} μ aj , + ≤ tr H aj ⊥ , and since λ j ≤ λ a \lambda_j\le\lambda_a λ j ≤ λ a , we have
μ a j , + ≤ λ a s a + λ j s a ≤ λ a s a + λ a s a = λ a ( s a + 1 s a ) = μ a a ∥ ≤ μ a 1 ∥ . (125) \mu_{aj,+}\le\frac{\lambda_a}{s_a}+\lambda_js_a\le\frac{\lambda_a}{s_a}+\lambda_as_a=\lambda_a\left(s_a+\frac{1}{s_a}\right)=\mu^{\parallel}_{aa}\le\mu^{\parallel}_{a1}. \tag*{(125)} μ aj , + ≤ s a λ a + λ j s a ≤ s a λ a + λ a s a = λ a ( s a + s a 1 ) = μ aa ∥ ≤ μ a 1 ∥ . (125)
Thus no out-of-subspace eigenvalue exceeds the largest within-subspace eigenvalue in the corresponding retained row. Consequently,
λ max ( H ) = max a ≤ k μ a 1 ∥ = max a ≤ k λ a ( s 1 + 1 s a ) . (126) \lambda_{\max}(H)=\max_{a\le k}\mu^{\parallel}_{a1}=\max_{a\le k}\lambda_a\left(s_1+\frac{1}{s_a}\right). \tag*{(126)} λ m a x ( H ) = a ≤ k max μ a 1 ∥ = a ≤ k max λ a ( s 1 + s a 1 ) . (126)
In particular,
λ 1 ( s 1 + 1 s 1 ) ≤ λ max ( H ) ≤ λ 1 ( s 1 + 1 ) , (127) \lambda_1\left(s_1+\frac{1}{s_1}\right)\le\lambda_{\max}(H)\le\lambda_1(s_1+1), \tag*{(127)} λ 1 ( s 1 + s 1 1 ) ≤ λ m a x ( H ) ≤ λ 1 ( s 1 + 1 ) , (127)
and hence, in the strongly decoder-heavy regime s 1 ≫ 1 s_1 \gg1 s 1 ≫ 1 ,
λ max ( H ) = λ 1 s 1 + O ( λ 1 ) . (128) \lambda_{\max}(H) = \lambda_1 s_1 + O(\lambda_1). \tag*{(128)} λ m a x ( H ) = λ 1 s 1 + O ( λ 1 ) . (128)
The assumptions
λ 1 ≥ ⋯ ≥ λ k , s 1 ≥ ⋯ ≥ s k ≥ 1 (129) \lambda_1 \ge\cdots\ge\lambda_k,\qquad s_1 \ge\cdots\ge s_k \ge1 \tag*{(129)} λ 1 ≥ ⋯ ≥ λ k , s 1 ≥ ⋯ ≥ s k ≥ 1 (129)
do not totally order the within-subspace eigenvalues. Indeed, for fixed b b b ,
μ a b ∥ − μ c b ∥ = s b ( λ a − λ c ) + ( λ a s a − λ c s c ) , (130) \mu_{ab}^{\parallel} - \mu_{cb}^{\parallel} = s_b(\lambda_a-\lambda_c) + \left(\frac{\lambda_a}{s_a}-\frac{\lambda_c}{s_c}\right), \tag*{(130)} μ ab ∥ − μ c b ∥ = s b ( λ a − λ c ) + ( s a λ a − s c λ c ) , (130)
and the second term need not have the same sign as the first. A product partial order follows under the additional ratio-ordering condition
λ 1 s 1 ≥ λ 2 s 2 ≥ ⋯ ≥ λ k s k . (131) \frac{\lambda_1}{s_1} \ge\frac{\lambda_2}{s_2} \ge\cdots\ge\frac{\lambda_k}{s_k}. \tag*{(131)} s 1 λ 1 ≥ s 2 λ 2 ≥ ⋯ ≥ s k λ k . (131)
Under this extra assumption,
a ≤ c , b ≤ d ⟹ μ a b ∥ ≥ μ c d ∥ . (132) a \le c,\quad b \le d \quad\Longrightarrow\quad\mu_{ab}^{\parallel} \ge\mu_{cd}^{\parallel}. \tag*{(132)} a ≤ c , b ≤ d ⟹ μ ab ∥ ≥ μ c d ∥ . (132)
Hessian spectrum for a general overcomplete linear autoencoder
Now consider an overcomplete PCA-type solution with k > d k>d k > d , for which we have W U = I d WU=I_d W U = I d . Our starting point is again
H ( δ W , δ U ) = tr [ ( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] + 2 tr [ ( δ W δ U ) Σ ( W U − I d ) T ] (133) H(\delta W,\delta U) = \operatorname{tr}[(W\delta U+\delta WU)\Sigma(W\delta U+\delta WU)^\mathsf{T}] + 2\operatorname{tr}[(\delta W\delta U)\Sigma(WU-I_d)^\mathsf{T}] \tag*{(133)} H ( δ W , δ U ) = tr [( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] + 2 tr [( δ W δ U ) Σ ( W U − I d ) T ] (133)
= tr [ ( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] , (134) = \operatorname{tr}[(W\delta U+\delta WU)\Sigma(W\delta U+\delta WU)^\mathsf{T}], \tag*{(134)} = tr [( W δ U + δ W U ) Σ ( W δ U + δ W U ) T ] , (134)
where we note that the second term vanishes thanks to the assumption that the reconstruction is exact. We now vectorize the first term. As
vec ( W δ U + δ W U ) = ( I d ⊗ W ) vec ( δ U ) + ( U T ⊗ I d ) vec ( δ W ) , (135) \operatorname{vec}(W\delta U+\delta WU)=(I_d\otimes W)\operatorname{vec}(\delta U)+(U^\mathsf{T}\otimes I_d)\operatorname{vec}(\delta W), \tag*{(135)} vec ( W δ U + δ W U ) = ( I d ⊗ W ) vec ( δ U ) + ( U T ⊗ I d ) vec ( δ W ) , (135)
we can write the Hessian as
H ( δ W , δ U ) = ( vec ( δ W ) vec ( δ U ) ) T J T J ( vec ( δ W ) vec ( δ U ) ) . (136) H(\delta W,\delta U)=
\begin{pmatrix}
\operatorname{vec}(\delta W)\\
\operatorname{vec}(\delta U)
\end{pmatrix}^{\mathsf{T}}
J^\mathsf{T}J
\begin{pmatrix}
\operatorname{vec}(\delta W)\\
\operatorname{vec}(\delta U)
\end{pmatrix}. \tag*{(136)} H ( δ W , δ U ) = ( vec ( δ W ) vec ( δ U ) ) T J T J ( vec ( δ W ) vec ( δ U ) ) . (136)
for
J = ( Σ 1 / 2 U T ⊗ I d Σ 1 / 2 ⊗ W ) . (137) J=\left(\Sigma^{1/2}U^\mathsf{T}\otimes I_d\ \ \Sigma^{1/2}\otimes W\right). \tag*{(137)} J = ( Σ 1/2 U T ⊗ I d Σ 1/2 ⊗ W ) . (137)
Now, as W U = I d WU=I_d W U = I d , both W W W and U U U must have rank d d d , hence J J J must have at most d 2 d^2 d 2 , a bound which is attained assuming that Σ \Sigma Σ is full-rank. Then, noting that
J J T = Σ 1 / 2 U T U Σ 1 / 2 ⊗ I d + Σ ⊗ W W T (138) JJ^\mathsf{T}=\Sigma^{1/2}U^\mathsf{T}U\Sigma^{1/2}\otimes I_d+\Sigma\otimes WW^\mathsf{T} \tag*{(138)} J J T = Σ 1/2 U T U Σ 1/2 ⊗ I d + Σ ⊗ W W T (138)
is then a full-rank d 2 × d 2 d^2\times d^2 d 2 × d 2 matrix, we find that the Hessian has 2 k d − d 2 2kd-d^2 2 k d − d 2 zero modes, plus d 2 d^2 d 2 non-zero eigenvalues given by the eigenvalues of J J T JJ^\mathsf{T} J J T . If Σ \Sigma Σ has zero modes, then they will generate zero modes of J J T JJ^\mathsf{T} J J T .
If we again write the parameters at the optimum as
W = P T A (139) W=P^\mathsf{T}A \tag*{(139)} W = P T A (139)
U = A − 1 P , (140) U=A^{-1}P, \tag*{(140)} U = A − 1 P , (140)
where P P P now satisfies P T P = I d P^\mathsf{T}P=I_d P T P = I d , we find that
J J T = Σ 1 / 2 P T ( A A T ) − 1 P Σ 1 / 2 ⊗ I d + Σ ⊗ P T A A T P . (141) JJ^\mathsf{T}=\Sigma^{1/2}P^\mathsf{T}(AA^\mathsf{T})^{-1}P\Sigma^{1/2}\otimes I_d+\Sigma\otimes P^\mathsf{T}AA^\mathsf{T}P. \tag*{(141)} J J T = Σ 1/2 P T ( A A T ) − 1 P Σ 1/2 ⊗ I d + Σ ⊗ P T A A T P . (141)
In this case, the Hessian has the generally simple expression
tr ( H ) = d tr ( Σ U T U ) + tr ( Σ ) tr ( W W T ) . (142) \operatorname{tr}(H)=d\operatorname{tr}(\Sigma U^\mathsf{T}U)+\operatorname{tr}(\Sigma)\operatorname{tr}(WW^\mathsf{T}). \tag*{(142)} tr ( H ) = d tr ( Σ U T U ) + tr ( Σ ) tr ( W W T ) . (142)
If we consider a gauge in which W W T = S WW^\mathsf{T}=S W W T = S and U T U = S − 1 U^\mathsf{T}U=S^{-1} U T U = S − 1 , then this becomes
tr ( H ) = d tr ( Σ S − 1 ) + tr ( Σ ) tr ( S ) . (143) \operatorname{tr}(H)=d\operatorname{tr}(\Sigma S^{-1})+\operatorname{tr}(\Sigma)\operatorname{tr}(S). \tag*{(143)} tr ( H ) = d tr ( Σ S − 1 ) + tr ( Σ ) tr ( S ) . (143)
Further supposing that S S S and Σ \Sigma Σ commute, this gives
tr ( H ) = d ∑ j = 1 d ( λ j s j + λ ˉ s j ) , (144) \operatorname{tr}(H)=d\sum_{j=1}^{d}\left(\frac{\lambda_j}{s_j}+\bar{\lambda}s_j\right), \tag*{(144)} tr ( H ) = d j = 1 ∑ d ( s j λ j + λ ˉ s j ) , (144)
where λ ˉ = 1 d tr ( Σ ) \bar{\lambda}=\frac{1}{d}\operatorname{tr}(\Sigma) λ ˉ = d 1 tr ( Σ ) .
For global re-scalings of the balanced solution, with A = s I k A=\sqrt{s}I_k A = s I k , we have the reduction
J J T = ( s + s − 1 ) ( Σ ⊗ I d ) , (145) JJ^{\mathsf{T}}=(s+s^{-1})(\Sigma\otimes I_d), \tag*{(145)} J J T = ( s + s − 1 ) ( Σ ⊗ I d ) , (145)
showing that in this case all non-zero eigenvalues are invariant under s ↦ 1 / s s\mapsto1/s s ↦ 1/ s .
Detailed derivation of the effective scale dynamics for PCA
Here, we derive the effective model for scale dynamics that we presented in the main text. The accuracy of the predictions of these effective dynamics rely on two facts, which we prove below: First, that fluctuations normal to the solution manifold contract back to the manifold at a fast timescale t η t\eta t η . Second, that Q t Q_t Q t evolves at a slow timescale t η 2 / B t\eta^2/B t η 2 / B , and on that timescale that we can neglect stochasticity in its evolution. This both justifies the effective model we present in the text, and shows that the PCA solution is locally stable. The fundamental mechanism for this is that, as we showed in Appendix B, the normal component of the Hessian is strictly positive-definite if the solution is a projection to the k k k -principal subspace, while otherwise it has modes with negative eigenvalue.
In this derivation, we will assume that the batches are i.i.d., and that each is composed of B B B i.i.d. datapoints. We assume that the data has bounded moments of all orders, i.e., E [ ∥ x ∥ 2 p ] < ∞ \mathbb{E}[\lVert x\rVert^{2p}]<\infty E [∥ x ∥ 2 p ] < ∞ for all p > 0 p>0 p > 0 . Alternatively, we may assume that the data distribution is sub-Gaussian. In practice, we will use Gaussian data in the simulations against which we will compare the model’s predictions. We will also assume that the data covariance E [ x x T ] = Σ \mathbb{E}[xx^{\mathsf{T}}]=\Sigma E [ x x T ] = Σ is diagonal.
Consider a generic point on the solution manifold, with ( W , U ) = ( P T A , A − 1 P ) (W,U)=(P^{\mathsf{T}}A,A^{-1}P) ( W , U ) = ( P T A , A − 1 P ) . Using the polar decomposition of A A A , we gauge-fix such that A = S 1 / 2 A=S^{1/2} A = S 1/2 for S S S a symmetric PSD matrix. Then, ( W , U ) = ( P T S 1 / 2 , S − 1 / 2 P ) (W,U)=(P^{\mathsf{T}}S^{1/2},S^{-1/2}P) ( W , U ) = ( P T S 1/2 , S − 1/2 P ) . Fix a compact subset K K K of the cone of symmetric positive definite matrices, defined for positive constants C > c > 0 C>c>0 C > c > 0 by
K = { 0 ≺ c I ⪯ S ⪯ C I } , (146) K=\{0\prec cI\preceq S\preceq CI\}, \tag*{(146)} K = { 0 ≺ c I ⪯ S ⪯ C I } , (146)
and let
M K = { ( P T A , A − 1 P ) : A T A ∈ K } (147) \mathcal{M}_K=\{(P^{\mathsf{T}}A,A^{-1}P):A^{\mathsf{T}}A\in K\} \tag*{(147)} M K = {( P T A , A − 1 P ) : A T A ∈ K } (147)
be the corresponding submanifold of the solution manifold. The assumption that S S S is bounded will technically be required at several points in the proof.
Fast relaxation of normal fluctuations
We first want to control fluctuations in the normal space. We will do so via a rather abstract and generic derivation, which parallels previous analyses of how SGD behaves near solution manifolds, e.g. by Li et al. (2022); Pashakhanloo and Koulakov (2023); Pashakhanloo (2025).
In a small neighbourhood of M K \mathcal{M}_K M K , we can decompose the full parameter vector θ t \theta_t θ t as
θ t = m t + ξ t , (148) \theta_t=m_t+\xi_t, \tag*{(148)} θ t = m t + ξ t , (148)
where m t ∈ M K m_t \in\mathcal{M}_K m t ∈ M K and ξ t ∈ N m n M K \xi_t \in N_{m_n}\mathcal{M}_K ξ t ∈ N m n M K is in the normal space to M K \mathcal{M}_K M K at m n m_n m n . Let Π \Pi Π be the local projection onto M K \mathcal{M}_K M K , and Π ⊥ ( θ ) = θ − Π ( θ ) \Pi^\perp(\theta) = \theta- \Pi(\theta) Π ⊥ ( θ ) = θ − Π ( θ ) the corresponding normal-coordinate map. Thus, ξ t = Π ⊥ ( θ ) \xi_t = \Pi^\perp(\theta) ξ t = Π ⊥ ( θ ) .
Write the SGD iteration as
θ t + 1 = θ t + δ t , (149) \theta_{t+1} = \theta_t + \delta_t, \tag*{(149)} θ t + 1 = θ t + δ t , (149)
where
δ t = − η ( ∇ L ( θ t ) + ζ t ( θ t ) ) (150) \delta_t = -\eta(\nabla L(\theta_t) + \zeta_t(\theta_t)) \tag*{(150)} δ t = − η ( ∇ L ( θ t ) + ζ t ( θ t )) (150)
where ζ t ( θ t ) \zeta_t(\theta_t) ζ t ( θ t ) is the SGD noise. Thus, applying Π ⊥ \Pi^\perp Π ⊥ , we have
ξ t + 1 = Π ⊥ ( θ t + δ t ) (151) \xi_{t+1} = \Pi^\perp(\theta_t + \delta_t) \tag*{(151)} ξ t + 1 = Π ⊥ ( θ t + δ t ) (151)
= ξ t + D Π θ t ⊥ [ δ t ] + O ( ∥ δ t ∥ 2 ) , (152) = \xi_t + D\Pi^\perp_{\theta_t}[\delta_t] + O(\lVert\delta_t\rVert^2), \tag*{(152)} = ξ t + D Π θ t ⊥ [ δ t ] + O (∥ δ t ∥ 2 ) , (152)
where in the second line we have made a Taylor expansion.
Now, at a given point m m m on the manifold, the derivative of the normal-coordinate map is the projection onto the normal space:
D Π m ⊥ = P N m , (153) D\Pi^\perp_m = P_{N_m}, \tag*{(153)} D Π m ⊥ = P N m , (153)
so, assuming that Π ⊥ \Pi^\perp Π ⊥ is smooth in a neighborhood around the manifold,
D Π θ t ⊥ = D Π m t + ξ t ⊥ = P N m t + O ( ∥ ξ t ∥ ) . (154) D\Pi^\perp_{\theta_t} = D\Pi^\perp_{m_t+\xi_t} = P_{N_{m_t}} + O(\lVert\xi_t\rVert). \tag*{(154)} D Π θ t ⊥ = D Π m t + ξ t ⊥ = P N m t + O (∥ ξ t ∥) . (154)
This gives
ξ t + 1 = ξ t + P N m t δ t + O ( ∥ ξ t ∥ ∥ δ t ∥ ) + O ( ∥ δ t ∥ 2 ) . (155) \xi_{t+1} = \xi_t + P_{N_{m_t}}\delta_t + O(\lVert\xi_t\rVert\lVert\delta_t\rVert) + O(\lVert\delta_t\rVert^2). \tag*{(155)} ξ t + 1 = ξ t + P N m t δ t + O (∥ ξ t ∥ ∥ δ t ∥) + O (∥ δ t ∥ 2 ) . (155)
By definition, ∇ L ( m ) = 0 \nabla L(m) = 0 ∇ L ( m ) = 0 for all m ∈ M K m \in\mathcal{M}_K m ∈ M K . Then, if we Taylor expand the population loss in normal coordinates, we have
P N m ∇ L ( m + ξ ) = H m ⊥ ξ + O ( ∥ ξ ∥ 2 ) , (156) P_{N_m}\nabla L(m+\xi) = H^\perp_m\xi+ O(\lVert\xi\rVert^2), \tag*{(156)} P N m ∇ L ( m + ξ ) = H m ⊥ ξ + O (∥ ξ ∥ 2 ) , (156)
where H m ⊥ H^\perp_m H m ⊥ is the projection of the Hessian onto the normal space at m m m . Moreover, we have that ∇ L ( m t + ξ t ) = O ( ∥ ξ t ∥ ) \nabla L(m_t+\xi_t) = O(\lVert\xi_t\rVert) ∇ L ( m t + ξ t ) = O (∥ ξ t ∥) . Therefore, letting
ζ t ⊥ = P N m t ζ t (157) \zeta^\perp_t = P_{N_{m_t}}\zeta_t \tag*{(157)} ζ t ⊥ = P N m t ζ t (157)
be the projection of the SGD noise onto the normal space, we have that
P N m t δ t = − η H m t ⊥ ξ t − η ζ t ⊥ + O ( η ∥ ξ t ∥ 2 ) (158) P_{N_{m_t}}\delta_t = -\eta H^\perp_{m_t}\xi_t - \eta\zeta^\perp_t + O(\eta\lVert\xi_t\rVert^2) \tag*{(158)} P N m t δ t = − η H m t ⊥ ξ t − η ζ t ⊥ + O ( η ∥ ξ t ∥ 2 ) (158)
and
∥ δ t ∥ = O ( η ( ∥ ξ t ∥ + ∥ ζ t ∥ ) ) . (159) \lVert\delta_t\rVert= O(\eta(\lVert\xi_t\rVert+ \lVert\zeta_t\rVert)). \tag*{(159)} ∥ δ t ∥ = O ( η (∥ ξ t ∥ + ∥ ζ t ∥)) . (159)
Thus, we at last find that
ξ t + 1 = ( I − η H m t ⊥ ) ξ t − η ζ t ⊥ + ϵ t , (160) \xi_{t+1} = (I - \eta H^\perp_{m_t})\xi_t - \eta\zeta^\perp_t + \epsilon_t, \tag*{(160)} ξ t + 1 = ( I − η H m t ⊥ ) ξ t − η ζ t ⊥ + ϵ t , (160)
where the remainder term
ϵ t = O ( η ∥ ξ t ∥ 2 ) + O ( η ∥ ξ t ∥ ∥ ζ t ∥ ) + O ( η 2 ( ∥ ξ t ∥ + ∥ ζ t ∥ ) 2 ) (161) \epsilon_t = O(\eta\lVert\xi_t\rVert^2) + O(\eta\lVert\xi_t\rVert\lVert\zeta_t\rVert) + O(\eta^2(\lVert\xi_t\rVert+ \lVert\zeta_t\rVert)^2) \tag*{(161)} ϵ t = O ( η ∥ ξ t ∥ 2 ) + O ( η ∥ ξ t ∥ ∥ ζ t ∥) + O ( η 2 (∥ ξ t ∥ + ∥ ζ t ∥ ) 2 ) (161)
has three contributions with distinct origins: the first comes from nonlinear contributions to the population gradient normal to the solution manifold, the second from the variation of the projection P N m P_{N_m} P N m away from the manifold, and the third from the expansion of the normal-coordinate map.
We now use this recurrence to argue that fluctuations away from the solution manifold relax rapidly. We do so supposing that the normal Hessian satisfies the uniform bound
H m t ⊥ ⪰ μ I (162) H^\perp_{m_t} \succeq\mu I \tag*{(162)} H m t ⊥ ⪰ μ I (162)
for some μ > 0 \mu> 0 μ > 0 , which in the case of interest is true provided that the data has a spectral gap separating the k k k -principal subspace from the remaining directions (Appendix B). Under this assumption, the stochastic dynamics for ξ t \xi_t ξ t are zero-reverting, and rapidly equilibrate.
Given that the noise has covariance of order 1 / B 1/B 1/ B , we can see that we should have
∥ ξ t ∥ = O ( η B ) (163) \lVert\xi_t\rVert= \mathcal{O}\left(\sqrt{\frac{\eta}{B}}\right) \tag*{(163)} ∥ ξ t ∥ = O ( B η ) (163)
in probability. If we instead considered a solution not corresponding to the k k k -principal subspace, the Hessian would not be positive-definite, and the process would not be zero-reverting. This is the basic reason why the PCA solution manifold is locally stable under SGD, while non-principal subspace solutions are locally unstable [2 ] .
To show this carefully, we fix a radius ρ > 0 \rho> 0 ρ > 0 , and suppose that ξ t \xi_t ξ t lies within that tube, so that the remainder terms in ϵ t \epsilon_t ϵ t are controlled. To be precise, let
τ ρ = inf { t : ∥ ξ t ∥ ≥ ρ } (164) \tau_\rho= \inf\{t : \lVert\xi_t\rVert\geq\rho\} \tag*{(164)} τ ρ = inf { t : ∥ ξ t ∥ ≥ ρ } (164)
be the time of first exit from the tube. Then, using the assumption that the Hessian is uniformly positive-definite and supposing that η \eta η is small, there exist constants c , C > 0 c, C > 0 c , C > 0 independent of η \eta η and B B B such that
E [ ∥ ξ t + 1 ∥ 2 1 t + 1 < τ ρ ] ≤ ( 1 − c η ) E [ ∥ ξ t ∥ 2 1 t + 1 < τ ρ ] + C η 2 B , (165) \mathbb{E}\left[\lVert\xi_{t+1}\rVert^2 \mathbf{1}_{t+1<\tau_\rho}\right] \leq(1-c\eta)\mathbb{E}\left[\lVert\xi_t\rVert^2 \mathbf{1}_{t+1<\tau_\rho}\right] + C\frac{\eta^2}{B}, \tag*{(165)} E [ ∥ ξ t + 1 ∥ 2 1 t + 1 < τ ρ ] ≤ ( 1 − cη ) E [ ∥ ξ t ∥ 2 1 t + 1 < τ ρ ] + C B η 2 , (165)
where the effect of the remainder terms can be absorbed into the constants provided that the tube radius ρ \rho ρ and learning rate η \eta η are small enough. This assumes that ∥ ζ t ∥ 4 \lVert\zeta_t\rVert^4 ∥ ζ t ∥ 4 is uniformly bounded in expectation, which is satisfied for the datasets of interest given that ξ t \xi_t ξ t lies within the tube. Iterating this recurrence, we find that
E [ ∥ ξ t + 1 ∥ 2 1 t + 1 < τ ρ ] ≤ e − c η t ∥ ξ 0 ∥ 2 + C η B , (166) \mathbb{E}\left[\lVert\xi_{t+1}\rVert^2 \mathbf{1}_{t+1<\tau_\rho}\right] \leq e^{-c\eta t}\lVert\xi_0\rVert^2 + C\frac{\eta}{B}, \tag*{(166)} E [ ∥ ξ t + 1 ∥ 2 1 t + 1 < τ ρ ] ≤ e − cη t ∥ ξ 0 ∥ 2 + C B η , (166)
which means that the mean-squared normal displacement is of order η / B \eta/B η / B after a time on the order of 1 η log 1 η \frac{1}{\eta}\log\frac{1}{\eta} η 1 log η 1 . This implies that ∥ ξ t ∥ = O ( η / B ) \lVert\xi_t\rVert= \mathcal{O}(\sqrt{\eta/B}) ∥ ξ t ∥ = O ( η / B ) .
We now want to argue that the probability that the exit time τ ρ \tau_\rho τ ρ will be reached over the order-B / η 2 B/\eta^2 B / η 2 time interval of interest is small. Under the assumption that the data has finite moments of all orders, we can see that we can use the same argument as above to show that
E [ ∥ ξ t + 1 ∥ 2 p 1 t + 1 < τ ρ ] ≤ C ( η B ) p (167) \mathbb{E}\left[\lVert\xi_{t+1}\rVert^{2p}\mathbf{1}_{t+1<\tau_\rho}\right] \leq C\left(\frac{\eta}{B}\right)^p \tag*{(167)} E [ ∥ ξ t + 1 ∥ 2 p 1 t + 1 < τ ρ ] ≤ C ( B η ) p (167)
for any p ≥ 1 p \geq1 p ≥ 1 , after the fast transient of order 1 η log 1 η \frac{1}{\eta}\log\frac{1}{\eta} η 1 log η 1 steps. Let T 1 T_1 T 1 be large enough such that the transient is evaded, and T 2 T_2 T 2 be of order B / η 2 B/\eta^2 B / η 2 , i.e., let T 2 = ⌊ τ B / η 2 ⌋ T_2 = \lfloor\tau B/\eta^2\rfloor T 2 = ⌊ τ B / η 2 ⌋ for some order-one τ \tau τ . Then, by a union bound and Markov’s inequality,
P ( max T 1 ≤ t ≤ T 2 ∥ ξ t ∥ > ρ ) ≤ ∑ t = T 1 T 2 P ( ∥ ξ t ∥ > ρ 0 ) ≤ C ( T 2 − T 1 ) ( η B ) p ≤ C τ η p − 2 B 1 − p , (168) \mathbb{P}\left(\max_{T_1\leq t\leq T_2}\lVert\xi_t\rVert> \rho\right) \leq\sum_{t=T_1}^{T_2}\mathbb{P}(\lVert\xi_t\rVert> \rho_0) \leq C(T_2-T_1)\left(\frac{\eta}{B}\right)^p \leq C\tau\eta^{p-2}B^{1-p}, \tag*{(168)} P ( T 1 ≤ t ≤ T 2 max ∥ ξ t ∥ > ρ ) ≤ t = T 1 ∑ T 2 P (∥ ξ t ∥ > ρ 0 ) ≤ C ( T 2 − T 1 ) ( B η ) p ≤ C τ η p − 2 B 1 − p , (168)
where the constant changes between the last two inequalities, and depends on τ \tau τ . This goes to zero with η \eta η for any p > 2 p > 2 p > 2 , hence the probability of exiting the tube tends to zero. Therefore, we can use the result above for the stopped process to show that the mean-squared displacement of ξ t \xi_t ξ t over the interval of interest is o ( 1 ) o(1) o ( 1 ) .
The important point here is that this relaxation is fast relative to the slow timescale of the evolution of Q Q Q . On the manifold, the mean update to Q Q Q is of order η 2 / B \eta^2/B η 2 / B , so for an order-one change to accumulate we must wait B / η 2 B/\eta^2 B / η 2 steps. In contrast, we need to wait only 1 / η 1/\eta 1/ η steps for the fluctuations away from the manifold to relax back to the manifold, meaning that the two timescales have a relative separation η / B \eta/B η / B , which tends to zero as η \eta η tends to zero. This shows that the contribution of these fluctuations to the evolution of Q Q Q is o ( 1 ) o(1) o ( 1 ) .
Stochastic approximation for flow along the manifold
We now leverage the separation of timescales proved above to derive an effective flow describing the slow scale growth. This is essentially a standard exercise in stochastic approximation (Kushner and Yin (2003)). As there is a separation of timescales, we can evaluate the evolution of Q t Q_t Q t on the solution manifold and incur only an o ( 1 ) o(1) o ( 1 ) error on the relevant timescale. On the manifold, we have W t T ( W t U t − I d ) = 0 W_t^{\mathsf{T}}(W_tU_t-I_d)=0 W t T ( W t U t − I d ) = 0 , which gives the immediate simplification
Q t + 1 − Q t = η 2 ( U t Σ ^ t ( W t U t − I d ) T ( W t U t − I d ) Σ ^ t U t T ) + o ( 1 ) . (169) Q_{t+1}-Q_t=\eta^2\left(U_t\widehat{\Sigma}_t(W_tU_t-I_d)^{\mathsf{T}}(W_tU_t-I_d)\widehat{\Sigma}_tU_t^{\mathsf{T}}\right)+o(1). \tag*{(169)} Q t + 1 − Q t = η 2 ( U t Σ t ( W t U t − I d ) T ( W t U t − I d ) Σ t U t T ) + o ( 1 ) . (169)
We now want to evaluate the mean and variance of the remaining update with respect to the batch. To do so, we decompose each datapoint as
x = P T x ∥ + x ⊥ , (170) x=P^{\mathsf{T}}x_{\parallel}+x_{\perp}, \tag*{(170)} x = P T x ∥ + x ⊥ , (170)
where x ⊥ x_{\perp} x ⊥ lies outside the principal subspace, and satisfies P x ⊥ = 0 Px_{\perp}=0 P x ⊥ = 0 . This leads to the decomposition of the full data matrix as
X t = P T X ∥ , t + X ⊥ , t (171) X_t=P^{\mathsf{T}}X_{\parallel,t}+X_{\perp,t} \tag*{(171)} X t = P T X ∥ , t + X ⊥ , t (171)
and thus, using the fact that W t U t − I d = P T P − I d W_tU_t-I_d=P^{\mathsf{T}}P-I_d W t U t − I d = P T P − I d and U t = S t − 1 / 2 P U_t=S_t^{-1/2}P U t = S t − 1/2 P on the solution manifold given the gauge-fixing assumption,
( W t U t − I d ) Σ ^ t U t T = 1 B ( P T P − I d ) ( P T X ∥ , t + X ⊥ , t ) ( X ∥ , t T P + X ⊥ , t T ) P T S t − 1 / 2 (172) (W_tU_t-I_d)\widehat{\Sigma}_tU_t^{\mathsf{T}}=\frac{1}{B}(P^{\mathsf{T}}P-I_d)(P^{\mathsf{T}}X_{\parallel,t}+X_{\perp,t})(X_{\parallel,t}^{\mathsf{T}}P+X_{\perp,t}^{\mathsf{T}})P^{\mathsf{T}}S_t^{-1/2} \tag*{(172)} ( W t U t − I d ) Σ t U t T = B 1 ( P T P − I d ) ( P T X ∥ , t + X ⊥ , t ) ( X ∥ , t T P + X ⊥ , t T ) P T S t − 1/2 (172)
= 1 B X ⊥ , t X ∥ , t T S t − 1 / 2 (173) =\frac{1}{B}X_{\perp,t}X_{\parallel,t}^{\mathsf{T}}S_t^{-1/2} \tag*{(173)} = B 1 X ⊥ , t X ∥ , t T S t − 1/2 (173)
= 1 B ∑ i ∈ B t x ⊥ , i x ∥ , i T S t − 1 / 2 . (174) =\frac{1}{B}\sum_{i\in B_t}x_{\perp,i}x_{\parallel,i}^{\mathsf{T}}S_t^{-1/2}. \tag*{(174)} = B 1 i ∈ B t ∑ x ⊥ , i x ∥ , i T S t − 1/2 . (174)
where in the last line we introduce indexing of the datapoints, with the minibatch defined by an index set B t B_t B t . Then, we have
U t Σ ^ t ( W t U t − I d ) T ( W t U t − I d ) Σ ^ t U t T = 1 B 2 S t − 1 / 2 ∑ i , j ∈ B t ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T S t − 1 / 2 , (175) U_t\widehat{\Sigma}_t(W_tU_t-I_d)^{\mathsf{T}}(W_tU_t-I_d)\widehat{\Sigma}_tU_t^{\mathsf{T}}=\frac{1}{B^2}S_t^{-1/2}\sum_{i,j\in B_t}(x_{\perp,i}x_{\perp,j}^{\mathsf{T}})x_{\parallel,i}x_{\parallel,j}^{\mathsf{T}}S_t^{-1/2}, \tag*{(175)} U t Σ t ( W t U t − I d ) T ( W t U t − I d ) Σ t U t T = B 2 1 S t − 1/2 i , j ∈ B t ∑ ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T S t − 1/2 , (175)
so
Q t + 1 − Q t = η 2 B 2 S t − 1 / 2 ∑ i , j ∈ B t ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T S t − 1 / 2 + o ( 1 ) . (176) Q_{t+1}-Q_t=\frac{\eta^2}{B^2}S_t^{-1/2}\sum_{i,j\in B_t}(x_{\perp,i}x_{\perp,j}^{\mathsf{T}})x_{\parallel,i}x_{\parallel,j}^{\mathsf{T}}S_t^{-1/2}+o(1). \tag*{(176)} Q t + 1 − Q t = B 2 η 2 S t − 1/2 i , j ∈ B t ∑ ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T S t − 1/2 + o ( 1 ) . (176)
Now, assuming that the datapoints are independent with mean zero and diagonal covariance, the mean update is
E [ η 2 B 2 ∑ i , j ∈ B t ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T ] = η 2 B C , (177) \mathbb{E}\left[\frac{\eta^2}{B^2}\sum_{i,j\in B_t}(x_{\perp,i}x_{\perp,j}^{\mathsf{T}})x_{\parallel,i}x_{\parallel,j}^{\mathsf{T}}\right]=\frac{\eta^2}{B}C, \tag*{(177)} E B 2 η 2 i , j ∈ B t ∑ ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T = B η 2 C , (177)
where we define
C = E [ ∥ x ⊥ ∥ 2 x ∥ x ∥ T ] . (178) C=\mathbb{E}[\lVert x_{\perp}\rVert^2x_{\parallel}x_{\parallel}^{\mathsf{T}}]. \tag*{(178)} C = E [∥ x ⊥ ∥ 2 x ∥ x ∥ T ] . (178)
We can then write
Q t + 1 − Q t = η 2 B S t − 1 / 2 C S t − 1 / 2 + η 2 B S t − 1 / 2 Z t S t − 1 / 2 + o ( 1 ) , (179) Q_{t+1}-Q_t=\frac{\eta^2}{B}S_t^{-1/2}CS_t^{-1/2}+\frac{\eta^2}{B}S_t^{-1/2}Z_tS_t^{-1/2}+o(1), \tag*{(179)} Q t + 1 − Q t = B η 2 S t − 1/2 C S t − 1/2 + B η 2 S t − 1/2 Z t S t − 1/2 + o ( 1 ) , (179)
where
Z t = 1 B ∑ i , j ∈ B t ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T − C (180) Z_t=\frac{1}{B}\sum_{i,j\in B_t}(x_{\perp,i}x_{\perp,j}^{\mathsf{T}})x_{\parallel,i}x_{\parallel,j}^{\mathsf{T}}-C \tag*{(180)} Z t = B 1 i , j ∈ B t ∑ ( x ⊥ , i x ⊥ , j T ) x ∥ , i x ∥ , j T − C (180)
is a noise term that is independent across timesteps. Assuming that the data has bounded eighth moments, Z t Z_t Z t has bounded second moment, where the constant may depend on the batch size B B B . Thus, assuming that S t S_t S t is bounded (which holds if the solution stays within the submanifold M K \mathcal{M}_K M K ), over T ∼ B / η 2 T \sim B/\eta^2 T ∼ B / η 2 steps, we have
var ( ∑ t = 1 T η 2 B S t − 1 / 2 Z t S t − 1 / 2 ) = O ( T η 4 B 2 ) = O ( η 2 B ) , (181) \operatorname{var}\left(\sum_{t=1}^{T}\frac{\eta^2}{B}S_t^{-1/2}Z_tS_t^{-1/2}\right)=\mathcal{O}\left(\frac{T\eta^4}{B^2}\right)=\mathcal{O}\left(\frac{\eta^2}{B}\right), \tag*{(181)} var ( t = 1 ∑ T B η 2 S t − 1/2 Z t S t − 1/2 ) = O ( B 2 T η 4 ) = O ( B η 2 ) , (181)
which tends to zero as η ↓ 0 \eta\downarrow0 η ↓ 0 at fixed batch size.
Combining these results, we find that if we take η ↓ 0 \eta\downarrow0 η ↓ 0 while keeping τ = t η 2 / B \tau=t\eta^2/B τ = t η 2 / B to be of order one, the discrete-time dynamics tend in probability to the solution of the corresponding limiting ODE by standard Grönwall-type arguments (Kushner and Yin, 2003). This relies on the fact that Q ( S ) = S − S − 1 Q(S)=S-S^{-1} Q ( S ) = S − S − 1 is a Lipschitz function of S S S provided that the solution remains within M K \mathcal{M}_K M K , i.e., that S S S is uniformly bounded from below and above in Löwner order. Assuming that this condition holds, the limiting dynamics are
d d τ ( S − S − 1 ) = S − 1 / 2 C S − 1 / 2 , (182) \frac{d}{d\tau}(S-S^{-1})=S^{-1/2}CS^{-1/2}, \tag*{(182)} d τ d ( S − S − 1 ) = S − 1/2 C S − 1/2 , (182)
or, equivalently,
d S d τ + S − 1 d S d τ S − 1 = S − 1 / 2 C S − 1 / 2 . (183) \frac{dS}{d\tau}+S^{-1}\frac{dS}{d\tau}S^{-1}=S^{-1/2}CS^{-1/2}. \tag*{(183)} d τ d S + S − 1 d τ d S S − 1 = S − 1/2 C S − 1/2 . (183)
Solution assuming co-diagonalizability
Now, we show that the effective dynamics for S S S can be solved analytically provided that S S S commutes with C C C at some reference time, which we define as τ = 0 \tau=0 τ = 0 without loss of generality.
We claim that if S S S and C C C commute at τ = 0 \tau=0 τ = 0 then they do throughout time under the effective dynamics. This follows from the fact that if S S S commutes with C C C , then so does d S / d τ dS/d\tau d S / d τ . To see this, we write the effective dynamics as
L S ( d S d τ ) = S − 1 / 2 C S − 1 / 2 , (184) L_S\left(\frac{dS}{d\tau}\right)=S^{-1/2}CS^{-1/2}, \tag*{(184)} L S ( d τ d S ) = S − 1/2 C S − 1/2 , (184)
where we define the linear map
L S ( X ) = X + S − 1 X S − 1 . (185) L_S(X)=X+S^{-1}XS^{-1}. \tag*{(185)} L S ( X ) = X + S − 1 X S − 1 . (185)
We can see that L S − 1 L_S^{-1} L S − 1 is well-defined for any PSD S S S , as in vectorized form we can write
vec ( L S ( X ) ) = ( I k ⊗ I k + S − 1 ⊗ S − 1 ) vec ( X ) , (186) \operatorname{vec}(L_S(X))=(I_k\otimes I_k+S^{-1}\otimes S^{-1})\operatorname{vec}(X), \tag*{(186)} vec ( L S ( X )) = ( I k ⊗ I k + S − 1 ⊗ S − 1 ) vec ( X ) , (186)
so we have the explicit formula
vec ( L S − 1 ( Y ) ) = ( I k ⊗ I k + S − 1 ⊗ S − 1 ) − 1 vec ( Y ) . (187) \operatorname{vec}(L_S^{-1}(Y))=(I_k\otimes I_k+S^{-1}\otimes S^{-1})^{-1}\operatorname{vec}(Y). \tag*{(187)} vec ( L S − 1 ( Y )) = ( I k ⊗ I k + S − 1 ⊗ S − 1 ) − 1 vec ( Y ) . (187)
This allows us to write
d S d τ = L S − 1 ( S − 1 / 2 C S − 1 / 2 ) . (188) \frac{dS}{d\tau}=L_S^{-1}(S^{-1/2}CS^{-1/2}). \tag*{(188)} d τ d S = L S − 1 ( S − 1/2 C S − 1/2 ) . (188)
We can now show that L S − 1 ( Y ) L_S^{-1}(Y) L S − 1 ( Y ) commutes with C C C if both S S S and Y Y Y do. If L S ( X ) = Y L_S(X)=Y L S ( X ) = Y for [ Y , C ] = 0 [Y,C]=0 [ Y , C ] = 0 , we have
0 = [ Y , C ] = [ L S ( X ) , C ] = [ X , C ] + [ S − 1 X S − 1 , C ] = [ X , C ] + S − 1 [ X , C ] S − 1 = L S ( [ X , C ] ) (189) 0=[Y,C]=[L_S(X),C]=[X,C]+[S^{-1}XS^{-1},C]=[X,C]+S^{-1}[X,C]S^{-1}=L_S([X,C]) \tag*{(189)} 0 = [ Y , C ] = [ L S ( X ) , C ] = [ X , C ] + [ S − 1 X S − 1 , C ] = [ X , C ] + S − 1 [ X , C ] S − 1 = L S ([ X , C ]) (189)
as by assumption S S S commutes with C C C . But, as L S L_S L S is invertible, this implies that [ X , C ] = 0 [X,C]=0 [ X , C ] = 0 . Therefore, we conclude the desired claim.
As a result, if we assume that [ S ( 0 ) , C ] = 0 [S(0),C]=0 [ S ( 0 ) , C ] = 0 , then we can choose a basis where
S ( τ ) = diag ( s 1 ( τ ) , … , s k ( τ ) ) and C = diag ( σ 1 , … , σ k ) (190) S(\tau)=\operatorname{diag}(s_1(\tau),\ldots,s_k(\tau))\quad\text{and}\quad C=\operatorname{diag}(\sigma_1,\ldots,\sigma_k) \tag*{(190)} S ( τ ) = diag ( s 1 ( τ ) , … , s k ( τ )) and C = diag ( σ 1 , … , σ k ) (190)
for all times τ ≥ 0 \tau\ge0 τ ≥ 0 . Projecting into this basis, we have the decoupled equations
d s i d τ + 1 s i 2 d s i d τ = σ i s i , i ∈ [ k ] . (191) \frac{d s_i}{d\tau}+\frac{1}{s_i^2}\frac{d s_i}{d\tau}=\frac{\sigma_i}{s_i},\quad i\in[k]. \tag*{(191)} d τ d s i + s i 2 1 d τ d s i = s i σ i , i ∈ [ k ] . (191)
Multiplying by s i s_i s i and recognizing that
d d τ ( 1 2 s i 2 + log s i ) = ( s i + 1 s i ) d s i d τ , (192) \frac{d}{d\tau}\left(\frac{1}{2}s_i^2+\log s_i\right)=\left(s_i+\frac{1}{s_i}\right)\frac{d s_i}{d\tau}, \tag*{(192)} d τ d ( 2 1 s i 2 + log s i ) = ( s i + s i 1 ) d τ d s i , (192)
we arrive at the equation
d d τ ( 1 2 s i 2 + log s i ) = σ i . (193) \frac{d}{d\tau}\left(\frac{1}{2}s_i^2+\log s_i\right)=\sigma_i. \tag*{(193)} d τ d ( 2 1 s i 2 + log s i ) = σ i . (193)
Integrating, we have
1 2 s i ( τ ) 2 + log s i ( τ ) = 1 2 s i ( 0 ) 2 + log s i ( 0 ) + σ i τ . (194) \frac{1}{2}s_i(\tau)^2+\log s_i(\tau)=\frac{1}{2}s_i(0)^2+\log s_i(0)+\sigma_i\tau. \tag*{(194)} 2 1 s i ( τ ) 2 + log s i ( τ ) = 2 1 s i ( 0 ) 2 + log s i ( 0 ) + σ i τ . (194)
We now want to solve this for s i ( τ ) s_i(\tau) s i ( τ ) . Multiplying by 2 and exponentiating,
s i ( τ ) 2 e s i ( τ ) 2 = s i ( 0 ) 2 e s i ( 0 ) 2 + 2 σ i τ . (195) s_i(\tau)^2e^{s_i(\tau)^2}=s_i(0)^2e^{s_i(0)^2+2\sigma_i\tau}. \tag*{(195)} s i ( τ ) 2 e s i ( τ ) 2 = s i ( 0 ) 2 e s i ( 0 ) 2 + 2 σ i τ . (195)
Now, recall that the principal branch of the Lambert W W W function, which we will write simply as W W W , satisfies (DLMF)
W ( z ) e W ( z ) = z . (196) W(z)e^{W(z)}=z. \tag*{(196)} W ( z ) e W ( z ) = z . (196)
Thus, we have the solution
s i ( τ ) = W [ s i ( 0 ) 2 exp ( s i ( 0 ) 2 + 2 σ i τ ) ] , (197) s_i(\tau)=\sqrt{W\left[s_i(0)^2\exp\left(s_i(0)^2+2\sigma_i\tau\right)\right]}, \tag*{(197)} s i ( τ ) = W [ s i ( 0 ) 2 exp ( s i ( 0 ) 2 + 2 σ i τ ) ] , (197)
as claimed in the main text. We note that W ( x ) = log x + log log x + o ( 1 ) W(x)=\log x+\log\log x+o(1) W ( x ) = log x + log log x + o ( 1 ) as x → ∞ x\to\infty x → ∞ (DLMF), so at long times this gives
s i ( τ ) ∼ 2 σ i τ . (198) s_i(\tau)\sim\sqrt{2\sigma_i\tau}. \tag*{(198)} s i ( τ ) ∼ 2 σ i τ . (198)
For Gaussian data with covariance eigenvalues λ 1 , … , λ k \lambda_1,\ldots,\lambda_k λ 1 , … , λ k , we have
σ i = ( ∑ j = k + 1 d λ j ) λ i , (199) \sigma_i=\left(\sum_{j=k+1}^{d}\lambda_j\right)\lambda_i, \tag*{(199)} σ i = j = k + 1 ∑ d λ j λ i , (199)
which predicts that the growth rates along different PCs are ordered.
We can in fact prove a stronger ordering statement, which we will use later. Suppose we start from a balanced initial condition with s i ( τ = 0 ) = 1 s_i(\tau=0)=1 s i ( τ = 0 ) = 1 . Then, fixing a time τ \tau τ , let s ( λ ) s(\lambda) s ( λ ) solve
s ( λ ) 2 + 2 log s ( λ ) = 1 + a λ , (200) s(\lambda)^2+2\log s(\lambda)=1+a\lambda, \tag*{(200)} s ( λ ) 2 + 2 log s ( λ ) = 1 + aλ , (200)
where
a = 2 τ ∑ j = k + 1 d λ j , (201) a=2\tau\sum_{j=k+1}^{d}\lambda_j, \tag*{(201)} a = 2 τ j = k + 1 ∑ d λ j , (201)
such that s i ( τ ) = s ( λ i ) s_i(\tau)=s(\lambda_i) s i ( τ ) = s ( λ i ) . We can show that
λ ↦ λ s ( λ ) (202) \lambda\mapsto\frac{\lambda}{s(\lambda)} \tag*{(202)} λ ↦ s ( λ ) λ (202)
is increasing in λ \lambda λ . By implicit differentiation,
s ′ ( λ ) = a s ( λ ) 2 ( s ( λ ) 2 + 1 ) . (203) s'(\lambda)=\frac{as(\lambda)}{2(s(\lambda)^2+1)}. \tag*{(203)} s ′ ( λ ) = 2 ( s ( λ ) 2 + 1 ) a s ( λ ) . (203)
Then,
d d λ λ s ( λ ) = 1 s ( λ ) [ 1 − λ s ′ ( λ ) s ( λ ) ] (204) \frac{d}{d\lambda}\frac{\lambda}{s(\lambda)}=\frac{1}{s(\lambda)}\left[1-\frac{\lambda s'(\lambda)}{s(\lambda)}\right] \tag*{(204)} d λ d s ( λ ) λ = s ( λ ) 1 [ 1 − s ( λ ) λ s ′ ( λ ) ] (204)
= 1 s ( λ ) [ 1 − a λ 2 ( s ( λ ) 2 + 1 ) ] (205) =\frac{1}{s(\lambda)}\left[1-\frac{a\lambda}{2(s(\lambda)^2+1)}\right] \tag*{(205)} = s ( λ ) 1 [ 1 − 2 ( s ( λ ) 2 + 1 ) aλ ] (205)
= 1 s ( λ ) [ 1 − s ( λ ) 2 + 2 log s ( λ ) − 1 2 ( s ( λ ) 2 + 1 ) ] (206) =\frac{1}{s(\lambda)}\left[1-\frac{s(\lambda)^2+2\log s(\lambda)-1}{2(s(\lambda)^2+1)}\right] \tag*{(206)} = s ( λ ) 1 [ 1 − 2 ( s ( λ ) 2 + 1 ) s ( λ ) 2 + 2 log s ( λ ) − 1 ] (206)
where in the last equation we have used the equation that defines s ( λ ) s(\lambda) s ( λ ) . Therefore, λ / s ( λ ) \lambda/s(\lambda) λ / s ( λ ) is increasing in λ \lambda λ if
s 2 + 2 log s − 1 < 2 ( s 2 + 1 ) , (207) s^2+2\log s-1<2(s^2+1), \tag*{(207)} s 2 + 2 log s − 1 < 2 ( s 2 + 1 ) , (207)
or if
2 log s < s 2 + 3. (208) 2\log s<s^2+3. \tag*{(208)} 2 log s < s 2 + 3. (208)
But, as log s < s − 1 \log s<s-1 log s < s − 1 for all s > 0 s>0 s > 0 , and as 2 ( s − 1 ) < s 2 + 3 2(s-1)<s^2+3 2 ( s − 1 ) < s 2 + 3 for all s > 0 s>0 s > 0 as it is equivalent to 2 s < s 2 + 5 2s<s^2+5 2 s < s 2 + 5 , we conclude that this inequality is satisfied. Therefore, for any time τ \tau τ , we have the ordering
λ 1 s 1 ( τ ) ≥ λ 2 s 2 ( τ ) ≥ ⋯ ≥ λ k s k ( τ ) . (209) \frac{\lambda_1}{s_1(\tau)}\geq\frac{\lambda_2}{s_2(\tau)}\geq\cdots\geq\frac{\lambda_k}{s_k(\tau)}. \tag*{(209)} s 1 ( τ ) λ 1 ≥ s 2 ( τ ) λ 2 ≥ ⋯ ≥ s k ( τ ) λ k . (209)
We note also that the specialization of these results to global scale growth is easy to derive. Then, the object of interest is
[ tr ( S t + 1 ) − tr ( S t + 1 − 1 ) ] − [ tr ( S t ) − tr ( S t − 1 ) ] = ∥ x t , ∥ ∥ 2 tr [ S t − 1 x t , ∥ x t , ∥ T ] (210) \left[\operatorname{tr}(S_{t+1})-\operatorname{tr}(S_{t+1}^{-1})\right]-\left[\operatorname{tr}(S_t)-\operatorname{tr}(S_t^{-1})\right]=\lVert x_{t,\parallel}\rVert^2\operatorname{tr}\left[S_t^{-1}x_{t,\parallel}x_{t,\parallel}^{\mathsf{T}}\right] \tag*{(210)} [ tr ( S t + 1 ) − tr ( S t + 1 − 1 ) ] − [ tr ( S t ) − tr ( S t − 1 ) ] = ∥ x t , ∥ ∥ 2 tr [ S t − 1 x t , ∥ x t , ∥ T ] (210)
Making the global scale Ansatz S = s I k S=sI_k S = s I k , this leads to
d d τ ( s − 1 s ) = σ ˉ , (211) \frac{d}{d\tau}\left(s-\frac{1}{s}\right)=\bar{\sigma}, \tag*{(211)} d τ d ( s − s 1 ) = σ ˉ , (211)
where we let
σ ˉ = 1 k tr ( C ) . (212) \bar{\sigma}=\frac{1}{k}\operatorname{tr}(C). \tag*{(212)} σ ˉ = k 1 tr ( C ) . (212)
Then, it is easy to see that the same analysis as above leads to
s ( τ ) = W [ s ( 0 ) 2 exp ( s ( 0 ) 2 + 2 σ ˉ τ ) ] . (213) s(\tau)=\sqrt{W\left[s(0)^2\exp\left(s(0)^2+2\bar{\sigma}\tau\right)\right]}. \tag*{(213)} s ( τ ) = W [ s ( 0 ) 2 exp ( s ( 0 ) 2 + 2 σ ˉ τ ) ] . (213)
Why is this a good effective model?
We now return to the question of why this might be a good effective model for scale growth, as it is not the only way to obtain a set of effective dynamics. In particular, suppose we tried to derive an effective model directly from the dynamics of W T W W^{\mathsf{T}}W W T W . Expanding out the update, we have
W t + 1 T W t + 1 = W t T W t − η ( W t T r t x t T U t T + U t x t r t T W t ) + η 2 ∥ r t ∥ 2 U t x t x t T U t T . (214) W_{t+1}^{\mathsf{T}}W_{t+1}=W_t^{\mathsf{T}}W_t-\eta\left(W_t^{\mathsf{T}}r_tx_t^{\mathsf{T}}U_t^{\mathsf{T}}+U_tx_tr_t^{\mathsf{T}}W_t\right)+\eta^2\lVert r_t\rVert^2U_tx_tx_t^{\mathsf{T}}U_t^{\mathsf{T}}. \tag*{(214)} W t + 1 T W t + 1 = W t T W t − η ( W t T r t x t T U t T + U t x t r t T W t ) + η 2 ∥ r t ∥ 2 U t x t x t T U t T . (214)
Now, on the solution manifold, we have W t T r t = 0 W_t^{\mathsf{T}}r_t=0 W t T r t = 0 , and moreover that r t = − x t , ⊥ r_t=-x_{t,\perp} r t = − x t , ⊥ and U t x t = A t − 1 x t , ∥ U_tx_t=A_t^{-1}x_{t,\parallel} U t x t = A t − 1 x t , ∥ . This leads to the simplified dynamics
W t + 1 T W t + 1 − W t T W t = η 2 A t − 1 [ ∥ x t , ⊥ ∥ 2 x t , ∥ x t , ∥ T ] A t − T (215) W_{t+1}^{\mathsf{T}}W_{t+1}-W_t^{\mathsf{T}}W_t=\eta^2A_t^{-1}\left[\lVert x_{t,\perp}\rVert^2x_{t,\parallel}x_{t,\parallel}^{\mathsf{T}}\right]A_t^{-\mathsf{T}} \tag*{(215)} W t + 1 T W t + 1 − W t T W t = η 2 A t − 1 [ ∥ x t , ⊥ ∥ 2 x t , ∥ x t , ∥ T ] A t − T (215)
Under the same stochastic approximation approach as before, assuming we can neglect fluctuations away from the solution manifold, this would lead to the dynamics
d S d τ = S − 1 / 2 C S − 1 / 2 (216) \frac{dS}{d\tau}=S^{-1/2}CS^{-1/2} \tag*{(216)} d τ d S = S − 1/2 C S − 1/2 (216)
for S = A ⊤ A S = A^{\top}A S = A ⊤ A . This again preserves the condition that [ S ( τ ) , C ] = 0 [S(\tau), C] = 0 [ S ( τ ) , C ] = 0 , meaning that we can diagonalize to obtain
s i d s i d τ = σ i (217) s_i \frac{d s_i}{d\tau} = \sigma_i \tag*{(217)} s i d τ d s i = σ i (217)
for each i ∈ [ k ] i \in[k] i ∈ [ k ] . As
s i d s i d τ = d d τ ( 1 2 s i 2 ) , (218) s_i \frac{d s_i}{d\tau} = \frac{d}{d\tau}\left(\frac{1}{2}s_i^2\right), \tag*{(218)} s i d τ d s i = d τ d ( 2 1 s i 2 ) , (218)
this leads to
s i ( τ ) = s i ( 0 ) 2 + 2 σ i τ . (219) s_i(\tau) = \sqrt{s_i(0)^2 + 2\sigma_i\tau}. \tag*{(219)} s i ( τ ) = s i ( 0 ) 2 + 2 σ i τ . (219)
Thus, this approach gives the same 2 σ i τ \sqrt{2\sigma_i\tau} 2 σ i τ growth at long times as our previous approach, but its early-time dynamics are different.
Why is this the case, and which result should we prefer? Well, in deriving effective dynamics from the order-η 2 \eta^2 η 2 update from the dynamics of Q Q Q , we used the assumption that we are on the solution manifold only to simplify the update itself. When working with the W ⊤ W W^{\top}W W ⊤ W dynamics directly, we used this assumption to argue that the order-η \eta η term vanishes and also to simplify the order-η 2 \eta^2 η 2 term. Thus, we expect the latter effective model to incur errors as a result of fluctuations away from the solution manifold that yield non-zero values of the O ( η ) O(\eta) O ( η ) update; the two models are affected in similar ways by how those fluctuations change the O ( η 2 ) O(\eta^2) O ( η 2 ) term. This means that we should expect the stochastic approximation from the dynamics of Q Q Q to give a better effective model. This is consistent with the fact that we see that the Lambert-W W W solution matches experiment very closely.
The edge of stability for the effective model
The effective model as derived above predicts indefinite anisotropic scale growth s i ( τ ) ∼ 2 σ i τ s_i(\tau) \sim\sqrt{2\sigma_i\tau} s i ( τ ) ∼ 2 σ i τ . However, this cannot be a true property of the underlying discrete-time dynamics, as the maximum eigenvalue of the Hessian of the population loss is scale-dependent, so indefinite growth would destabilize the discrete-time dynamics.1 For an eigenvalue μ i ( H ) \mu_i(H) μ i ( H ) of the Hessian, we recall that the general edge of stability criterion is that η μ i ( H ) ≈ 2 \eta\mu_i(H) \approx2 η μ i ( H ) ≈ 2 , with the threshold being likely somewhat less than 2 for SGD [4 , 6 , 1 , 10 ] .
Recall from our analysis in Appendix B that the within-subspace sector Hessian eigenvalues are
μ a b ∥ = λ a ( s b + 1 s a ) , a , b ∈ [ k ] , (220) \mu^{\parallel}_{ab} = \lambda_a\left(s_b + \frac{1}{s_a}\right), \qquad a,b \in[k], \tag*{(220)} μ ab ∥ = λ a ( s b + s a 1 ) , a , b ∈ [ k ] , (220)
and that we expect these to be the dangerous modes. We have shown above that the scales satisfy the ordering
λ i s i ≥ λ j s j (221) \frac{\lambda_i}{s_i} \ge\frac{\lambda_j}{s_j} \tag*{(221)} s i λ i ≥ s j λ j (221)
if i < j i < j i < j , if we start from a balanced initial condition. Thus, given the ordering results from Appendix B, we conclude that for any a ≤ c a \le c a ≤ c and b ≤ d b \le d b ≤ d , we have
μ a b ∥ ≥ μ c d ∥ . (222) \mu^{\parallel}_{ab} \ge\mu^{\parallel}_{cd}. \tag*{(222)} μ ab ∥ ≥ μ c d ∥ . (222)
For a given b b b , we then have that μ a b ∥ ≥ μ c b ∥ \mu^{\parallel}_{ab} \ge\mu^{\parallel}_{cb} μ ab ∥ ≥ μ c b ∥ whenever a ≤ c a \le c a ≤ c , which shows that μ 1 b ∥ \mu^{\parallel}_{1b} μ 1 b ∥ is the dangerous mode for each b b b .
Given the ordering of the scales s i s_i s i , we expect them to sequentially hit the stability threshold. Write the threshold condition as η λ i ( H ) = κ \eta\lambda_i(H) = \kappa η λ i ( H ) = κ for some 0 < κ ≤ 2 0 < \kappa\le2 0 < κ ≤ 2 . First, s 1 s_1 s 1 will hit a threshold at s 1 = s 1 ∗ s_1 = s_1^* s 1 = s 1 ∗ determined by
η λ 1 ( s 1 ∗ + 1 s 1 ∗ ) = κ . (223) \eta\lambda_1\left(s_1^*+\frac{1}{s_1^*}\right)=\kappa. \tag*{(223)} η λ 1 ( s 1 ∗ + s 1 ∗ 1 ) = κ . (223)
Subsequently, the lower modes will hit thresholds determined by
η λ 1 ( 1 s 1 ∗ + s j ∗ ) = κ , j > 1 , (224) \eta\lambda_1\left(\frac{1}{s_1^*}+s_j^*\right)=\kappa,\qquad j>1, \tag*{(224)} η λ 1 ( s 1 ∗ 1 + s j ∗ ) = κ , j > 1 , (224)
This leads to a common ceiling for all scale directions. To show this very explicitly, let κ ~ = κ / η λ 1 \tilde{\kappa}=\kappa/\eta\lambda_1 κ ~ = κ / η λ 1 be the normalized stability threshold, which we assume to be large as we are working at small learning rate. Then, the above conditions state that the scales satisfy
s 1 ∗ = κ ~ − 1 s 1 ∗ and s j ∗ = κ ~ − 1 s 1 ∗ , j > 1. (225) s_1^*=\tilde{\kappa}-\frac{1}{s_1^*}
\qquad\text{and}\qquad
s_j^*=\tilde{\kappa}-\frac{1}{s_1^*},\qquad j>1. \tag*{(225)} s 1 ∗ = κ ~ − s 1 ∗ 1 and s j ∗ = κ ~ − s 1 ∗ 1 , j > 1. (225)
From this, we can see immediately that we must have all s j ∗ = s 1 ∗ s_j^*=s_1^* s j ∗ = s 1 ∗ at the threshold, where by solving the equation for s 1 ∗ s_1^* s 1 ∗ we have
s j ∗ = s 1 ∗ = κ ~ + κ ~ 2 − 4 2 = κ ~ + O ( κ ~ − 1 ) , (226) s_j^*=s_1^*=\frac{\tilde{\kappa}+\sqrt{\tilde{\kappa}^2-4}}{2}
=\tilde{\kappa}+O(\tilde{\kappa}^{-1}), \tag*{(226)} s j ∗ = s 1 ∗ = 2 κ ~ + κ ~ 2 − 4 = κ ~ + O ( κ ~ − 1 ) , (226)
where the asymptotic expansion holds for κ ~ ≫ 1 \tilde{\kappa}\gg1 κ ~ ≫ 1 .
Batch sharpness decreases with scale
Andreyev and Beneventano [1 ] proposed that networks trained with minibatch SGD operate near the Edge of Stochastic Stability, defined by when the so-called “batch sharpness” saturates near 2 / η 2/\eta 2/ η . The batch sharpness is defined by
B S = E B [ ∇ L ^ B T H ^ B ∇ L ^ B ∥ ∇ L ^ B ∥ 2 ] (227) \mathrm{BS}=\mathbb{E}_{B}\left[\frac{\nabla\hat{L}_{B}^{\mathsf{T}}\hat{H}_{B}\nabla\hat{L}_{B}}{\lVert\nabla\hat{L}_{B}\rVert^2}\right] \tag*{(227)} BS = E B [ ∥ ∇ L ^ B ∥ 2 ∇ L ^ B T H ^ B ∇ L ^ B ] (227)
where L ^ B \hat{L}_{B} L ^ B is the loss on minibatch B \mathcal{B} B , and H ^ B \hat{H}_{B} H ^ B is its Hessian.
In the present setting, consider a minibatch X B ∈ R d × B X_B\in\mathbb{R}^{d\times B} X B ∈ R d × B with empirical covariance Σ ^ B = 1 B X B X B T \hat{\Sigma}_B=\frac{1}{B}X_BX_B^{\mathsf{T}} Σ ^ B = B 1 X B X B T . Then, we have
L ^ B = 1 2 tr [ ( W U − I d ) Σ ^ B ( W U − I d ) T ] , (228) \hat{L}_B=\frac{1}{2}\operatorname{tr}\left[(WU-I_d)\hat{\Sigma}_B(WU-I_d)^{\mathsf{T}}\right], \tag*{(228)} L ^ B = 2 1 tr [ ( W U − I d ) Σ ^ B ( W U − I d ) T ] , (228)
so the minibatch gradients are
∇ W L ^ B = ( W U − I d ) Σ ^ B U T (229) \nabla_W\hat{L}_B=(WU-I_d)\hat{\Sigma}_B U^{\mathsf{T}} \tag*{(229)} ∇ W L ^ B = ( W U − I d ) Σ ^ B U T (229)
∇ U L ^ B = W T ( W U − I d ) Σ ^ B . (230) \nabla_U\hat{L}_B=W^{\mathsf{T}}(WU-I_d)\hat{\Sigma}_B. \tag*{(230)} ∇ U L ^ B = W T ( W U − I d ) Σ ^ B . (230)
Using the general result from Appendix B, the minibatch Hessian is compactly expressed as a bilinear form acting on a perturbation ( δ W , δ U ) (\delta W,\delta U) ( δ W , δ U ) :
H ^ B ( δ W , δ U ) = tr [ ( W δ U + δ W U ) Σ ^ B ( W δ U + δ W U ) T ] + 2 tr [ ( δ W δ U ) Σ ^ B ( W U − I d ) T ] . (231) \begin{aligned}
\hat{H}_B(\delta W,\delta U)
&=\operatorname{tr}\left[(W\delta U+\delta WU)\hat{\Sigma}_B(W\delta U+\delta WU)^{\mathsf{T}}\right] \\
&\quad+2\operatorname{tr}\left[(\delta W\delta U)\hat{\Sigma}_B(WU-I_d)^{\mathsf{T}}\right]. \tag*{(231)}
\end{aligned} H ^ B ( δ W , δ U ) = tr [ ( W δ U + δ W U ) Σ ^ B ( W δ U + δ W U ) T ] + 2 tr [ ( δ W δ U ) Σ ^ B ( W U − I d ) T ] . (231)
We now compute the batch sharpness at a PCA-type solution. Recall that such a solution satisfies
( W , U ) = ( P T A , A − 1 P ) (232) (W,U)=(P^{\mathsf{T}}A,A^{-1}P) \tag*{(232)} ( W , U ) = ( P T A , A − 1 P ) (232)
where P ∈ R k × d P \in\mathbb{R}^{k \times d} P ∈ R k × d is an orthogonal projection (P P ⊤ = I k PP^{\top}=I_k P P ⊤ = I k ) and A ∈ GL ( k ) A \in\operatorname{GL}(k) A ∈ GL ( k ) . Then,
W U − I d = P ⊤ P − I d = − P ⊥ (233) WU-I_d=P^{\top}P-I_d=-P_{\perp} \tag*{(233)} W U − I d = P ⊤ P − I d = − P ⊥ (233)
is a projection, and moreover one that is annihilated by P P P . This shows that ∇ U L ^ B = 0 \nabla_U\widehat{L}_B=0 ∇ U L B = 0 , while ∇ W L ^ B = − P ⊥ Σ ^ B P ⊤ A − ⊤ \nabla_W\widehat{L}_B=-P_{\perp}\widehat{\Sigma}_B P^{\top}A^{-\top} ∇ W L B = − P ⊥ Σ B P ⊤ A − ⊤ . As before, introduce coordinates for the data matrix
X B = P ⊤ X ∥ , B + X ⊥ , B , (234) X_B=P^{\top}X_{\parallel,B}+X_{\perp,B}, \tag*{(234)} X B = P ⊤ X ∥ , B + X ⊥ , B , (234)
such that
P X B = X ∥ , B and P ⊥ X B = X ⊥ , B . (235) PX_B=X_{\parallel,B}\quad\text{and}\quad P_{\perp}X_B=X_{\perp,B}. \tag*{(235)} P X B = X ∥ , B and P ⊥ X B = X ⊥ , B . (235)
Then,
∥ ∇ L ^ B ∥ 2 = ∥ ∇ W L ^ B ∥ 2 = 1 B 2 ∥ P ⊥ X B X B ⊤ P ⊤ A − ⊤ ∥ 2 = 1 B 2 tr ( K B H B ) . (236) \lVert\nabla\widehat{L}_B\rVert^2=\lVert\nabla_W\widehat{L}_B\rVert^2=\frac{1}{B^2}\lVert P_{\perp}X_BX_B^{\top}P^{\top}A^{-\top}\rVert^2=\frac{1}{B^2}\operatorname{tr}(K_BH_B). \tag*{(236)} ∥ ∇ L B ∥ 2 = ∥ ∇ W L B ∥ 2 = B 2 1 ∥ P ⊥ X B X B ⊤ P ⊤ A − ⊤ ∥ 2 = B 2 1 tr ( K B H B ) . (236)
where we have defined the B × B B \times B B × B matrices
K B = X ∥ , B ⊤ ( A A ⊤ ) − 1 X ∥ , B and H B = X ⊥ , B ⊤ X ⊥ , B . (237) K_B=X_{\parallel,B}^{\top}(AA^{\top})^{-1}X_{\parallel,B}\quad\text{and}\quad H_B=X_{\perp,B}^{\top}X_{\perp,B}. \tag*{(237)} K B = X ∥ , B ⊤ ( A A ⊤ ) − 1 X ∥ , B and H B = X ⊥ , B ⊤ X ⊥ , B . (237)
Moreover,
∇ W L ^ B U = − P ⊥ Σ ^ B P ⊤ ( A A ⊤ ) − 1 P , (238) \nabla_W\widehat{L}_BU=-P_{\perp}\widehat{\Sigma}_BP^{\top}(AA^{\top})^{-1}P, \tag*{(238)} ∇ W L B U = − P ⊥ Σ B P ⊤ ( A A ⊤ ) − 1 P , (238)
hence
H ^ B ( ∇ W L ^ B , ∇ U L ^ B ) = tr [ ( ∇ W L ^ B U ) Σ ^ B ( ∇ W L ^ B U ) ⊤ ] = 1 B 3 tr [ K B 2 H B ] . (239) \widehat{H}_B(\nabla_W\widehat{L}_B,\nabla_U\widehat{L}_B)=\operatorname{tr}\left[(\nabla_W\widehat{L}_BU)\widehat{\Sigma}_B(\nabla_W\widehat{L}_BU)^{\top}\right]=\frac{1}{B^3}\operatorname{tr}[K_B^2H_B]. \tag*{(239)} H B ( ∇ W L B , ∇ U L B ) = tr [ ( ∇ W L B U ) Σ B ( ∇ W L B U ) ⊤ ] = B 3 1 tr [ K B 2 H B ] . (239)
Therefore, we can write the batch sharpness on the PCA solution manifold as
B S = E B [ 1 B tr [ K B 2 H B ] tr ( K B H B ) ] . (240) \mathrm{BS}=\mathbb{E}_B\left[\frac{1}{B}\frac{\operatorname{tr}[K_B^2H_B]}{\operatorname{tr}(K_BH_B)}\right]. \tag*{(240)} BS = E B [ B 1 tr ( K B H B ) tr [ K B 2 H B ] ] . (240)
Under a global re-scaling A A ⊤ ↦ s A A ⊤ AA^{\top}\mapsto sAA^{\top} A A ⊤ ↦ s A A ⊤ , we have K B ↦ s − 1 K B K_B\mapsto s^{-1}K_B K B ↦ s − 1 K B , and thus
B S ↦ 1 s B S . (241) \mathrm{BS}\mapsto\frac{1}{s}\mathrm{BS}. \tag*{(241)} BS ↦ s 1 BS . (241)
Therefore, on the PCA solution manifold the batch sharpness is decreasing in global scale; it is in fact precisely homogeneous of degree − 1 -1 − 1 .
This property is shared by what Andreyev and Beneventano [1 ] define as the modified batch sharpness, which amounts to separately averaging the numerator and denominator:
M B S = E B [ ∇ L ^ B ⊤ H ^ B ∇ L ^ B ] E B [ ∥ ∇ L ^ B ∥ 2 ] = 1 B E B [ tr ( K B 2 H B ) ] E B [ tr ( K B H B ) ] . (242) \mathrm{MBS}=\frac{\mathbb{E}_B[\nabla\widehat{L}_B^{\top}\widehat{H}_B\nabla\widehat{L}_B]}{\mathbb{E}_B[\lVert\nabla\widehat{L}_B\rVert^2]}=\frac{1}{B}\frac{\mathbb{E}_B[\operatorname{tr}(K_B^2H_B)]}{\mathbb{E}_B[\operatorname{tr}(K_BH_B)]}. \tag*{(242)} MBS = E B [∥ ∇ L B ∥ 2 ] E B [ ∇ L B ⊤ H B ∇ L B ] = B 1 E B [ tr ( K B H B )] E B [ tr ( K B 2 H B )] . (242)
The advantage of considering this quantity is that it can be computed analytically for the Gaussian data model on which we focus. As in Appendix C, work in a basis where the data covariance Σ \Sigma Σ and the scale matrix S S S are jointly diagonal. Then, X ∥ , B X_{\parallel,B} X ∥ , B and X ⊥ , B X_{\perp,B} X ⊥ , B are independent, and thus H B H_B H B is independent of K B K_B K B . Then, using the fact that E B [ H B ] = ( ∑ j = k + 1 d λ j ) I B \mathbb{E}_B[H_B]=\left(\sum_{j=k+1}^{d}\lambda_j\right)I_B E B [ H B ] = ( ∑ j = k + 1 d λ j ) I B , we find that
M B S = 1 B E B [ tr ( K B 2 ) ] E B [ tr ( K B ) ] . (243) \mathrm{MBS}=\frac{1}{B}\frac{\mathbb{E}_B[\operatorname{tr}(K_B^2)]}{\mathbb{E}_B[\operatorname{tr}(K_B)]}. \tag*{(243)} MBS = B 1 E B [ tr ( K B )] E B [ tr ( K B 2 )] . (243)
as the overall constant of proportionality cancels. Using Isserlis’ theorem for Gaussian moments, we find that
E B [ tr ( K B ) ] = B a 1 , (244) \mathbb{E}_B[\operatorname{tr}(K_B)]=Ba_1, \tag*{(244)} E B [ tr ( K B )] = B a 1 , (244)
E B [ tr ( K B 2 ) ] = B a 1 2 + ( B + 1 ) a 2 (245) \mathbb{E}_B[\operatorname{tr}(K_B^2)]=Ba_1^2+(B+1)a_2 \tag*{(245)} E B [ tr ( K B 2 )] = B a 1 2 + ( B + 1 ) a 2 (245)
where we let
a 1 = ∑ i = 1 k λ i s i and a 2 = ∑ i = 1 k λ i 2 s i 2 . (246) a_1=\sum_{i=1}^{k}\frac{\lambda_i}{s_i}\quad\text{and}\quad a_2=\sum_{i=1}^{k}\frac{\lambda_i^2}{s_i^2}. \tag*{(246)} a 1 = i = 1 ∑ k s i λ i and a 2 = i = 1 ∑ k s i 2 λ i 2 . (246)
This gives
M B S = 1 B ( a 1 + ( B + 1 ) a 2 a 1 ) . (247) \mathrm{MBS}=\frac{1}{B}\left(a_1+(B+1)\frac{a_2}{a_1}\right). \tag*{(247)} MBS = B 1 ( a 1 + ( B + 1 ) a 1 a 2 ) . (247)
Before the edge of stability is reached, we can use the solution of the effective model to study the time evolution of the modified batch sharpness. In fact, we can show that, if we start from a balanced initial condition,
d d τ M B S < 0 (248) \frac{d}{d\tau}\mathrm{MBS}<0 \tag*{(248)} d τ d MBS < 0 (248)
along the flow. To show this, we recall from Appendix C that, assuming Gaussian data, the dynamics under the effective model are
d s i d τ = σ ⊥ λ i s i s i 2 + 1 , s i ( 0 ) = 1 (249) \frac{d s_i}{d\tau}=\sigma_{\perp}\lambda_i\frac{s_i}{s_i^2+1},\qquad s_i(0)=1 \tag*{(249)} d τ d s i = σ ⊥ λ i s i 2 + 1 s i , s i ( 0 ) = 1 (249)
assuming a balanced initial condition, where σ ⊥ = ∑ j = k + 1 d λ j \sigma_{\perp}=\sum_{j=k+1}^{d}\lambda_j σ ⊥ = ∑ j = k + 1 d λ j is the variance outside the principal subspace. Moreover, we recall that the explicit solution is given implicitly by
s i 2 + 2 log s i − 1 = 2 σ ⊥ λ i τ . (250) s_i^2+2\log s_i-1=2\sigma_{\perp}\lambda_i\tau. \tag*{(250)} s i 2 + 2 log s i − 1 = 2 σ ⊥ λ i τ . (250)
Then, we see immediately that
d d τ log s i > 0 , (251) \frac{d}{d\tau}\log s_i>0, \tag*{(251)} d τ d log s i > 0 , (251)
so
d d τ a 1 = ∑ i = 1 k d d τ λ i s i = − ∑ i = 1 k λ i s i d d τ log s i < 0. (252) \frac{d}{d\tau}a_1=\sum_{i=1}^{k}\frac{d}{d\tau}\frac{\lambda_i}{s_i}=-\sum_{i=1}^{k}\frac{\lambda_i}{s_i}\frac{d}{d\tau}\log s_i<0. \tag*{(252)} d τ d a 1 = i = 1 ∑ k d τ d s i λ i = − i = 1 ∑ k s i λ i d τ d log s i < 0. (252)
What requires more care is to show that a 2 / a 1 a_2/a_1 a 2 / a 1 is decreasing. Expanding out the derivatives, we can see that we need to show that
− a 1 2 d d τ a 2 a 1 = 2 a 1 ∑ i = 1 k λ i 2 s i 2 d d τ log s i − a 2 ∑ i = 1 k λ i s i d d τ log s i (253) -a_1^2\frac{d}{d\tau}\frac{a_2}{a_1}=2a_1\sum_{i=1}^{k}\frac{\lambda_i^2}{s_i^2}\frac{d}{d\tau}\log s_i-a_2\sum_{i=1}^{k}\frac{\lambda_i}{s_i}\frac{d}{d\tau}\log s_i \tag*{(253)} − a 1 2 d τ d a 1 a 2 = 2 a 1 i = 1 ∑ k s i 2 λ i 2 d τ d log s i − a 2 i = 1 ∑ k s i λ i d τ d log s i (253)
= ∑ i = 1 k λ i 3 s i 3 d d τ log s i + ∑ i < j λ i λ j 2 s i s j 2 F i j (254) =\sum_{i=1}^{k}\frac{\lambda_i^3}{s_i^3}\frac{d}{d\tau}\log s_i+\sum_{i<j}\frac{\lambda_i\lambda_j^2}{s_i s_j^2}F_{ij} \tag*{(254)} = i = 1 ∑ k s i 3 λ i 3 d τ d log s i + i < j ∑ s i s j 2 λ i λ j 2 F ij (254)
is positive, where we have defined
F i j = ( 2 λ i s i s j λ j − 1 ) d d τ log s i + ( 2 − λ i s i s j λ j ) d d τ log s j . (255) F_{ij}=\left(2\frac{\lambda_i}{s_i}\frac{s_j}{\lambda_j}-1\right)\frac{d}{d\tau}\log s_i+\left(2-\frac{\lambda_i}{s_i}\frac{s_j}{\lambda_j}\right)\frac{d}{d\tau}\log s_j. \tag*{(255)} F ij = ( 2 s i λ i λ j s j − 1 ) d τ d log s i + ( 2 − s i λ i λ j s j ) d τ d log s j . (255)
As suggested by our definition, our remaining task is to show that F i j > 0 F_{ij}>0 F ij > 0 , as the first sum is clearly positive. Focus on some entry with i < j i<j i < j . We know from Appendix C that if i ≤ j i\leq j i ≤ j then
λ i s i ≥ λ j s j . (256) \frac{\lambda_i}{s_i}\geq\frac{\lambda_j}{s_j}. \tag*{(256)} s i λ i ≥ s j λ j . (256)
Therefore,
α = λ i s j s i λ j ≥ 1 , (257) \alpha=\frac{\lambda_i s_j}{s_i\lambda_j}\geq1, \tag*{(257)} α = s i λ j λ i s j ≥ 1 , (257)
in terms of which
F i j = ( 2 α − 1 ) d d τ log s i + ( 2 − α ) d d τ log s j . (258) F_{ij}=(2\alpha-1)\frac{d}{d\tau}\log s_i+(2-\alpha)\frac{d}{d\tau}\log s_j. \tag*{(258)} F ij = ( 2 α − 1 ) d τ d log s i + ( 2 − α ) d τ d log s j . (258)
If 1 ≤ α ≤ 2 1 \le\alpha\le2 1 ≤ α ≤ 2 , then both coefficients 2 α − 1 2\alpha- 1 2 α − 1 and 2 − α 2 - \alpha 2 − α are non-negative, and at least one is strictly positive, so clearly F i j > 0 F_{ij} > 0 F ij > 0 . If α > 2 \alpha> 2 α > 2 , then more work is required. Let
r i = d d τ log s i . (259) r_i = \frac{d}{d\tau}\log s_i. \tag*{(259)} r i = d τ d log s i . (259)
We claim that if i < j i < j i < j , then r i > 1 2 r j r_i > \frac{1}{2}r_j r i > 2 1 r j ; we will prove this below. Given this claim, for any α ≥ 1 \alpha\ge1 α ≥ 1 we have
F i j = ( 2 α − 1 ) r i + ( 2 − α ) r j > ( 2 α − 1 ) 1 2 r j + ( 2 − α ) r j = 3 2 r j > 0. (260) F_{ij} = (2\alpha- 1)r_i + (2 - \alpha)r_j > (2\alpha- 1)\frac{1}{2}r_j + (2 - \alpha)r_j = \frac{3}{2}r_j > 0. \tag*{(260)} F ij = ( 2 α − 1 ) r i + ( 2 − α ) r j > ( 2 α − 1 ) 2 1 r j + ( 2 − α ) r j = 2 3 r j > 0. (260)
To prove the claim that if i < j i < j i < j , then r i > 1 2 r j r_i > \frac{1}{2}r_j r i > 2 1 r j , we start by letting y i = s i 2 y_i = s_i^2 y i = s i 2 , and recall from before that if i < j i < j i < j then y i ≥ y j ≥ 1 y_i \ge y_j \ge1 y i ≥ y j ≥ 1 . The dynamics of s i s_i s i imply that
r i = σ ⊥ λ i 1 y i + 1 . (261) r_i = \sigma_{\perp}\lambda_i \frac{1}{y_i + 1}. \tag*{(261)} r i = σ ⊥ λ i y i + 1 1 . (261)
At the initial condition τ = 0 \tau= 0 τ = 0 , all of the scales y i = 1 y_i = 1 y i = 1 , so we have r i ( τ = 0 ) = 1 2 σ ⊥ λ i r_i(\tau= 0) = \frac{1}{2}\sigma_{\perp}\lambda_i r i ( τ = 0 ) = 2 1 σ ⊥ λ i , meaning that r i ≥ r j ≥ 0 r_i \ge r_j \ge0 r i ≥ r j ≥ 0 for any i < j i < j i < j given the eigenvalues are ordered, hence the claim follows trivially. For τ > 0 \tau> 0 τ > 0 , all y j > 1 y_j > 1 y j > 1 , and we can use the explicit solution s i 2 + log s i 2 − 1 = 2 σ ⊥ λ i τ s_i^2 + \log s_i^2 - 1 = 2\sigma_{\perp}\lambda_i\tau s i 2 + log s i 2 − 1 = 2 σ ⊥ λ i τ to write σ ⊥ λ i \sigma_{\perp}\lambda_i σ ⊥ λ i in terms of the solution y i y_i y i , which leads to
r i = 1 2 τ ϕ ( y i ) for ϕ ( y ) = y + log y − 1 y + 1 . (262) r_i = \frac{1}{2\tau}\phi(y_i) \quad\text{for} \quad\phi(y) = \frac{y + \log y - 1}{y + 1}. \tag*{(262)} r i = 2 τ 1 ϕ ( y i ) for ϕ ( y ) = y + 1 y + log y − 1 . (262)
We are then left with a self-contained problem about the scalar function ϕ ( y ) = y + log y − 1 y + 1 \phi(y) = \frac{y+\log y-1}{y+1} ϕ ( y ) = y + 1 y + l o g y − 1 , defined for y ≥ 1 y \ge1 y ≥ 1 : we must prove that if x ≥ y > 1 x \ge y > 1 x ≥ y > 1 , then ϕ ( x ) > 1 2 ϕ ( y ) \phi(x) > \frac{1}{2}\phi(y) ϕ ( x ) > 2 1 ϕ ( y ) . By inspection, ϕ ( y = 1 ) = 0 \phi(y = 1) = 0 ϕ ( y = 1 ) = 0 , and moreover ϕ ( y ) ≥ 0 \phi(y) \ge0 ϕ ( y ) ≥ 0 for all y ∈ [ 1 , ∞ ) y \in[1,\infty) y ∈ [ 1 , ∞ ) . Differentiating, we see that
ϕ ′ ( y ) = 3 + y − 1 − log ( y ) ( 1 + y ) 2 (263) \phi'(y) = \frac{3 + y^{-1} - \log(y)}{(1+y)^2} \tag*{(263)} ϕ ′ ( y ) = ( 1 + y ) 2 3 + y − 1 − log ( y ) (263)
has a unique zero at y ⋆ = 1 / W ( e − 3 ) y_\star= 1/W(e^{-3}) y ⋆ = 1/ W ( e − 3 ) , the unique solution to 3 + y − 1 − log ( y ) = 0 3 + y^{-1} - \log(y) = 0 3 + y − 1 − log ( y ) = 0 . From this, we find that ϕ \phi ϕ is strictly increasing on [ 1 , y ⋆ ] [1,y_\star] [ 1 , y ⋆ ] and strictly decreasing on [ y ⋆ , ∞ ) [y_\star,\infty) [ y ⋆ , ∞ ) . An elementary lower bound on y ⋆ y_\star y ⋆ is that y ⋆ > e 3 y_\star> e^3 y ⋆ > e 3 , which holds because ϕ ′ ( e 3 ) = e − 3 ( e 3 + 1 ) 2 > 0 \phi'(e^3) = \frac{e^{-3}}{(e^3+1)^2} > 0 ϕ ′ ( e 3 ) = ( e 3 + 1 ) 2 e − 3 > 0 .
At the unique global maximum y ⋆ y_\star y ⋆ , we have ϕ ( y ⋆ ) = 1 + W ( e − 3 ) ≤ 1 + W ( 1 ) < 2 \phi(y_\star) = 1 + W(e^{-3}) \le1 + W(1) < 2 ϕ ( y ⋆ ) = 1 + W ( e − 3 ) ≤ 1 + W ( 1 ) < 2 , and from this we see that ϕ ( y ) < 2 \phi(y) < 2 ϕ ( y ) < 2 for all y y y . This upper bound also can be directly proved by noting that it is equivalent to the statement that y + log y − 1 < 2 y + 2 y + \log y - 1 < 2y + 2 y + log y − 1 < 2 y + 2 , which in turn is equivalent to the obvious inequality log y < y + 3 \log y < y + 3 log y < y + 3 .
We can now divide the proof of the desired claim into two cases. If ϕ ( x ) ≥ ϕ ( y ) \phi(x) \ge\phi(y) ϕ ( x ) ≥ ϕ ( y ) , then we can immediately conclude that ϕ ( x ) > 1 2 ϕ ( y ) \phi(x) > \frac{1}{2}\phi(y) ϕ ( x ) > 2 1 ϕ ( y ) because we know that ϕ ( y ) ≥ 0 \phi(y) \ge0 ϕ ( y ) ≥ 0 for any y ≥ 1 y \ge1 y ≥ 1 . If instead ϕ ( x ) < ϕ ( y ) \phi(x) < \phi(y) ϕ ( x ) < ϕ ( y ) for x ≥ y > 1 x \ge y > 1 x ≥ y > 1 , then we must have x > y ⋆ x > y_\star x > y ⋆ . Now, as noted before, we know that ϕ ( y ) < 2 \phi(y) < 2 ϕ ( y ) < 2 , so the claim follows if ϕ ( x ) ≥ 1 \phi(x) \ge1 ϕ ( x ) ≥ 1 . We can see that ϕ ( x ) ≥ 1 \phi(x) \ge1 ϕ ( x ) ≥ 1 is equivalent to the inequality x + log x − 1 ≥ x + 1 x+\log x-1 \ge x+1 x + log x − 1 ≥ x + 1 , which is in turn equivalent to log x ≥ 2 \log x \ge2 log x ≥ 2 , or x ≥ e 2 x \ge e^2 x ≥ e 2 . But, we know that x > y ⋆ x > y_\star x > y ⋆ , and from before that y ⋆ > e 3 y_\star> e^3 y ⋆ > e 3 , which is greater than e 2 e^2 e 2 . As a result, we conclude that x > e 2 x > e^2 x > e 2 and thus that ϕ ( x ) ≥ 1 \phi(x) \ge1 ϕ ( x ) ≥ 1 , and thus the desired result. This concludes the proof.
Nonlinear autoencoders
As we focus on linear autoencoders, a natural question is whether any of the phenomenology generalizes to nonlinear models.
Extending the PCA manifold to homogeneous nonlinear models
Consider a general nonlinear autoencoder
f θ , φ ( x ) = g θ ( h φ ( x ) ) , (264) f_{\theta,\varphi}(x) = g_{\theta}(h_{\varphi}(x)), \tag*{(264)} f θ , φ ( x ) = g θ ( h φ ( x )) , (264)
where h φ : R d → R k h_{\varphi} : \mathbb{R}^{d} \to\mathbb{R}^{k} h φ : R d → R k and g θ : R k → R d g_{\theta} : \mathbb{R}^{k} \to\mathbb{R}^{d} g θ : R k → R d are the encoder and decoder, with parameter vectors φ \varphi φ and θ \theta θ , respectively. We will usually suppress the subscripts, and write simply f f f , g g g , and h h h . Suppose that the model has a scale symmetry, in the sense that its output f θ , φ ( x ) f_{\theta,\varphi}(x) f θ , φ ( x ) is invariant for any example x x x under transformations of the form
( θ , φ ) ↦ ( a θ , a − 1 φ ) , a > 0. (265) (\theta,\varphi) \mapsto(a\theta,a^{-1}\varphi), \quad a > 0. \tag*{(265)} ( θ , φ ) ↦ ( a θ , a − 1 φ ) , a > 0. (265)
If we train the model to minimize an L 2 L^{2} L 2 reconstruction loss L = 1 2 E x [ ∥ f ( x ) − x ∥ 2 ] L = \frac{1}{2}\mathbb{E}_{x}[\lVert f(x)-x\rVert^{2}] L = 2 1 E x [∥ f ( x ) − x ∥ 2 ] via gradient flow ∂ t θ = − ∇ θ L \partial_{t}\theta= -\nabla_{\theta}L ∂ t θ = − ∇ θ L , ∂ t φ = − ∇ φ L \partial_{t}\varphi= -\nabla_{\varphi}L ∂ t φ = − ∇ φ L , then it is well-known that the scale symmetry (E.2) means that the corresponding Noether charge
q = ∥ θ ∥ 2 − ∥ φ ∥ 2 (266) q = \lVert\theta\rVert^{2} - \lVert\varphi\rVert^{2} \tag*{(266)} q = ∥ θ ∥ 2 − ∥ φ ∥ 2 (266)
is conserved, i.e., ∂ t q = 0 \partial_{t}q = 0 ∂ t q = 0 ([9 ] (Kunin et al. 2021; Tanaka and Kunin 2021)). To see this, note that our assumption that f ( x ) = g ( h ( x ) ) f(x) = g(h(x)) f ( x ) = g ( h ( x )) is invariant under transformations ( θ , φ ) ↦ ( a θ , a − 1 φ ) (\theta,\varphi) \mapsto(a\theta,a^{-1}\varphi) ( θ , φ ) ↦ ( a θ , a − 1 φ ) for a > 0 a > 0 a > 0 implies that the per-example loss ℓ ( x ) = 1 2 ∥ f ( x ) − x ∥ 2 \ell(x) = \frac{1}{2}\lVert f(x)-x\rVert^{2} ℓ ( x ) = 2 1 ∥ f ( x ) − x ∥ 2 is invariant. This implies that
0 = d d a ℓ ( x ) ∣ a = 1 = ⟨ ∇ θ ℓ ( x ) , θ ⟩ − ⟨ ∇ φ ℓ ( x ) , φ ⟩ , (267) 0 = \left.\frac{d}{da}\ell(x)\right|_{a=1} = \langle\nabla_{\theta}\ell(x),\theta\rangle- \langle\nabla_{\varphi}\ell(x),\varphi\rangle, \tag*{(267)} 0 = d a d ℓ ( x ) a = 1 = ⟨ ∇ θ ℓ ( x ) , θ ⟩ − ⟨ ∇ φ ℓ ( x ) , φ ⟩ , (267)
which in turn implies that
∂ t q = 2 ( ⟨ θ , ∂ t θ ⟩ − ⟨ φ , ∂ t φ ⟩ ) (268) \partial_{t}q = 2(\langle\theta,\partial_{t}\theta\rangle- \langle\varphi,\partial_{t}\varphi\rangle) \tag*{(268)} ∂ t q = 2 (⟨ θ , ∂ t θ ⟩ − ⟨ φ , ∂ t φ ⟩) (268)
= − 2 E [ ⟨ θ , ∇ θ ℓ ( x ) ⟩ − ⟨ φ , ∇ φ ℓ ( x ) ⟩ ] (269) = -2\mathbb{E}[\langle\theta,\nabla_{\theta}\ell(x)\rangle- \langle\varphi,\nabla_{\varphi}\ell(x)\rangle] \tag*{(269)} = − 2 E [⟨ θ , ∇ θ ℓ ( x )⟩ − ⟨ φ , ∇ φ ℓ ( x )⟩] (269)
= 0. (270) = 0. \tag*{(270)} = 0. (270)
Under SGD updates θ t + 1 = θ t − η ∇ θ L ^ t \theta_{t+1} = \theta_{t} - \eta\nabla_{\theta}\widehat{L}_{t} θ t + 1 = θ t − η ∇ θ L t , φ t + 1 = φ t − η ∇ φ L ^ t \varphi_{t+1} = \varphi_{t} - \eta\nabla_{\varphi}\widehat{L}_{t} φ t + 1 = φ t − η ∇ φ L t for L ^ t = E x ∼ B t [ ℓ ( x ) ] \widehat{L}_{t} = \mathbb{E}_{x\sim B_{t}}[\ell(x)] L t = E x ∼ B t [ ℓ ( x )] , we have
q t + 1 = q t − 2 η E x ∼ B t [ ⟨ θ , ∇ θ ℓ ( x ) ⟩ − ⟨ φ , ∇ φ ℓ ( x ) ⟩ ] + η 2 ( ∥ ∇ θ L ^ t ∥ 2 − ∥ ∇ φ L ^ t ∥ 2 ) (271) q_{t+1} = q_{t} - 2\eta\mathbb{E}_{x\sim B_{t}}[\langle\theta,\nabla_{\theta}\ell(x)\rangle- \langle\varphi,\nabla_{\varphi}\ell(x)\rangle] + \eta^{2}(\lVert\nabla_{\theta}\widehat{L}_{t}\rVert^{2} - \lVert\nabla_{\varphi}\widehat{L}_{t}\rVert^{2}) \tag*{(271)} q t + 1 = q t − 2 η E x ∼ B t [⟨ θ , ∇ θ ℓ ( x )⟩ − ⟨ φ , ∇ φ ℓ ( x )⟩] + η 2 (∥ ∇ θ L t ∥ 2 − ∥ ∇ φ L t ∥ 2 ) (271)
= q t + η 2 ( ∥ ∇ θ L ^ t ∥ 2 − ∥ ∇ φ L ^ t ∥ 2 ) , (272) = q_{t} + \eta^{2}(\lVert\nabla_{\theta}\widehat{L}_{t}\rVert^{2} - \lVert\nabla_{\varphi}\widehat{L}_{t}\rVert^{2}), \tag*{(272)} = q t + η 2 (∥ ∇ θ L t ∥ 2 − ∥ ∇ φ L t ∥ 2 ) , (272)
where the order-η \eta η term vanishes identically by (E.4).
We now observe that we can partially extend the PCA solution geometry to these more general nonlinear models. Consider a particular example x x x . Let its latent encoding be z = h ( x ) z = h(x) z = h ( x ) , and the residual be r = g ( z ) − x r = g(z) - x r = g ( z ) − x , such that the reconstruction error is ℓ ( x ) = 1 2 ∥ r ∥ 2 \ell(x) = \frac{1}{2}\lVert r\rVert^{2} ℓ ( x ) = 2 1 ∥ r ∥ 2 . By the chain rule, the parameter gradients appearing in the update (E.9) for q t q_t q t are ∇ θ ℓ = ( ∂ g / ∂ θ ) T r \nabla_{\theta}\ell= (\partial g/\partial\theta)^{\mathsf{T}}r ∇ θ ℓ = ( ∂ g / ∂ θ ) T r and ∇ φ ℓ = ( ∂ h / ∂ φ ) T ( ∂ g / ∂ z ) T r \nabla_{\varphi}\ell= (\partial h/\partial\varphi)^{\mathsf{T}}(\partial g/\partial z)^{\mathsf{T}}r ∇ φ ℓ = ( ∂ h / ∂ φ ) T ( ∂ g / ∂ z ) T r . For an overcomplete autoencoder, perfect reconstruction is possible, leading to r = 0 r = 0 r = 0 and q t + 1 = q t q_{t+1} = q_t q t + 1 = q t . In contrast, for an undercomplete autoencoder with k < d k < d k < d , it is not generally possible to make the residual vanish for an arbitrary example.
Geometrically, we can then decompose the residual r r r into components normal and tangential to the decoder manifold D = { g ( z ) : z ∈ im h } \mathcal{D} = \{g(z) : z \in\operatorname{im} h\} D = { g ( z ) : z ∈ im h } , which we write as r ⊥ r_{\perp} r ⊥ and r ∥ r_{\parallel} r ∥ , respectively. By definition, ( ∂ g / ∂ z ) T r ⊥ = 0 (\partial g/\partial z)^{\mathsf{T}}r_{\perp} = 0 ( ∂ g / ∂ z ) T r ⊥ = 0 . Thus, the encoder gradient ∇ φ ℓ \nabla_{\varphi}\ell ∇ φ ℓ is sensitive only to r ∥ r_{\parallel} r ∥ , while the decoder gradient ∇ θ ℓ \nabla_{\theta}\ell ∇ θ ℓ is sensitive to both r ∥ r_{\parallel} r ∥ and r ⊥ r_{\perp} r ⊥ . Assuming that k ≪ d k \ll d k ≪ d , it is possible for the undercomplete autoencoder to make the k k k -dimensional tangential component r ∥ r_{\parallel} r ∥ quite small. As a result, as the decoder gradient has an additional contribution from r ⊥ r_{\perp} r ⊥ relative to the encoder gradient, we expect undercomplete autoencoders to generically favor decoder-heavy solutions so long as ∥ r ∥ ∥ ≪ ∥ r ⊥ ∥ \lVert r_{\parallel}\rVert\ll\lVert r_{\perp}\rVert ∥ r ∥ ∥ ≪ ∥ r ⊥ ∥ . In the extreme, we can consider what we might refer to as projection-type solutions that have r ∥ = 0 r_{\parallel}=0 r ∥ = 0 ; these are in some sense an analog of the PCA solutions in the linear case. On the manifold of such solutions, the imbalance dynamics reduce to
q t + 1 = q t + η 2 ∥ ∇ L ^ t ∥ 2 , (273) q_{t+1}=q_t+\eta^2\lVert\nabla\widehat{L}_t\rVert^2, \tag*{(273)} q t + 1 = q t + η 2 ∥ ∇ L t ∥ 2 , (273)
that is, there is a systematic drift towards larger decoder scales.
Per-neuron scale symmetries in ReLU autoencoders
In the section above we considered the case in which the GL ( k ) \operatorname{GL}(k) GL ( k ) symmetry of a linear autoencoder is reduced all the way down to a single R > 0 \mathbb{R}_{>0} R > 0 . However, for a standard ReLU autoencoder
f ( x ) = W σ ( U x ) , (274) f(x)=W\sigma(Ux), \tag*{(274)} f ( x ) = W σ ( U x ) , (274)
where σ ( t ) = max ( 0 , t ) \sigma(t)=\max(0,t) σ ( t ) = max ( 0 , t ) acts elementwise, has a larger symmetry group defined by re-scaling each hidden neuron, in addition to permutation symmetries. The continuous component of the symmetry group is simply the neuron-wise rescalings R > 0 k \mathbb{R}_{>0}^{k} R > 0 k , which correspond to ( W , U ) ↦ ( W A , A − 1 U ) (W,U)\mapsto(WA,A^{-1}U) ( W , U ) ↦ ( W A , A − 1 U ) for A = diag ( a 1 , … , a k ) A=\operatorname{diag}(a_1,\ldots,a_k) A = diag ( a 1 , … , a k ) a diagonal matrix with positive diagonal elements a i > 0 a_i>0 a i > 0 [9 ] (Tanaka and Kunin 2021).
A more tractable expression follows by letting w i w_i w i be the i i i -th column of W W W , and u i T u_i^{\mathsf{T}} u i T be the i i i -th row of U U U . Then,
f ( x ) = ∑ i = 1 k w i σ ( u i T x ) (275) f(x)=\sum_{i=1}^{k}w_i\sigma(u_i^{\mathsf{T}}x) \tag*{(275)} f ( x ) = i = 1 ∑ k w i σ ( u i T x ) (275)
and the action of the symmetry group is that, for each i i i , ( w i , u i ) ↦ ( a i w i , a i − 1 u i ) (w_i,u_i)\mapsto(a_iw_i,a_i^{-1}u_i) ( w i , u i ) ↦ ( a i w i , a i − 1 u i ) . This formulation also makes it obvious that there are k k k Noether charges corresponding to this symmetry:
q i = ∥ w i ∥ 2 − ∥ u i ∥ 2 . (276) q_i=\lVert w_i\rVert^2-\lVert u_i\rVert^2. \tag*{(276)} q i = ∥ w i ∥ 2 − ∥ u i ∥ 2 . (276)
The charge related to global rescaling is then simply the sum of these per-neuron charges: q = ∑ i = 1 k q i q=\sum_{i=1}^{k}q_i q = ∑ i = 1 k q i . The proof that these charges are individually conserved under gradient flow parallels the proof for homogeneous rescalings considered above: for any i ∈ [ k ] i\in[k] i ∈ [ k ] ,
0 = ∂ ∂ a i ℓ ( x ) ∣ A = I k = ⟨ ∇ w i ℓ ( x ) , w i ⟩ − ⟨ ∇ u i ℓ ( x ) , u i ⟩ , (277) 0=\left.\frac{\partial}{\partial a_i}\ell(x)\right|_{A=I_k}=\langle\nabla_{w_i}\ell(x),w_i\rangle-\langle\nabla_{u_i}\ell(x),u_i\rangle, \tag*{(277)} 0 = ∂ a i ∂ ℓ ( x ) A = I k = ⟨ ∇ w i ℓ ( x ) , w i ⟩ − ⟨ ∇ u i ℓ ( x ) , u i ⟩ , (277)
so
∂ t q i = 2 ( ⟨ w i , ∂ t w i ⟩ − ⟨ u i , ∂ t u i ⟩ ) = 2 E [ ⟨ ∇ w i ℓ ( x ) , w i ⟩ − ⟨ ∇ u i ℓ ( x ) , u i ⟩ ] = 0. (278) \partial_tq_i=2(\langle w_i,\partial_tw_i\rangle-\langle u_i,\partial_tu_i\rangle)=2\mathbb{E}[\langle\nabla_{w_i}\ell(x),w_i\rangle-\langle\nabla_{u_i}\ell(x),u_i\rangle]=0. \tag*{(278)} ∂ t q i = 2 (⟨ w i , ∂ t w i ⟩ − ⟨ u i , ∂ t u i ⟩) = 2 E [⟨ ∇ w i ℓ ( x ) , w i ⟩ − ⟨ ∇ u i ℓ ( x ) , u i ⟩] = 0. (278)
Under SGD, we have the general update
q t + 1 , i − q t , i = η 2 ( ∥ ∇ w i L ^ t ∥ 2 − ∥ ∇ u i L ^ t ∥ 2 ) . (279) q_{t+1,i}-q_{t,i}=\eta^2(\lVert\nabla_{w_i}\widehat{L}_t\rVert^2-\lVert\nabla_{u_i}\widehat{L}_t\rVert^2). \tag*{(279)} q t + 1 , i − q t , i = η 2 (∥ ∇ w i L t ∥ 2 − ∥ ∇ u i L t ∥ 2 ) . (279)
We show in Figure S2 that, empirically, SGD training leads to decoder-heavy imbalance for these networks.
Experimental details
The simulations were performed with two-layer autoencoders of the form x ^ = W ϕ ( U x ) \hat{x}=W\phi(Ux) x ^ = W ϕ ( U x ) , with zero bias, input dimension n = 20 n=20 n = 20 , and either a contractive hidden layer k = 10 < n k=10<n k = 10 < n or an expansive hidden layer k = 40 > n k=40>n k = 40 > n . The data were generated online from a diagonal Gaussian distribution, x ∼ N ( 0 , Σ ) x\sim\mathcal{N}(0,\Sigma) x ∼ N ( 0 , Σ ) , where Σ = diag ( λ 1 , … , λ n ) \Sigma=\operatorname{diag}(\lambda_1,\ldots,\lambda_n) Σ = diag ( λ 1 , … , λ n ) is the covariance eigenvalues were geometrically spaced from λ 1 = 12 \lambda_1 = 12 λ 1 = 12 to λ n = 0.18 \lambda_n = 0.18 λ n = 0.18 (concretely, λ i = λ 1 ( λ n λ 1 ) i − 1 n − 1 \lambda_i = \lambda_1 \left(\frac{\lambda_n}{\lambda_1}\right)^{\frac{i-1}{n-1}} λ i = λ 1 ( λ 1 λ n ) n − 1 i − 1 ). Training used minibatch SGD with batch size B B B , learning rate η \eta η , mean-squared reconstruction loss, and fresh Gaussian samples at every update. Unless specified, all networks had linear activation ϕ ( z i ) = z i \phi(z_i) = z_i ϕ ( z i ) = z i . The specific parameters for each plot are as follows.
Figure 1 A/Figure S1 : n = 20 n = 20 n = 20 , k = 10 k = 10 k = 10 (contractive) and k = 40 k = 40 k = 40 (expansive), B = 48 B = 48 B = 48 , η = 0.003 \eta= 0.003 η = 0.003 .
Figure S1. Continual minibatch training drives scale imbalance in linear autoencoders. (A) Validation loss for contractive and expansive linear autoencoders during online training with random initialization at the onset. (B) Scale imbalance is measured by q = ∥ W ∥ F 2 − ∥ U ∥ F 2 q = \lVert W\rVert_{F}^{2} - \lVert U\rVert_{F}^{2} q = ∥ W ∥ F 2 − ∥ U ∥ F 2 . (C,D) Frobenius norms of decoder and encoder weights, ∥ W ∥ F \lVert W\rVert_{F} ∥ W ∥ F and ∥ U ∥ F \lVert U\rVert_{F} ∥ U ∥ F , for contractive and expansive autoencoders, respectively (see §F for experimental details).
Figure S2 : n = 20 n = 20 n = 20 , k = 10 k = 10 k = 10 (contractive) and k = 40 k = 40 k = 40 (expansive), B = 48 B = 48 B = 48 , η = 0.003 \eta= 0.003 η = 0.003 . ϕ ( z i ) = max ( 0 , z i ) \phi(z_i) = \max(0, z_i) ϕ ( z i ) = max ( 0 , z i ) (ReLU activation).
Figure 1 F: n = 20 n = 20 n = 20 , k = 10 k = 10 k = 10 , B = 128 B = 128 B = 128 , η ∈ { 0.014 , 0.016 , … , 0.026 } \eta\in\{0.014, 0.016, \ldots, 0.026\} η ∈ { 0.014 , 0.016 , … , 0.026 } .
Networks in Figure 1 A/Figure S1 and Figure S2 were initialized with i.i.d. zero-mean Gaussian weights with standard deviation 0.01, while the contractive networks in the other plots were initialized at the PCA solution with the identity scale. Specifically, for those networks,
W 0 = [ I k 0 ( n − k ) × k ] , U 0 = [ I k 0 k × ( n − k ) ] , W 0 U 0 = diag ( I k , 0 ( n − k ) × ( n − k ) ) W_0 = \begin{bmatrix} I_k \\ 0_{(n-k)\times k} \end{bmatrix}, \qquad U_0 = \begin{bmatrix} I_k & 0_{k\times(n-k)} \end{bmatrix}, \qquad W_0U_0 = \operatorname{diag}\left(I_k, 0_{(n-k)\times(n-k)}\right) W 0 = [ I k 0 ( n − k ) × k ] , U 0 = [ I k 0 k × ( n − k ) ] , W 0 U 0 = diag ( I k , 0 ( n − k ) × ( n − k ) )
resulting in an initial scale matrix S 0 = W 0 T W 0 = I k S_0 = W_0^{\mathsf{T}}W_0 = I_k S 0 = W 0 T W 0 = I k .