Title: Parameter Symmetry and Noise Equilibrium of Stochastic Gradient Descent
Venue: NeurIPS 2024
Accepted: yes
Keywords: SGD

fixed point

symmetry
Abstract: 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 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.

Parameter Symmetry and Noise Equilibrium of Stochastic Gradient Descent

Abstract

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 θ along the degenerate direction to a unique initializationindependent fixed point θ ∗ . These points are referred to as the 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.

1 Introduction

Stochastic gradient descent (SGD) and its variants have become the cornerstone algorithms used in deep learning. In the continuous-time limit, the algorithm can be written as [19, 13, 21, 32, 9]:

where Σ ( θ ) is the covariance matrix of gradient noise (Section 3) with the prefactor σ 2 = η /( 2 S ) modeling the impact of a finite learning rate η and batch size S ; W t denotes the Brownian motion. When σ = 0 , Eq. (1) corresponds to gradient descent (GD) 1 . However, SGD and GD can exhibit significantly different behaviors, often converging to solutions with significantly different levels of performance [31, 39, 44, 22, 49]. Notably, even when σ 2 ≪ 1 , where we expect a close resemblance between SGD and GD over finite time [19], their long-time behaviors still differ substantially [26]. These observations indicate that gradient noise can bias the dynamics significantly, and revealing its underlying mechanism is thus crucial for understanding the disparities between SGD and GD.

Contribution. In this paper, we study the how of SGD noise biases training through the lens of symmetry. Our key contributions are summarized as follows. We show that

when symmetry exists in the loss function, the dynamics of SGD can be precisely characterized and is different from GD along the degenerate direction;

38th Conference on Neural Information Processing Systems (NeurIPS 2024).

the treatment of common symmetries, including the rescaling and scaling symmetry in deep learning, can be unified in a single theoretical framework that we call the exponential symmetry;

for any θ , every exponential symmetry implies the existence of a unique and attractive fixed point along the degenerate direction for SGD;

symmetry and balancing of noise can serve as novel mechanisms for important deep learning phenomena such as progressive sharpening/flattening and latent representation formation.

See Figure 1 for an illustration of how symmetry leads to a systematic flow of SGD. This work is organized as follows. We discuss the most relevant works in Section 2. The main theoretical results are presented in Section 4. We apply our theory to understand specific problems and present numerical results in Section 5. The last section concludes this work. All the proofs are presented in the Appendix.

2 Related Works

The dynamics of SGD in the degenerate directions of the loss landscape is a poorly understood problem. There are two closely related prior works. Ref. [48] studies the dynamics of SGD when there is a simple rescaling symmetry and applies it to derive the stationary distribution of SGD for linear networks. Our result is more general because rescaling symmetry is the simplest case of exponential symmetries 2 . Another related work is Ref. [20], which studies a different special case of exponential symmetry, the scale invariance, and in the presence of weight decay. Their analysis assumes the existence of the fixed point of the dynamics, which we proved to exist. Also related is the study of conservation laws under gradient flow [34, 18, 24, 43, 40], which we will discuss more closely in Section 4. However, these works do not take the stochasticity of training into account. Comparing with these results that assume no stochasticity, our result could suggest that SGD converges to initialization-independent solutions, whereas the GD finds solutions are strongly initialization-dependent. In addition, Section D extends our main result to discrete-time SGD.

3 Preliminaries

Setup and Notations. Let ℓ ∶ Ω × Z ↦ R denote the per-sample loss, with Ω and Z denoting the parameter and sample space, respectively. Here, z ∈ Z includes both the input and label and accordingly. We use E z = E to denote the expectation over a given training set. Therefore, L ( θ ) = E z [ ℓ ( θ, z )] is the empirical risk function. The covariance of gradient noise is given by

Additionally, we use Σ v ( θ ) ∶= E z [∇ v ℓ ( θ, z )∇ v ℓ ( θ, z ) ⊺ ] - ∇ v L ( θ )∇ v L ( θ ) ⊺ to denote the covariance of gradient noise impacting on the subset of parameters v . Denote by ( θ t ) t ≥ 0 the trajectory of SGD or GD. For any h ∶ Ω ↦ R , we write h t = h ( θ t ) and ˙ h ( θ t ) = d d t h ( θ t ) for brevity. When the context is clear, we also use ℓ ( θ ) to denote ℓ ( θ, z ) .

Symmetry. The per-sample loss ℓ (⋅ , ⋅) is said to possess the Q -symmetry if

where ( Q ρ ) ρ ∈ R is a set of continuous transformation parameterized by ρ ∈ R . Without loss of generality, we assume Q 0 = id . The most common symmetries exist within the model f , namely f θ is invariant under certain transformations of θ . However, our formalism is slightly more general in the sense that it is also possible for the model to be variant while the per-sample loss remains unchanged, which appears in self-supervised learning [50], for example.

4 Continuous Symmetry and Noise Equilibria

Taking the derivative with respect to ρ at ρ = 0 in Eq. (2), we have

where J ( θ ) = d Q ρ ( θ ) d ρ ∣ ρ = 0 . Denote by C be the antiderivative of J , that is, ∇ C ( θ ) = J ( θ ) . Then, taking the expectation over z in (3) gives the following conservation law for GD solutions ( θ t ) t ≥ 0 :

Essentially, this is a consequence of Noether's theorem [25], and C will be called a 'Noether charge' in analogy to theoretical physics. The conservation law (4) implies that the GD trajectory is constrained on the manifold { θ ∶ C ( θ ) = C ( θ 0 )} . We refer to Ref. [18] for a study of this type of conservation law under the Bregman Lagrangian [16].

4.1 Noether Flow in Degenerate Directions

In this paper, we are interested in how C ( θ t ) changes, if it changes at all, under SGD. By Ito's lemma, we have the following Noether flow (namely, the flow of the Noether charge):

where ∇ 2 C denotes the Hessian matrix of C . The derivation is deferred to Appendix B. By definition, Σ ( θ t ) is always positive semidefinite (PSD). Thus, we immediately have: if ∇ 2 C is PSD throughout training, C ( θ t ) is a monotonically increasing function of time. Conversely, if ∇ 2 θ C is negative semidefinite (NPD), C ( θ t ) is a monotonically decreasing function of time.

The existence of symmetry implies that (with suitable conditions of smoothness) any solution θ resides within a connected, loss-invariant manifold, defined as M θ ∶= { Q ρ ( θ ) ∶ ρ ∈ R } . We term directions within this manifold as 'degenerate directions' since movement along them does not change the loss value. Notably, the biased flow (5) suggests that SGD noise can drive SGD to explore within this manifold along these degenerate directions since the value of C ( θ ) for θ ∈ M θ can vary.

4.2 Exponential symmetries

Now, let us focus on a family of symmetries that is common in deep learning. Since the corresponding conserved quantities are quadratic functions of the model parameters, we will refer to this class of symmetries as exponential symmetries .

Definition 4.1. ( Q ρ ) ρ is said to be a exponential symmetry if J ( θ ) ∶= d d ρ Q ρ ( θ )∣ ρ = 0 = Aθ for a symmetric matrix A .

This implies when ρ ≪ 1 , Q ρ = id + ρA + o ( ρ ) . In the sequel, we also use the words ' A -symmetry' and ' Q -symmetry' interchangeably since all properties of Q ρ we need can be derived from A . This definition applies to the following symmetries that are common in deep learning:

Rescaling symmetry : Q ρ ( a, b ) = ( a ( ρ + 1 ) , b /( ρ + 1 )) , which appears in linear and ReLU networks [7, 48]. In this symmetry, A = diag ( I a , -I b ) , where I is the identity matrix with dimensions matching that of a and b .

Scaling symmetry : Q ρ θ = ( ρ + 1 ) θ , which exists whenever part of the model normalized using techniques like batch normalization [14], layer normalization [2], or weight normalization [29]. In this case, A = I .

Double rotation symmetry: This symmetry appears when parts of the model involve a matrix factorization problem, where for an arbitrary invertible matrix B ℓ = ℓ ( UW ) = ℓ ( UBB -1 W ) . Writing the exponential symmetry for this case is a little cumbersome. We need first to view U and W as a single vector, and the exponential transformation is given by a block-wise diagonal matrix diag ( B,..., B, B -1 , ..., B -1 ) . See Section 5.1 for more detail.

It is possible for only a subset of parameters to have a given symmetry. Mathematically, this corresponds to the case when A is low-rank. It is also common for ℓ to have multiple exponential symmetries at once, often for different (but not necessarily disjoint) subsets of parameters. For example, a ReLU network has a different rescaling symmetry for every hidden neuron.

It is obvious that under this Q symmetry, the Noether charge has a simple quadratic form:

Moreover, the interplay between this symmetry and weight decay can be explicitly characterized in our framework. To this end, we need the following definition.

Definition 4.2. For any γ ∈ R , we say ℓ γ ( θ, x ) ∶= ℓ ( θ, x ) + γ ∥ θ ∥ 2 has the Q symmetry as long as ℓ ( θ, x ) has the Q symmetry.

For the SGD dynamics that minimizes L γ ( θ ) = E x [ ℓ γ ( θ, x )] , it follows from (5) that

Thus, a positive γ always causes ∣ C ( θ t )∣ to decay, and the influence of symmetry is determined by the spectrum of A . Denote by A = ∑ j µ j n j n ⊺ j the eigendecomposition of A . Then,

This gives a clear interpretation of the interplay between SGD noise and the exponential symmetry: the noise along the positive directions of A causes C ( θ t ) to grow, while the noise along the negative directions causes C ( θ t ) to decay. In other words, the noise-induced dynamics of C ( θ t ) is determined by the competition between the noise along the positive- and negative-eigenvalue directions of A .

Time Scales. The above analysis implies that the dynamics of SGD can be decomposed into two parts: the dynamics that directly reduce loss, and the dynamics along the degenerate direction of the loss, which is governed by Eq (5). These two dynamics have essentially independent time scales. The first part is independent of the σ 2 in expectation, whereas the time scale of the dynamics in the degenerate directions depends linearly on σ 2 .

The first time scale t erm is due to the dynamics of empirical risk minimization. The second time scale t equi is the time scale for Eq. (5) to reach equilibrium, which is irrelevant to direct risk minimization. When the parameters are properly tuned, t erm is of order 1 , whereas t equi is proportional to σ 2 = η /( 2 S ) . Therefore, when σ 2 is large, the parameters will stay close to the equilibrium point early in the training, and one can expect that ˙ C ( θ t ) is approximately zero after t equi . In line with Ref. [20], this can be called the fast-equilibrium phase of learning. Likewise, when σ 2 ≪ 1 , the approach to equilibrium will be slower than the actual time scale of risk minimization, and the dynamics in the degenerate direction only take off when the model has reached a local minimum. This can be called the slow-equilibrium phase of learning.

4.3 Noise Equilibrium and Fixed Point Theorem

It is important and practically relevant to study the stationary points of dynamics in Eq. (7). Formally, the stationary point is reached when -γC ( θ )+ η Tr [ Σ ( θ ) A ] = 0 . Because we make essentially no assumption about ℓ ( θ ) and Σ ( θ ) , one might feel that it is impossible to guarantee the existence of a fixed point. Remarkably, we prove below that a fixed point exists and is unique for every connected degenerate manifold.

To start, consider the exponential maps generated by A :

which applies the symmetry transformation to θ for λ / ρ times. Then, it follows that if we apply Q ρ transformation to θ infinitely many times and for a perturbatively small ρ ,

Thus, the exponential symmetry implies the symmetry with respect to an exponential map, a fundamental element of Lie groups [11]. Note that exponential-map symmetry is also an exponential symmetry by definition. For the exponential map, the degenerate direction is clear: for any λ , θ connects to e λA θ without any loss function barrier. Therefore, the degenerate direction for any exponential symmetry is unbounded. Now, we prove the following fixed point theorem, which shows that for every exponential symmetry and every θ , there is one and only one corresponding fixed point in the degenerate direction.

Theorem 4.3. Let the per-sample loss satisfy the A -exponential symmetry and θ λ ∶= exp [ λA ] θ . Then, for any θ and any γ ≥ 0 , 3

(1) G ( θ λ ) (Eq. (7) ) and -C ( θ λ ) are monotonically decreasing functions of λ ;

(2) there exists a λ ∗ ∈ R ∪{±∞} such that G ( θ λ ∗ ) = 0 ;

(3) in addition, if G ( θ λ ) ≠ 0 , λ ∗ is unique and G ( θ λ ) is strictly monotonic;

(4) in addition to (3), if Σ ( θ ) is differentiable, λ ∗ ( θ ) is a differentiable function of θ .

Remark 4.4 . It is now worthwhile to differentiate gradient flow (GF), GD, SGD, and stochastic gradient flow (SGF). Technically, one can prove that the same result holds for discrete-time GD and SGD in expectation, and GF is the only of the four algorithms that do not obey this theorem (See Section D), and so one could argue that the discrete step size is the essential cause of noise balance. Mathematically, the SGF can be seen as a model of the leading order effect of having a finite step size and thus also share this effect (remember that the Ito Lemma contains a second-order term in dθ ). That being said, there is a practical caveat: in practice, we find it much easier for models to reach these fixed points with SGD than with GD, and so it is fair to say that this effect is the most dominant when gradient noise is present.

Part (1), together with Part (2), implies that the unique stationary point is essentially attractive. This is because ˙ C decreases with λ while C increases with it. Let C ∗ = C ( θ λ ∗ ) . Thus, C ( θ ) -C ∗ always have the opposite sign of λ ∗ , while d dt C ( θ ) will have the same sign. Conceptually, this means that C will always move to reduce its distance to C ∗ . Assuming that C ∗ is a constant in time (or close to a constant, which is often the case at the end of training), Part (1) implies that d dt ( C ( θ ) -C ∗ ) ∝ -sgn ( C ( θ ) -C ∗ ) , signaling a convergence to C ( θ ) = C ∗ . In other words, SGD will move to restore the balance if it is perturbed away from λ ∗ = 0 . If the matrix Σ A is wellbehaved, one can indeed establish the convergence to the fixed point in the relative distance even if C ∗ is mildly divergent due to diffusion. Because this part is strongly technical and our focus is on the fixed points, we leave the formal statement and its discussion to Appendix B.3.

Theorem 4.5. (Informal) Let C ∗ follow a drifted Brownian motion and Σ A satisfy two well-behaved conditions. Then, either C -C ∗ → 0 in L 2 or ( C -C ∗ ) 2 /( C ∗ ) 2 → 0 in probability.

Parts (2) and (3) show that a unique fixed point exists. We note that it is more common than not for the conditions of uniqueness to hold because there is generally no reason for Tr [ Σ ( θ ) A ] or Tr [ θθ ⊺ A ] to vanish simultaneously, except in some very restrictive subspaces. One major (perhaps the only) reason for the first trace to vanish is when the model is located at an interpolation minimum. However, interpolation minima are irrelevant for modern large-scale problems such as large language models because the amount of available text for training far exceeds the size of the largest models. Even when the interpolation minimum exists, the unique fixed point should still exist when the training is not complete. See Figure 1. Part (4) means that the fixed points of the dynamics is well-behaved. If the parameter θ has a small fluctuation around a given location, C will also have a small fluctuation around the fixed point solution. This justifies approximating C by a constant value when θ changes slowly and with small fluctuation.

Fixed point as a Noise Equilibrium. Let θ ∗ be a fixed point of (7). It must satisfy

Hence, a large weight decay leads to a small ∣ C ( θ ∗ )∣ , whereas a large gradient noise leads to a large ∣ C ( θ ∗ )∣ . When there is no weight decay, we get a different equilibrium condition: Tr [ Σ ( θ ∗ ) A ] = 0 , which can be finite only when A contains both positive and negative eigenvalues. This equilibrium condition is equivalent to ∑ i ∶ µ i > 0 µ i n ⊺ i Σ ( θ ∗ ) n i = -∑ j ∶ µ j < 0 µ j n ⊺ j Σ ( θ ∗ ) n j . Namely, the overall gradient fluctuation in the two different subspaces specified by the symmetry A must balance. We will see that the main implication of this result is that the gradient noise between different layers of a deep neural network should be balanced at the end of training. Conceptually, Theorem 4.3 suggests the existence of a special type of fixed point for SGD, which the following definition formalizes.

Definition 4.6. θ is a noise equilibrium for a nonconstant function C ( θ ) if ˙ C ( θ ) = 0 under SGD.

5 Applications

Now, we analyze the noise equilibria of a few important problems. These examples are prototypes of what appears frequently in deep learning practice and substantiate our arguments with numerical

60

104

theory

2500

40

△11

SGD

IMMM

2000

20

△12

△13

A-l

1500

SGD

0

△14

△15

In"nll

103

△16

1000

-20

△17

500

-40

△18

△19

-60

102

0

1000

2000

3000

0

1000

2000

3000

2 ×102

3×102

4× 102

t

t

WrwW

examples. In addition, an experiment with the scale invariance in normalized tanh networks is presented in Appendix A.1.

5.1 Generalized Matrix Factorization

Exponential symmetry is also observed when the model involves a (generalized) matrix factorization. This occurs in standard matrix completion problems [33] or within the self-attention of transformers through the key and query matrices [35]. For a (generalized) matrix factorization problem, we have the following symmetry in the objective:

for any invertible matrix A and symmetry-irrelevant parameters θ ′ . We consider matrices A that are close to identity: A = I + ρB + O ( ρ 2 ) , and A -1 = I -ρB + O ( ρ 2 ) . Therefore, for an arbitrary symmetric B , we have a conserved quantity for GD: C B ( θ ) = Tr [ UBU ⊺ ] -Tr [ W ⊺ BW ] . This conservation law can also be written in the matrix form, which is a well-known result for GD [8, 24]:

For SGD, applying (5) gives the following proposition.

Proposition 5.1. Suppose the symmetry (10) holds. Let U = ( ˜ u 1 , /uni22EF , ˜ u d 2 ) ⊺ ∈ R d 2 × d , W = ( ˜ w 1 , /uni22EF , ˜ w d 0 ) ∈ R d × d 0 , where ˜ u i , ˜ w j ∈ R d . Let C B ( θ ) = Tr [ UBU ⊺ ] -Tr [ W ⊺ BW ] for any symmetric matrix B ∈ R d × d . Then, for SGD, we have

This dynamics is analytically solvable when U ∈ R 1 × d and W ∈ R d × 1 . In this case, taking B = E k,l + E l,k where E i,j denotes the matrix with entries of 1 at ( i, j ) and zeros elsewhere. For this choice of B , we obtain that C B ( θ ) = W k W l -U k U l , and applying the results we have derived, it is easy to show that for some random variable r : ˙ C B ( θ t ) = -Var [ r ( θ t )] C B ( θ t ) , which signals an exponential decay. For common problems, Var [ r ( θ t )] > 0 [48]. Since the choice of B is arbitrary, we have that W k W l → U k U l for all k and l . The message is rather striking: SGD automatically converges to a solution where all neurons output the same sign ( sgn ( U i ) = sgn ( U j ) ) at an exponential rate.

5.2 Balance and Stability of Matrix Factorization

As a concrete example, let us consider a two-layer linear network (this can also be seen as a variant of standard matrix factorizations):

where x ∈ R d x is the input data, and y = y ′ + ϵ ∈ R d y is a noisy version of the label. The ground truth mapping is linear and realizable: y ′ = U ∗ W ∗ x . The second moments of the input and noise are denoted as Σ x = E [ xx ⊺ ] and Σ ϵ = E [ ϵϵ ⊺ ] , respectively. Note that this problem is essentially identical to a matrix factorization problem, which is not only a theoretical model of neural networks but also an important algorithm frequently in use for recommender systems [41]. The following theorem gives the fixed point of Noether flow.

1.6

theory

SGD

95.0

zll/lmIl

1.4

SGD+WD

92.5

GD+WD

1.2

S

90.0

theory

87.5

init.

1.0

85.0

/

end

0.6

0.8

1.0

0.4

0.6

0.8

1.0

1.2

Φx

Φx

See Figure 8 for the convergence of SGD to this solution under different learning rate, batch size and width. The equilibrium condition takes a more suggestive form when the model is at the global minimum, where U ∗ W ∗ x -y = ϵ . Assuming that ϵ and x are independent and that there is no weight decay, we have:

Here, the bar over the matrices indicates that they have been normalized by their traces: ¯ Σ = Σ / Tr [ Σ ] . The matrices Γ W and Γ U simplifies because at the global minimum, r i = ϵ i and so E [∥ x ∥ 2 rr ⊺ ] = Tr [ Σ x ] Σ ϵ and E [∥ r ∥ 2 xx ⊺ ] = Tr [ Σ ϵ ] Σ x . This condition should be compared with the alignment condition for GD in Eq. (11), where the alignment is entirely determined by the initialization and perfect alignment is achieved only if the initialization is perfectly aligned. This condition simplifies further if both ¯ Σ x and ¯ Σ ϵ are isotropic, where the equation simplifies to WW ⊺ / d x = U ⊺ U / d y . Namely, the two layers will be perfectly aligned, and the overall balance depends only on input and output dimensions. Figure 2-Left shows an experiment that shows that the two-layer linear net is perfectly aligned after training. Here, every point corresponds to the converged solution of an independent run with the same initialization and training procedures but different values of Σ ϵ . In agreement with the theory, the two layers are aligned according to Theorem 5.2 under SGD, but not under GD. In fact, GD finds solutions that are more than an order of magnitude away from SGD.

Noise Driven Progressive Sharpening and Flattening. This result implies a previously unknown mechanism of progressive sharpening and flattening, where, during training, the stability of the algorithm steadily improves (during flattening) or deteriorates (during sharpening) [39, 15, 6]. To see this, we first derive a metric of sharpness for this model.

Proposition 5.3. For the per-sample loss (12) , let S ( θ ) ∶= Tr [∇ 2 L ( θ )] . Then, S ( θ ) = d y ∥ W Σ 1 / 2 x ∥ 2 F +∥ U ∥ 2 F Tr [ Σ x ] .

The trace of the Hessian is a good metric of the local stability of the GD and SGD algorithm because the trace upper bounds the largest Hessian eigenvalue. Let us analyze the simplest case of an autoencoding task, where the model is at the global minimum. Here, Σ x ∝ I d x , Σ ϵ ∝ I d y . For a random Gaussian initialization with variance σ 2 W and σ 2 U , the trace at initialization is, in expectation, S init = d y d Tr [ Σ x ]( σ 2 W + σ 2 U ) . At the end of the training, the model is close to the global minimum and satisfies Proposition 5.3. Here, the rank of U and W matters and is upper bounded by min ( d, d x ) , and at the global minimum, U and W are full-rank (equal to min ( d, d x ) ), and all the singular values are 1 . Thus,

The change in the sharpness during training thus depends crucially on the initialization scheme. For Xavier init, σ 2 U = ( d y + d ) -1 and σ 2 W = ( d + d x ) -1 , and so S init ≈ S end (but S init is slightly smaller). Thus, for the Xavier init., the sharpness of loss experiences a small sharpening during training. For Kaiming init., σ 2 U = 1 and σ 2 W = d -1 x . Therefore, it always holds that S init ≥ S end , and so the stability improves as the training proceeds. The only case when the Kaiming init. does not experience progressive flattening is when d = d x = d y , which agrees with the common observation that training is easier if the widths of the model are balanced [12]. See Figure 4 for an experiment. In previous works, the progressive sharpening happens when the model is trained with GD [6]; our theory suggests an alternative mechanism for it.

A practical technique that the theory explains is using warmup to stabilize training in the early stage. This technique was first proposed in Ref. [10] for training CNNs, where it was observed that the training is divergent if we start the training at a fixed large learning rate η max . However, this divergent behavior disappears if we perform a warmup training, where the learning rate is increased gradually from a minimal value to η max . Later, the same technique is found to be crucially useful for training large language models [27]. Our theory shows that the gradient noise can drive Kaiming init. to a stabler status where a larger learning can be applied.

Flat or Sharp? Prior works have often argued that SGD prefers flatter solutions to sharper ones (e.g., see Ref. [42]). The exact solution we found, however, implies a subtle picture: for some datasets, SGD prefers sharper solutions, while for others, SGD prefers flatter solutions. Therefore, there is no causal relationship between SGD training and the sharpness of the found solution. See Figure 3 for the dependence of the flatness on the data distribution. A related question is whether SGD noise creates a similar effect as weight decay training. The answer is also negative: weight decay always prefers smaller norms and, thus, norm-balanced solutions, which are not necessarily noise-aligned solutions. Figure 3 shows that SGD can also lead to unbalanced solutions, unlike weight decay.

5.3 Noise-Aligned Solution of Deep Linear Networks

Here, we apply our result to derive the exact solution of an arbitrarily deep and wide deep linear network, which has been under extensive study due to its connection in loss landscape to deep neural networks [4, 5, 17, 23, 47, 38]. Deep linear networks have also been a major model for understanding the implicit bias of GD [1]. The per-sample loss for a deep linear network can be written as:

where W i is an arbitrary dimensional matrix for all i . The global minimum is realizable: y = V x + ϵ , for i.i.d. noises ϵ . Because there is a double rotation symmetry between every two neighboring matrices, the Noether charge can be defined with respect to every such pair of matrices. Let B i be a symmetric matrix; we define the charges to be C B i = W T i B i W i . The noise equilibrium solution is given by the following theorem.

Theorem 5.4. Let W D ...W 1 = V . Let V ′ = √ Σ ϵ V √ Σ x such that V ′ = LS ′ R is its SVD and d = rank ( V ′ ) . Then, for all i and all B i , a noise equilibrium for C B i at the global minimum is for i = 2 , /uni22EF , D -1 . U i are arbitrary matrices satisfying U T i U i = I d × d , and Σ i are diagonal matrices such that

2000

SGDKaiming+warmup

1750

SGDKaiming

1500

SGDXavier

1250

GDKaiming

1000

750

500

250

0

0

2000

4000

6000

8000

10000

t

8

input

input

output

4

output

intermediate

intermediate

6

3

2

4

1

2

0

0

2000

4000

6000

0

2000

4000

6000

iteration

iteration

This solution has quite a few striking features. Surprisingly, the norms of all intermediate layers are balanced:

All intermediate layers are thus rescaled orthogonal matrices aligned with the neighboring matrices and the only two matrices that process information are the first and the last layer. See Figure 5 for an illustration of this effect. This explains an experimental result first observed in Ref. [30], where the authors showed that the neural networks find similar solutions when the model is initialized with the standard init., where there is no alignment at the start, and with the aligned init. Thus, the balance and alignment between different layers in the neural networks can be attributed to the rescaling symmetry between each pair of matrices.

5.4 Approximate Symmetry and Bias of SGD

Lastly, let us consider what happens if the loss function only has an approximate symmetry. As a minimal model, let us consider the following loss function: ℓ = ℓ 1 ( θ, x ) + ζℓ 2 ( θ ) . Here, ℓ 1 has the A -symmetry, whereas ℓ 2 ( θ ) has no symmetry nor randomness and so ℓ 2 does not affect Σ at all. ζ determines the relative strength between the two terms. In totality, ℓ no longer has the A -symmetry.

As before, let C A = θ ⊺ Aθ . Then, ˙ C A ( θ ) = -ζ (∇ ℓ 2 ) ⊺ Aθ ∗ + σ 2 Tr [ Σ ( θ ) A ] , whose fixed point is

This equilibrium condition thus depends strongly on how large ζ is. When ζ is small, we see that SGD still favors the fixed point given by Theorem 4.3, but with a first-order correction in ζ .

Conversely, if ζ is large and σ 2 is small, we can expand around a local minimum of the loss function θ ∗ , and so the fixed point becomes

where H is the Hessian of ℓ 2 . Certainly, this implies that SGD will stay around a point that deviates from the local minimum by an O ( σ 2 ) amount. This stationary point potentially has many solutions. For example, one class of solution is when θ -θ ∗ is an eigenvector of H with eigenvalue h ∗ > 0 and eigenvector n , we can denote s = ( θ -θ ∗ ) ⊺ n and obtain a direct solution of s :

This deviation disappears in the limit σ 2 → 0 . Therefore, this implicit regularization effect is only a consequence of SGD training and is not present under GD. With this condition, one can obtain a clear expression of the deviation of the quantity C from its local minimum value C ∗ ∶= ( θ ∗ ) ⊺ Aθ ∗ . We have that

Thus, our results in the previous section still apply. The quantity C will be systematically larger than the local minimum values of C if the approximate symmetry matrix A is PD. It is systematically smaller if A is ND. When A contains both positive and negative eigenvalues, the deviation of C

35

35

35

35

30

30

30

30

25

25

25

25

20

20

20

20

15

15

15

15

10

一

10

10

10

5

5

5

5

0

0

0

0

0

10

20

30

0

10

20

30

0

10

20

30

0

10

20

30

neuronindex

neuronindex

neuron index

neuronindex

depends on the local gradient fluctuation balancing condition. When the smallest eigenvalue of H is close to zero (which is true for common neural networks), the dominant factor that biases C occurs in this space. Therefore, it is not bad to approximate the deviation as C ( θ ) ≈ C ∗ + 2 σ 2 Tr [ Σ A ]/ h min , where h min is the smallest eigenvalue of the Hessian at the local minimum. In reality, ζ is neither too large nor too small, and one expects that the solution favored by SGD is an effective interpolation between the true local minimum and the fixed point favored by the symmetries.

A set of experiments is shown in Figure 6, where we compare the latent representation of a twolayer tanh net with the prediction of 5.2. This is a natural example because fully connected networks are believed to be approximated by deep linear networks because they have the same connectivity patterns. We thus compare the prediction of Theorem 5.2 with the experimental results of nonlinear networks. Here, the task is a simple autoencoding task, where x ∈ R 40 and y = x + ϵ . x is sampled from an isotropic Gaussian, and ϵ is an independent non-isotropic (but diagonal) Gaussian noise such that Var [ ϵ 1 ] = 5 and Var [ ϵ i ] = 1 for i ≠ 1 . We train with SGD or GD for 10 4 iterations. The experimental results show that if trained with SGD, the learned representation agrees with the prediction of Theorem 5.2 well, whereas under GD, the model learned a completely different representation. This suggests that our result may be greatly useful for understanding the structures of latent representations of trained neural networks because the quantity W ¯ Σ x W has a clean interpretation as the normalized covariance matrix of pre-activation hidden representation. Also, this result is not a special feature of tanh networks. Appendix A.4 also shows that the same phenomenon can be observed for swish [28], ReLU, and leaky-ReLU nets.

6 Conclusion

In this work, we have studied how continuous symmetries affect the learning dynamics and fixed points of SGD. The result implies that SGD converges to initialization-independent solutions at the end of training, in sharp contrast to GD, which converges to strongly initialization-dependent solutions. We constructed the theoretical framework of exponential symmetries to study the special tendency of SGD to stay close to a special fixed point along the constant directions of the loss landscape. We proved that every exponential symmetry leads to a mapping of every parameter to a unique and essentially attractive fixed point. This point also has a clean interpretation: it is the point where the gradient noises of SGD in different subspaces balance and align . Because of this property, we termed these fixed points the 'noise equilibria.' The advantage of our result is that it only relies on the existence of symmetries and is independent of the particular definitions of model architecture or data distribution. A limitation of our work is that we only focus on the problems that exponential symmetries can describe. It would be important to extend the result to other types of symmetries in the future. Another interesting future direction is to study these noise equilibria of more advanced models, which may deepen both our understanding of deep learning and neuroscience.

References

Sanjeev Arora, Nadav Cohen, Wei Hu, and Yuping Luo. Implicit regularization in deep matrix factorization. Advances in Neural Information Processing Systems , 32, 2019.

Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450 , 2016.

Feng Chen, Daniel Kunin, Atsushi Yamamura, and Surya Ganguli. Stochastic collapse: How gradient noise attracts sgd dynamics towards simpler subnetworks. arXiv preprint arXiv:2306.04251 , 2023.

Anna Choromanska, Mikael Henaff, Michael Mathieu, G´ erard Ben Arous, and Yann LeCun. The loss surfaces of multilayer networks. In Artificial Intelligence and Statistics , pages 192204, 2015.

Anna Choromanska, Yann LeCun, and G´ erard Ben Arous. Open problem: The landscape of the loss surfaces of multilayer networks. In Conference on Learning Theory , pages 1756-1760. PMLR, 2015.

Jeremy M Cohen, Simran Kaur, Yuanzhi Li, J Zico Kolter, and Ameet Talwalkar. Gradient descent on neural networks typically occurs at the edge of stability. arXiv preprint arXiv:2103.00065 , 2021.

L. Dinh, R. Pascanu, S. Bengio, and Y. Bengio. Sharp Minima Can Generalize For Deep Nets. ArXiv e-prints , March 2017.

Simon S Du, Wei Hu, and Jason D Lee. Algorithmic regularization in learning deep homogeneous models: Layers are automatically balanced. Advances in neural information processing systems , 31, 2018.

Xavier Fontaine, Valentin De Bortoli, and Alain Durmus. Convergence rates and approximation results for sgd and its continuous-time counterpart. In Mikhail Belkin and Samory Kpotufe, editors, Proceedings of Thirty Fourth Conference on Learning Theory , volume 134 of Proceedings of Machine Learning Research , pages 1965-2058. PMLR, 15-19 Aug 2021.

Priya Goyal, Piotr Doll´ ar, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677 , 2017.

Brian C Hall and Brian C Hall. Lie groups, Lie algebras, and representations . Springer, 2013.

Boris Hanin and David Rolnick. How to start training: The effect of initialization and architecture. Advances in Neural Information Processing Systems , 31, 2018.

Wenqing Hu, Chris Junchi Li, Lei Li, and Jian-Guo Liu. On the diffusion approximation of nonconvex stochastic gradient descent. arXiv preprint arXiv:1705.07562 , 2017.

Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167 , 2015.

Stanislaw Jastrzebski, Maciej Szymczak, Stanislav Fort, Devansh Arpit, Jacek Tabor, Kyunghyun Cho, and Krzysztof Geras. The break-even point on optimization trajectories of deep neural networks. In International Conference on Learning Representations , 2019.

Michael I Jordan. Dynamical, symplectic and stochastic perspectives on gradient-based optimization. In Proceedings of the International Congress of Mathematicians: Rio de Janeiro 2018 , pages 523-549. World Scientific, 2018.

Kenji Kawaguchi. Deep learning without poor local minima. Advances in Neural Information Processing Systems , 29:586-594, 2016.

Daniel Kunin, Javier Sagastuy-Brena, Surya Ganguli, Daniel LK Yamins, and Hidenori Tanaka. Neural mechanics: Symmetry and broken conservation laws in deep learning dynamics. arXiv preprint arXiv:2012.04728 , 2020.

Qianxiao Li, Cheng Tai, and Weinan E. Stochastic modified equations and dynamics of stochastic gradient algorithms i: Mathematical foundations. Journal of Machine Learning Research , 20(40):1-47, 2019.

Zhiyuan Li, Kaifeng Lyu, and Sanjeev Arora. Reconciling modern deep learning with traditional optimization analyses: The intrinsic learning rate. Advances in Neural Information Processing Systems , 33:14544-14555, 2020.

Zhiyuan Li, Sadhika Malladi, and Sanjeev Arora. On the validity of modeling sgd with stochastic differential equations (sdes), 2021.

Kangqiao Liu, Liu Ziyin, and Masahito Ueda. Noise and fluctuation of finite learning rate stochastic gradient descent, 2021.

Haihao Lu and Kenji Kawaguchi. Depth creates no bad local minima. arXiv preprint arXiv:1702.08580 , 2017.

Sibylle Marcotte, R´ emi Gribonval, and Gabriel Peyr´ e. Abide by the law and follow the flow: Conservation laws for gradient flows. 2023.

Emmy Noether. Invariante variationsprobleme. K¨ oniglich Gesellschaft der Wissenschaften G¨ ottingen Nachrichten Mathematik-physik Klasse , 2:235-267, 1918.

Scott Pesme, Loucas Pillaud-Vivien, and Nicolas Flammarion. Implicit bias of sgd for diagonal linear networks: a provable benefit of stochasticity. Advances in Neural Information Processing Systems , 34:29218-29230, 2021.

Martin Popel and Ondˇ rej Bojar. Training tips for the transformer model. arXiv preprint arXiv:1804.00247 , 2018.

Prajit Ramachandran, Barret Zoph, and Quoc V. Le. Searching for activation functions, 2017.

Tim Salimans and Durk P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. Advances in neural information processing systems , 29, 2016.

Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120 , 2013.

N. Shirish Keskar, D. Mudigere, J. Nocedal, M. Smelyanskiy, and P. T. P. Tang. On LargeBatch Training for Deep Learning: Generalization Gap and Sharp Minima. ArXiv e-prints , September 2016.

Justin Sirignano and Konstantinos Spiliopoulos. Stochastic gradient descent in continuous time: A central limit theorem. Stochastic Systems , 10(2):124-151, 2020.

Nathan Srebro, Jason Rennie, and Tommi Jaakkola. Maximum-margin matrix factorization. Advances in neural information processing systems , 17, 2004.

Hidenori Tanaka and Daniel Kunin. Noether's learning dynamics: Role of symmetry breaking in neural networks. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems , volume 34, pages 25646-25660. Curran Associates, Inc., 2021.

Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems , 30, 2017.

Ruosi Wan, Zhanxing Zhu, Xiangyu Zhang, and Jian Sun. Spherical motion dynamics: Learning dynamics of normalized neural network using sgd and weight decay. Advances in Neural Information Processing Systems , 34:6380-6391, 2021.

Ming Chen Wang and George Eugene Uhlenbeck. On the theory of the brownian motion ii. Reviews of modern physics , 17(2-3):323, 1945.

Zihao Wang and Liu Ziyin. Posterior collapse of a linear latent variable model. Advances in Neural Information Processing Systems , 35:37537-37548, 2022.

Lei Wu, Chao Ma, and Weinan E. How sgd selects the global minima in over-parameterized learning: A dynamical stability perspective. Advances in Neural Information Processing Systems , 31, 2018.

Yizhou Xu and Liu Ziyin. When does feature learning happen? perspective from an analytically solvable model. arXiv preprint arXiv:2401.07085 , 2024.

Hong-Jian Xue, Xinyu Dai, Jianbing Zhang, Shujian Huang, and Jiajun Chen. Deep matrix factorization models for recommender systems. In IJCAI , volume 17, pages 3203-3209. Melbourne, Australia, 2017.

Ning Yang, Chao Tang, and Yuhai Tu. Stochastic gradient descent introduces an effective landscape-dependent regularization favoring flat solutions. Physical Review Letters , 130(23):237101, 2023.

Bo Zhao, Nima Dehmamy, Robin Walters, and Rose Yu. Symmetry teleportation for accelerated optimization. Advances in Neural Information Processing Systems , 35:16679-16690, 2022.

Zhanxing Zhu, Jingfeng Wu, Bing Yu, Lei Wu, and Jinwen Ma. The anisotropic noise in stochastic gradient descent: Its behavior of escaping from sharp minima and regularization effects. arXiv preprint arXiv:1803.00195 , 2018.

Liu Ziyin. Symmetry induces structure and constraint of learning. In Forty-first International Conference on Machine Learning .

Liu Ziyin, Isaac Chuang, Tomer Galanti, and Tomaso Poggio. Formation of representations in neural networks. arXiv preprint arXiv:2410.03006 , 2024.

Liu Ziyin, Botao Li, and Xiangming Meng. Exact solutions of a deep linear network. In Advances in Neural Information Processing Systems , 2022.

Liu Ziyin, Hongchao Li, and Masahito Ueda. Law of balance and stationary distribution of stochastic gradient descent. arXiv preprint arXiv:2308.06671 , 2023.

Liu Ziyin, Kangqiao Liu, Takashi Mori, and Masahito Ueda. Strength of minibatch noise in SGD. In International Conference on Learning Representations , 2022.

Liu Ziyin, Ekdeep Singh Lubana, Masahito Ueda, and Hidenori Tanaka. What shapes the loss landscape of self supervised learning? In The Eleventh International Conference on Learning Representations , 2023.

16

16

16

Net-A

Net-A

Net-A

14

Net-B

14

Net-B

14

Net-B

12

12

12

+

10

三

10

三

10

8

8

8

6

6

6

4

4

4

0

1000

2000

3000

4000

5000

0

1000

2000

3000

4000

5000

0

1000

2000

3000

4000

5000

t

t

t

A Additional Experiments

A.1 Scale Invariance

The scale invariance appears when common normalization techniques such as batch normalization [14] and layer normalization [2] are used. Let ℓ ( θ, x ) denote a per-sample loss such that for any ρ ∈ R + : ℓ ( θ, x ) = ℓ ( ρθ, x ) , where θ ∈ R d . For this symmetry, A = I . Thus, by Eq. (7), we have during SGD training that

Thus, without weight decay, the parameter norm increases monotonically and even diverges, particularly for under-parameterized models where the gradient noise is typically non-degenerate.

Here, we numerically compare two networks trained on GD and SGD: Net-A: f ( x ) = ∑ j u j ∥ w ∥ tanh ( w ⊺ j x /∥ u ∥ F ) ; and Net-B: f ( x ) = ∑ j u ij ∥ u ∥ tanh ( w ⊺ j x /∥ w ∥ F ) . Here, w and u are matrices and w j denotes the j -th row of w and u j denotes the j -th column of u . The two networks are different functions of u and w . However, both networks have the global scale invariance: if we scale both U and W by an arbitrary positive scalar ρ , the network output and loss function remain unchanged for any sample x . We train these two networks on simple linear Gaussian data with GD or SGD. Figure 7 shows the result. Clearly, for SGD, both networks have a monotonically increasing norm, whereas the norm remains unchanged when the training proceeds with GD. What's more, Net-B has two additional layer-wise scale invariances where one can scale only u (or only w ) by ρ while keeping the loss function unchanged. This means that both layers will have a monotonically increasing norm, which is not the case for Net-A.

Recent works have studied the dynamics of SGD under the scale-invariant models when weight decay is present [36, 20]. Our result shows that the model parameters will diverge without weight decay, leading to potential numerical problems. Combining the two results, the importance of having weight decay becomes clear: it prevents the divergence of models.

A.2 Experiment Detail for Alignment Dynamics of Matrix Factorization

Here, we give the details for the experiment in Figure 2. We train a two-layer linear net with d 0 = d 2 = 30 and d = 40 . The input data is x ∼ N( 0 , 1 ) , and y = x + ϵ , where ϵ is i.i.d. Gaussian with unit variance. At the end of SGD training, every element of the matrix U ⊺ Γ U U is close to that of W Γ W W ⊺ , and they are therefore very well aligned. Such a phenomenon does not happen for GD.

A.3 Convergence of Matrix Factorization to the Noise Equilibrium

See Figure 8.

125

125

n=0.04

d=500

S =60

100

n=0.06

MM

100

d=700

100

S=100

WT

75

7=0.1

n=0.08

WT

75

d=1100

006=p

WT

75

S =140

S=180

L

1

50

n=0.14

n =0.12

1

50

d=1300

d=1500

L

1

50

25

7

25

d=1700

25

d=1900

0

0

0

0

200

400

600

800

1000

0

200

400

600

800

1000

0

200

400

600

800

1000

t

t

t

A.4 Alignment in Nonlinear Networks

Here, we complement the experiment in the main text with other types of activations. The experimental setting is exactly the same except that we switch the activation to swish, ReLU, and LeakyReLU. This shows that the prediction of Proposition 13 may have a surprisingly wide applicability. See Figure 9.

35

35

30

25

25

20

20

15

15

10

10-

5

5

0

？

0-

0

10

20

30

0

10

20

30

neuron index

neuron index

35

35

30

30

25

25

20

20-

15

15

10

10

5

0

0

0

10

20

30

0

10

20

30

neuron index

neuron index

35

35

F0

30

25

25

20

20-

15

15

10

10

5

5

0-

0

10

20

30

0

10

20

30

neuron index

neuron index

B Proofs

B.1 Ito's Lemma and Derivation of Eq. (5)

Let a vector X t follow the following stochastic process:

for a matrix G t . Then, the dynamics of any function of X t can be written as (Ito's Lemma)

Applying this result to quantity C ( θ ) under the SGD dynamics, we obtain that

where we have used µ t = ∇ L , G t = √ σ 2 Σ ( θ ) . By Eq. (3), we have that

and

Because Σ ( θ ) and √ Σ ( θ ) share eigenvectors, we have that

Therefore, we have derived:

B.2 Proof of Theorem 4.3

We first prove a lemma that links the gradient covariance at θ to the gradient covariance at θ λ . Lemma B.1.

Proof. By the definition of the exponential symmetry, we have that for an arbitrary λ ,

Taking the derivative of both sides, we obtain that

The standard result of Lie groups shows that e λA is full-rank and symmetric, and its inverse is e -λA . Therefore, we have

Now, we apply this relation to the trace of interest. By definition,

Because e λA is a function of A , it commutes with A . Therefore,

Now, we are ready to prove the main theorem.

Proof. First of all, it is easy to see that C ( θ λ ) is a monotonically increasing function of λ . By definition,

where we have decomposed the matrix e λA Ae λA = Z + + Z -into two symmetric matrices such that Z + only contains nonnegative eigenvalues, and Z -only contains nonpositive eigevalues. Because e λA commute with A , they share the eigenvectors. Using elementary Lie algebra shows that the eigenvalues of Z + are a + e λa + and that of Z -are a -e λa -, where a + ≥ 0 and a 0 ≤ 0 . This implies that θ T Z + θ and θ T Z -θ are monotonically increasing functions of λ .

Similarly, the regularization term is

Now, by assumption, if G ( θ λ ) ≠ 0 , we have either Tr [ Σ ( θ ) A ] ≠ 0 or Tr [ θθ ⊺ A ] ≠ 0 .

If Tr [ Σ ( θ ) A ] = θ ⊺ Aθ = 0 , we have already proved item (2) of the theorem. Therefore, let us consider the case when either (or both) Tr [ Σ ( θ ) A ] ≠ 0 or θ ⊺ Aθ ≠ 0

Without loss of generality, we assume γ ≥ 0 , and the case of γ < 0 follows an analogous proof. In such a case, we can write the trace in terms of the eigenvectors n i of A :

where µ i is the i -th eigenvalue of A , ˜ θ i = ( n ⊺ i θ i ) 2 , σ 2 i = n ⊺ i Σ ( θ ) n i ≥ 0 is the norm of the projection of Σ in this direction.

By definition, I 1 is either a zero function or strictly monotonically increasing function with I 1 (-∞) = +∞ , I 1 (+∞) = 0 Likewise, I 2 is either a zero function or a strictly monotonically increasing function with I 2 (-∞) = 0 , I 2 (+∞) = +∞ . By the assumption Tr ( Σ ( θ ) A ) ≠ 0 or Tr ( θθ ⊺ A ) ≠ 0 , we have that at least one of I 1 and I 2 must be a strictly monotonic function.

If I 1 or I 2 is zero, we can take λ to be either +∞ or -∞ to satisfy the condition.

If both I 1 and I 2 are nonzero, then I = I 1 -I 2 is a strictly monotonically decreasing function with I (-∞) = +∞ and I (+∞) = -∞ . Therefore, there must exist only a unique λ ∗ ∈ R such that I ( λ ∗ ) = 0 .

For the proof of (4), we denote the multi-variable function J ( θ ; λ ) ∶= G ( θ λ ) . Given that Σ ( θ ) is differentiable, ∂J ∂θ exists.

It is easy to see that ∂J ∂λ is continuous. Moreover, for any θ and λ = λ ∗ ( θ ) ,

Consequently, according to the Implicit Function Theorem, the function λ ∗ θ is differentiable.

( ) ∂J .

B.3 Convergence

First of all, notice an important property, which follows from Theorem 4.3: λ ∗ = 0 if and only if C -C ∗ = 0 .

Lemma B.2. For all θ ( t ) ,

Thus,

This finishes the proof.

Lemma B.3. For any θ ,

Proof. As in the main text, let θ ∗ denote θ λ ∗ , C = C ( θ ) and C ∗ = C ( θ ∗ ) . Thus,

where the second equality follows from Lemma B.1. One can decompose A as a sum of two symmetric matrices

where Q is an orthogonal matrix, Σ + ( Σ -) is diagonal and contains only non-negative (non-positive) entries. Note that by the definition of λ ∗ , we have Tr [ Σ ( θ ∗ ) A ] = 0 and, thus,

Using the inequality I + A ≤ e A (namely, that e A -I -A is PSD), we obtain a lower bound

If λ ∗ > 0 , Tr [ Σ ( θ ∗ )( e 2 λ ∗ A --I ) A -] < 0 ,

Likewise, there is an upper bound, which simplifies to the following form if λ ∗ < 0 :

Proof. The proof is conceptually similar to the previous one. By definition, we have

By the inequality I + A ≤ e A , we have an upper bound

If λ ∗ > 0 , ( θ ∗ ) ⊺ A -( e -2 λ ∗ A --I ) θ ∗ ≥ 0 ,

Likewise, if λ ∗ < 0 , one can prove a lower bound:

Combining the above two lemmas, one can prove the following corollary.

Corollary B.4.

Now, one can prove that as long as C ∗ is not moving too fast, C converges to C ∗ in mean square. Lemma B.5. Let the dynamics of C ∗ be a drifted Brownian motion: dC ∗ = µdt + sdW , where W is a Brownian motion with variance s 2 . If there exists c 0 > 0 such that Tr [ Σ ( θ ∗ ) A 2 + ] ( θ ∗ ) ⊺ A 2 + θ ∗ ≥ c 0 and Tr [ Σ ( θ ∗ ) A 2 -] ( θ ∗ ) ⊺ A 2 -θ ∗ > c 0 ,

Let us first focus on the case when C -C ∗ > 0 . By the definition of C ∗ and Ito's lemma,

Let Z = e σ 2 c 0 t ( C -C ∗ ) , we obtain that

Alternatively, if C -C ∗ < 0 , we let Z = e σ 2 c 0 t ( C ∗ -C ) , and obtain

where we have used Ito's isometry in the first line. By construction,

Proof. By assumption,

Its solution is given by

Thus,

The proof is complete.

Let → p denote convergence in probability. One can now prove the following theorem, the convergence of the relative distance to zero in probability.

Theorem B.6. Let the assumptions be the same as Lemma. (B.5) . Then, if s = µ = 0 , E [( C -C ∗ ) 2 ] → 0 . Otherwise,

Proof. By Lemma B.5 and Markov's inequality:

Now, consider the distribution of ( C ∗ ) 2 . Because C ∗ is a Gaussian variable with mean µt and variance s 2 t , we have that √

Now,

where we have used the Frechet inequality in the second line. This finishes the proof.

B.4 Proof of Proposition 5.1

Proof. Recall that U = ( ˜ u 1 , /uni22EF , ˜ u d 2 ) ⊺ ∈ R d 2 × d , W = ( ˜ w 1 , /uni22EF , ˜ w d 0 ) ∈ R d × d 0 , where ˜ u i , ˜ w i ∈ R d . θ = vec ( U,W ) = ( ˜ u ⊺ 1 , /uni22EF , ˜ u ⊺ d 2 , ˜ w ⊺ 1 , /uni22EF , ˜ w ⊺ d 0 ) ⊺ ∈ R ( d 2 + d 0 ) d .

For ∇ 2 θθ C , it holds that

Therefore,

The proof is complete.

B.5 Proofs of Proposition 5.3

Proof. The loss function is

Let us adopt the following notation: U = ( ˜ u 1 , /uni22EF , ˜ u d y ) ⊺ ∈ R d y × d , W = ( ˜ w 1 , /uni22EF , ˜ w d x ) ∈ R d × d x , where ˜ u i , ˜ w i ∈ R d . θ = vec ( U,W ) = ( ˜ u ⊺ 1 , /uni22EF , ˜ u ⊺ d y , ˜ w ⊺ 1 , /uni22EF , ˜ w ⊺ d x ) ⊺ ∈ R ( d x + d y ) d .

Due to

the diagonal blocks of the Hessian ∇ 2 θθ ℓ have the following form:

The trace of the Hessian is a good metric of the local stability of the GD and SGD algorithm because the trace upper bounds the largest Hessian eigenvalue. For this loss function, the trace of the Hessian of the empirical risk is

where Σ x = xx ⊺

C Proof of Theorem 5.2

Proof. First, we split U and W like U = ( u 1 , /uni22EF , u d ) ∈ R d y × d and W = ( w ⊺ 1 , /uni22EF , w ⊺ d ) ⊺ ∈ R d × d x . The quantity under consideration is C B = Tr [ UBU ⊺ ] -Tr [ W ⊺ BW ] for an arbitrary symmetric matrix B . What will be relevant to us is the type of B that is indexed by two indices k and l such that

Specifically, for k, l ∈ [ d ] , we select B ( k,l ) i,j = δ i,k δ j,l + δ i,l δ j,k in C B . With this choice, for an arbitrary pair of k and l ,

and

Therefore,

where we have defined r i = ˜ u ⊺ i Wx -y i and Σ ′ W = E [∥ r ∥ 2 xx ⊺ ] . Likewise, we have that

where we have defined Σ ′ u = E [∥ x ∥ 2 rr ⊺ ] . Therefore, we have found that for arbitrary pair of k and l

The fixed point of this dynamics is:

where Σ w = η Σ ′ w + γI and Σ U = η Σ ′ u + γI . Because this holds for arbitrary k and l , the equation can be written in a matrix form:

Namely, U ′ and ( W ′ ) ⊺ must have the same right singular vectors and singular values. This gives us the following solution. Let V ′ = LSR be the singular value decomposition of V ′ , where L and R are orthogonal matrices an S is a positive diagonal matrix. Then, for an arbitrary orthogonal matrix F , the following choice of U ′ and W ′ satisfies the two conditions:

This finishes the proof.

D Discrete-Time GD and SGD

In fact, our results hold in a similar form for discrete-time GD and SGD. Let us focus on the exponential symmetries with the symmetric matrix A .

The following equation holds with probability 1 :

For discrete-time SGD, it is notationally simpler and without loss of generality to regard ℓ ( θ ) as the minibatch-averaged loss, which is the notation we adopt here. This is because if a symmetry holds for every per-sample loss, then it must also hold for every empirical average of these per-sample losses.

The dynamics of SGD gives

This means that

Therefore, we have that

Therefore,

where ˜ Σ d ( θ ) = ∇ θ ℓ ( θ )∇ ⊺ θ ℓ ( θ ) is by definition PSD. Already, note the similarity between Eq. (98) and its continuous-time version. The qualitative discussions carry over: if A is PSD, C t increases monotonically.

Now, while the first-order terms in η also vanish in the r.h.s, the problem is that the r.h.s. becomes stochastic because Σ d ( θ t ) is different for every time step. However, one can still analyze the expected flow and show that the expected flow (over the sampling of minibatches) is zero at a unique point in a way similar to the continuous-time limit of the problem. Therefore, we define

We can now prove the following theorem. Note that this theorem applies for any batch size, and so it applies to both SGD and GD.

Theorem D.1. (Discrete-time fixed point theorem of SGD.) Let the per-sample loss satisfy the A exponential symmetry and θ λ ∶= exp [ λA ] θ . Then, for any θ and any γ ∈ R ,

Let V = UW . To show that a solution exists for an arbitrary V . Let W ′ = W √ Σ w and U ′ = √ Σ u U , which implies that √ √

and

G d ( θ λ ) is a monotonically decreasing function of λ ;

there exists a λ ∗ ∈ R ∪{±∞} such that G d ( θ λ ) = 0 ;

in addition, if Tr [ Σ d ( θ ) A ] ≠ 0 or Tr [ θθ ⊺ A ] ≠ 0 , λ ∗ is unique and G d ( θ λ ) is strictly monotonic;

in addition to (3), if Σ d ( θ ) is differentiable, λ ∗ ( θ ) is a differentiable function of θ .

Proof. Similarly, let us establish the relationship between ∇ ℓ ( θ ) and ∇ ℓ ( exp ( λA )) . By the definition of the exponential symmetry, we have that for an arbitrary λ ,

Taking the derivative of both sides, we obtain that

The standard result of Lie groups shows that e λA is full-rank and symmetric, and its inverse is e -λA . Therefore, we have

Now, we apply this relation to the trace of interest. By definition,

Because e λA is a function of A , it commutes with A . Therefore,

Similarly, the regularization term is

Now, if Tr [ Σ d ( θ ) A ] = θ ⊺ Aθ = 0 , we have already proved item (2) of the theorem. Therefore, let us consider the case when either (or both) Tr [ Σ d ( θ ) A ] ≠ 0 or θ ⊺ Aθ ≠ 0

Without loss of generality, we assume γ ≥ 0 , and the case of γ < 0 follows an analogous proof. In such a case, we can write the trace in terms of the eigenvectors n i of A :

where µ i is the i -th eigenvalue of A , ˜ θ i = ( n ⊺ i θ i ) 2 , σ 2 i = n ⊺ i Σ d ( θ ) n i ≥ 0 is the norm of the projection of Σ d in this direction.

By definition, I 1 is either a zero function or strictly monotonically increasing function with I 1 (-∞) = +∞ , I 1 (+∞) = 0 Likewise, I 2 is either a zero function or a strictly monotonically increasing function with I 2 (-∞) = 0 , I 2 (+∞) = +∞ . By the assumption Tr ( Σ d ( θ ) A ) ≠ 0 or Tr ( θθ ⊺ A ) ≠ 0 , we have that at least one of I 1 and I 2 must be a strictly monotonic function.

If I 1 or I 2 is zero, we can take λ to be either +∞ or -∞ to satisfy the condition.

If both I 1 and I 2 are nonzero, then I = I 1 -I 2 is a strictly monotonically decreasing function with I (-∞) = +∞ and I (+∞) = -∞ . Therefore, there must exist only a unique λ ∗ ∈ R such that I ( λ ∗ ) = 0 .

The proof of (4) follows from the Implicit Function Theorem, as in the continuous-time case.

The final question is this: what does it mean for θ to reach a point where G d ( θ ) = 0 ? An educated guess can be made: the fluctuation in C does not vanish, but the flow takes C towards this vanishing flow point - something like a Brownian motion trapped in a local potential well [37]. However, it is difficult to say more without specific knowledge of the systems.

E Proof of Theorem 5.4

Wefirst prove the following theorem, which applies to an arbitrary parameter that are not necessarily local minima of of the loss.

Theorem E.1. Let r = W D /uni22EF W 1 x -y , ξ i + 1 ∶= W D /uni22EF W i + 2 and h i ∶= W i -1 /uni22EF W 1 . For all layer i , the equilibrium is achieved at

where C i 0 = E [∥ h i x ∥ 2 rr ⊺ ] , C i 1 ∶= E [∥ ξ ⊺ i + 1 r ∥ 2 xx ⊺ ] . Or equivalently,

Proof. By Proposition 5.1,

The derivatives are

Therefore, the two terms on R.H.S of Eq. (111) are given by

Because the matrix B is arbitrary, we can let B i,j = δ i,k δ j,l + δ i,l δ j,k . Then, the two terms become

Here, we define the vectors W i = ( ˜ w ⊺ i, 1 , /uni22EF , ˜ w ⊺ i,d ) ⊺ and W i + 1 = ( ˜ w i + 1 , 1 , /uni22EF , ˜ w i + 1 ,d ) . Because Eq. (116) and (117) hold for arbitrary k, l , we have

For Eq. (111) to be 0 , we must have

which is Eq. (109). The proof is complete.

We are now ready to prove Theorem 5.4.

Proof. It suffices to specialize Theorem E.1 to the global minimum. At the global minimum, we can define

Then, Eq. (109) can be written as

To solve Eq. (122), we substitute W D and W 1 with W ′ 1 = W 1 √ Σ x and W ′ D = √ Σ ϵ W D , which transform Eq. (122) into

The global minimum condition can be written as

Then, we can decompose the matrices W ′ 1 , /uni22EF , W ′ D as

where Σ D , /uni22EF , Σ 1 ∈ R d × d , L ∈ R d y × d , U i ∈ R d i × d , R ∈ R d × d x with d ∶= rank ( V ′ ) and arbitrary d i . The matrices U i satisfy U ⊺ i U i = I d × d . By substituting the decomposition into Eq. (123), we have

Since these diagonal matrices commute with each other, we can see Σ i = cI d × d . Then we move on to fix the parameter c . By taking i = 1 and i = D -1 in Eq. (126), we obtain

where d represents the dimension of the learning space. By taking trace to both sides of Eqs. (127) and (128), we can see Tr [ Σ 2 1 ] = Tr [ Σ 2 D ] and hence, Σ 1 = Σ D . The parameter c is given by

With the SVD decomposition V ′ = LS ′ R , we have

Therefore, the solutions for c and Σ 1 are

The scaling of the diagonal matrices are shown as

The proof is complete.

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: We believe that the abstract and introduction reflect the contributions and scope of the paper.

Guidelines:

The answer NA means that the abstract and introduction do not include the claims made in the paper.

The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers.

The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings.

It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: We have discussed the limitations of our work in the conclusion.

Guidelines:

The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper.

The authors are encouraged to create a separate 'Limitations' section in their paper.

The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be.

The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated.

The authors should reflect on the factors that influence the performance of the approach. For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon.

The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.

If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness.

While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: We believe that the assumptions are clarified and complete proofs are provided for the theoretical parts.

Guidelines:

The answer NA means that the paper does not include theoretical results.

All the theorems, formulas, and proofs in the paper should be numbered and crossreferenced.

All assumptions should be clearly stated or referenced in the statement of any theorems.

The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged to provide a short proof sketch to provide intuition.

Inversely, any informal proof provided in the core of the paper should be complemented by formal proofs provided in appendix or supplemental material.

Theorems and Lemmas that the proof relies upon should be properly referenced.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: We believe that all of the experimental results are reproducable in our work.

Guidelines:

The answer NA means that the paper does not include experiments.

If the paper includes experiments, a No answer to this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.

If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.

Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, or provide access to the model. In general. releasing code and data is often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how to replicate the results, access to a hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate to the research performed.

While NeurIPS does not require releasing code, the conference does require all submissions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example

(a) If the contribution is primarily a new algorithm, the paper should make it clear how to reproduce that algorithm.

(b) If the contribution is primarily a new model architecture, the paper should describe the architecture clearly and fully.

(c) If the contribution is a new model (e.g., a large language model), then there should either be a way to access this model for reproducing the results or a way to reproduce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).

