Parameter Symmetry and Noise Equilibrium of Stochastic Gradient Descent

Symmetries are prevalent in deep learning and can significantly influence the learning dynamics of neural networks. In this paper, we examine how exponential symmetries -- a broad subclass of continuous symmetries present in the model architecture or loss function -- interplay with stochastic gradient descent (SGD). We first prove that gradient noise creates a systematic motion (a ``Noether flow") of the parameters $\theta$ along the degenerate direction to a unique initialization-independent fixed point $\theta^*$. These points are referred to as the {\it noise equilibria} because, at these points, noise contributions from different directions are balanced and aligned. Then, we show that the balance and alignment of gradient noise can serve as a novel alternative mechanism for explaining important phenomena such as progressive sharpening/flattening and representation formation within neural networks and have practical implications for understanding techniques like representation normalization and warmup.

Paper

Similar papers

Peer review

Reviewer QY9h7/10 · confidence 4/52024-06-20

Summary

The authors study the effect of exponential symmetries on the learning dynamics of SGD. They establish the theorem that every exponential symmetry implies the existence of a unique and attractive fixed point in SGD dynamics, which could explain phenomena in machine learning such as matrix factorization and progressive sharpening or flattening.

Strengths

The paper studies the dynamics of SGD. The authors prove a novel theorem that relates continuous symmetry to the attractive fixed point in SGD. The theorem is quite general and can have significant potential impacts on the field. The authors apply their theorem to matrix factorization, offering strong analytical and experimental support. And by my knowledge, this is a novel contribution.

Weaknesses

1. C is not guaranteed to exist. (Line 70) 2. Usually, the stability of the learning is determined by the largest eigenvalue of the Hessian instead of the trace as discussed in the paper. The trace may not be an upper bound on the largest eigenvalue as it can contain negative eigenvalues. 3. I think it’s missing dependence on $\gamma$ in proposition 5.3. 4. The authors proved that in deep linear networks, the noise will lead to a balanced norm for all intermediate layers. This is an important theorem, but it lacks empirical verification. It is important to verify that the empirics actually match the theorem, which would strengthen the paper by a lot. Such an experiment should not be hard to run. 5. There is a lack of clarity in how the analyses in Section 5.4 (Equation 24) relate to Figure 4.

Questions

1. In line 124-128, the authors state that the SGD dynamics can be decomposed into two independent parts. Why does equation (5) have no effect on the loss? I would expect the noise will result in fluctuation of the loss at the end of training, which means that the decomposition should not hold. 2. For the double rotation symmetry, why it is hard to write the matrix A explicitly? It seems that A can just be any symmetric matrix as discussed in section 5.1. Also, why do you require A to be symmetric when defining the exponential symmetry? I am wondering if the results can be generalized to a general matrix A. 3. I don’t understand why one needs to assume C* to be a constant in line 163. By definition, C is a deterministic function that only depends on $\theta$.

Rating

7

Confidence

4

Soundness

2

Presentation

3

Contribution

4

Limitations

The authors have included the limitations. For additional points, please see my comments above.

Reviewer HyRa5/10 · confidence 3/52024-07-07

Summary

This paper considers the relationship between the behavior of SGD for solving empirical risk minimization and the exponential symmetry.

Strengths

The strength of this paper is to study the relationship (Theorem 4.3) between the behavior of SGD for solving empirical risk minimization and the exponential symmetry (Definition 4.1). Moreover, it considers a noise equilibrium (Definition 4.5) and provides explicit solutions of the noise equilibriums for some applications (Section 5). In addition, it provides some numerical results to support the theoretical analyses presented in this paper.

Weaknesses

The weaknesses are the following. Please see Questions for details. - The mathematical preliminaries are insufficient. - The assumptions seem to be strong. - The explanations of contributions are insufficient.

Questions

- SGD for minimizing $L(\theta) = E_z [\ell (\theta,z)]$ is defined by (1): $d \theta_t = - \nabla L(\theta_t) dt + \sqrt{2 \sigma^2 \Sigma (\theta_t)} d W_t$ using $\sigma^2 = \eta/(2S)$, where $\eta > 0$ is a step-size and $S > 0$ is a batch size. My first question is "Which is a problem considered in this paper: the expected risk minimization or the empirical risk minimization?" $L$ is defined by using the expectation $E$ (Lines 56-57), however, Line 57 says "the empirical risk function." - Line 19 says that SGD with $\sigma = 0$ implies GD. I do not understand it, since $\sigma^2 = \eta/(2S) = 0$ iff $\eta = 0$, which contradicts $\eta > 0$. - Line 21: I do not understand what $\sigma^2 \ll 1$ is. - Line 58: Please define $\Sigma_v (\theta)$ explicitly. - Line 93: a --> an - Eq (7): Is $-4 \gamma$ in (7) replaced with $-2 \gamma$? - Line 142: I do not understand the definition of "fixed point." Please define "fixed point" explicitly. A fixed point $x$ of a mapping $T \colon R^d \to R^d$ is defined by $x = T(x)$. The definition of "fixed point" considered in this paper seems to be different from a fixed point of a mapping (see Theorem 4.3). - Eq (8): I do not understand the relationship between $\ell (\theta, z)$ and $\ell$ defined by (8). Why do we consider $\ell$ in (8) not $\ell (\theta, z)$? I think that the main objective of this paper is to minimize $L(\theta) = E_z [\ell (\theta, z)]$. - Eq (9): We cannot define (9) when $\gamma = 0$. Please define $C(\theta^\star)$ explicitly. - Eq (11): $\theta'$ is not defined. - Section 5.1: This section considers a matrix factorization: Given $A$, find $U$ and $W$ such that $A = UW$. The assumption of $A$ seems to be strong such that $A$ is close to the identity matrix $I$ (Lines 204 and 205). - Proposition 5.1: The assumption "the symmetry (11) holds" (based on $A \approx I$) seems to be strong. Please provide practical examples of empirical risk minimization and SGD satisfying (11). - Figure 2: There are not definitions of the matrix size, a batch size $S$, $\eta$, and $\ell (\theta,x)$. - Line 222: $\epsilon$ is not defined. - Theorem 5.2: Is the theorem based on (11)? If so, please provide some examples of $\dot{C}_B = 0$ under (11). - Figure 3: There are not definitions of $d_x$, $d_y$, $\epsilon$, $S$, and so on. Moreover, I do not understand why a warm-up with $\eta_\min = 0.001$, $\eta_\max = 0.008$, and the switching steps $5000$ is used. Please justify the setting from the theoretical results. - ... - Additional comments: I would like to know new insights that come from the theoretical results in this paper. This is because I am not surprised at the results. For example, can we apply the results to training more practical deep neural networks on practical datasets? Then, can we say new insights for training practical deep neural networks? Moreover, can we estimate appropriate step-size $\eta$, batch size $S$, and hyperparameter $\gamma$ using the theoretical results before implementing SGD? Anyway, I would like to know contributions of this paper.

Rating

5

Confidence

3

Soundness

2

Presentation

2

Contribution

2

Limitations

N/A

Authorsrebuttal2024-08-05

Answer to the Contribution Question

**I would like to know new insights that come from the theoretical results in this paper. This is because I am not surprised at the results. For example, can we apply the results to training more practical deep neural networks on practical datasets? Then, can we say new insights for training practical deep neural networks... Anyway, I would like to know contributions of this paper..** Essentially, the answer will have to depend on the subjective opinion of the reader. A contribution for researchers in one field may not seem like a contribution for researchers in other fields. The subjectiveness here is clearly reflected in the fact that the other reviewers rate our contribution as "excellent" while you rate it as "poor." How does understanding an insect's brain help us understand the training of diffusion models? It probably does not, and the problem is not with the brains of insects but with this question being ill-posed. Also, keep in mind that NeurIPS is not just a conference for practical deep learning but also a conference for neuroscience and many other interdisciplinary fields of science.   With these caveats in mind, we clarify our contribution from different angles below. In short, our theory is interdisciplinary, requiring knowledge and expertise from many different fields to understand, and it could be significant to these related fields. We believe that our research has the potential to inspire new research in pure mathematics, neuroscience, deep learning, physics, and practices in deep learning. 1. Pure Mathematics: Lie-group symmetries have been leveraged to solve ordinary differential equations (e.g., see the book Elementary Lie group analysis and ordinary differential equations). However,  leveraging the Lie group to solve stochastic differential equations is a novel concept and tool for pure and applied mathematics, and our result advances our understanding of stochastic systems. The tool we developed is sufficiently general that it may even be applied to problems outside the field of deep learning. 2. Neuroscience: Understanding how latent representations are formed in animal brains is a fundamental scientific problem in neuroscience. Until now, there has been a very limited understanding of this, and our theory suggests one mechanism of how latent representations form and can inspire neuroscientists to understand biological brains. The fact that symmetry in the solutions can be a core mechanism for latent representation is a novel and potentially surprising message. For example, compare the latent representations in our paper with the biological data in Figure 7B in www.cell.com/neuron/fulltext/S0896-6273(18)30581-6 3. Theory and Mathematics of Deep Learning: The most important contribution of our work is on the mathematical tool side. We established a new mathematical tool (the formalism of the noise-equilibrium fixed points of SGD), and this formalism has the potential to be applied to many problems in deep learning. For example, we showed its relevance to flattening and sharpening effects during training, the warm-up technique, and the solution of deep matrix factorizations. We emphasize that developing new mathematical tools is an important progress per se. Understanding deep learning is a difficult task, and without new mathematical tools, this would be impossible. 4. Physics: Symmetry is a fundamental concept of physics. The standard understanding was that when a continuous symmetry exists, a conserved quantity exists during the dynamics. This concept has also played an important role in machine learning; for example, see the well-known result in https://arxiv.org/abs/1806.00900, where the symmetry and its related conserved quantities are leveraged to prove the convergence of the matrix factorization problem. Our theory, however, shows that this picture is no longer right when the dynamics are stochastic -- conserved quantities no longer exist in general, and, in place of them, we now have unique fixed points where the gradient noises must balance. This is a novel and potentially surprising new concept.  5. Practices in Deep Learning: Lastly, our theory also has implications for the practices of deep learning, although we do not claim this to be a main contribution. The first contribution is that our theory helps us understand when SGD prefers flatter solutions. The concept of flatness is of practical importance (for example, practitioners leverage it to design algorithms: https://arxiv.org/abs/2010.01412). Another practical insight our theory directly offers is the importance of data preprocessing because our theory shows that the data distribution has a major impact on the learning trajectory and the final solution it reaches. For example, see the newly added experiments in Figure 7, where we directly show that the orientation of the data distribution has a direct effect on the balancedness and sharpness of the learned solution.

Reviewer HyRa2024-08-09

Reply to the authors' comments

I would like to thank the authors for detailed comments. I have read all of them. As a result, I would like to raise my score. However, I still have some concerns. I will write the above form.

Authorsrebuttal2024-08-09

reply

Thanks for the update and additional question. **Since $S$ is a fixed batch size, we should replace $S$ with $S_t$?** $S$ is fixed and does not change with time, and so one should not write it as $S_t$. Here, this limit is a mathematical limit of differential equations. One mathematically rigorous way to construct this limit is to define it as a limit of a sequence of differential equations. Operationally, this (roughly) corresponds to running the experiment first with $S=1$. Then, run an independent experiment with $S=2$. Then, with $S=3$, and ad infinitum. During each of these running, $S$ is held fixed, and so does not change with $t$. **I do not know why $\sigma$ is less than 1.** This factor is just a hyperparameter determined by the user of SGD. If the user uses a learning rate of $0.1$ and a batch size of $100$, one naturally has $\sigma=0.1/(2\times 100) \ll 1$.

Reviewer rhMv7/10 · confidence 4/52024-07-12

Summary

The paper takes important steps toward showing that the noise in SGD pushed the dynamics along symmetry directions toward a unique fixed point. This differs in an important way from GD and gradient flow (GF) where one can show that in the presence of continuous symmetries (called exponential symmetries in the paper) there will be conserved quantities $C$, such as layer imbalance. These conserved quantities ensure that runs starting with different values of $C$ end up on different points along a minimum manifold (with some caveats). This paper shows that SGD noise causes drift toward a fixed point on a minimum manifold.

Strengths

This is potentially a very significant work. This is one of the few works I know which focuses on the effect of SGD noise on the symmetry directions and derives a concrete dynamics for this. I think the approach is at least partly original. Although there are many related works (see weaknesses), this paper is the only one which derives concrete solutions for the noisy dynamics along the symmetry directions. There are some corners that need to be ironed out. But if the results survive, this work could answer many questions about the implicit bias and generalization in SGD.

Weaknesses

There exist multiple other works addressing the same questions. Two particular ones with very similar claims that the authors may have missed are: [1] Chen, Feng, Daniel Kunin, Atsushi Yamamura, and Surya Ganguli. "Stochastic collapse: How gradient noise attracts sgd dynamics towards simpler subnetworks." Advances in Neural Information Processing Systems 37 (2023). [2] Yang, Ning, Chao Tang, and Yuhai Tu. "Stochastic gradient descent introduces an effective landscape-dependent regularization favoring flat solutions." Physical Review Letters 130, no. 23 (2023): 237101. I ask the authors to clarify the distinction between their work and the above. [1] is also about the effect of SGD noise on the symmetry directions, afaik. [2] also derives the effective dynamics of SGD as a Langevin equation and shows a result similar to yours, namely that along symmetric minima, the noise drives the system toward the least sharp minimum.

Questions

There are many details int he computations and proofs which I think need to be clarified. One aspect which I think is an error is related to the Lie algebra of the symmetries discussed in the paper. Most derivations in the paper hold for symmetric Lie algebra elements (i.e. generators of scaling and hyperbolic directions in the group) but fail for rotations. A relevant work which studies the parameter space more thoroughly is: [3] Zhao, Bo, Iordan Ganev, Robin Walters, Rose Yu, and Nima Dehmamy. "Symmetries, flat minima, and the conserved quantities of gradient flow." ICLR (2023). My questions are as follows: line 49: ref [40] may be wrong (it doesn't discuss conservation laws) maybe another paper by Zhao is meant: Zhao et al ICLR 2023 "Symmetries, flat minima, and the conserved quantities of gradient flow". sec 4: important caveat about conserved quantities is that the antiderivative C may not always exist. An important case is when the symmetry is a rotation. (see Zhao et al "symmetries, flat minima ..." ICLR 2023) In this case, the Noether charge is zero. 1. line 78: eq 5: to clarify, $\nabla^T C \nabla \ell(\theta, z) = 0$ is always zero due to eq 2 and 3, right? Is that why both terms in eq 30 (App B) vanish? However, there are some statements in Appendix B which seem inaccurate to me: a. when $\Sigma = GG^T$, the matrix $G$ need not be square and $G = \sqrt{\Sigma}$ is just one of the possible $G$. What is your argument for this $G$ being the correct $G$? b. I don't agree with your statement that "Because $\Sigma$ and $\sqrt{\Sigma}$ share eigenvector..." eq 31 would vanish. Trivial example: the 2x2 matrices $A=diag(1,-1)$ and the identity matrix share eigenvectors, but the vector $v=(1,1)$, $Av = 0$, but $Iv \ne 0$. I think the real reason is that $\Sigma = GG^T$. Doing SVD, $G = USV^T$ and $\Sigma = US^2U^T$. Then eq 30 yields $\nabla^T C U S= 0$. Assuming the covariance is nondegenerate (i.e. $S_{ii}\ne 0$ for all $i$), we must have $\nabla^T C U = 0$ which also implies $\nabla^T C G = 0$. 2. line 83: at a minimum, some symmetry orbits (i.e. invariant manifold) may collapse to a point, e.g. rotation symmetry in a quadratic loss as in linear regression $\|\theta x -y \|^2$. 3. line 104: Instead of "double rotation" this should be called double linear transformation, becuase the group is not just $O(h)$, but rather $GL(h)$ 4. eq 6: As noted above, this Noether charge vanishes for rotations $SO(h)$ because $A$ is anti symmetric and hence $\theta^T A \theta=0$ (see Zhao ICLR 2023). 5. line 114: why? Why the explicit weight decay? Why in defining the symmetry do you ignore $\|\theta\|^2$ which doesn't have rescaling or $GL(n)$ symmetry, only rotation symmetry $O(n)$? 6. Eq 7: what happens to the cross terms of $\theta^t \nabla \ell$ in $\Sigma_\gamma$? 7. line 118: eigenvalues and vectors of A can be complex (e.g. for Lie algebra of rotation), so $n^T$ needs to be $n^\dagger$. 8. line 214-215: I don't understand how you arrive at $\dot{C} = \mathrm{Var}[r]C$. I think you mean when the hidden dimension is 1, not the output, right? I hidden is $d>1$, let $\sigma=\Sigma_{u_i}$, then for $B= E_{kl}+E_{lk}$ we have $\mathrm{Tr}[\Sigma_{u_i}B] = \sigma_{lk}+\sigma_{kl}$, which are off-diagonal terms in the covariance matrix, unless $k=l$. 9. eq 13: When $\gamma\ne 0$, eq 13 does not have the symmetry (11) for symmetric Lie algebra element $B$. The reason is $\|W\|_F$ is invariant under rotations where $A^{-1} = A^T$. The Lie algebra of rotations (infinitesimal $A = I+\rho B$) has anti-symmetric $B$. 10. line 235: under what condition will the covariances $\Sigma_x$ and $\Sigma_\epsilon$ be isotropic? I don't think this happens often in SGD. I think you need adaptive gradient optimizers or Newton's method to have isotropic $\Sigma_\epsilon$. 11. eq 39,40: $\nabla^T_{\theta_\lambda} \ell = [\nabla_{\theta_\lambda} \ell]^T e^{-\lambda A^T}$, so we don't have (40) and in (41) there should $e^{-\lambda A^T}A e^{-\lambda A}$. 12. line 531: $Z_++Z_-$ will have complex eigenvalues when $A$ is not symmetric. Diagonalizing $A$, your arguments about $Z_\pm$ only hold for symmetric $A$.

Rating

7

Confidence

4

Soundness

3

Presentation

3

Contribution

4

Limitations

There are some gaps in the derivations (see questions) which I hope the authors can fill. Additionally, the experiments seem to only look at two aspects: alignment of weights in matrix factorization (which is already known under weight decay, afaik), and bias toward less sharp minima (again, known). I would have liked to see a more direct test of the mechanism the paper claims is driving this movement toward flatter minima. At least, the balancing of the weights or some other direct result from the paper would have been desirable.

Authorsrebuttal2024-08-12

Thanks for the feedback

Hi! We noticed that you have not communicated with us during the discussion period. It would be really helpful to us when revising and improving our manuscript if we could hear more from you. We would be happy to hear any additional thoughts or feedback you have on our work and on our previous reply!

Reviewer QY9h2024-08-09

I appreciate the author’s response to my review. The author has addressed most of my concerns and the author also added more empirical experiments to verify the theorems claimed in the paper. All these have strengthened the paper and as a result, I am increasing my score. As a side note, I have also reviewed the comments from the other reviewers. While there is some debate regarding the soundness, precision of language, and overall presentation of the paper, I respectfully disagree with reviewer HyRa in rating the contribution of this paper as ‘poor’. Although some of the related works and discussions are indeed missing (as noted by rhMv), the results in this paper are novel to the best of my knowledge and contribute meaningfully to a better understanding of the role of SGD.

Reviewer HyRa2024-08-09

Reply to the authors' comments

I also thank you for replies on my comments. I misread the manuscript. I am sorry for my first review. I still have some minor concerns for your replies. - I do not understand why $S \to \infty$ is done. Since $S$ is a fixed batch size, we should replace $S$ with $S_t$? - I do not know why $\sigma$ is less than $1$. Do you mean that $\sigma_t = \eta/(2S_t)$ is less than $1$ for a sufficiently large $t$?

Reviewer rhMv2024-08-12

thank you for the answers. The point you make about Noether charge for rotations is interesting (is that mentioned elsewhere?). The log doesn't generalize easily to nonsquare matrices, but I think a variant of what you say may hold for higher dims. I Adlai see your did mention symmetric A in your definition. My general advice would be not to coopt general terms such as exponential symmetry for a subset of actual exponential symmetries. This is bad practice and misleads subsequent works that cite yours. So I suggest you use more specific expressions for Defs 4.1 and 4.2. About Ref [2], yes I understand your result predicts bit ways depending on parameters. But the more useful fixed point is similar to ref 2. I think y should mention that work and then emphasize that your results can go both ways. I am happy with your response and I think this is a significant paper. Therefore I am reading my score to 7.

Authorsrebuttal2024-08-13

reply

Thanks for your reply. We will revise our manuscript to make sure that the terminology is as accurate as possible. The existence of antisymemtric noether charge, to the best of our knowledge, has not been pointed out in any previous literature, and may be an important and interesting future problem to study.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC