betaFeedback

WorksComputer Science

Broken scale symmetries in undercomplete linear autoencoders

Abstract

Neural network loss landscapes have many symmetries, which are preserved by gradient flow but broken by finite-stepsize stochastic gradient descent (SGD). A canonical example of such a symmetry is scale in homogeneous networks: one can scale up the parameters in one layer and down in the next without changing the network output. Previous work has documented cases in which SGD breaks this symmetry in favor of balancing gradient noise or minimizing fluctuations. Here, we show that the solution geometry of undercomplete linear autoencoders instead selects a preferred sign for scale drift: on the PCA solution manifold, SGD favors large decoder weights. This directed scale drift occurs on a slow timescale, and its dynamics admit an analytically-tractable effective description. However, it cannot continue indefinitely: increasing scale eventually drives the dynamics towards a finite-stepsize stability boundary. The resulting solutions are sharper than a balanced baseline in the sense of the maximum eigenvalue of the loss Hessian, but different sharpness measures can move in opposing directions. Thus, undercomplete autoencoders give a concrete illustration of how loss geometry can convert residual gradient noise into directed motion along a manifold of functionally-equivalent solutions.

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)=WUx(1)f(x)=WUx \tag*{(1)}

with encoder weights U∈Rk×dU\in\mathbb{R}^{k\times d} and decoder weights W∈Rd×kW\in\mathbb{R}^{d\times k}. We train these models to minimize an L2L^2 reconstruction loss L=12Ex[∥f(x)−x∥2]L=\frac{1}{2}\mathbb{E}_x[\lVert f(x)-x\rVert^2], assuming zero-mean data x∈Rdx\in\mathbb{R}^d with covariance Σ=E[xxT]\Sigma=\mathbb{E}[xx^\mathsf{T}]. Our focus is on the undercomplete regime k<dk<d, where exact reconstruction is impossible if Σ\Sigma is of full rank.

These networks have a GL⁡(k)\operatorname{GL}(k) symmetry group that preserves the function output: mapping (W,U)↦(WA,A−1U)(W,U)\mapsto(WA,A^{-1}U) for A∈GL⁡(k)A\in\operatorname{GL}(k) leaves f(x)f(x) invariant. Under gradient flow, it is well-known that the Noether charge

Q=WTW−UUT∈Rk×k(2)Q=W^\mathsf{T}W-UU^\mathsf{T}\in\mathbb{R}^{k\times k} \tag*{(2)}

corresponding to this symmetry is conserved, i.e., ∂tQ=0\partial_t Q=0 (App. § 9; (Tanaka and Kunin, 2021; Kunin et al., 2021)). QQ measures imbalances in the incoming and outgoing weights for each latent neuron. In contrast, under SGD with learning rate η\eta and loss L^t=12Ex∼Bt[∥f(x)−x∥2]\hat{L}_t=\frac{1}{2}\mathbb{E}_{x\sim B_t}[\lVert f(x)-x\rVert^2] for a minibatch BtB_t of size BB and covariance Σ^t\hat{\Sigma}_t, QQ evolves as

Qt+1=Qt+η2[(∇WL^t)T(∇WL^t)−(∇UL^t)(∇UL^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)}

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 with a strict spectral gap λk>λk+1\lambda_k > \lambda_{k+1} separating the kk-principal subspace from the remaining directions, and let P∈Rk×dP \in\mathbb{R}^{k \times d} be an orthogonal projection to the principal subspace, with PPT=IkPP^{\mathsf{T}} = I_k. Then, the global loss minima form the manifold (W,U)=(PTA,A−1P)(W,U) = (P^{\mathsf{T}}A,A^{-1}P) for A∈GL⁡(k)A \in\operatorname{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=(WU−Id)xr = (WU-I_d)x for an arbitrary datapoint xx lies entirely in the complement of the principal subspace, as Id−WU=Id−PPT≡P⊥I_d-WU = I_d-PP^{\mathsf{T}} \equiv P_{\perp} projects to the complement. This forces ∇UL^t=0\nabla_U \widehat{L}_t = 0 to be identically zero, while ∇WL^t=−P⊥Σ^tPTAt−T\nabla_W \widehat{L}_t = -P_{\perp}\widehat{\Sigma}_tP^{\mathsf{T}}A_t^{-\mathsf{T}} depends on the product of in- and out-of-subspace fluctuations, and does not vanish (App. § 9). Thus,

Qt+1−Qt=η2(∇WL^t)T(∇WL^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)}

on the PCA solution manifold; QQ 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∥F2−∥U∥F2q = \operatorname{tr}(Q) = \lVert W\rVert_F^2-\lVert U\rVert_F^2 associated with global rescalings (W,U)↦(aW,a−1U)(W,U) \mapsto(aW,a^{-1}U) for a>0a > 0 (Figure 1A). 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 1A). We now analyze the scale dynamics.

Six-panel plots of scale imbalance and saturation in linear autoencoders

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 and ∥U∥F\lVert U\rVert_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 (BB). s1=(WTW)11s_1=(W^\mathsf{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, si=(WTW)iis_i=(W^\mathsf{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 BB, changes to the balancing matrix QQ accumulate over Tslow∼B/η2T_{\mathrm{slow}} \sim B/\eta^2 steps, which is slow relative to the Tfast∼1/ηT_{\mathrm{fast}} \sim1/\eta steps over which fluctuations away from the solution manifold relax back towards it, as Tfast/Tslow∼η/B≪1T_{\mathrm{fast}}/T_{\mathrm{slow}} \sim\eta/B \ll1 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=ATAS = A^{\mathsf{T}}A summarizing the scale degrees of freedom are given in the small-learning-rate limit η↓0\eta\downarrow0 by the flow

∂τS+S−1∂τSS−1=S−1/2CS−1/2,(5)\partial_{\tau}S + S^{-1}\partial_{\tau}SS^{-1} = S^{-1/2}CS^{-1/2}, \tag*{(5)}

where C=E[∥x∥∥2x∥x∥T]C = \mathbb{E}[\lVert x_{\parallel}\rVert^2x_{\parallel}x_{\parallel}^{\mathsf{T}}] is defined in terms of x∥=Pxx_{\parallel} = Px and x⊥=(Id−PTP)xx_{\perp} = (I_d-P^{\mathsf{T}}P)x. If S(τ=0)S(\tau=0) and CC commute, then this matrix differential equation can be solved analytically. Working in a basis where S=diag⁡(s1,…,sk)S = \operatorname{diag}(s_1,\ldots,s_k) and C=diag⁡(c1,…,ck)C = \operatorname{diag}(c_1,\ldots,c_k), we have the solution

sa(τ)=W[sa(0)2exp⁡(sa(0)2+2caτ)],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)}

where W(⋅)W(\cdot) is the principal branch of the Lambert WW-function (DLMF). Therefore, we expect anisotropic rates of growth along the different scale directions. In the Gaussian case, we have ca=λa∑j=k+1dλjc_a = \lambda_a\sum_{j=k+1}^{d}\lambda_j, i.e., the rate of growth along the aa-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 1C).

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, which for full-batch GD would be exactly equal to 2 (Cohen et al., [4]). For S=diag⁡(s1,…,sk)S = \operatorname{diag}(s_1,\ldots,s_k) with ordered entries s1>s2>⋯>sks_1 > s_2 > \cdots> s_k, we show in Appendix C that the Hessian of the population loss has dangerous modes μ11∥>μ12∥>⋯>μ1k∥\mu^{\parallel}_{11} > \mu^{\parallel}_{12} > \cdots> \mu^{\parallel}_{1k} given by μ1a∥=λ1(s1−1+sa)\mu^{\parallel}_{1a} = \lambda_1(s_1^{-1} + s_a) for a∈[k]a \in[k]. Therefore, as the scales increase anisotropically, the curvature along each of these modes will increase until it hits the threshold ημ1a∥=κ\eta\mu^{\parallel}_{1a} = \kappa at which the underlying discrete dynamics become unstable. Thus, we predict that all scales will eventually saturate at a common value given by sa=κηλ1+O(η)s_a = \frac{\kappa}{\eta\lambda_1} + O(\eta). We show that this prediction is consistent with simulations, with κ≃2\kappa\simeq2, in Figure 1D-F.

References

  1. [1]Arseniy Andreyev and Pierfrancesco Beneventano. Edge of stochastic stability: Revisiting the edge of stability for SGD. arXiv, 2025. URL https://arxiv.org/abs/2412.20553.
  2. [2]Pierre Baldi and Kurt Hornik. Neural networks and principal component analysis: Learning from examples without local minima. Neural Networks, 2(1):53–58, 1989. ISSN 0893-6080. doi: https://doi.org/10.1016/0893-6080(89)90014-2. URL https://www.sciencedirect.com/science/article/pii/0893608089900142.
  3. [3]Feng Chen, Daniel Kunin, Atsushi Yamamura, and Surya Ganguli. Stochastic collapse: how gradient noise attracts SGD dynamics towards simpler subnetworks. Journal of Statistical Mechanics: Theory and Experiment, 2024(10):104023, oct 2024. doi: 10.1088/1742-5468/ad6429. URL https://doi.org/10.1088/1742-5468/ad6429.
  4. [4]Jeremy Cohen, Simran Kaur, Yuanzhi Li, J Zico Kolter, and Ameet Talwalkar. Gradient descent on neural networks typically occurs at the edge of stability. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=jh-rTtvkGeM.arxiv.org/abs/2103.00065
  5. [5]Jeremy Cohen, Alex Damian, Ameet Talwalkar, J Zico Kolter, and Jason D. Lee. Understanding optimization in deep learning with central flows. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=sIE2rI3ZPs.arxiv.org/abs/2410.24206
  6. [6]Alex Damian, Eshaan Nichani, and Jason D. Lee. Self-stabilization: The implicit bias of gradient descent at the edge of stability. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=mhKHA5gXz.arxiv.org/abs/2209.15594
  7. [7]Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1019–1028. PMLR, 06–11 Aug 2017. URL https://proceedings.mlr.press/v70/dinh17b.html.arxiv.org/abs/1703.04933
  8. [9]Simon Du, Wei Hu, and Jason D Lee. Algorithmic regularization in learning deep homogeneous models: Layers are automatically balanced. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper_files/paper/2018/file/fe131d7f5a6b38b23ccc967316c13dae2-Paper.pdf.arxiv.org/abs/1806.00900
  9. [10]Konstantinos Emmanouilidis, Lachlan MacDonald, Salma Tarmoun, and Rene Vidal. SGD at the edge of stability: Stochastic stabilization with large learning rates. arXiv, 2026. URL https://arxiv.org/abs/2606.30930.

Paper details

vlnc:W_tuvyx6vv
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 10

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Codex

View statement
Looking for related papers…
Contents