(d) We recognize that reproducibility may be tricky in some cases, in which case authors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., to registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [No]

Justification: The code or data of the experiments are simple and easy to reproduce following the description in the main text.

Guidelines:

The answer NA means that paper does not include experiments requiring code.

Please see the NeurIPS code and data submission guidelines ( https://nips.cc/ public/guides/CodeSubmissionPolicy ) for more details.

While we encourage the release of code and data, we understand that this might not be possible, so 'No' is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for a new open-source benchmark).

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines ( https: //nips.cc/public/guides/CodeSubmissionPolicy ) for more details.

The authors should provide instructions on data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.

The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only a subset of experiments are reproducible, they should state which ones are omitted from the script and why.

At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).

Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: We have specified the training and test details of the experiments in the captions or the corresponding explanations in the main text for Figs. 2, 3, 4, 5 and 6.

Guidelines:

The answer NA means that the paper does not include experiments.

The experimental setting should be presented in the core of the paper to a level of detail that is necessary to appreciate the results and make sense of them.

The full details can be provided either with the code, in appendix, or as supplemental material.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [No]

Justification: Here the dynamics is deterministic and there is no need to consider the error bars here.

Guidelines:

The answer NA means that the paper does not include experiments.

The authors should answer 'Yes' if the results are accompanied by error bars, confidence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.

The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, or overall run with given experimental conditions).

The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)

The assumptions made should be given (e.g., Normally distributed errors).

It should be clear whether the error bar is the standard deviation or the standard error of the mean.

It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified.

For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).

If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [No]

Justification: The experiments can be simply conducted on personal computers.

Guidelines:

The answer NA means that the paper does not include experiments.

The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.

The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.

The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper).

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: We have confirmed that the research is conducted with the NeurIPS Code of Ethics.

Guidelines:

The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.

If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics.

The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction).

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [NA]

Justification: Our work is a fundamental research on the learning dynamics of SGD and hence it does not have direct positive or negative societal impacts.

Guidelines:

The answer NA means that there is no societal impact of the work performed.

If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact.

Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations.

The conference expects that many papers will be foundational research and not tied to particular applications, let alone deployments. However, if there is a direct path to any negative applications, the authors should point it out. For example, it is legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, it is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.

The authors should consider possible harms that could arise when the technology is being used as intended and functioning correctly, harms that could arise when the technology is being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.

If there are negative societal impacts, the authors could also discuss possible mitigation strategies (e.g., gated release of models, providing defenses in addition to attacks, mechanisms for monitoring misuse, mechanisms to monitor how a system learns from feedback over time, improving the efficiency and accessibility of ML).

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [No]

Justification: We believe there is no risks for misuse for the data and models.

Guidelines:

The answer NA means that the paper poses no such risks.

Released models that have a high risk for misuse or dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by requiring that users adhere to usage guidelines or restrictions to access the model or implementing safety filters.

Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.

We recognize that providing effective safeguards is challenging, and many papers do not require this, but we encourage authors to take this into account and make a best faith effort.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer:[NA]

Justification: [NA]

Guidelines:

The answer NA means that the paper does not use existing assets.

The authors should cite the original paper that produced the code package or dataset.

The authors should state which version of the asset is used and, if possible, include a URL.

The name of the license (e.g., CC-BY 4.0) should be included for each asset.

For scraped data from a particular source (e.g., website), the copyright and terms of service of that source should be provided.

If assets are released, the license, copyright information, and terms of use in the package should be provided. For popular datasets, paperswithcode.com/ datasets has curated licenses for some datasets. Their licensing guide can help determine the license of a dataset.

For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.

If this information is not available online, the authors are encouraged to reach out to the asset's creators.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [No]

Justification: Nothing introduced.

Guidelines:

The answer NA means that the paper does not release new assets.

Researchers should communicate the details of the dataset/code/model as part of their submissions via structured templates. This includes details about training, license, limitations, etc.

The paper should discuss whether and how consent was obtained from people whose asset is used.

At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: We believe that neither the crowdsourcing nor the research with human subjects is included in our work.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Including this information in the supplemental material is fine, but if the main contribution of the paper involves human subjects, then as much detail as possible should be included in the main paper.

According to the NeurIPS Code of Ethics, workers involved in data collection, curation, or other labor should be paid at least the minimum wage in the country of the data collector.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: Our work does not contain crowdsourcing or research with human subjects.

Guidelines:

The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.

Depending on the country in which research is conducted, IRB approval (or equivalent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this in the paper.

We recognize that the procedures for this may vary significantly between institutions and locations, and we expect authors to adhere to the NeurIPS Code of Ethics and the guidelines for their institution.

For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe 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.\n\nSTRENGTHS:\nThe 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.\n\nWEAKNESSES:\n1.\tC is not guaranteed to exist. (Line 70)\n2.\tUsually, 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.\n3.\tI think it’s missing dependence on $\\gamma$ in proposition 5.3.\n4.\tThe 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.\n5.\tThere is a lack of clarity in how the analyses in Section 5.4 (Equation 24) relate to Figure 4.\n\nQUESTIONS:\n1.\tIn 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.\n2.\tFor 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.\n3.\tI 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$.\n\nLIMITATIONS:\nThe authors have included the limitations. For additional points, please see my comments above.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-06-20"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper considers the relationship between the behavior of SGD for solving empirical risk minimization and the exponential symmetry.\n\nSTRENGTHS:\nThe 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.\n\nWEAKNESSES:\nThe weaknesses are the following. Please see Questions for details.  \n- The mathematical preliminaries are insufficient. \n- The assumptions seem to be strong. \n- The explanations of contributions are insufficient.\n\nQUESTIONS:\n- 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.\"\n- 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$.\n- Line 21: I do not understand what $\\sigma^2 \\ll 1$ is. \n- Line 58: Please define $\\Sigma_v (\\theta)$ explicitly. \n- Line 93: a --> an \n- Eq (7): Is $-4 \\gamma$ in (7) replaced with $-2 \\gamma$?\n- 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).\n- 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)]$. \n- Eq (9): We cannot define (9) when $\\gamma = 0$. Please define $C(\\theta^\\star)$ explicitly. \n- Eq (11): $\\theta'$ is not defined. \n- 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). \n- 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). \n- Figure 2: There are not definitions of the matrix size, a batch size $S$, $\\eta$, and $\\ell (\\theta,x)$.\n- Line 222: $\\epsilon$ is not defined. \n- Theorem 5.2: Is the theorem based on (11)? If so, please provide some examples of $\\dot{C}_B = 0$ under (11). \n- 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.  \n- ...\n- 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.\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-07-07"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe 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). \nThis paper shows that SGD noise causes drift toward a fixed point on a minimum manifold.\n\nSTRENGTHS:\nThis 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. \nThere 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.\n\nWEAKNESSES:\nThere exist multiple other works addressing the same questions. Two particular ones with very similar claims that the authors may have missed are: \n[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).\n[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.\n\nI 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. \n[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.\n\nQUESTIONS:\nThere 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:\n[3] Zhao, Bo, Iordan Ganev, Robin Walters, Rose Yu, and Nima Dehmamy. \"Symmetries, flat minima, and the conserved quantities of gradient flow.\" ICLR (2023). \n\nMy questions are as follows:\n\n\n\nline 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\". \nsec 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. \n\n1. 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? \nHowever, there are some statements in Appendix B which seem inaccurate to me: \n  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$? \n  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$. \n\n2. 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$.    \n\n3. 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)$\n\n4. 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).   \n\n5. 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)$?\n\n6. Eq 7: what happens to the cross terms of $\\theta^t \\nabla \\ell$ in $\\Sigma_\\gamma$? \n\n7. 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$. \n\n8. 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$. \n\n9. 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$. \n\n10. 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$. \n\n11. 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}$. \n\n12. 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$.\n\nLIMITATIONS:\nThere are some gaps in the derivations (see questions) which I hope the authors can fill. \nAdditionally, 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.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-12"}