SERVATION LAWS IN DEEP LEARNING DYNAMICS
Year: 2021

Abstract:
Understanding the dynamics of neural network parameters during training is one of the key challenges in building a theoretical foundation for deep learning. A central obstacle is that the motion of a network in high-dimensional parameter space undergoes discrete finite steps along complex stochastic gradients derived from real-world datasets. We circumvent this obstacle through a unifying theoretical framework based on intrinsic symmetries embedded in a network’s architecture that are present for any dataset. We show that any such symmetry imposes stringent geometric constraints on gradients and Hessians, leading to an associated conservation law in the continuous-time limit of stochastic gradient descent (SGD), akin to Noether’s theorem in physics. We further show that finite learning rates used in practice can actually break these symmetry induced conservation laws. We apply tools from finite difference methods to derive modified gradient flow, a differential equation that better approximates the numerical trajectory taken by SGD at finite learning rates. We combine modified gradient flow with our framework of symmetries to derive exact integral expressions for the dynamics of certain parameter combinations. We empirically validate our analytic expressions for learning dynamics on VGG-16 trained on Tiny ImageNet. Overall, by exploiting symmetry, our work demonstrates that we can analytically describe the learning dynamics of various parameter combinations at finite learning rates and batch sizes for state of the art architectures trained on any dataset.

heading: 1 INTRODUCTION
text: Just like the fundamental laws of classical and quantum mechanics taught us how to control and optimize the physical world for engineering purposes, a better understanding of the laws governing neural network learning dynamics can have a profound impact on the optimization of artificial neural networks. This raises a foundational question: what, if anything, can we quantitatively understand about the learning dynamics of large-scale, non-linear neural network models driven by real-world datasets and optimized via stochastic gradient descent with a finite batch size, learning rate, and with or without momentum? In order to make headway on this extremely difficult question, existing works have made major simplifying assumptions on the network, such as restricting to identity activation functions Saxe et al. (2013), infinite width layers Jacot et al. (2018), or single hidden layers Saad & Solla (1995). Many of these works have also ignored the complexity introduced by stochasticity and discretization by only focusing on the learning dynamics under gradient flow. In the present work, we make the first step in an orthogonal direction. Rather than introducing unrealistic assumptions on the model or learning dynamics, we uncover restricted, but meaningful, combinations of parameters with simplified dynamics that can be solved exactly without introducing a major assumption (see Fig. 1). To find the parameter combinations, we use the lens of symmetry to show that if the training loss doesn’t change under some transformation of the parameters, then the gradient and Hessian for those parameters have associated geometric constraints. We systematically apply this approach to modern neural networks to derive exact integral expressions and verify our predictions empirically on large scale models and datasets. We believe our work is the first step towards a foundational understanding
* Equal contribution. Correspondence to kunin@stanford.edu & hidenori.tanaka@ntt-research.com
of neural network learning dynamics that is not based in simplifying assumptions, but rather the simplifying symmetries embedded in a network’s architecture. Our main contributions are:
1. We leverage continuous differentiable symmetries in the loss to unify and generalize geometric constraints on neural network gradients and Hessians (section 3). 2. We prove that each of these differentiable symmetries has an associated conservation law under the learning dynamics of gradient flow (section 4). 3. We construct a more realistic continuous model for stochastic gradient descent by modeling weight decay, momentum, stochastic batches, and finite learning rates (section 5). 4. We show that under this more realistic model the conservation laws of gradient flow are broken, yielding simple ODEs governing the dynamics for the previously conserved parameter combinations (section 6). 5. We solve these ODEs to derive exact learning dynamics for the parameter combinations, which we validate empirically on VGG-16 trained on Tiny ImageNet with and without batch normalization (section 6).
2 RELATED WORK
The goal of this work is to construct a theoretical framework to better understand the learning dynamics of state-of-the-art neural networks trained on real-world datasets. Existing works have made progress towards this goal through major simplifying assumptions on the architecture and learning rule. Saxe et al. (2013; 2019) and Lampinen & Ganguli (2018) considered linear neural networks with specific orthogonal initializations, deriving exact solutions for the learning dynamics under gradient flow. The theoretical tractability of linear networks has further enabled analyses on the properties of loss landscapes Kawaguchi (2016), convergence Arora et al. (2018a); Du & Hu (2019), and implicit acceleration by overparameterization Arora et al. (2018b). Saad & Solla (1995) and Goldt et al. (2019) studied single hidden layer architectures with non-linearities in a studentteacher setup, deriving a set of complex ODEs describing the learning dynamics. Such shallow neural networks have also catalyzed recent major advances in understanding convergence
properties of neural networks Du et al. (2018b); Mei et al. (2018). Jacot et al. (2018) considered infinitely wide neural networks with non-linearities, demonstrating that the network’s prediction becomes linear in its parameters. This setting allows for an insightful mathematical formulation of the network’s learning dynamics as a form of kernel regression where the kernel is defined by the initialization (though see also Fort et al. (2020)). Arora et al. (2019) extended these results to convolutional networks and Lee et al. (2019) demonstrated how this understanding also allows for predictions of parameter dynamics.
In the present work, we make the first step in an orthogonal direction. Instead of introducing unrealistic assumptions, we discover restricted combinations of parameters for which we can find exact solutions, as shown in Fig. 1. We make this fundamental contribution by constructing a framework harnessing the geometry of the loss shaped by symmetry and realistic continuous equations of learning.
Geometry of the loss. A wide range of literature has discussed constraints on gradients originating from specific architectural building blocks of networks. For the first part of our work, we simplify, unify, and generalize the literature through the lens of symmetry.
The earliest works understanding the importance of invariances in neural networks come from the loss landscape literature Baldi & Hornik (1989) and the characterization of critical points in the presence
of explicit regularization Kunin et al. (2019). More recent works have studied implicit regularization originating from linear Arora et al. (2018b) and homogeneous Du et al. (2018a) activations, finding that gradient geometry plays an important role in constraining the learning dynamics. A different line of research studying the generalization capacity of networks has noticed similar gradient structures Liang et al. (2019). Beyond theoretical studies, geometric properties of the gradient and Hessian have been applied to optimize Neyshabur et al. (2015), interpret Bach et al. (2015), and prune Tanaka et al. (2020) neural networks.
Gradient properties introduced by batch Ioffe & Szegedy (2015), weight Salimans & Kingma (2016) and layer Ba et al. (2016) normalization have been intensely studied. Van Laarhoven (2017); Zhang et al. (2018) showed that normalization layers are scale invariant, but have an implicit role in controlling the effective learning rate. Cho & Lee (2017); Hoffer et al. (2018); Chiley et al. (2019); Li & Arora (2019); Wan et al. (2020) have leveraged the scale invariance of batch normalization to understand geometric properties of the learning dynamics. Most recently, Li et al. (2020) studied the role of gradient noise in reconciling the empirical dynamics of batch normalization with the theoretical predictions given by continuous models of gradient descent.
Equations of learning. To make experimentally testable predictions on learning dynamics, we introduce a continuous model for stochastic gradient descent (SGD). There exists a large body of works studying this subject using stochastic differential equations (SDEs) in the continuous-time limit Mandt et al. (2015; 2017); Li et al. (2017); Smith & Le (2017); Chaudhari & Soatto (2018); Jastrzębski et al. (2017); Zhu et al. (2018); An et al. (2018). Each of these works involves making specific assumptions on the loss or the noise in order to derive stationary distributions. More careful treatment of stochasticity led to fluctuation dissipation relationships at steady state without such assumptions Yaida (2018). In our analysis, we apply a more recent approach Li et al. (2017); Barrett & Dherin (2020), inspired by finite difference methods, that augments SDE model with higher-order terms to account for the effect of a finite step size and curvature in the learning trajectory.

heading: 3 SYMMETRIES IN THE LOSS SHAPE GRADIENT AND HESSIAN GEOMETRIES
text: While we initialize neural networks randomly, their gradients and Hessians at all points in training, no matter the loss or dataset, obey certain geometric constraints. Some of these constraints have been noticed previously as a form of implicit regularization, while others have been leveraged algorithmically in applications from network pruning to interpretability. Remarkably, all these geometric constraints can be understood as consequences of numerous differentiable symmetries in the loss introduced by neural network architectures. A set of parameters observes a differentiable symmetry in the loss if the loss doesn’t change under a certain differentiable transformation of these parameters. This invariance introduces associated geometric constraints on the gradient and Hessian.
Consider a function f(θ) where θ ∈ Rm. This function possesses a differentiable symmetry if it is invariant under the differentiable action ψ
of a group G on the parameter vector θ, i.e., if θ 7→ ψ(θ, α) where α ∈ G, then F (θ, α) = f (ψ(θ, α)) = f(θ) for all (θ, α). The existence of a symmetry enforces a geometric structure on the gradient, ∇F . Evaluating the gradient at the identity element I of G (so that for all θ, ψ(θ, I) = θ) yields the result, 〈∇f, ∂αψ|α=I〉 = 0, (1) where 〈 , 〉 denotes the inner product. This equality implies that the gradient ∇f is perpendicular to the vector field ∂αψ|α=I that generates the symmetry, for all θ. The symmetry also enforces a geometric structure on the Hessian, HF . Evaluating the Hessian at the identity element yields the
result, Hf [∂θψ|α=I ]∂αψ|α=I + [∂θ∂αψ|α=I ]∇f = 0, (2)
which constrains the Hessian Hf . See appendix A for the derivation of these properties and other geometric consequences of symmetry.
We will now consider the specific setting of a neural network parameterized by θ ∈ Rm, the training loss L(θ), and three families of symmetries (translation, scale, and rescale) that commonly appear in modern network architectures.
Translation symmetry. Translation symmetry is defined by the group R and action θ 7→ θ + α1A where 1A is the indicator vector for some subsetA of the parameters {θ1, . . . , θm}. The loss function L thus possesses translation symmetry if L(θ) = L(θ + α1A) for all α ∈ R. Such a symmetry in turn implies the loss gradient ∂θL = g is orthogonal to the indicator vector ∂αψ|α=I = 1A,
〈g,1A〉 = 0, (3) and that the Hessian matrix H = ∂2θL has the indicator vector in its kernel,
H1A = 0. (4)
Softmax function. Any network using the softmax function gives rise to translation symmetry for the parameters immediately preceding the function. Let z = Wx + b be the input to the softmax function such that σ(z)i = e
zi∑ j e
zj . Notice that shifting any column of the weight matrix wi or the bias vector b by a real constant has no effect on the output of the softmax as the shift factors from both the numerator and denominator canceling its effect. Thus, the loss function is invariant w.r.t. this translation, yielding the gradient constraints 〈 ∂L∂wi ,1〉 = 〈 ∂L ∂b ,1〉 = 0, visualized in Fig. 2 for the toy model where wi ∈ R2. Scale symmetry. Scale symmetry is defined by the group GL+1 (R) and action θ 7→ αA θ where αA = α1A + 1Ac . The loss function possesses scale symmetry if L(θ) = L(αA θ) for all α ∈ GL+1 (R). This symmetry immediately implies the loss gradient is everywhere perpendicular to the parameter vector itself ∂αψ|α=I = θ 1A = θA,
〈g, θA〉 = 0, (5) and relates to the Hessian matrix, where [∂α∂θψ|α=I ]∂θL = diag(1A)g = gA, as
HθA + gA = 0. (6)
Batch normalization. Batch normalization leads to scale invariance during training. Let z = wᵀx+ b be the input to a neuron with batch normalization such that BN(z) = z−E[z]√
Var(z) where E[z] is the
sample mean and Var(z) is the sample variance given a batch of data. Notice that scaling w and b by a non-zero real constant has no effect on the output of the batch normalization as it factors from z, E[z], and Var(z) canceling its effect. Thus, these parameters observe scale symmetry in the loss and their gradients satisfy 〈 ∂L ∂w , w 〉 + 〈 ∂L ∂b , b 〉 = 0, as has been previously noted by Ioffe & Szegedy (2015); Van Laarhoven (2017), and visualized in Fig. 2 for the toy model where w, b ∈ R. Rescale symmetry. Rescale symmetry is defined by the group GL+1 (R) and action θ 7→ αA1 α−1A2 θ where A1 and A2 are two disjoint sets of parameters. The loss function possesses rescale symmetry if L(θ) = L(αA1 α−1A2 θ) for all α ∈ GL + 1 (R). This symmetry immediately implies the loss gradient is everywhere perpendicular to the sign inverted parameter vector ∂αψ|α=I = θA1 − θA2 = θ (1A1 − 1A2), 〈g, θA1 − θA2〉 = 0 (7) and relates to the Hessian matrix, where [∂α∂θψ|α=I ]∂θL = diag(1A1 − 1A2)g = gA1 − gA2 , as
H(θA1 − θA2) + gA1 − gA2 = 0. (8) Homogeneous activation. For networks with continuous, homogeneous activation functions φ(z) = φ′(z)z (e.g. ReLU, Leaky ReLU, linear), this symmetry emerges at every hidden neuron by considering all incoming and outgoing parameters to the neuron. For example, consider a hidden neuron with ReLU activation φ(z) = max{0, z}, such that w2φ(wᵀ1x + b) is the computational path through this neuron. Scaling w1 and b by a real constant and w2 by its inverse has
no effect on the computational path as the constants can be passed through the ReLU activation canceling their effects. Thus, these parameters observe rescale symmetry and their gradients satisfy〈 ∂L ∂w1 , w1 〉 + 〈 ∂L ∂b , b 〉 − 〈 ∂L ∂w2 , w2 〉 = 0, as has been previously noted by Du et al. (2018a); Liang et al. (2019); Tanaka et al. (2020), and visualized in Fig. 2 for the toy model where w1, w2 ∈ R and b = 0.

heading: 4 SYMMETRY LEADS TO CONSERVATION LAWS UNDER GRADIENT FLOW
text: We now explore how geometric constraints on gradients and Hessians, arising as a consequence of symmetry, impact the learning dynamics given by stochastic gradient descent (SGD). We will consider a model parameterized by θ, a training dataset {x1, . . . , xN} of size N , and a training loss L(θ) = 1N ∑N i=1 `(θ, xi) with corresponding gradient g(θ) = ∂L ∂θ .
The gradient descent update with learning rate η is θ(n+1) = θ(n) − ηg(θ(n)), which is a forward Euler discretization with step size η of the ordinary differential equation (ODE)
dθ dt = −g(θ). (9)
In the limit as η → 0, gradient descent exactly matches the dynamics of this ODE, which is commonly referred to as gradient flow Kushner & Yin (2003). Equipped with a continuous model for the learning dynamics, we now ask how do the dynamics interact with the geometric properties introduced by symmetries?
Symmetry leads to conservation. Strikingly similar to Noether’s theorem, which describes a fundamental relationship between symmetry and conservation for physical systems governed by Lagrangian dynamics, here we show that symmetries of a network architecture have corresponding conserved quantities through training under gradient flow.
Theorem 1. Symmetry and conservation laws in neural networks. Every differentiable symmetry ψ(α, θ) of the loss that satisfies 〈θ, [∂α∂θψ|α=I ]g(θ)〉 = 0 has the corresponding conservation law,
d dt 〈θ, ∂αψ|α=I〉 = 0, (10)
through learning under gradient flow.
To prove Theorem 1, consider projecting the gradient flow learning dynamics in equation (9) onto the generator vector field ∂αψ|α=I associated with a symmetry. As shown in section 3, the gradient of the loss g(θ) is always perpendicular to the vector field ∂αψ|α=I . Thus, the projection yields a differential equation, which can be simplified to equation (10). See appendix B for a complete derivation.
Application of this general theorem to the translation, scale, and rescale symmetries, identified in section 3, yields the following conservation law of learning,
Translation: 〈θA(t),1〉 = 〈θA(0),1〉 (11) Scale: |θA(t)|2 = |θA(0)|2 (12)
Rescale: |θA1(t)|2 − |θA2(t)|2 = |θA1(0)|2 − |θA2(0)|2 (13) Each of these equations define a conserved constant of learning through training. For parameters with translation symmetry, their sum (〈θA(t),1〉) is conserved, effectively constraining their dynamics to a hyperplane. For parameters with scale symmetry, their euclidean norm (|θA(t)|2) is conserved,
effectively constraining their dynamics to a sphere Ioffe & Szegedy (2015); Van Laarhoven (2017). For parameters with rescale symmetry, their difference in squared euclidean norm (|θA1(t)|2− |θA2(t)|2) is conserved, effectively constraining their dynamics to a hyperbola Du et al. (2018a). In Fig. 3 we visualize the level sets of these conserved quantities for the toy models discussed in Fig. 2.

heading: 5 A REALISTIC CONTINUOUS MODEL FOR STOCHASTIC GRADIENT DESCENT
text: In section 4 we combined the geometric constraints introduced by symmetries with gradient flow to derive conservation laws for simple combinations of parameters during training. However, empirically we know these laws are broken, as demonstrated in Fig. 1. What causes this discrepancy? Gradient flow is too simple of a continuous model for realistic SGD training. It fails to incorporate the effect of weight decay introduced by explicit regularization, momentum introduced by commonly used hyperparameters, stochasticity introduced by random batches, and discretization introduced by a finite learning rate. Here, we construct a more realistic continuous model for stochastic gradient descent.
Modeling weight decay. Explicit regularization through the addition of an L2 penalty on the parameters, with regularization constant λ, is very common practice when training modern deep learning models. This is generally implemented not by modifying the training loss, but rather directly modifying the optimizer’s update equation. For stochastic gradient descent, the result leads to the updated continuous model
dθ dt = −g(θ)− λθ. (14)
Modeling momentum. Momentum is a common extension to SGD that uses an exponentially moving average of gradients to update parameters rather than a single gradient evaluation Rumelhart et al. (1986). The method introduces two additional hyperparameters, a damping coefficient α and a momentum coefficient β, and applies the two step update equation, θ(n+1) = θ(n) − ηv(n+1) where v(n+1) = βv(n) + (1− α)g(θ(n)). When α = β = 0, we regain classic gradient descent. In general, α effectively reduces the learning rate and β controls how past gradients are used in future updates resulting in a form of “inertia” accelerating and smoothing the descent trajectory. Rearranging the two-step update equation, we find that gradient descent with momentum is a first-order discretization with step size η(1− α) of the ODE1,
(1− β)dθ dt = −g(θ). (15)
Modeling stochasticity. Stochastic gradients ĝB(θ) arise when we consider a batch B of size S drawn uniformly from the indices {1, . . . , N} forming the unbiased gradient estimate ĝB(θ) = 1 S ∑ i∈B∇`(θ, xi). When the batch size is much smaller than the size of the dataset, S N , then we can model the batch gradient as an average of S i.i.d. samples from a noisy version of the true gradient g(θ). Using the central limit theorem, we assume ĝB(θ) − g(θ) is a Gaussian random variable with mean µ = 0 and covariance matrix Σ(θ). However, because both the batch gradient and true gradient observe the same geometric properties introduced by symmetry, the noise has a special low-rank structure. As we showed in section 3, the gradient of the loss, regardless of the batch, is orthogonal to the generator vector field ∂αψ|α=I associated with a symmetry. This implies the stochastic noise must also observe the same property. In order for this relationship to hold for arbitrary noise, then Σ(θ)∂αψ|α=I = 0. In other words, the differential symmetry inherent in neural network architectures projects the noise introduced by stochastic gradients onto low rank subspaces, leaving the gradient flow dynamics in these directions unchanged2.
Modeling discretization. The effect of discretization when modeling continuous dynamics is a well studied problem in the numerical analysis of partial differential equations. One tool commonly used in this setting, is modified equation analysis Warming & Hyett (1974), which determines how to better model discrete steps with a continuous differential equation by introducing higher order spatial or temporal derivatives. We present two methods based on modified equation analysis, which modify gradient flow to account for the effect of discretization.
1A more detailed derivation for this ODE can be found in appendix C. 2Stochasticity and discretization can lead to non-trivial interactions requiring analysis using stochastic
differential equation as explained in appendix F.
−1.5 2
] w. On the left we visualize gradi-
ent dynamics using modified loss. On the right we visualize momentum dynamics using modified flow. In both settings the modified continuous dynamics visually track the discrete dynamics better than the original continuous dynamics. See appendix D for further details.
Modified loss. Gradient descent always moves in the direction of steepest descent on a loss function L at each step, however, due to the finite nature of the learning rate, it fails to remain on the continuous steepest descent path given by gradient flow. Li et al. (2017); Feng et al. (2019) and most recently Barrett & Dherin (2020), demonstrate that the gradient descent trajectory closely follows the steepest descent path of a modified loss function L̃. The divergence between these trajectories fundamentally depends on the learning rate η and the curvature H . As derived in Barrett & Dherin (2020), and summarized in appendix D, this divergence is given by the gradient correction − 12Hg, which is the gradient of the squared norm −η4 |∇L|
2. Thus, the modified loss is L̃ = L+ η4 |∇L|2 and the modified gradient flow ODE is
dθ dt = −g(θ)− η 2 H(θ)g(θ). (16)
See Fig. 4 for an illustrative example of this method applied to a quadratic loss in R2.
Modified flow. Rather than modifying gradient flow with higher order “spatial” derivatives of the loss function, here we introduce higher order temporal derivatives. We start by assuming the existence of a continuous trajectory θ(t) that weaves through the discrete steps taken by gradient descent and then identify the differential equation that generates the trajectory. Rearranging the update equation for gradient descent, θt+1 = θt−ηg(θt), and assuming θ(t) = θt and θ(t+η) = θt+1, gives the equality −g(θt) = θ(t+η)−θ(t)η , which Taylor expanding the right side results in the differential equation −g(θt) = dθdt + η 2 d2θ dt2 +O(η
2). Notice that in the limit as η → 0 we regain gradient flow. For small η, we obtain a modified version of gradient flow with an additional second-order term,
dθ dt = −g(θ)− η 2
d2θ dt2 . (17)
This approach to modifying first-order differential equation with higher order temporal derivatives was applied by Kovachki & Stuart (2019) to construct a more realistic continuous model for momentum, as illustrated in Fig. 4.

heading: 6 COMBINING SYMMETRY AND MODIFIED GRADIENT FLOW TO DERIVE EXACT LEARNING DYNAMICS
text: As shown in section 4, each symmetry results in a conserved quantity under gradient flow. We now study how weight decay, momentum, stochastic gradients, and finite learning rates all interact to break these conservation laws. Remarkably, even when using a more realistic continuous model for stochastic gradient descent, as discussed in section 5, we can derive exact learning dynamics for the previously conserved quantities. To do this we (i) consider a realistic continuous model for SGD, (ii) project these learning dynamics onto the generator vector fields ∂αψ|α=I associated with each symmetry, (iii) harness the geometric constraints from section 3 to derive simplified ODEs, and (iv) solve these ODEs to obtain exact dynamics for the previously conserved quantities. For simplicity, we first consider the continuous model of SGD incorporating weight decay and modified loss, but not momentum and stochasticity3. In this setting, the exact dynamics, as fully derived in appendix E, for the parameter combinations tied to the symmetries are,
3See appendix F for a discussion on how to handle stochasticity in this setting using Itô calculus.
Translation: 〈θ(t),1A〉 = e−λt〈θ(0),1A〉 (18) Scale: |θA(t)|2 = e−2λt|θA(0)|2 + η ∫ t
0
e−2λ(t−τ) |gA|2 dτ (19)
Rescale: |θA1(t)|2 − |θA2(t)|2 = (20) e−2λt(|θA1(0)|2 − |θA2(0)|2) + η ∫ t
0
e−2λ(t−τ) (∣∣gθA1 ∣∣2 − ∣∣gθA2 ∣∣2) dτ
Notice how these equations are equivalent to the conservation laws derived in section 4 when η = λ = 0. Remarkably, even in typical hyperparameter settings (weight decay, stochastic batches, finite learning rates), these solutions match nearly perfectly with empirical results4 from modern neural networks (VGG-16) trained on real-world datasets (Tiny ImageNet), as shown in Fig. 5. We will now discuss each equation individually.
Translation dynamics. For parameters with translation symmetry, equation 18 implies that the sum of these parameters (〈θA(t),1〉) decays exponentially to zero at a rate proportional to the weight decay. Equation 18 does not directly depend on the learning rate η nor any information of the dataset or task. This is due to the lack of curvature in the gradient field for these parameters (as shown in Fig. 2). This implies that at initialization we can deterministically predict the trajectory for the parameter sum as simple exponential functions with a rate defined by the weight decay. The first row in Fig. 5 demonstrates this qualitatively, as all trajectories are smooth exponential functions that converge faster for increasing levels of weight decay.
Scale dynamics. For parameters with scale symmetry, equation 19 implies that the norm for these parameters (|θA|2) is the sum of an exponentially decaying memory of the norm at initialization and an exponentially weighted integral of gradient norms accumulated through training. Compared to the translation dynamics, the scale dynamics do depend on the data through the gradient norms accumulated throughout training. Without weight decay λ = 0, the first term stays constant and the second term grows monotonically. With weight decay λ > 0, the first term decays monotonically to zero, while the second term can decay or grow, but always stays positive. The second row in Fig. 5 demonstrates these qualitative relationships. Without weight decay the norms increase monotonically as predicted and with weight decay the dynamics are non-monotonic and present more complex behavior. To better understand the forces driving
these complex dynamics, we can examine the time derivative of equation 19,
d dt |θA(t)|2 = −2λ|θA(t)|2 + η |gA|2 . (21)
From this equation we see that there is a competition between a centripetal effect due to weight decay (−2λ|θA(t)|2) and a centrifugal effect due to discretization (η |gA|2). The centripetal effect
4See appendix J for more details on the experiments and how we compute the integrals terms in the exact solutions using stochastic gradients.
due to weight decay is a direct consequence of its regularizing influence, pulling the parameters towards the origin. The centrifugal effect due to discretization originates from the spherical geometry of the gradient field in parameter space – because scale symmetry implies the gradient is always orthogonal to the parameter itself, each discrete update with a finite learning rate effectively pushes the parameters away from the origin. At the stationary state of the dynamics, these forces will balance leading the dynamics of these parameters to be constrained to the surface of a high-dimensional sphere. In particular, at stationarity, then ddt |θ(t)|2 = 0, which rearranging equation (21) gives the condition ω(t) ≡ ∣∣dθ dt
∣∣ /|θ| = √ 2λη . Consistent with the results of Wan et al. (2020), this implies that at stationarity the angular speed ω(t) of the weights is constant and governed only by the learning rate η and weight decay constant λ. When considering stochasticity explicitly, as explained in appendix F, then these dynamics also depend on the covariance of the gradient noise Σ(θ) and batch size S.
Rescale dynamics. For parameters with rescale symmetry, equation (20) is the sum of an exponentially decaying memory of the difference in norms at initialization and an exponentially weighted integral of difference in gradient norms accumulated through training. Similar to the scale dynamics, the rescale dynamics do depend on the data through the gradient norms, however unlike the scale dynamics we have no guarantee that the integral term is always positive. This leads to quite sophisticated, complex dynamics, consistent with the third row in Fig. 5. Despite the complexity, our theory, nevertheless, quantitatively matches the empirics. The only apparent pattern from the empirics is that for large enough weight decay, the regularization dominates any complexity introduced by the gradient norms and the difference in parameter norms decays exponentially to zero.
Harmonic oscillation with momentum. We will now consider a continuous model of SGD with momentum. As discussed in appendix G, we consider the continuous model incorporating weight decay, momentum, stochasticity, and modified flow. Under this model, the solutions we obtain take the form of driven harmonic oscillators where the driving force is given by the gradient norms, the friction is defined by the momentum constant, the spring coefficient is defined by the regularization rate, and the mass is defined by the the learning rate and momentum constant. For most standard hyperparameter choices, these solutions are in the overdamped setting and align well with the first-order solutions for SGD without momentum up to a time rescaling, as shown in the left and middle panel of Fig. 6. However, for large values of beta we can push the solution into the underdamped regime where we would expect harmonic oscil-
lation and indeed, we can empirically verify our predictions, even at scale for VGG-16 trained on Tiny ImageNet, as in right panel of Fig. 6.

heading: 7 CONCLUSION
text: Despite being the central guiding principle in the exploration of the physical world Anderson (1972); Gross (1996), symmetry has been underutilized in understanding the mechanics of neural networks. In this paper, we constructed a unifying theoretical framework harnessing the geometric properties of symmetry and more realistic continuous equations for learning dynamics that model weight decay, momentum, stochasticity, and discretization. We use this framework to derive exact dynamics for meaningful combinations of parameters, which we experimentally verified on large scale neural networks and datasets. For example, in the case of a VGG-16 model with batch normalization trained on Tiny-ImageNet (one of the model/dataset combinations we considered in section 6) there are 12, 751 distinct parameter combinations whose dynamics we can analytically describe. Overall, this work provides a first step towards understanding the mechanics of learning in neural networks without unrealistic simplifying assumptions.

heading: ACKNOWLEDGEMENTS
text: We thank Daniel Bear, Lauren Gillespie, Kyogo Kawaguchi, Brett Larsen, Eshed Margalit, Alain Studer, Sho Sugiura, Umberto Maria Tomasini, and Atsushi Yamamura for helpful discussions. This work was funded in part by the IBM-Watson AI Lab. D.K. thanks the Stanford Data Science Scholars program for support. J.S. thanks the Mexican National Council of Science and Technology (CONACYT) for support. S.G. thanks the James S. McDonnell and Simons Foundations, NTT Research, and an NSF CAREER Award for support. D.L.K.Y thanks the McDonnell Foundation (Understanding Human Cognition Award Grant No. 220020469), the Simons Foundation (Collaboration on the Global Brain Grant No. 543061), the Sloan Foundation (Fellowship FG-2018-10963), the National Science Foundation (RI 1703161 and CAREER Award 1844724), and the DARPA Machine Common Sense program for support and the NVIDIA Corporation for hardware donations.

heading: A SYMMETRY AND GEOMETRY
text: Here we derive in detail the geometric properties of the loss landscape introduced by symmetry, as discussed in section 3. Consider a function f(θ) where θ ∈ Rm. This function possesses a symmetry if it is invariant under the action ψ of a group G on the parameter vector θ, i.e., if θ 7→ ψ(θ, α) where α ∈ G, then F (θ, α) = f (ψ(θ, α)) = f(θ) for all (θ, α). Symmetry enforces a geometric relationship between the gradient∇F and Hessian HF of the composition F (θ, α) with the gradient ∇f and Hessian Hf of the original function f(θ). This relationship can be described by five constraints on ∇f and Hf . Considering these general formulae when f(θ) = L(θ), the training loss of a neural network, yields fifteen distinct equations describing the geometrical relationships between architectural symmetries and the loss landscapes, some of which have been identified individually in existing literature (Table 1).
Translation Scale Rescale
∇F ∂θF — 1, 2, 5 6 ∂αF — 3, 4 7,8,9
HF ∂2θF — 3, 5 —
∂θ∂αF — — — ∂2αF — — 9

heading: A.1 GRADIENT GEOMETRY
text: If a function f posses a symmetry, then there exists a geometric constraint on the relationship between the gradients∇F and ∇f at all (θ, α),
∇F = ( ∂θF ∂αF ) = ( ∂ψF∂θψ ∂ψF∂αψ ) = ( ∇f 0 ) .
The top element of the gradient relationship, ∂θF , evaluated at any (θ, α), yields the property
∂θψ ∇f |ψ(θ,α) = ∇f |θ , (22) which describes how the symmetry transformation affects the function’s gradients despite leaving the output unchanged. The bottom element of the gradient relationship, ∂αF , evaluated at the identity element of G yields the property 〈∇f, ∂αψ|α=I〉 = 0, (23) which implies the gradient ∇f is perpendicular to the vector field ∂αψ|α=I that generates the symmetry, for all θ. In the specific setting when f(θ) = L(θ), the training loss of a neural network, these gradient properties are summarized in Table 2 for the translation, scale, and rescale symmetries described in section 3.
Notice that the first row of Table 2 implies that symmetry transformations affect learning dynamics governed by gradient descent for scale and rescale symmetries, while it does not for translation symmetry. These observations are in agreement with Van Laarhoven (2017) who has shown that effective learning rate is inversely proportional to the norm of parameters immediately preceding the batch normalization layers and Neyshabur et al. (2015) who have noticed that SGD is not invariant to the rescale symmetry that the network output respects and proposed Path-SGD to fix the discrepancy.

heading: A.2 HESSIAN GEOMETRY
text: If a function f posses a symmetry, then there also exists a geometric constraint on the relationship between the Hessian matrices HF and Hf at all (θ, α),
HF = ( ∂2θF ∂θ∂αF ∂α∂θF ∂ 2 αF ) = ( ∂ψF∂ 2 θψ + ∂ 2 ψF (∂θψ)
2 ∂2ψF∂θψ∂αψ + ∂ψF∂θ∂αψ ∂2ψF∂θψ∂αψ + ∂ψF∂θ∂αψ (∂αψ) ᵀ∂2ψF∂αψ + (∂ψF ) ᵀ∂2αψ
) = ( Hf 0 0 0 ) .
The first diagonal element, ∂2θF , evaluated at any (θ, α), yields the property
∂2θψ ∇f |ψ(θ,α) + (∂θψ)2 Hf |ψ(θ,α) = Hf |θ , (24) which describes how the symmetry transformation affects the function’s Hessian despite leaving the output unchanged. The off-diagonal elements, ∂θ∂αF = ∂α∂θF , evaluated at the identity element of G yields the property
Hf [∂θψ|α=I ]∂αψ|α=I + [∂θ∂α|α=I ]ψ∇f = 0, (25) which implies the geometry of gradient and Hessian are connected through the action of the symmetry. Lastly, the second diagonal element, ∂2αF , represents an equality, evaluated at the identity element of G yields the property
(∂αψ|α=I)ᵀHf(∂αψ|α=I) + 〈∇f, ∂2αψ|α=I〉 = 0, (26)
which combines the geometric relationships in equation 23 and equation 25. In the specific setting when f(θ) = L(θ), the training loss of a neural network, these Hessian properties are summarized in Table 2 for the translation, scale, and rescale symmetries described in section 3.
Translation Scale Rescale
H(θ) = H(ψ(θ, α)) diag(α2A)H(ψ(θ, α)) diag(α 2 A1 α −2 A2)H(ψ(θ, α))
0 = H1A HθA + gA H(θA1 − θA2) + gA1 − gA2
The translation, scale, and rescale symmetries identified in section 3 is not an exhaustive list of the symmetries present in neural network architectures. For example, more general rescale symmetries can be defined by the group GL+1 (R) and action θ 7→ αk1A1 α −k2 A2 θ, which occur in networks with quadratic activation functions. A stronger form of rescale symmetry also occurs for linear networks under the action of the group GL+k (R) of k × k invertible matrices, as noticed previously by Arora et al. (2018a); Du et al. (2018a). Interestingly, some of the gradient and Hessian properties for scale symmetry can also be easily proven as consequences of Euler’s Homogeneous Function Theorem when k = 0.

heading: B CONSERVATION LAWS
text: Here we repeat Theorem 1 and provide a detailed derivation. Theorem. Symmetry and conservation laws in neural networks. Every differentiable symmetry ψ(α, θ) of the loss that satisfies 〈θ, [∂α∂θψ|α=I ]g(θ)〉 = 0 has the corresponding conservation law d dt 〈θ, ∂αψ|α=I〉 = 0 through learning under gradient flow.
Proof. Project the gradient flow learning dynamics, dθdt = −g(θ), onto the vector field that generates the symmetry ∂αψ|α=I , evaluated at the identity element,
〈dθ dt , ∂αψ|α=I〉 = 〈−g(θ), ∂αψ|α=I〉 = 0.
We can factor the left side of this equation as
〈dθ dt , ∂αψ|α=I〉 = d dt 〈θ, ∂αψ|α=I〉 − 〈θ, d dt ∂αψ|α=I〉
= d
dt 〈θ, ∂αψ|α=I〉 − 〈θ, ∂α∂θψ|α=I
dθ dt 〉
= d
dt 〈θ, ∂αψ|α=I〉+ 〈θ, ∂α∂θψ|α=Ig(θ)〉
By assumption, 〈θ, [∂α∂θψ|α=I ]g(θ)〉 = 0, implying ddt 〈θ, ∂αψ|α=I〉 = 0.
The condition 〈θ, [∂α∂θψ|α=I ]g(θ)〉 = 0 holds for the translation, scale, and rescale symmetries we consider in section 3. For translation symmetry, ∂α∂θψ|α=I = 0. For scale symmetry, ∂α∂θψ|α=I = I and 〈θA, g(θA)〉 = 0. For rescale symmetry, ∂α∂θψ|α=I = [ I 0 0 −I ] and 〈θA1 , g(θA1)〉 − 〈θA2 , g(θA2)〉 = 0.

heading: C LIMITING DIFFERENTIAL EQUATIONS FOR LEARNING RULES
text: Here we identify ordinary differential equations whose first-order discretization give rise to the gradient descent and classical momentum algorithms. These differential equations can be understood as the limiting dynamics for their respective discrete algorithms as the learning rate η → 0.

heading: C.1 GRADIENT DESCENT
text: Gradient descent with learning rate η is given by the update equation
θk+1 = θk − ηg(θk), and initial condition θ0. Rearranging the difference between consecutive updates gives
θk+1 − θk η = −g(θk).
This is a discretization with step size η of the first order ODE
d dt θ = −g(θ),
where we used the forward Euler discretization ddtθk = θk+1−θk
η . This ODE is commonly referred to as gradient flow.

heading: C.2 CLASSICAL MOMENTUM
text: Classical momentum with learning rate η, damping coefficient α, and momentum parameter β, is given by the update equation5
vk+1 = βvk + (1− α)g(θk), θk+1 = θk − ηvk+1,
and initial conditions v0 = 0 and some θ0. The difference between consecutive updates is
θk+1 − θk = −ηvk+1 = −ηβvk − η(1− α)g(θk) = β (θk − θk−1)− η(1− α)g(θk).
Rearranging this equation we get
θk+1 − θk η(1− α) − β θk − θk−1 η(1− α) = −g(θk).
This is a discretization with step size η(1− α) of the first order ODE
(1− β) d dt θ = −g(θ),
where we used the forward Euler discretization ddtθk = θk+1−θk η(1−α) and backward Euler discretization
d dtθk = θk−θk−1 η(1−α) . We will refer to this equation as momentum flow. A more detailed derivation for this ODE under Nesterov variants of classical momentum can be found in Su et al. (2014) and Kovachki & Stuart (2019).
5The default PyTorch implementation does not perform damping on the gradient in the first momentum buffer v1.
D MODIFIED EQUATION ANALYSIS discrete dynamics
continuous dynamics
modified continuous dynamics
1 0
]
x and the
Gradient descent always moves in the direction of steepest descent on a loss function, however, due to the finite nature of the learning rate, it fails to remain on the continuous steepest descent path. The divergence between the discrete and continuous trajectories fundamentally depends on the learning rate and the curvature of the loss. It is thus natural to assume there exists a more realistic continuous model for SGD that incorporates both these terms in a non-trivial way. How can we better model the discrete dynamics of gradient descent with a continuous differential equation?
Intuition from finite difference methods. To answer this question we will take inspiration from tools developed for finite difference methods. Finite difference methods are a class of numerical techniques for approximating derivatives in the analysis of partial differential equations (PDE). These approximations are applied iteratively to construct numerical solutions to a PDE given some initial conditions. However, this discretization process introduces numerical artifacts, which can lead to a significant difference between the numerical solution and the true solution for the PDE. Modified equation analysis is a method for understanding this difference by modeling the numerical artifacts as higher-order spatial or temporal derivatives modifying the original PDE. This approach can be used to construct modified continuous dynamics that better approximate discrete dynamics, as illustrated in Fig. 7.

heading: D.1 MODIFIED LOSS
text: Taking inspiration from modified equation analysis, Li et al. (2017); Feng et al. (2019) and most recently Barrett & Dherin (2020), demonstrate that the trajectory given by gradient descent closely follows the steepest descent path of a modified loss function L̃, rather than the original loss L. As explained in Barrett & Dherin (2020), assume there exists a modified vector field with corrections gi in powers of the learning rate to the original vector field g that the discrete dynamics follow. In other words, rather than considering the dynamics given by gradient flow, ddtθ = −g(θ), we consider the modified differential equation,
d dt θ = −g(θ) + ηg1(θ) + η2g2(θ) + . . . .
Truncating the modified vector field up to the order η and using backward error analysis we can derive that the first-order correction g1 = − 12Hg, which is the gradient of the squared norm −η4 |∇L|
2. Thus, the truncated modified differential equation is simply gradient flow on a modified loss L̃ = L+ η4 |∇L|2. Convex quadratic loss. To illustrate modified loss, we will consider the trajectories of gradient descent wt, gradient flow ŵ(t), and modified gradient flow w̃(t) on the convex quadratic loss L(w) = 12wᵀAw, where A 0 is some positive definite matrix, as shown in Fig. 4. For a finite learning rate η and initial condition w0, gradient descent is given by the update formula wt+1 = wt − ηAwt. Gradient flow is defined as ddt ŵ = −Aŵ, a linear first-order differential equation. For the initial condition w0, the resulting initial value problem can be solved exactly giving the gradient flow trajectory ŵ(t) = S−1e−ΛtSw0, where A = S−1ΛS is the diagonalization of the curvacture matrix. For learning rate η, the modified loss is L̃(w) = 12wᵀAw + η 4w ᵀA2w and modified gradient flow is defined as ddt w̃ = −Aw̃ − η 2A
2w̃. For the initial condition w0, the resulting initial value problem can be solved exactly giving the modified gradient flow trajectory
w̃(t) = S−1e − ( Λ+ η 2 Λ 2 ) t Sw0.

heading: D.2 MODIFIED FLOW
text: Rather than modify gradient flow with higher order “spatial” derivatives of the loss function, here we introduce higher order temporal derivatives. We start by assuming the existence of a continuous trajectory θ(t) that weaves through the discrete steps taken by SGD and then identify the differential equation that generates the trajectory. Rearranging the update equation for SGD, θt+1 = θt−ηgB(θt), and assuming θ(t) = θt and θ(t + η) = θt+1, gives the equality −gB(θt) = θ(t+η)−θ(t)η , which Taylor expanding the right side results in the differential equation −gB(θt) = dθdt + η 2 d2θ dt2 +O(η
2). Notice that in the limit as η → 0 we regain gradient flow. For small η, η 1, we obtain a modified version of gradient flow with an additional second-order term. This approach of modifying first-order differential equations with higher order temporal derivatives was applied by Kovachki & Stuart (2019) to modify momentum flow, capturing the harmonic motion of momentum.
Convex quadratic loss. To illustrate modified flow, we will consider the trajectories of momentum wt, momentum flow ŵ(t), and modified momentum flow w̃(t) on the convex quadratic loss L(w) = 1 2w
ᵀAw, where A 0 is some positive definite matrix, as shown in Fig. 4. For a finite learning rate η, dampening α = 0, momentum constant β, and initial conditions v0 = 0, w0, then momentum is given by the pair of recursive update equations vt+1 = βvt + Awt and wt+1 = wt − ηvt+1. Momentum flow is defined as (1 − β) ddt ŵ = −Aŵ, a linear first-order differential equation. For a given initialization w0, the resulting initial value problem can be solved exactly as in the case of gradient flow. Modified momentum flow is defined as η2 (1 +β) d2
dt2 w̃+ (1−β) ddt w̃ = −Aw̃, a linear second-order differential equation. For a given initialization w0 and the assumed initial condition d dt w̃(0) = 0, then the resulting initial value problem can be solved exactly as a system of damped harmonic oscillators.

heading: E DERIVING THE EXACT LEARNING DYNAMICS OF SGD
text: We consider a continuous model of SGD without momentum incorporating weight decay (equation 14) and modified loss (equation 16), such that
L̃ = Lλ + η
4 |∇Lλ|2
where Lλ = L+ λ2 |θ|2 is the regularized loss. The gradient of the modified loss is,
∇L̃ = ∇Lλ + η
2 Hλ∇Lλ =
( 1 + ηλ
2
) g + ( λ+ ηλ2
2
) θ + η
2 (Hg + λHθ) ,
where we used ∇Lλ = g + λθ and Hλ = H + λI . Thus, the equation of learning we consider is dθ
dt = −∇L̃(θ) = −
( 1 + ηλ
2
) g − ( λ+ ηλ2
2
) θ − η
2 (Hg + λHθ) . (27)
To incorporate the effect of stochasticity (equation 31) in this equation of learning we could replace the full-batch gradient g and Hessian H with their stochastic batch counterparts ĝB and ĤB respectively. However, careful treatment of these terms using stochastic calculus is needed when integrating the resulting stochastic differential equation, which we discuss at the end of this section.
Translation dynamics. In the case of parameters with translation symmetry, the effect of discretization essentially leaves the dynamics for the constant of learning unchanged. Combining the geometric properties of gradient (〈g,1A〉 = 0) and Hessian (H1A = 0) introduced by translation symmetry with the equation of learning (equation 27) gives the differential equation,〈
dθ dt +∇L̃,1A
〉 = ( λ+ d
dt
) 〈θ,1A〉 = 0, (28)
where we used the simplification,
〈∇L̃,1A〉 = ( 1 + ηλ
2
)〈g,1A〉=0︷ ︸︸ ︷ 〈g,1A〉+ ( λ+ ηλ2
2
) 〈θ,1A〉+ η
2 (
H1A=0︷ ︸︸ ︷ 〈Hg, 1A〉+λ H1A=0︷ ︸︸ ︷ 〈Hθ,1A〉)
= ( λ+ ηλ 2
2
) 〈θ,1A〉,
and ignored the O(ηλ2) term as we set the weight decay constant λ to be as small as the learning rate η in practice. The solution to this differential equation is
〈θ(t),1A〉 = e−λt〈θ(0),1A〉.
Scale dynamics. In the case of parameters with scale symmetry, the effect of discretization does distort the original geometry. A finite learning rate leads to a centrifugal force that monotonically increases the previously conserved quantity (|θ|2), while weight decay acts as a centripetal force decreasing the quantity. Combining the geometric constraints on the gradient (〈g, θA〉 = 0) and Hessian (HθA = −gA) introduced by scale symmetry with the equation of learning (equation 27) gives the following differential equation,〈
dθ dt +∇L̃, θA
〉 = ( λ+ 1
2
d
dt
) |θA|2 − η
2 |gA|2 = 0, (29)
where we used the simplifications 〈dθdt , θA〉 = 12 ddt |θA|2,
〈∇L̃, θA〉 = ( 1 + ηλ
2
)〈g,θA〉=0︷ ︸︸ ︷ 〈g, θA〉+ ( λ+ ηλ2
2
) 〈θ, θA〉+ η
2 (
〈g,HθA〉=−|g2|︷ ︸︸ ︷ 〈Hg, θA〉 +λ −〈g,θA〉=0︷ ︸︸ ︷ 〈Hθ, θA〉)
= ( λ+ ηλ 2
2
) |θA|2 − η
2 |gA|2,
and ignored the O(ηλ2) term. The solution to this differential equation is |θA(t)|2 = e−2λt|θA(0)|2 + η ∫ t
0
e−2λ(t−τ) |gA|2 dτ.
Rescale dynamics. In the case of parameters with rescale symmetry, the effect of discretization also distorts the original geometry. However, unlike in the sphere, the force originating from discretization can both increase or decrease the previously conserved quantity (|θA1(t)|2 − |θA2(t)|2). Combining the geometric properties of gradient (〈g, θA1〉 − 〈g, θA2〉 = 0) and Hessian (HθA1 −HθA2 + gA1 − gA2 = 0) introduced by rescale symmetry with the equation of learning (equation 27) gives the following differential equation,〈 dθ
dt +∇L̃, θA1
〉 − 〈 dθ
dt +∇L̃, θA2
〉 = ( λ+ 1
2
d
dt
)( |θA1(t)|2 − |θA2(t)|2 ) −η
2
( |gA1 |2 − |gA2 |2 ) = 0,
(30) where we used the simplification,
〈∇θL̃, θA1〉 − 〈∇L̃, θA2〉 = ( 1 + ηλ
2
) ( 〈g,θA1 〉−〈g,θA2 〉=0︷ ︸︸ ︷ (((( ((((〈g, θA1〉 − 〈g, θA2〉) + ( λ+ ηλ2
2
) (|θA1 |2 − |θA2 |2)
+ η
2
〈g,−gA1+gA2 〉=−|gA1 | 2+|gA2 | 2︷ ︸︸ ︷ 〈g,HθA1 −HθA2〉 +λ −〈g,θA1 〉+〈g,θA2 〉=0︷ ︸︸ ︷ (((( ((((〈θ,HθA1 −HθA2〉  = ( λ+ ηλ 2
2
) (|θA1 |2 − |θA2 |2)− η
2 (|gA1 |2 − |gA2 |2),
and ignored the O(ηλ2) term. This is the same differential equation as in equation (29), just with a different forcing term. Thus, the solution to this differential equation is
|θA1(t)|2 − |θA2(t)|2 = e−2λt(|θA1(0)|2 − |θA2(0)|2) + η ∫ t
0
e−2λ(t−τ) ( |gA1 |2 − |gA2 |2 ) dτ.

heading: F MODELING STOCHASTICITY
text: Stochastic gradients ĝB(θ) arise when we consider a batch B of size S drawn uniformly from the indices {1, . . . , N} forming the unbiased gradient estimate ĝB(θ) = 1S ∑ i∈B∇`(θ, xi). When the batch size is much smaller than the size of the dataset, S N , then we can model the batch gradient as an average of S i.i.d. samples from a noisy version of the true gradient g(θ). Using the central limit theorem, we assume ĝB(θ)− g(θ) is a Gaussian random variable with mean µ = 0 and covariance matrix Σ(θ) = 1SG(θ)G(θ)
ᵀ. Under this assumption, the stochastic gradient update can be written as θ(n+1) = θ(n) − ηg(θ(n)) + η√
S G(θ)ξ, where ξ is a standard normal random variable. This update
is an Euler-Maruyama discretization with step size η of the stochastic differential equation dθ = −g(θ)dt+ √ η
S G(θ)dWt, (31)
where Wt is a standard Wiener process. Equation (31) has been derived as a model for SGD in many previous works Mandt et al. (2015). In order to simplify the analysis, many of these works have then made additional assumptions on the covariance matrix Σ(θ) = G(θ)G(θ)ᵀ, such as Σ(θ) = H(θ) where H(θ) is the Hessian matrix Jastrzębski et al. (2017), Σ(θ) = C where C is some constant matrix Mandt et al. (2015), and Σ(θ) = I where I is the identity matrix Chaudhari & Soatto (2018). However, without any additional assumptions, the differential symmetries intrinsic to neural network architectures add fundamental constraints on Σ.
As we showed in section 3, the gradient of the loss, regardless of the batch, is orthogonal to the generator vector field ∂αψ|α=I associated with a symmetry. This implies the stochastic noise must also observe the same property, 〈− 1√
S G(θ)ξ, ∂αψ|α=I〉 = 0. In order for this relationship to hold
for arbitrary noise6 ξ, then G(θ)ᵀ∂αψ|α=I = 0. In other words, the differential symmetry inherent in neural network architectures projects the noise introduced by stochastic gradients onto low rank subspaces.
Scale Symmetry with Stochasticity. In the previous section, we performed our analysis using continuous-time model with deterministic gradients to facilitate calculations, and replaced them with stochastic batch gradients upon discretization when we evaluated the results empirically. Instead, we can also directly model the stochastic noise arising from batch gradient with an Itô process to perform analogous analysis in continuous-time as pointed out by Li et al. (2021) in a recent follow-up work.
First, we assume that the time evolution of network parameters θ(t) during SGD training is described by the Itô process dθ = µdt+ √ η SG(θ)dWt, where
µ = −g − λθ − η 2 (Hg + λHθ) +O(η2) +O(ηλ) +O(λ2).
Assuming a set of parameters A respect scale symmetry, then applying Itô’s lemma to the function |θA(t)|2 yields the Itô process,
d|θA(t)|2 = { 2θᵀAµ+ η
S Tr[G(θA)
TG(θA)] } dt+ 2 √ η
S θᵀG(θA)dWt = { −2λ|θA|2 − η|gA|2 + η
S Tr[G(θA)
TG(θA)] } dt.
Notice this is a deterministic ODE equivalent to the previously derived ODE with an additional forcing term accounting for the variance of the noise. We can perform an analogous analysis for the case of translation and rescale symmetry.
We can also consider the effect of stochasticity without the complexity of stochastic calculus by considering the dynamics in the discrete setting. As explained in appendix I, this is possible for the case without momentum, but becomes much more complicated once we consider momentum as well.
6We do not need to assume the noise is Gaussian in order for this property to be true. However, we adopt this commonly accepted assumption to contextualize our work within the literature modeling SGD with an SDE.

heading: G DERIVING THE EXACT LEARNING DYNAMICS OF SGD WITH MOMENTUM
text: We consider a continuous model of SGD with momentum incorporating weight decay (equation 14), momentum (equation 15), stochasticity (equation 31), and modified flow (equation 17). As discussed in appendix C, we can model the effect of momentum by considering the forward Euler discretization θk+1−θk η(1−α) and the backward Euler discretization −β θk−θk−1 η(1−α) . These terms introduce the numerical artifacts η(1−α)2 d2 dt2 θ and η(1−α) 2 β d2
dt2 θ respectively, as explained by the modified flow analysis in appendix D. Incorporating these elements with weight decay gives the equation of learning,
η(1− α) 2 (1 + β) d2 dt2 θ + (1− β) d dt θ + λθ = −g(θ).
Incorporating the effect of stochasticity into this equation of learning gives the Langevin equation,
η(1− α) 2
(1 + β)dv = −(1− β)vdt− λθdt− g(θ)dt+ √ η
S G(θ)dWt,
dθ = vdt,
(32)
where Wt is a standard Weiner process. Compared to the modified loss route (described in the previous section), it is much more natural and simple to account for the effect of stochasticity with modified flow.
Translation dynamics. Combining the geometric properties of gradient (〈g,1A〉 = 0), Hessian (H1A = 0), and stochasticity (G(θ)ᵀ1A = 0) introduced by translation symmetry with the Langevin equation of learning (equation 32) gives the differential equation,(
η(1− α) 2 (1 + β) d2 dt2 + (1− β) d dt + λ
) 〈θ,1A〉 = 0. (33)
This is the differential equation for a harmonic oscillator with γ = 1−βη(1−α)(1+β) and ω =√ 2λ
η(1−α)(1+β) . Assuming the initial condition d dt 〈θ(t),1A〉 ∣∣ t=0
= 0, then the general solution (as derived in appendix H) is
〈θ(t),1A〉 =  e−γt ( cosh (√ γ2 − ω2t ) + γ√ γ2−ω2 sinh (√ γ2 − ω2t )) 〈θ(0),1A〉 γ > ω e−γt(1 + γt)〈θ(0),1A〉 γ = ω e−γt ( cos (√ ω2 − γ2t )
+ γ√ ω2−γ2
sin (√ ω2 − γ2t )) 〈θ(0),1A〉 γ < ω
(34)
Scale dynamics. Combining the geometric constraints on the gradient (〈g, θA〉 = 0), Hessian (HθA = −gA), and stochasticity (G(θA)ᵀθA = 0) introduced by scale symmetry with the Langevin equation of learning (equation 32) gives the following differential equation7,
( η(1− α)(1 + β)
4
d2 dt2 + (1− β) 2 d dt + λ
) |θA|2 =
η(1− α)(1 + β) 2 ∣∣∣∣dθAdt ∣∣∣∣2 , (35)
This is the differential equation for a driven harmonic oscillator with γ = 1−βη(1−α)(1+β) , ω =√ 4λ η(1−α)(1+β) , and f(t) = 2 ∣∣dθA dt ∣∣2. Assuming the initial condition ddt |θA|2∣∣t=0 = 0, then the general solution (derived in appendix H) is
|θA(t)|2 =  |θA(t)|2h + ∫ t 0 e−γ(t−τ) ( sinh (√ γ2−ω2(t−τ) ) √ γ2−ω2 ) 2 ∣∣dθA dt (τ) ∣∣2 dτ γ > ω |θA(t)|2h + ∫ t 0 e−γ(t−τ)(t− τ)2 ∣∣dθA dt (τ) ∣∣2 dτ γ = ω |θA(t)|2h + ∫ t 0 e−γ(t−τ) ( sin (√ ω2−γ2(t−τ) ) √ ω2−γ2 ) 2 ∣∣dθA dt (τ) ∣∣2 dτ γ < ω (36)
7The derivation of this ODE uses 〈 d 2θA dt2 , θA〉 = 12 d2 dt2 |θA|2 − | dθAdt | 2.
where |θA(t)|2h is the solution to the homogeneous harmonic oscillator
|θA(t)|2h =  e−γt ( cosh (√ γ2 − ω2t ) + γ√ γ2−ω2 sinh (√ γ2 − ω2t )) |θA(0)|2 γ > ω e−γt(1 + γt)|θA(0)|2 γ = ω e−γt ( cos (√ ω2 − γ2t )
+ γ√ ω2−γ2
sin (√ ω2 − γ2t )) |θA(0)|2 γ < ω
(37)
Rescale dynamics. Combining the geometric properties of gradient 〈g, θA1 − θA2〉 = 0, Hessian (H(θA1 − θA2) + gA1 − gA2 = 0), and stochasticity (G(θA1)ᵀθA1 −G(θA2)ᵀθA2 = 0) introduced by rescale symmetry with the Langevin equation of learning (equation 32) gives the differential equation,
( η(1− α)(1 + β)
4
d2 dt2 + (1− β) 2 d dt + λ
)( |θA1 |2 − |θA2 |2 ) = η(1− α)(1 + β)
2
(∣∣∣∣dθA1dt ∣∣∣∣2 − ∣∣∣∣dθA2dt ∣∣∣∣2 ) .
(38)
This is the same harmonic oscillator given by equation (35) with the different forcing term f(t) = 2 ( |dθA1dt |2 − | dθA2 dt |2 ) . The general solution is given by equation (36) and (37) replacing |θ|2 and |dθdt |2 by |θA1 |2 − |θA2 |2 and | dθA1 dt |2 − | dθA2 dt |2 respectively.

heading: H GENERAL SOLUTIONS FOR ODES

heading: H.1 EXPONENTIAL GROWTH
text: Here we will solve for the general solution of the homogenous first-order linear differential equation,( d
dt + λ
) x(t) = 0.
Assume a solution of the form x(t) = eαt. Plugging this in gives the auxiliary equation α+ λ = 0. Thus, the general solution to the differential equation with initial condition x(0) is
x(t) = e−λtx(0).
Now we will solve the inhomogenous differential equation,( d
dt + λ
) x(t) = f(t).
Multiply both sides by eλt and factor the left hand side using the product rule such that the differential equation simplies to ddt ( eλtx(t) ) = eλtf(t). Integrate this equation and using the fundamental theorem of calculus rearrange to get the solution
x(t) = e−λtx(0) + ∫ t
0
e−λ(t−τ)f(τ)dτ.

heading: H.2 HARMONIC OSCILLATOR
text: Here we will solve the general solution for a harmonic oscillator,( d2
dt2 + 2γ
d dt + ω2
) x(t) = 0.
Assume a solution of the form x(t) = eαt. Plugging this in gives the auxiliary equation α2 + 2γα+ ω2 = 0 with solutions α± = −γ ± √ γ2 − ω2. Thus, the general solution to the oscillator equation with initial conditions x(0) and dxdt (0) = 0 is
x(t) = e−γt ( C1e √ γ2−ω2t + C2e − √ γ2−ω2t )
where C1, C2 are constants
C1 = γ +
√ γ2 − ω2
2 √ γ2 − ω2 x(0), C2 = −γ +
√ γ2 − ω2
2 √ γ2 − ω2 x(0).
Using hyperbolic functions the solution simplifies as x(t) = e−γt ( cosh (√ γ2 − ω2t ) + γ√
γ2 − ω2 sinh
(√ γ2 − ω2t )) x(0).
The form of this general solution implicitly assumes γ > ω, the overdamped setting. When γ = ω, the critically damped setting, then the solution reduces to
x(t) = e−γt(C1 + C2t),
where C1 = x(0) and C2 = γx(0). When γ < ω, the underdamped setting, then the solution reduces to x(t) = e−γt ( C1 cos (√ ω2 − γ2t ) + C2 sin (√ ω2 − γ2t )) ,
where C1 = x(0) and C2 = γ√ ω2−γ2 x(0).

heading: H.3 DRIVEN HARMONIC OSCILLATOR
text: Here we will solve the general solution for a driven harmonic oscillator,( d2
dt2 + 2γ
d dt + ω2
) x(t) = f(t).
First notice that if xh(t) is a solution to the homogenous harmonic oscillator and xd(t) a specific solution to the driven harmonic oscillator, then
x(t) = xh(t) + xd(t),
is the general solution to the driven harmonic oscillator. We will use the Fourier transform to solve for xd(t).
Let x̂d(τ) = (∇L̃xd)(τ) and f̂(τ) = (∇L̃f)(τ) be the Fourier transforms of xd(t) and f(t) respectively. Applying the Fourier transform to the driven harmonic oscillator equation and rearranging gives
x̂d(τ) = ( −τ2 + 2γiτ + ω2 )−1 f̂(τ),
which implies by the inverse Fourier transform that xd(t) is the convolution, xd(t) = (G ∗ f) (t),
where G(t) is Green’s function (the driven solution xd(t) for the dirac delta forcing function δ0),
G(t) = Θ(t) e−γt 2 √ γ2 − ω2
( e √ γ2−ω2t − e− √ γ2−ω2t ) ,
which again using hyperbolic functions simplifies as
G(t) = Θ(t)e−γt sinh
(√ γ2 − ω2t ) √ γ2 − ω2 .
This form of Green’s function is again implicitly assuming γ > ω. When γ = ω, the function simplifies to G(t) = Θ(t)e−γtt, and when γ < ω, the function simplifies to
G(t) = Θ(t)e−γt sin (√ ω2 − γ2t )
√ ω2 − γ2
.
Noticing that both G and f are only supported on [0,∞), their convolution can be simplified and the general solution for the driven harmonic oscillator is
x(t) = xh(t) + ∫ t 0 G(t− τ)f(τ)dτ.

heading: I DERIVING DYNAMICS IN THE DISCRETE SETTING
text: In section 4 we identified certain parameter combinations associated with network symmetries that are conserved under gradient flow. However, as we explained in section 5, these conservation laws are not observed empirically. To remedy this discrepancy we constructed more realistic continuous models for SGD, incorporating weight decay, momentum, stochasticity, and finite learning rates. In section 6 we derived the exact dynamics for the parameter combinations under this more realistic setting, demonstrating near perfect alignment with the empirical dynamics. What would happen if we instead derived the dynamics for the parameter combinations directly in the discrete setting of SGD? Here, we will identify these discrete dynamics and discuss the relationship between the discrete equations and the continuous solutions.
Gradient descent with learning rate η and weight decay constant λ is given by the update equation θ(n+1) = (1− ηλ)θ(n) − ηg(θ(n)), and initial condition θ(0). Using this update equation the sum of the parameters after n+ 1 steps can be “unrolled” as,
〈θ(n+1),1A〉 = (1− ηλ)n+1〈θ(0),1A〉+ η n∑ i=0 (1− ηλ)n−i〈g(θ(i)),1A〉.
Similarly, the squared Euclidean norm of the parameters after n+ 1 steps can be “unrolled” as,
|θ(n+1)A |2 = (1−ηλ)2(n+1)|θ (0) A |2+η2 n∑ i=0 (1−ηλ)2(n−i)|gA(θ(i))|2−2η n∑ i=0 (1−ηλ)2(n−i)+1〈g(θ(i)), θ(i)A 〉.
Combining these unrolled equations, with the gradient properties of symmetry discussed in section 3, gives the discrete dynamics for the parameter combinations,
Translation: 〈 θ(n),1A 〉 = (1− ηλ)n 〈 θ(0),1A 〉 (39)
Scale: ∣∣∣θ(n)A ∣∣∣2 = (1− ηλ)2n ∣∣∣θ(0)A ∣∣∣2 + η2 n−1∑
i=0
(1− ηλ)2(n−1−i) ∣∣∣g(i)A ∣∣∣2 (40)
Rescale: ∣∣∣θ(n)A1 ∣∣∣2 − ∣∣∣θ(n)A2 ∣∣∣2 = (41) (1− ηλ)2n
(∣∣∣θ(0)A1 ∣∣∣2 − ∣∣∣θ(0)A2 ∣∣∣2)+ η2 n−1∑ i=0 (1− ηλ)2(n−1−i) (∣∣∣g(i)A1∣∣∣2 − ∣∣∣g(i)A2∣∣∣2)
Notice the striking similarity between the continuous equations (18), (19), (20) presented in section 6 and the discrete equations (39), (40), (41). The exponential function with decay rate λ from the continuous solutions are replaced by a power of the base (1 − ηλ) in the discrete setting. The integral of exponentially weighted gradient norms from the continuous solutions are replaced by a Riemann sum of power weighted gradient norms in the discrete setting. This is further confirmation that the continuous solutions we derived, and the modified gradient flow equation of learning used, well approximate the actual empirics. While the equations derived in the discrete setting remove any uncertainty about the exactness of the theoretical predictions, they provide limited qualitative understanding for the empirical learning dynamics. This is especially true if we consider the learning dynamics with momentum. In this setting, the process of “unrolling” is much more complicated and the harmonic nature of the empirics, easily derived in the continuous setting, is hidden in the discrete algebra.

heading: J EXPERIMENTAL DETAILS
text: An open source version of our code, used to generate all the figures in this paper, is available at github.com/danielkunin/neural-mechanics.
Dataset. While we ran some initial experiments on Cifar-100, the dataset used in all the empirical figures in this documents was Tiny Imagenet. It is used for image categorization an consists of 100,000 training images at a resolution of 64× 64 spanning 200 classes. Model. We use standard VGG-16 models for all out experiments with the following modifications:
• The last three fully connected layers at the end have been adjusted for an input at the Tiny ImageNet resolution (64× 64) and thus consist of 2048, 2048, and 200 layers respectively. • In addition to the standard arrangement of conv layers for the VGG-16, we consider a
variant where we add a batch normalization layer between every convolutional layer and its activation function.
Training hyperparameters. Certain hyperparameters were varied during training. Below we outline the combinations explored. All models were initialized using Kaiming Normal, and no learning rate drops or warmup were used.
Counting number of symmetries. Here we explain how to count the number of symmetries a VGG-16 model contains.
• Scale symmetries appear once per channel at every layer preceding a batch normalization layer. For our VGG-16 model with batch norm: 2·64+2·128+3·256+3·512+3·512+3 = 4, 227. • Rescale symmetries appear once per channel where there are afine transforms between
layers as well as once per input neuron to a fully connected layer. Note that the sizes of the fully connected layers depend on input image size and the number of classes. For our VGG-16 model with and without batchnorm on Tiny ImageNet, this is: (2 · 64 + 2 · 128 + 3 · 256 + 3 · 512 + 3 · 512 + 3) + (2048 + 1024 + 1024) = 8, 323. • Translation symmetries appear once per input value to the softmax function, which for the
case of classification is always equal to the number of classes, plus the bias term. For our case this is 200 + 1 = 201.
Computing the theoretical predictions. Some of the expressions shown in equations (18), (19), and (20) in section 6 are not trivial to compute as they involve an integral of an exponentially weighted gradient term. To tackle this problem, we wrote custom optimizers in PyTorch with additional buffers to approximate the integral via a Riemann sum. At every update step, the argument in the integral term was computed from the batch gradients, scaled appropriately, and was accumulated in the buffer. Note that the above sum needs to be scaled by the learning rate, which is the coarseness of the grid of this Riemann sum. Checkpoints of the model and optimizer states were stored at
pre-defined frequencies during training. Our visualizations involve computing the right hand side of equations (18), (19), and (20) from the model states and the left hand side of the same equations from the integral buffers stored in the optimizer states as explained above. These two quantities are referred to as “empirical” and “theoretical” in the figures and are depicted with solid color lines and dotted lines, respectively.

heading: J.1 ADDITIONAL EMPIRICS
text: In this work we made exact predictions for the dynamics of combinations of parameters during training with SGD. Importantly, these predictions were made at the neuron level, but could be aggregated for each layer. Here we plot our predictions at both layer and neuron levels for VGG-16 models trained on Tiny ImageNet.

heading: Time (⌘ ⇥ steps)
text: <latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit>

heading: Time (⌘ ⇥ steps)

heading: Time (⌘ ⇥ steps)
text: <latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit>

heading: Time (⌘ ⇥ steps)
text: <latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit><latexit sha1_base64="RMpDnB/7xPsMFt8zjK4vPgt6L00=">AAACEHicbVC7SgNBFJ2NrxhfUUubwSDGJuyKoGXQxjJCXpBdwuzkbjJk9sHMXTEs+QQbf8XGQhFbSzv/xsmj0MQDA+eecy937vETKTTa9reVW1ldW9/Ibxa2tnd294r7B00dp4pDg8cyVm2faZAiggYKlNBOFLDQl9DyhzcTv3UPSos4quMoAS9k/UgEgjM0Urd46iI8YFYXIdAxLbuAjLpoKk1njkZI9PisWyzZFXsKukycOSmROWrd4pfbi3kaQoRcMq07jp2glzGFgksYF9xUQ8L4kPWhY2jEzEovmx40pidG6dEgVuZFSKfq74mMhVqPQt90hgwHetGbiP95nRSDKy8TUZIiRHy2KEglxZhO0qE9oYCjHBnCuBLmr5QPmGIcTYYFE4KzePIyaZ5XHMPvLkrV63kceXJEjkmZOOSSVMktqZEG4eSRPJNX8mY9WS/Wu/Uxa81Z85lD8gfW5w+8z50G</latexit>

Review summaries:
This paper studies the dynamics of the parameters while training a neural network via SGD. SGD is not studied directly but three continuous time approximations of SGD are considered: the classical gradient flow, a stochastic differential equation of Langevin type, and a "modified" gradient flow whose derivation has roots in the literature. For each dynamics, the authors show that some invariant properties of the loss function (which are often satisfied in practice) imply some invariant quantities for the dynamics.  

The current work studies the implications of continuous symmetries of a DNN on its weight dynamics. Specifically, they consider linearly realized symmetries (such as a shift/translation to the logits), and use the fact that the loss/hessian/mini-batches, are insensitive to such shift to decouple their dynamics. They do so both in the continuous/vanishing-learning-rate case and for small learning rates and manage to provide accurate quantitative predictions for the dynamics of these quantities.