Understanding Gradient Descent on Edge of Stability in Deep Learning

Sanjeev Arora, Zhiyuan Li, Abhishek Panigrahi

Introduction

Traditional convergence analyses of gradient-based algorithms assume learning rate η\eta is set according to the basic relationship η<2/λ\eta<2/\lambda where λ\lambda is the largest eigenvalue of the Hessian of the objective, called sharpnessConfusingly, another traditional name for λ\lambda is smoothness.. Descent Lemma says that if this relationship holds along the trajectory of Gradient Descent, loss drops during each iteration. In deep learning where objectives are nonconvex and have multiple optima, similar analyses can show convergence towards stationary points and local minima. In practice, sharpness is unknown and η\eta is set by trial and error. Since deep learning works, it has been generally assumed that this trial and error allows η\eta to adjust to sharpness so that the theory applies. But recent empirical studies (Cohen et al., 2021; Ahn et al., 2022) showed compelling evidence to the contrary. On a variety of popular architectures and training datasets, GD with fairly small values of η\eta displays following phenomena that they termed Edge of Stability (EoS): (a) Sharpness rises beyond 2/η2/\eta, thus violating the above-mentioned relationship. (b) Thereafter sharpness stops rising but hovers noticeably above 2/η2/\eta and even decreases a little. (c) Training loss behaves non-monotonically over individual iterations, yet consistently decreases over long timescales.

Note that (a) was already pointed out by Li et al. (2020b). Specifically, in modern deep nets, which use some form of normalization combined with weight decay, training to near-zero loss must lead to arbitrarily high sharpness. (However, Cohen et al. (2021) show that the EoS phenomenon appears even without normalization.) Phenomena (b), (c) are more mysterious, suggesting that GD with finite η\eta is able to continue decreasing loss despite violating η<2/λ\eta<2/\lambda, while at the same time regulating further increase in value of sharpness and even causing a decrease. These striking inter-related phenomena suggest a radical overhaul of our thinking about optimization in deep learning. At the same time, it appears mathematically challenging to analyze such phenomena, at least for realistic settings and losses (as opposed to toy examples with 2 or 3 layers). The current paper introduces frameworks for doing such analyses.

We start by formal definition of stableness, ensuring that if a point + LR combination is stable then a gradient step is guaranteed to decrease the loss by the local version of Descent Lemma.

The second setting assumes that the loss is smooth but learning rate is effectively adaptive. We focus a concrete example, Normalized Gradient Descent, x←x−η∇L/∥∇L∥x\leftarrow x-\eta\nabla L/\|\nabla L\|, which exhibits EoS behavior as ∇L→0\nabla L\rightarrow 0. We can view Normalized GD as GD with a varying LR ηt=η∥∇L(x(t))∥\eta_{t}=\frac{\eta}{\left\|\nabla L(x(t))\right\|}, which goes to infinity when ∇L→0\nabla L\rightarrow 0.

We show that Normalized GD on LL (Section 4.3) and GD on L\sqrt{L} (Section 4.4) exhibit similar two-phase dynamics with sufficiently small LR η\eta. In the first phase, GD tracks gradient flow (GF), with a monotonic decrease in loss until getting O(η)O(\eta)-close to the manifold (Theorems 4.3 and 4.5) and the stableness becomes larger than 22. In the second phase, GD no longer tracks GF and loss is not monotone decreasing due to the high stableness. Repeatedly overshooting, GD iterate jumps back and forth across the manifold while moving slowly along the direction in the tangent space of the manifold which decreases the sharpness. (See Figure 1 for a graphical illustration) Formally, we prove when η→0\eta\to 0, the trajectory of GD converges to some limiting flow on the manifold. (Theorems 4.4 and 4.6) We further prove that in both settings GD in the second phase operates on EOS, and loss decreases in a non-monotone manner. Formally, we show that the average stableness over any two consecutive steps is at least 2 and that the average of L/η\sqrt{L}/\eta over two consecutive is proportional to sharpness or square root of sharpness. (Theorems 4.7 and 4.8)

Though many works have suggested (primarily via experiments and some intuition) that the training algorithm in deep learning implicitly selects out solutions of low sharpness in some way, we are not aware of a formal setting where this had ever been made precise. Note that our result requires no stochasticity as in SGD (Li et al., 2022b), though we need to inject tiny noise (e.g., of magnitude O(η100)O(\eta^{100}) ) to GD iterates occasionally (Algorithms 1 and 2). We believe that this is due the technical limitation of our current analysis and can be relaxed with a more advanced analysis. Indeed, in experiments, our theoretical predictions hold for the deterministic GD directly without any perturbation.

Novelty of Our Analysis:

To prove the alignment between the gradient and the top eigenvector of Hessian, it boils down to analyze Normalized GD on quadratic functions (2), which to the best of our knowledge has not been studied before. The dynamics is like chaotic version of power iteration, and we manage to show that the iterate will always align to the top eigenvector of Hessian of the quadratic loss. The proof is based on identifying a novel potential (Section 3) and might be of independent interest.

Related Works

Low sharpness has long been related to flat minima and thus to good generalization (Hochreiter and Schmidhuber, 1997; Keskar et al., 2016). Recent study on predictors of generalization (Jiang et al., 2020) does show sharpness-related measures as being good predictors, leading to SAM algorithm that improves generalization by explicitly controlling a parameter related to sharpness (Foret et al., 2021). However, Dinh et al. (2017) show that due to the positive homogeneity in the network architecture, networks with rescaled parameters can have very different sharpness yet be the same to the original one in function space. This observation weakens correlation between sharpness and and generalization gap and makes the definition of sharpness ambiguous. In face of this challenge, multiple notions of scale-invariant sharpness have been proposed (Yi et al., 2019a, b; Tsuzuku et al., 2020; Rangamani et al., 2021). Especially, Yi et al. (2021); Kwon et al. (2021) derived new algorithms with better generalization by explicitly regularizing new sharpness notions aware of the symmetry and invariance in the network. He et al. (2019) goes beyond the notion of sharpness/flatness and argues that the local minima of modern deep networks can be asymmetric, that is, sharp on one side, but flat on the other side.

Limiting Diffusion/Flow around Manifold of Minimizers:

The idea of analyzing the behavior of SGD with small LR along the the manifold originates from Blanc et al. (2020), which gives a local analysis on a special noise type named label noise, i.e. noise covariance is equal to Hessian at minimizers. Damian et al. (2021) extends this analysis and show SGD with label noise finds approximate stationary point for original loss plus some Hessian-related regularizer. The formal mathematical framework of approximating the limiting dynamics of SGD with arbitrary noise by Stochastic Differential Equations is later established by Li et al. (2022b), which is built on the convergence result for solutions of SDE with large-drift (Katzenberger, 1991).

Implicit Bias:

The notion that training algorithm plays an active role in selecting the solution (when multiple optima exist) has been termed the implicit bias of the algorithm (Gunasekar et al., 2018c) and studied in a large number of papers (Soudry et al., 2018; Li et al., 2018; Arora et al., 2018a, 2019a; Gunasekar et al., 2018b, a; Lyu and Li, 2020; Li et al., 2020a; Woodworth et al., 2020; Razin and Cohen, 2020; Lyu et al., 2021; Azulay et al., 2021; Gunasekar et al., 2021). In the infinite width limit, the implicit bias of Gradient Descent is shown to be the solution with the minimal RKHS norm with respect to the Neural Tangent Kernel (NTK) (Jacot et al., 2018; Li and Liang, 2018; Du et al., 2019; Arora et al., 2019b, c; Allen-Zhu et al., 2019b, a; Zou et al., 2020; Chizat et al., 2019; Yang, 2019). The implicit bias results from these papers are typically proved by performing a trajectory analysis for (Stochastic) Gradient Descent. Most of the results can be directly extended to the continuous limit (i.e., GD infinitesimal LR) and even some heavily relies on the conservation property which only holds for the continuous limit. In sharp contrast, the implicit bias shown in this paper – reducing the sharpness along the minimizer manifold – requires finite LR and doesn’t exist for the corresponding continuous limit. Other implicit bias results that fundamentally relies on the finiteness of LR includes stability analysis (Wu et al., 2017; Ma and Ying, 2021) and implicit gradient regularization (Barrett and Dherin, 2021), which is a special case of approximation results for stochastic modified equation by Li et al. (2017, 2019).

Non-monotone Convergence of Gradient Descent :

Warm-up: Quadratic Loss Functions

Our main result Theorem 3.1 is that the iterates of Normalized GD x(t)x(t) converge to v1v_{1} in direction, from which the loss oscillation Corollary 3.2 follows, suggesting that GD is operating in EoS. Since in quadratic case there is only one local minima, there is of course no need to talk about implicit bias. However, the observation that the GD iterates always align to the top eigenvector as well as the technique used in its proof play a very important role for deriving the sharpness-reduction implicit bias for the case of general loss functions.

Define x~(t)=Ax(t)η\widetilde{x}(t)=\frac{Ax(t)}{\eta}, and the following update rule (2) holds. It is clear that the convergence of x~t\widetilde{x}_{t} to v1v_{1} in direction implies the convergence of xtx_{t} as well.

If ∣⟨v1,x~(t)⟩∣≠0\left|\langle v_{1},\widetilde{x}(t)\rangle\right|\neq 0, ∀t≥0\forall t\geq 0, then there exists 0<C<10<C<1 and s∈{±1}s\in\{\pm 1\} such that lim⁡t→∞x~(2t)=Csλ1v1\lim_{t\to\infty}\widetilde{x}(2t)=Cs\lambda_{1}v_{1} and lim⁡t→∞x~(2t+1)=(C−1)sλ1v1\lim_{t\to\infty}\widetilde{x}(2t+1)=(C-1)s\lambda_{1}v_{1}.

As a direct corollary, the loss oscillates as between time step 2t2t and time step 2t+12t+1 as t→∞t\to\infty. This shows that the behavior of loss is not monotonic and hence indicates the edge of stability phenomena for the quadratic loss.

If ∣⟨v1,x~(t)⟩∣≠0\left|\langle v_{1},\widetilde{x}(t)\rangle\right|\neq 0, ∀t≥0\forall t\geq 0, then there exists 0<C<10<C<1 such that lim⁡t→∞L(x(2t))=12C2λ1η2\lim_{t\to\infty}L(x(2t))=\frac{1}{2}C^{2}\lambda_{1}\eta^{2} and lim⁡t→∞L(x(2t+1))=12(C−1)2λ1η2\lim_{t\to\infty}L(x(2t+1))=\frac{1}{2}(C-1)^{2}\lambda_{1}\eta^{2}.

For any j∈[D]j\in[D] and t≥λ1λjln⁡λ1λj+max⁡{∥x~(0)∥−λ1λD,0}t\geq\frac{\lambda_{1}}{\lambda_{j}}\ln\frac{\lambda_{1}}{\lambda_{j}}+\max\{\frac{\left\|\widetilde{x}(0)\right\|-\lambda_{1}}{\lambda_{D}},0\}, it holds that x~(t)∈Ij\widetilde{x}(t)\in\mathcal{I}_{j}.

First, we show for any j∈[D]j\in[D], Ij\mathcal{I}_{j} is indeed an invariant set for update rule (2) via Lemma A.1. With straightforward calculation, one can show that for any j∈[D]j\in[D], ∥P(j:D)x~(t)∥\left\|P^{(j:D)}\widetilde{x}(t)\right\| decreases by λD∥P(j:D)x~(t)∥∥x~(t)∥\frac{\lambda_{D}\left\|P^{(j:D)}\widetilde{x}(t)\right\|}{\left\|\widetilde{x}(t)\right\|} if ∥P(j:D)x~(t)∥≥λj\left\|P^{(j:D)}\widetilde{x}(t)\right\|\geq\lambda_{j} (Lemma A.2). Setting j=1j=1, we have ∥x~(t)∥\left\|\widetilde{x}(t)\right\| decreases by λD\lambda_{D} if ∥x~(t)∥≥λ1\left\|\widetilde{x}(t)\right\|\geq\lambda_{1} (Corollary A.3). Thus for all t≥max⁡{∥x~(0)∥−λ1λD,0}t\geq\max\{\frac{\left\|\widetilde{x}(0)\right\|-\lambda_{1}}{\lambda_{D}},0\}, x~(t)∈I1\widetilde{x}(t)\in\mathcal{I}_{1}. Finally once x~(t)∈I1\widetilde{x}(t)\in\mathcal{I}_{1}, we can upper bound ∥x~(t)∥\left\|\widetilde{x}(t)\right\| by λ1\lambda_{1}, and thus ∥P(j:D)x~(t)∥\left\|P^{(j:D)}\widetilde{x}(t)\right\| shrinks at least by a factor of λDλ1\frac{\lambda_{D}}{\lambda_{1}} per step, which implies x~(t)\widetilde{x}(t) will be in Ij\mathcal{I}_{j} in another λ1λjln⁡λ1λj\frac{\lambda_{1}}{\lambda_{j}}\ln\frac{\lambda_{1}}{\lambda_{j}} steps.(Corollary A.4) ∎

Once the component of x~(t)\widetilde{x}(t) on an eigenvector becomes , it stays . So without loss of generality we can assume that after the preparation phase, the projection of x~(t)\widetilde{x}(t) along the top eigenvector v1v_{1} is non-zero, otherwise we can study the problem in the subspace excluding the top eigenvector.

If x~(T)∈∩j=1DIj\widetilde{x}(T)\in\cap_{j=1}^{D}\mathcal{I}_{j} holds for some TT, then for any t′,tt^{\prime},t such that T≤t≤t′T\leq t\leq t^{\prime} and ∥x~(t)∥≤0.5λ1\left\|\widetilde{x}(t)\right\|\leq 0.5\lambda_{1}, it holds ∣⟨v1,x~(t)⟩∣≤∣⟨v1,x~(t′)⟩∣\left|\langle v_{1},\widetilde{x}(t)\rangle\right|\leq\left|\langle v_{1},\widetilde{x}(t^{\prime})\rangle\right|.

First, Lemma 3.5 (proved in Appendix A) shows that the norm of the iterate x~(t)\widetilde{x}(t) remains above 0.5λ10.5\lambda_{1} for only one time-step.

For any tt with x~(t)∈∩j=1DIj\widetilde{x}(t)\in\cap_{j=1}^{D}\mathcal{I}_{j}, if ∥x~(t)∥>λ12\left\|\widetilde{x}(t)\right\|>\frac{\lambda_{1}}{2}, then ∥x~(t+1)∥≤max⁡(λ12−λD22λ1,λ1−∥x~(t)∥)\left\|\widetilde{x}(t+1)\right\|\leq\max\left(\frac{\lambda_{1}}{2}-\frac{\lambda_{D}^{2}}{2\lambda_{1}},\lambda_{1}-\left\|\widetilde{x}(t)\right\|\right).

Thus, for any tt with x~(t)∈∩j=1DIj\widetilde{x}(t)\in\cap_{j=1}^{D}\mathcal{I}_{j} and ∥x~(t)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2}, either ∥x~(t+1)∥≤λ12\left\|\widetilde{x}(t+1)\right\|\leq\frac{\lambda_{1}}{2}, or ∥x~(t+1)∥>λ12\left\|\widetilde{x}(t+1)\right\|>\frac{\lambda_{1}}{2}, which in turn implies that ∥x~(t+2)∥≤λ12\left\|\widetilde{x}(t+2)\right\|\leq\frac{\lambda_{1}}{2} by Lemma 3.5. The proof of Lemma 3.4 is completed by induction on Lemma 3.6.

For any step tt with ∥x~(t)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2}, for any k∈{1,2}k\in\{1,2\}, ∣⟨v1,x~(t+k)⟩∣≥∣⟨v1,x~(t)⟩∣\left|\langle v_{1},\widetilde{x}(t+k)\rangle\right|\geq\left|\langle v_{1},\widetilde{x}(t)\rangle\right|.

Proof of case k=1k=1 in Lemma 3.6 follows directly from plugging the assumption ∥x~(t)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2} into (2) (See Lemma A.5). The case of k=2k=2 in Lemma 3.6 follows from Lemma A.7. We defer the complete proof of Lemma 3.6 into Appendix A. ∎

To complete the proof for Theorem 3.1, we relate the increase in the projection along v1v_{1} at any step tt, ∣⟨v1,x~(t)⟩∣\left|\langle v_{1},\widetilde{x}(t)\rangle\right|, to the magnitude of the angle between x~(t)\widetilde{x}(t) and the top eigenspace, θt\theta_{t}. Briefly speaking, we show that if ∥x~(t)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2}, ∣⟨v1,x~(t)⟩∣\left|\langle v_{1},\widetilde{x}(t)\rangle\right| has to increase by a factor of Θ(θt2)\Theta(\theta^{2}_{t}) in two steps. Since ∣⟨v1,x~(t)⟩∣\left|\langle v_{1},\widetilde{x}(t)\rangle\right| is bounded and monotone increases among {t∣∥x~(t)∥≤λ12}\{t\mid\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2}\} by Lemma 3.4, we conclude that θt\theta_{t} gets arbitrarily small for sufficiently large tt with ∥x~(t)∥≤λ12,∥x~(t+2)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2},\left\|\widetilde{x}(t+2)\right\|\leq\frac{\lambda_{1}}{2} satisfied. Since the one-step normalized GD update Equation 2 is continuous when bounded away from origin, with a careful analysis, we conclude θt→0\theta_{t}\to 0 for all iterates. Please see Section A.3 for details.

Below we show GD on loss L(x)=12x⊤Ax\sqrt{L}(x)=\sqrt{\frac{1}{2}x^{\top}Ax}, Equation 3, follows the same update rule as Normalized GD on L(x)=12x⊤AxL(x)=\frac{1}{2}x^{\top}Ax, up to a linear transformation.

Denoting x~(t)=1η(2A)1/2x(t)\widetilde{x}(t)=\frac{1}{\eta}(2A)^{1/2}x(t), we can easily check x~(t)\widetilde{x}(t) also satisfies update rule (2).

Main Results

In this section we present the main results of this paper. Section 4.1 is for preliminary and notations. In Section 4.2, we make our key assumptions that the minimizers of the loss function form a manifold. In Sections 4.3 and 4.4 we present our main results for Normalized GD and GD on L\sqrt{L} respectively. In Section 4.5 we show the above two settings for GD do enter the regime of Edge of Statbility.

In this section, we focus on the setting where LR η\eta goes to 0 and we fix the initialization xinitx_{\text{init}} and the loss function LL throughout this paper. We use O(⋅),Ω(⋅)O(\cdot),\Omega(\cdot) to hide constants about xinitx_{\text{init}} and LL.

2 Key Assumptions on Manifold of Local Minimizers

Following Fehrman et al. (2020); Li et al. (2022b), we make the following assumption throughout the paper.

The smoothness assumption is satisfied for networks with smooth activation functions like tanh and GeLU (Hendrycks and Gimpel, 2016). The existence of manifold is due to the vast overparametrization in modern deep networks and preimage theorem. (See a discussion in section 3.1 of Li et al. (2022b)) The assumption rank⁡(∇2L(x))=M\operatorname{rank}\left(\nabla^{2}L(x)\right)=M basically say ∇2L(x)\nabla^{2}L(x) always attains the maximal rank in the normal space of the manifold, which ensures the differentiability of Φ\Phi and is crucial to our current analysis, though it’s not clear if it is necessary. We also make the following assumption to ensure that λ1(∇2L(⋅))\lambda_{1}(\nabla^{2}L(\cdot)) is differentiable, which is necessary for our main results, Theorems 4.4 and 4.6.

For any x∈Γx\in\Gamma, ∇2L(x)\nabla^{2}L(x) has a positive eigengap, i.e., λ1(∇2L(x))>λ2(∇2L(x))\lambda_{1}(\nabla^{2}L(x))>\lambda_{2}(\nabla^{2}L(x)).

3 Results for Normalized GD

We first denote the iterates of Normalized GD with LR η\eta by xη(t)x_{\eta}(t), with xη(0)≡xinitx_{\eta}(0)\equiv x_{\text{init}} for all η\eta:

The first theorem demonstrates the movement in the manifold, when the iterate travels from xinitx_{\text{init}} to a position that is O(η)O(\eta) distance closer to the manifold (more specifically, Φ(xinit)\Phi(x_{\text{init}})). Moreover, just like the result in the quadratic case, we have more fine-grained bounds on the projection of xη(t)−Φ(xη(t))x_{\eta}(t)-\Phi(x_{\eta}(t)) into the bottom-kk eigenspace of ∇2L(Φ(xη(t)))\nabla^{2}L(\Phi(x_{\eta}(t))) for every k∈[D]k\in[D]. For convenience, we define the following quantity for all j∈[d]j\in[d] and x∈Ux\in U:

In the quadratic case, Lemma 3.3 shows that Rj(x)R_{j}(x) will eventually become non-positive for normalized GD iterates. Similarly, for the general loss, the following theorem shows that Rj(xη(t))R_{j}(x_{\eta}(t)) eventually becomes approximately non-positive (smaller than O(η2)O(\eta^{2})) in O(1η)O(\frac{1}{\eta}) steps.

Our main contribution is the analysis for the second phase (Theorem 4.4), which says just like the quadratic case, the angle between x~η(t)\widetilde{x}_{\eta}(t) and the top eigenspace of ∇2L(Φ(xη(t)))\nabla^{2}L(\Phi(x_{\eta}(t))), denoted by θt\theta_{t}, will be O(η)O(\eta) on average. And as a result, the dynamics of Normalized GD tracks the riemannian gradient flow with respect to log⁡(λ1(∇2L(⋅)))\log(\lambda_{1}(\nabla^{2}L(\cdot))) on manifold, that is, the unique solution of Equation 5, where Px,Γ⊥P^{\perp}_{x,\Gamma} is the projection matrix onto the tangent space of manifold Γ\Gamma at x∈Γx\in\Gamma.

Note Equation 5 is not guaranteed to have a global solution, i.e., a well-defined solution for all τ≥0\tau\geq 0, for the following two reasons: (1). when the multiplicity of top eigenvalue is larger than 11, λ1(∇2L(⋅))\lambda_{1}(\nabla^{2}L(\cdot)) may be not differentiable and (2). the projection matrix is only defined on Γ\Gamma and the equation becomes undefined when the solution leaves Γ\Gamma, i.e., moving across the boundary of Γ\Gamma. For simplicity, we make 4.2 that every point on Γ\Gamma has a positive eigengap. Or equivalently, we can work with a slightly smaller manifold Γ′={x∈Γ∣λ1(x)>λ2(x)}\Gamma^{\prime}=\{x\in\Gamma\mid\lambda_{1}(x)>\lambda_{2}(x)\}.

Towards a mathematical rigorous characterization of the dynamics in the second phase, we need to make the following modifications: (1). we add negligible noise of magnitude O(η100)O(\eta^{100}) every η−0.1\eta^{-0.1} steps, (2). we assume for each η>0\eta>0, there exist some step t=Θ(1/η)t=\Theta(1/\eta) in phase I, except the guaranteed condition (1) and (2) (by Theorem 4.3, the additional condition (3) also holds. This assumption is mild because we only require (3) to hold for one step among Θ(1/η)\Theta(1/\eta) steps from T1η\frac{T_{1}}{\eta} to T1′η\frac{T_{1}^{\prime}}{\eta}, where T1T_{1} is the constant given by Theorem 4.3 and T1′T_{1}^{\prime} is arbitrary constant larger than T1T_{1}. This assumption also holds empirically for all our experiments in Section 6.

4 Results for GD on L𝐿\sqrt{L}

In this subsection, we denote the iterates of GD on L\sqrt{L} with LR η\eta by xη(t)x_{\eta}(t), with xη(0)≡xinitx_{\eta}(0)\equiv x_{\text{init}} for all η\eta:

Similar to Normalized GD, we will have two phases. The first theorem demonstrates the movement in the manifold, when the iterate travels from xinitx_{\text{init}} to a position that is O(η)O(\eta) distance closer to the manifold. For convenience, we will denote the quantity ∑i=jMλi(x)⟨vi(x),x−Φ(x)⟩2−η1/2λj(x)\sqrt{\sum_{i=j}^{M}\lambda_{i}(x)\langle v_{i}(x),x-\Phi(x)\rangle^{2}}-\eta\sqrt{1/2}\lambda_{j}(x) by R‾j(x)\overline{R}_{j}(x) for all j∈[M]j\in[M] and x∈Ux\in U.

The next result demonstrates that close to the manifold, the trajectory implicitly minimizes sharpness.

5 Operating on the Edge of Stability

In this section, we show that both Normalized GD on LL and GD on L\sqrt{L} is on Edge of Stability in their phase II, that is, at least in one of every two consecutive steps, the stableness is at least 22 and the loss oscillates in every two consecutive steps. Interestingly, the average loss over two steps decreases over time, even when operating on the edge of Stability (see Figure 1 for illustration), as indicated by the following theorems. Note that Theorems 4.4 and 4.6 ensures that the average of θt\theta_{t} are O(η)O(\eta) and O(η)O(\sqrt{\eta}). We defer their proofs into Sections E.5 and G.4 respectively.

Under the setting of Theorem 4.4, by viewing Normalized GD as GD with time-varying LR ηt:=η∥∇L(xη(t))∥\eta_{t}:=\frac{\eta}{\left\|\nabla L(x_{\eta}(t))\right\|}, we have [SL(xη(t),ηt)]−1+[SL(xη(t+1),ηt+1)]−1=1+O(θt+η).[S_{L}(x_{\eta}(t),\eta_{t})]^{-1}+[S_{L}(x_{\eta}(t+1),\eta_{t+1})]^{-1}=1+O(\theta_{t}+\eta). Moreover, we have L(xη(t))+L(xη(t+1))=ηλ1(∇2L(xη(t)))2+O(ηθt)\sqrt{L(x_{\eta}(t))}+\sqrt{L(x_{\eta}(t+1))}=\eta\sqrt{\frac{\lambda_{1}(\nabla^{2}L(x_{\eta}(t)))}{2}}+O(\eta\theta_{t}).

Under the setting of Theorem 4.6, we have [SL(xη(t),ηt)]≥Ω(1θt)[S_{\sqrt{L}}(x_{\eta}(t),\eta_{t})]\geq\Omega(\frac{1}{\theta_{t}}). Moreover, we have L(xη(t))+L(xη(t+1))=ηλ1(∇2L(xη(t)))+O(ηθt)\sqrt{L(x_{\eta}(t))}+\sqrt{L(x_{\eta}(t+1))}=\eta\lambda_{1}(\nabla^{2}L(x_{\eta}(t)))+O(\eta\theta_{t}).

Proof Overview

We sketch the proof of the Normalized GD in phase I and II respectively in Section 5.2. Then we briefly discuss how to prove the results for GD with L\sqrt{L} with same analysis in Section 5.3. We start by introducing the properties of limit map of gradient flow Φ\Phi in Section 5.1, which plays a very important role in the analysis.

The limit map of gradient flow Φ\Phi lies at the core of our analysis. When LR η\eta is small, one can show xη(t)x_{\eta}(t) will be O(η)O(\eta) close to manifold and Φ(xη(t))\Phi(x_{\eta}(t)). Therefore, Φ(xη(t))\Phi(x_{\eta}(t)) captures the essential part of the implicit regularization of Normalized GD and characterization of the trajectory of Φ(xη(t))\Phi(x_{\eta}(t)) immediately gives us that of Φ(xη(t))\Phi(x_{\eta}(t)) up to O(η)O(\eta).

Below we first recap a few important properties of Φ\Phi that will be used later this section, which makes the analysis of Φ(xη(t))\Phi(x_{\eta}(t)) convenient.

Under 4.1, Φ\Phi satisfies the following two properties:

∂Φ(x)∇L(x)=0\partial\Phi(x)\nabla L(x)=0 for any x∈U.x\in U. (Lemma B.16)

For any x∈Γx\in\Gamma, if λ1(x)>λ2(x)\lambda_{1}(x)>\lambda_{2}(x), ∂2Φ(x)[v1(x),v1(x)]=−12Px,Γ⊥∇log⁡λ1(x)\partial^{2}\Phi(x)[v_{1}(x),v_{1}(x)]=-\frac{1}{2}P^{\perp}_{x,\Gamma}\nabla\log\lambda_{1}(x). (Lemmas B.18 and B.20)

Note that xη(t+1)−xη(t)=−η∇L(xη(t))∥∇L(xη(t))∥x_{\eta}(t+1)-x_{\eta}(t)=-\eta\frac{\nabla L(x_{\eta}(t))}{\left\|\nabla L(x_{\eta}(t))\right\|}, using a second order taylor expansion of Φ\Phi, we have

where we use the first claim of Lemma 5.1 in the final step. Therefore, we have Φ(xη(t+1))−Φ(xη(t))=O(η2)\Phi(x_{\eta}(t+1))-\Phi(x_{\eta}(t))=O(\eta^{2}), which means Φ(xη(t))\Phi(x_{\eta}(t)) moves slowly along the manifold, at a rate of at most O(η2)O(\eta^{2}) step. The Taylor expansion of Φ\Phi, (8) plays a crucial role in our analysis for both Phase I and II and will be used repeatedly.

2 Analysis for Normalized GD

The Phase I itself can be divided into two subphases: (A). Normalized GD iterate xη(t)x_{\eta}(t) gets O(η)O(\eta) close to manifold; (B). counterpart of preparation phase in the quadratic case: local movement in the O(η)O(\eta)-neighborhood of the manifold which decreases Rj(xη(t))R_{j}(x_{\eta}(t)) to O(η2)O(\eta^{2}). Below we sketch their proofs respectively:

Subphase (A): First, with a very classical result in ODE approximation theory, normalized GD with small LR will track the normalized gradient flow, which is a time-rescaled version of standard gradient flow, with O(η)O(\eta) error, and enter a small neighborhoods of the manifold where Polyak-Łojasiewicz (PL) condition holds. Since then, Normalized GD decreases the fast loss with PL condition and the gradient has to be O(η)O(\eta) small in O(1η)O(\frac{1}{\eta}) steps. (See details in Section C.1).

Subphase (B): The result in subphase (B) can be viewed as a generalization of Lemma 3.3 when the loss function is O(η)O(\eta)-approximately quadratic, in both space and time. More specifically, it means ∥∇2L(Φ(xη(t)))−∇2L(x)∥≤O(η)\left\|\nabla^{2}L(\Phi(x_{\eta}(t)))-\nabla^{2}L(x)\right\|\leq O(\eta) for all xx which is O(η)O(\eta)-close to some Φ(xη(t′))\Phi(x_{\eta}(t^{\prime})) with t′−t≤O(1/η)t^{\prime}-t\leq O(1/\eta). This is because by Taylor expansion (8), ∥Φ(xη(t))−Φ(xη(t′))∥=O(η2(t′−t))=O(η)\left\|\Phi(x_{\eta}(t))-\Phi(x_{\eta}(t^{\prime}))\right\|=O(\eta^{2}(t^{\prime}-t))=O(\eta), and again by Taylor expansion of ∇2L\nabla^{2}L, we know ∥∇2L(x)−∇2L(Φ(xη(t)))∥=O(∥x−Φ(xη(t))∥)=O(η)\left\|\nabla^{2}L(x)-\nabla^{2}L(\Phi(x_{\eta}(t)))\right\|=O(\left\|x-\Phi(x_{\eta}(t))\right\|)=O(\eta).

With a similar proof technique, we show xη(t)x_{\eta}(t) enters ainvariant set around the manifold Γ\Gamma, that is, {x∈U∣Rj(x)≤O(η2),∀j∈[D]}\{x\in U\mid R_{j}(x)\leq O(\eta^{2}),\forall j\in[D]\}. Formally, we show the following analog of Lemma 3.3:

Let {xη(t)}t≥0\{x_{\eta}(t)\}_{t\geq 0} be the iterates of Normalized GD (4) with LR η\eta. If for some step t0t_{0}, ∥xη(t0)−Φ(xη(t0))∥=O(η)\left\|x_{\eta}(t_{0})-\Phi(x_{\eta}(t_{0}))\right\|=O(\eta), then for sufficiently small LR η\eta and all steps t∈[t0+Θ(1),Θ(η−2)]t\in[t_{0}+\Theta(1),\Theta(\eta^{-2})] steps, the iterate xη(t){x}_{\eta}(t) satisfy max⁡j∈[M]Rj(xη(t))≤O(η2)\max_{j\in[M]}R_{j}(x_{\eta}(t))\leq O(\eta^{2}).

Analysis for Phase II, Theorem 4.4:

Similar to the subphase (B) in the Phase I, the high-level idea here is again that xη(t)x_{\eta}(t) locally evolves like normalized GD with quadratic loss around Φ(xη(t))\Phi(x_{\eta}(t)) and with an argument similar to the alignment phase of quadratic case (though technically more complicated), we show xη(t)−Φ(xη(t))x_{\eta}(t)-\Phi(x_{\eta}(t)) approximately aligns to the top eigenvector of ∇2L(Φ(xη(t)))\nabla^{2}L(\Phi(x_{\eta}(t))), denoted by v1(t)v_{1}(t) and so does ∇L(xη(t))\nabla L(x_{\eta}(t)). More specifically, it corresponds to the second claim in Theorem 4.4, that 1⌊T2/η2⌋∑t=0⌊T2/η2⌋θt≤O(η)\frac{1}{\lfloor T_{2}/\eta^{2}\rfloor}\sum_{t=0}^{\lfloor T_{2}/\eta^{2}\rfloor}\theta_{t}\leq O(\eta).

We now have a more detailed look at the movement in Φ\Phi. Since Φ(xη(t))\Phi(x_{\eta}(t)) belongs to the manifold, we have ∇L(Φ(xη(t)))=0\nabla L(\Phi(x_{\eta}(t)))=0 and so ∇L(xη(t))=∇2L(Φ(xη(t)))(xη(t)−Φ(xη(t)))+O(η2)\nabla L(x_{\eta}(t))=\nabla^{2}L(\Phi(x_{\eta}(t)))(x_{\eta}(t)-\Phi(x_{\eta}(t)))+O(\eta^{2}) using a Taylor expansion. This helps us derive a relation between the Normalized GD update and the top eigenvector of the hessian (simplified version of Lemma B.9):

Incorporating the above into the movement in Φ(xη(t))\Phi(x_{\eta}(t)) from Equation 8 gives:

Applying the second property of Lemma 5.1 on Equation 10 above yields Lemma 5.3.

Under the setting in Theorem 4.4, for sufficiently small η\eta, we have at any step t≤⌊T2/η2⌋t\leq\lfloor T_{2}/\eta^{2}\rfloor

To complete the proof of Theorem 4.4, we show that for small enough η\eta, the trajectory of Φ(xη(τ/η2))\Phi(x_{\eta}(\tau/\eta^{2})) is O(η3⌊T2/η2⌋+η2∑t=0⌊T2/η2⌋θt)O(\eta^{3}\lfloor T_{2}/\eta^{2}\rfloor+\eta^{2}\sum_{t=0}^{\lfloor T_{2}/\eta^{2}\rfloor}\theta_{t})-close to X(τ)X(\tau) for any τ≤T2\tau\leq T_{2}, where X(⋅)X(\cdot) is the flow given by Equation 5. This error is O(η)O(\eta), since ∑t=0⌊T2/η2⌋θt=O(⌊T2/η2⌋η)\sum_{t=0}^{\lfloor T_{2}/\eta^{2}\rfloor}\theta_{t}=O(\lfloor T_{2}/\eta^{2}\rfloor\eta).

One technical difficulty towards showing the average of ηt\eta_{t} is only O(η)O(\eta) is that our current analysis requires ∣⟨v1(xη(t)),xη(t)−Φ(xη(t))⟩∣\left|\langle v_{1}(x_{\eta}(t)),x_{\eta}(t)-\Phi(x_{\eta}(t))\rangle\right| doesn’t vanish, that is, it remains Ω(η)\Omega(\eta) large throughout the entire training process. This is guaranteed by Lemma 3.4 in quadratic case – since the alignment monotone increases whenever it’s smaller λ12\frac{\lambda_{1}}{2}, but the analysis breaks when the loss is only approximately quadratic and the alignment ∣⟨v1(xη(t)),xη(t)−Φ(xη(t))⟩∣\left|\langle v_{1}(x_{\eta}(t)),x_{\eta}(t)-\Phi(x_{\eta}(t))\rangle\right|could decrease decrease by O(θtη2)O(\theta_{t}\eta^{2}) per step. Once the alignment becomes too small, even if the angle θt\theta_{t} is small, the normalized GD dynamics become chaotic and super sensitive to any perturbation. Our current proof technique cannot deal with this case and that’s the main reason we have to make the additional assumption in Theorem 4.4.

Role of η100\eta^{100} noise. Fortunately, with the additional assumption that the initial alignment is at least Ω(η)\Omega(\eta), we can show adding any poly(η)\text{poly}(\eta) perturbation (even as small as Ω(η100)\Omega(\eta^{100})) suffices to prevent the aforementioned bad case, that is, ∣⟨v1(xη(t)),xη(t)−Φ(xη(t))⟩∣\left|\langle v_{1}(x_{\eta}(t)),x_{\eta}(t)-\Phi(x_{\eta}(t))\rangle\right| stays Ω(η)\Omega(\eta) large. The intuition why Ω(η100)\Omega(\eta^{100}) perturbation works again comes from quadratic case – it’s clear that x~=cv1\widetilde{x}=cv_{1} for any ∣c∣≤1|c|\leq 1 is a stationary point for two-step normalized GD updates for quadratic loss under the setting of Section 3. But if cc is smaller than critical value determined by the eigenvalues of the hessian, the stationary point is unstable, meaning any deviation away from the top eigenspace will be amplified until the alignment increases above the critical threshold. Based on this intuition, the formal argument, Lemma E.11 uses the techniques from the ‘escaping saddle point’ analysis (Jin et al., 2017). Adding noise is not necessary in experiments to observe the predicted behavior (see ‘Alignment’ in Figure 4 where no noise is added). On one hand, it might be because the floating point errors served the role of noise. On the other hand, we suspect it’s not necessary even for theory, just like GD gets stuck at saddle point only when initialized from a zero measure set even without noise (Lee et al., 2016, 2017).

3 Analysis for GD on L𝐿\sqrt{L}

In this subsection we will make an additional assumption that L(x)=0L(x)=0 for all x∈Γx\in\Gamma. The analysis then will follow a very similar strategy as the analysis for (Normalized) GD. However, the major difference from the analysis for Normalized GD comes from the update rule for xη(t)x_{\eta}(t) when it is O(η)O(\eta)-close to the manifold:

Thus, the effective learning rate is λ1(t)η\sqrt{\lambda_{1}(t)}\eta at any step tt. This shows up, when we compute the change in the function Φ\Phi. Thus, we have the following lemma showcasing the movement in the function Φ\Phi with the GD update on L\sqrt{L}:

Under the setting in Theorem 4.6, for sufficiently small η\eta, we have at any step t≤⌊T2/η2⌋t\leq\lfloor T_{2}/\eta^{2}\rfloor, Φ(xη(t+1))−Φ(xη(t))=−η28Pt,Γ⊥∇λ1(t)+O(η3+η2θt).\Phi(x_{\eta}(t+1))-\Phi(x_{\eta}(t))=-\frac{\eta^{2}}{8}P^{\perp}_{t,\Gamma}\nabla\lambda_{1}(t)+O(\eta^{3}+\eta^{2}\theta_{t}).

Experiments

Though our main theorems characterizes the dynamics of Nomalized GD and GD on L\sqrt{L} for sufficiently small LR, it’s not clear if the predicted phenomena is related to the training with practical LR as the function and initialization dependent constants are hard to compute and could be huge. Neverthesless, in this section we show the phenomena predicted by our theorem does occur for real-life models like VGG-16. We further verify the predicted convergence to the limiting flow for Normalized GD on a two-layer fully-connected network trained on MNIST.

We observe that the alignment function reaches close to 11, towards the end of training. The top eigenvalue decreases over time (as predicted byTheorem 4.4 and Theorem 4.6), and the stableness hovers around 22 at the end of training.

Verifying Convergence to Limiting Flow on MNIST:

Conclusion

The recent discovery of Edge of Stability phenomenon in Cohen et al. (2021) calls for a reexamination of how we understand optimization in deep learning. The current paper gives two concrete settings with fairly general loss functions, where gradient updates can be shown to decrease loss over many iterations even after stableness is lost. Furthermore, in one setting the trajectory is shown to amount to reduce the sharpness (i.e., the maximum eigenvalue of the Hessian of the loss), thus rigorously establishing an effect that has been conjectured for decades in deep learning literature and was definitively documented for GD in Cohen et al. (2021). Our analysis crucially relies upon learning rate η\eta being finite, in contrast to many recent results on implicit bias that required an infinitesimal LR. Even the alignment analysis of Normalized GD to the top eigenvector for quadratic loss in Section 3 appears to be new.

One limitation of our analysis is that it only applies close to the manifold of local minimizers. By contrast, in experiments the EoS phenomenon, including the control of sharpness, begins much sooner. Addressing this gap, as well as analysing the EoS for the loss LL itself (as opposed to L\sqrt{L} as done here) is left for future work. Very likely this will require novel understanding of properties of deep learning losses, which we were able to circumvent by looking at L\sqrt{L} instead. Exploration of EoS-like effects in SGD setting would also be interesting, although we first need definitive experiments analogous to Cohen et al. (2021).

Acknowledgement

We thank Kaifeng Lyu for helpful discussions. The authors acknowledge support from NSF, ONR, Simons Foundation, Schmidt Foundation, Mozilla Research, Amazon Research, DARPA and SRC. ZL is also supported by Microsoft Research PhD Fellowship.

References

Appendix A Omitted Proofs for Results for Quadratic Loss Functions

Recall the loss function LL is defined as L(x)=12x⊤AxL(x)=\frac{1}{2}x^{\top}Ax. The Normalized GD update (LR= η\eta )is given by x(t+1)=x(t)−ηAx(t)∥Ax(t)∥x(t+1)=x(t)-\eta\frac{Ax(t)}{\left\|Ax(t)\right\|}. A substitution x~(t):=Ax(t)η\widetilde{x}(t):=\frac{Ax(t)}{\eta} gives the following update rule:

Now we recall the main theorem for Normalized GD on quadratic loss functions: See 3.1

We also note that GD on L\sqrt{L} with any LR η\eta can also be reduced to update rule (2), as shown in the discussion at the end of Section 3.

In this subsection, we show (1). Ij\mathcal{I}_{j} is indeed an invariant set for normalized GD ∀j∈[D]\forall j\in[D] and (2). from any initialization, normalized GD will eventually go into their intersection ∩j=1DIj\cap_{j=1}^{D}\mathcal{I}_{j}.

Note P(j:D)A=P(j:D)AP(j:D)P^{(j:D)}A=P^{(j:D)}AP^{(j:D)}, by definition of Normalized GD (2), we have

Note that P(j:D)A≼λjIP^{(j:D)}A\preccurlyeq\lambda_{j}I, ∥P(j:D)x~(t)∥≤∥x~(t)∥\left\|P^{(j:D)}\widetilde{x}(t)\right\|\leq\left\|\widetilde{x}(t)\right\| and ∥P(j:D)x~(t)∥≤λj\left\|P^{(j:D)}\widetilde{x}(t)\right\|\leq\lambda_{j} by assumption, we have

Therefore ∥I−P(j:D)A∥x~(t)∥∥≤λj∥P(j:D)x~(t)∥\left\|I-\frac{P^{(j:D)}A}{\left\|\widetilde{x}(t)\right\|}\right\|\leq\frac{\lambda_{j}}{\left\|P^{(j:D)}\widetilde{x}(t)\right\|} and thus we conclude ∥P(j:D)x~(t+1)∥≤λj{\left\|P^{(j:D)}\widetilde{x}(t+1)\right\|}\leq\lambda_{j}. ∎

Since λj≤∥P(j:D)x~(t)∥≤∥x~(t)∥\lambda_{j}\leq\left\|P^{(j:D)}\widetilde{x}(t)\right\|\leq\left\|\widetilde{x}(t)\right\|, we have 0≼I−P(j:D)A∥x~(t)∥≼1−λD∥x~(t)∥0\preccurlyeq I-\frac{P^{(j:D)}A}{\left\|\widetilde{x}(t)\right\|}\preccurlyeq 1-\frac{\lambda_{D}}{\left\|\widetilde{x}(t)\right\|}. Therefore ∥I−P(j:D)A∥x~(t)∥∥≤1−λD∥x~(t)∥\left\|I-\frac{P^{(j:D)}A}{\left\|\widetilde{x}(t)\right\|}\right\|\leq 1-\frac{\lambda_{D}}{\left\|\widetilde{x}(t)\right\|}. The proof is completed by plugging this into Equation 11. ∎

Lemma A.2 has the following two direct corollaries.

For any initialization x~(0)\widetilde{x}(0) and t≥∥x~(0)∥−λ1λDt\geq\frac{\left\|\widetilde{x}(0)\right\|-\lambda_{1}}{\lambda_{D}}, ∥x~(t)∥≤λ1\left\|\widetilde{x}(t)\right\|\leq\lambda_{1}, that is, x~(t)∈I1\widetilde{x}(t)\in\mathcal{I}_{1}.

Set j=1j=1 in Lemma A.2, it holds that ∥x~(t+1)∥≤∥x~(t)∥−λD\left\|\widetilde{x}(t+1)\right\|\leq\left\|\widetilde{x}(t)\right\|-\lambda_{D} whenever ∥x~(t)∥≥λ1\left\|\widetilde{x}(t)\right\|\geq\lambda_{1}. Thus \left\|\widetilde{x}(\big{\lceil}\frac{\left\|\widetilde{x}(0)\right\|-\lambda_{1}}{\lambda_{D}}\big{\rceil})\right\|\leq\lambda_{1}. The proof is completed as I1\mathcal{I}_{1} is an invariant set by Lemma A.1. ∎

For any coordinate j∈[D]j\in[D] and initial point x~(0)∈I1\widetilde{x}(0)\in\mathcal{I}_{1}, if t≥λ1λDln⁡λ1λjt\geq\frac{\lambda_{1}}{\lambda_{D}}\ln\frac{\lambda_{1}}{\lambda_{j}} then ∥P(j:D)x~(t)∥≤λj\left\|P^{(j:D)}\widetilde{x}(t)\right\|\leq\lambda_{j}.

Since I1\mathcal{I}_{1} is an invariant set, we have ∥x~(t)∥≤λ1\left\|\widetilde{x}(t)\right\|\leq\lambda_{1} for all t≥0t\geq 0. Thus let T=⌊λ1λDln⁡λ1λj⌋T=\lfloor\frac{\lambda_{1}}{\lambda_{D}}\ln\frac{\lambda_{1}}{\lambda_{j}}\rfloor, we have

The proof is completed since IjI_{j} is a invariant set for any j∈[D]j\in[D] by Lemma A.1. ∎

A.2 Proofs for Alignment Phase

In this subsection, we analyze how normalized GD align to the top eigenvector once it goes through the preparation phase, meaning x~(t)∈∩j=1DIj\widetilde{x}(t)\in\cap_{j=1}^{D}\mathcal{I}_{j} for all tt in alignment phase.

Let the index kk be the smallest integer such that λk+1<2∥x~(t)∥−λ1\lambda_{k+1}<2\left\|\widetilde{x}(t)\right\|-\lambda_{1}. If no such index exists, then one can observe that ∥x~(t+1)∥≤λ1−∥x~(t)∥\left\|\widetilde{x}(t+1)\right\|\leq\lambda_{1}-\left\|\widetilde{x}(t)\right\|. Assuming that such an index exists in [D][D], we have λk≥2∥x~(t)∥−λ1\lambda_{k}\geq 2\left\|\widetilde{x}(t)\right\|-\lambda_{1} and ∥x~(t)∥−λj≤λ1−∥x~(t)∥\left\|\widetilde{x}(t)\right\|-\lambda_{j}\leq\lambda_{1}-\left\|\widetilde{x}(t)\right\|, ∀j≤k\forall j\leq k. Now consider the following vectors:

By definition of kk, ∣∥x~(t)∥−λj∣≤∣∥x~(t)∥−λ1∣|\left\|\widetilde{x}(t)\right\|-\lambda_{j}|\leq|\left\|\widetilde{x}(t)\right\|-\lambda_{1}|. Thus

By assumption, we have x~(t)∈∩j=1DIj\widetilde{x}(t)\in\cap_{j=1}^{D}\mathcal{I}_{j}. Thus

where we applied AM-GM inequality multiple times in the pre-final step.

where the final step is because λ12≤∥x~(t)∥≤λ1\frac{\lambda_{1}}{2}\leq\left\|\widetilde{x}(t)\right\|\leq\lambda_{1} and that the maximal value of a convex function is attained at the boundary of an interval.

At any step tt and i∈[D]i\in[D], if ∥x~(t)∥⪌λi2\left\|\widetilde{x}(t)\right\|\gtreqqless\frac{\lambda_{i}}{2}, then ∣x~i(t+1)∣⪋∣x~i(t)∣\left|\widetilde{x}_{i}(t+1)\right|\lesseqqgtr\left|\widetilde{x}_{i}(t)\right|, where ⪌\gtreqqless denotes larger than, equal to and smaller than respectively. (Same for ⪋\lesseqqgtr, but in the reverse order)

From the Normalized GD update rule, we have x~i(t+1)=x~i(t)(1−λi∥x~(t)∥), for all i∈[D]\widetilde{x}_{i}(t+1)=\widetilde{x}_{i}(t)\left(1-\frac{\lambda_{i}}{\left\|\widetilde{x}(t)\right\|}\right),\text{ for all }i\in[D]. Thus

At any step tt, if ∥x~(t)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2}, then

where θt=arctan⁡∥P(2:D)x~(t)∥∣e1⊤x~(t)∣\theta_{t}=\arctan\frac{\left\|P^{(2:D)}\widetilde{x}(t)\right\|}{\left|e_{1}^{\top}\widetilde{x}(t)\right|} and λ=min⁡(λ1−λ2,λD)\lambda=\min(\lambda_{1}-\lambda_{2},\lambda_{D}).

We first show that the left side inequality holds by the following update rule for ⟨e1,x~(t)⟩\langle e_{1},\widetilde{x}(t)\rangle:

Since ∥x~(t+1)∥≥∣⟨e1,x~(t+1)⟩∣\left\|\widetilde{x}(t+1)\right\|\geq\left|\langle e_{1},\widetilde{x}(t+1)\rangle\right| and θt\theta_{t} denotes the angle between e1e_{1} and x~(t+1)\widetilde{x}(t+1), we get the left side inequality.

Now, we focus on the right hand side inequality. First of all, the update in the coordinate j∈[2,D]j\in[2,D] is given by

where again in the final step, we have used ∥x~(t)∥<λ12\left\|\widetilde{x}(t)\right\|<\frac{\lambda_{1}}{2}. The above bound can be further bounded by

where we have used λ=min⁡(λ1−λ2,λD).\lambda=\min(\lambda_{1}-\lambda_{2},\lambda_{D}).

If at some step tt, ∥x~(t+1)∥+∥x~(t)∥≤λ1\left\|\widetilde{x}(t+1)\right\|+\left\|\widetilde{x}(t)\right\|\leq\lambda_{1}, then ∣x~1(t+2)∣≥∣x~1(t)∣\left|\widetilde{x}_{1}(t+2)\right|\geq\left|\widetilde{x}_{1}(t)\right|, where the equality holds only when ∥x~(t+1)∥+∥x~(t)∥=λ1\left\|\widetilde{x}(t+1)\right\|+\left\|\widetilde{x}(t)\right\|=\lambda_{1}. Therefore, by Lemma A.6, we have :

where θt=arctan⁡∥P(2:D)x~(t)∥∣e1⊤x~(t)∣,\theta_{t}=\arctan\frac{\left\|P^{(2:D)}\widetilde{x}(t)\right\|}{\left|e_{1}^{\top}\widetilde{x}(t)\right|}, and λ=min⁡(λ1−λ2,λD)\lambda=\min(\lambda_{1}-\lambda_{2},\lambda_{D}).

Using the Normalized GD update rule, we have

where the equality holds only when ∥x~(t+1)∥+∥x~(t)∥=λ1\left\|\widetilde{x}(t+1)\right\|+\left\|\widetilde{x}(t)\right\|=\lambda_{1}.

Moreover, with the additional condition that ∥x~(t)∥<λ12\left\|\widetilde{x}(t)\right\|<\frac{\lambda_{1}}{2}, we have from Lemma A.6, ∥x~(t+1)∥≤λ1−∥x~(t)∥−λ(λ1−λ)sin⁡2θt\left\|\widetilde{x}(t+1)\right\|\leq\lambda_{1}-\left\|\widetilde{x}(t)\right\|-\lambda(\lambda_{1}-\lambda)\sin^{2}\theta_{t}, where λ=min⁡(λ1−λ2,λD)\lambda=\min(\lambda_{1}-\lambda_{2},\lambda_{D}).

Hence, retracing the steps we followed before, we have

where the final step follows from ∥x~(t+1)∥≤λ1−∥x~(t)∥\left\|\widetilde{x}(t+1)\right\|\leq\lambda_{1}-\left\|\widetilde{x}(t)\right\| and therefore ∥x~(t+1)∥∥x~(t)∥≤λ124\left\|\widetilde{x}(t+1)\right\|\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}^{2}}{4}. ∎

A.3 Proof of Main theorems for Quadratic Loss

Preparation phase: x~(t)\widetilde{x}(t) enters and stays in an invariant set around the origin, that is, ∩j=1DIj\cap_{j=1}^{D}\mathcal{I}_{j}, where Ij:={x~∣∑i=jD⟨ei,x~(t)⟩2≤λj2}\mathcal{I}_{j}:=\{\widetilde{x}\mid\sum_{i=j}^{D}\langle e_{i},\widetilde{x}(t)\rangle^{2}\leq\lambda^{2}_{j}\}. (See Lemma 3.3, which is a direct consequence of Lemmas A.1, A.3 and A.1.)

Alignment phase: The projection of x~(t)\widetilde{x}(t) on the top eigenvector, ∣⟨x~(t),e1⟩∣|\left\langle\widetilde{x}(t),e_{1}\right\rangle|, is shown to increase monotonically among the steps among the steps {t∣∥x~(t)∥≤0.5}\{t\mid\left\|\widetilde{x}(t)\right\|\leq 0.5\}, up until convergence, since it’s bounded. (Lemma 3.4)

By Lemma A.7, the convergence of ∣⟨x~(t),e1⟩∣|\left\langle\widetilde{x}(t),e_{1}\right\rangle| would imply the convergence of x~(t)\widetilde{x}(t) to e1e_{1} in direction.

Now we claim ∀t≥3\forall t\geq 3, there is some k∈{0,1,3}k\in\{0,1,3\} such that t−k∈S′t-k\in S^{\prime}. This is because Lemma 3.5 says that if t∉St\notin S, then both t−1,t+1∈St-1,t+1\in S. Thus for any t∉St\notin S, t−1∈S′t-1\in S^{\prime}. Therefore, for any t∈S/S′t\in S/S^{\prime}, if t−2∉St-2\notin S, then t−3∈S′t-3\in S^{\prime}. Thus we conclude that ∀t≥3\forall t\geq 3, there is some k∈{0,1,3}k\in\{0,1,3\} such that t−k∈S′t-k\in S^{\prime}, which implies lim⁡t→∞θt=0\lim\limits_{t\to\infty}\theta_{t}=0. Hence lim⁡t→∞∥x~(t+1)−x~(t)∥=λ1\lim\limits_{t\to\infty}\left\|\widetilde{x}(t+1)-\widetilde{x}(t)\right\|=\lambda_{1}, meaning for sufficiently large tt, x~1(t)\widetilde{x}_{1}(t) flips its sign per step and thus lim⁡t→∞x~(t+2)−x~(t)=0\lim\limits_{t\to\infty}\widetilde{x}(t+2)-\widetilde{x}(t)=0, lim⁡t→∞∥x~(t+1)∥+∥x~(t)∥=λ1\lim\limits_{t\to\infty}\left\|\widetilde{x}(t+1)\right\|+\left\|\widetilde{x}(t)\right\|=\lambda_{1}.

If C=12C=\frac{1}{2}, then we must have lim⁡t→∞∥x~(t)∥=λ12\lim\limits_{t\to\infty}\left\|\widetilde{x}(t)\right\|=\frac{\lambda_{1}}{2} and we are done in this case. If C<12C<\frac{1}{2}, note that lim⁡t→∞,t∈S′∣x~1(t)∣=Cλ1\lim\limits_{t\to\infty,t\in S^{\prime}}\left|\widetilde{x}_{1}(t)\right|=C\lambda_{1}, it must hold that lim⁡t→∞,t∈S′∥x~(t+1)∥=(1−C)λ1\lim\limits_{t\to\infty,t\in S^{\prime}}\left\|\widetilde{x}(t+1)\right\|=(1-C)\lambda_{1}, thus there is some large T∈ST\in S such that for all t∈S,t≥Tt\in S,t\geq T, t+1∉St+1\notin S. By Lemma 3.5, t+2∈St+2\in S. Thus we conclude lim⁡t→∞x~(T+2t)=Cλse1\lim\limits_{t\to\infty}\widetilde{x}(T+2t)=C\lambda se_{1} for some s∈{−1,1}s\in\{-1,1\} and thus lim⁡t→∞x~(T+2t+1)=(C−1)λse1\lim\limits_{t\to\infty}\widetilde{x}(T+2t+1)=(C-1)\lambda se_{1}. This completes the proof. ∎

A.4 Some Extra Lemmas (only used in the general loss case)

For a general loss function LL satisfying 4.1, the loss landscape looks like a strongly convex quadratic function locally around its minimizer. When sufficient small learning rate, the dynamics will be sufficiently close to the manifold and behaves like that in quadratic case with small perturbations. Thus it will be very useful to have more refined analysis for the quadratic case, as they allow us to bound the error in the approximate quadratic case quantitatively. Lemmas A.8, A.9, A.10 and A.11 are such examples. Note that they are only used in the proof of the general loss case, but not in the quadratic loss case.

Lemma A.8 is a slightly generalized version of Lemma 3.5.

Suppose at time tt, ∥P(j:D)x~(t)∥≤λj(1+λD2λ12), for all j∈[D]\left\|P^{(j:D)}\widetilde{x}(t)\right\|\leq\lambda_{j}(1+\frac{\lambda^{2}_{D}}{\lambda^{2}_{1}}),\text{ for all }j\in[D], if ∥x~(t)∥>λ12\left\|\widetilde{x}(t)\right\|>\frac{\lambda_{1}}{2}, then ∥x~(t+1)∥≤λ12\left\|\widetilde{x}(t+1)\right\|\leq\frac{\lambda_{1}}{2}.

The proof is similar to the proof of Lemma 3.5. Let the index kk be the smallest integer such that λk+1<2∥x~(t)∥−λ1\lambda_{k+1}<2\left\|\widetilde{x}(t)\right\|-\lambda_{1}. If no such index exists, then one can observe that ∥x~(t+1)∥≤λ1−∥x~(t)∥\left\|\widetilde{x}(t+1)\right\|\leq\lambda_{1}-\left\|\widetilde{x}(t)\right\|. Assuming that such an index exists in [D][D], we have λk≥2∥x~(t)∥−λ1\lambda_{k}\geq 2\left\|\widetilde{x}(t)\right\|-\lambda_{1} and ∥x~(t)∥−λj≤λ1−∥x~(t)∥\left\|\widetilde{x}(t)\right\|-\lambda_{j}\leq\lambda_{1}-\left\|\widetilde{x}(t)\right\|, ∀j≤k\forall j\leq k. With the same decomposition and estimation, since x~(t)∈∩j=1D(1+λD2λ12)Ij\widetilde{x}(t)\in\cap_{j=1}^{D}(1+\frac{\lambda_{D}^{2}}{\lambda_{1}^{2}})\mathcal{I}_{j}, we have

∣⟨e1,x~(t)⟩∣≤(1−2c)g(λk)\left|\langle e_{1},\widetilde{x}(t)\rangle\right|\leq(1-2c)g(\lambda_{k}).

θt≤c∣⟨e1,x~(t)⟩∣\theta_{t}\leq\sqrt{c\left|\langle e_{1},\widetilde{x}(t)\rangle\right|},

where θt=arctan⁡∥P(2:D)(x~(t))∥∣⟨e1,x~(t)⟩∣\theta_{t}=\arctan\frac{\left\|P^{(2:D)}(\widetilde{x}(t))\right\|}{\left|\langle e_{1},\widetilde{x}(t)\rangle\right|}.

From the quadratic update, we have the update rule as:

Thus, as long as, the following holds true:

We can use (λ1−∥x~(t)∥)cos⁡θt≤∥x~(t+1)∥≤λ1−∥x~(t)∥−λ2λ1(1−λλ1)λ1sin⁡2θt(\lambda_{1}-\left\|\widetilde{x}(t)\right\|)\cos\theta_{t}\leq\left\|\widetilde{x}(t+1)\right\|\leq\lambda_{1}-\left\|\widetilde{x}(t)\right\|-\frac{\lambda}{2\lambda_{1}}\left(1-\frac{\lambda}{\lambda_{1}}\right)\lambda_{1}\sin^{2}\theta_{t}, where λ=min⁡(λ1−λ2,λD)\lambda=\min(\lambda_{1}-\lambda_{2},\lambda_{D}) from Lemma A.6 to show the following with additional algebraic manipulation:

where the last step we use that ∣θt∣≤c∣⟨e1,x~(t)⟩∣\left|\theta_{t}\right|\leq\sqrt{c\left|\langle e_{1},\widetilde{x}(t)\rangle\right|}, we only need

The above inequality is true when ∣⟨e1,x~(t)⟩∣≤(1−2c)g(λk)\left|\langle e_{1},\widetilde{x}(t)\rangle\right|\leq\left(1-2c\right)g(\lambda_{k}). ∎

Then, the following must hold true at time tt.

where the final step holds true for any c∈(0,1).c\in(0,1).

The result follows after substituting this bound in Equation 12.

At any step tt, if ∥x~(t)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2},

∣tan⁡(∠(x~(t+1),e1))∣≤max⁡(λ2λ1,1−2λDλ1)∣tan⁡(∠(x~(t),e1))∣\left|\tan(\angle(\widetilde{x}(t+1),e_{1}))\right|\leq\max(\frac{\lambda_{2}}{\lambda_{1}},1-2\frac{\lambda_{D}}{\lambda_{1}})\left|\tan(\angle(\widetilde{x}(t),e_{1}))\right|.

∣tan⁡(∠(x~(t+2),e1))∣≤λ1∥x~(t)∥∣tan⁡(∠(x~(t),e1))∣\left|\tan(\angle(\widetilde{x}(t+2),e_{1}))\right|\leq\frac{\lambda_{1}}{\left\|\widetilde{x}(t)\right\|}\left|\tan(\angle(\widetilde{x}(t),e_{1}))\right|.

From the Normalized GD update rule, we have

implying ∣x~i(t+1)∣<∣(1−1∥x~(t)∥)∣∣x~i(t)∣\left|\widetilde{x}_{i}(t+1)\right|<\left|\left(1-\frac{1}{\left\|\widetilde{x}(t)\right\|}\right)\right|\left|\widetilde{x}_{i}(t)\right| for all i∈[2,D]i\in[2,D], since λi<1\lambda_{i}<1.

Since λi<λ1\lambda_{i}<\lambda_{1} and ∥x~(t)∥≤λ12\left\|\widetilde{x}(t)\right\|\leq\frac{\lambda_{1}}{2}, it holds that

Recall ∣tan⁡(∠(v,e1))∣=∥P(2:D)v∥∣⟨e1,v⟩∣\left|\tan(\angle(v,e_{1}))\right|=\frac{\left\|P^{(2:D)}v\right\|}{\left|\left\langle e_{1},v\right\rangle\right|} for any vector vv, the first claim follows from re-arranging the terms.

For the second claim, it suffices to apply the above inequality to t+1t+1, which yields that

The proof is completed by noting ∥x~(t+1)∥≤λ1−∥x~t∥\left\|\widetilde{x}(t+1)\right\|\leq\lambda_{1}-\left\|\widetilde{x}{t}\right\| (Lemma A.6) and tan⁡(∠(x~(t+1),e1))≤tan⁡(∠(x~(t),e1))\tan(\angle(\widetilde{x}(t+1),e_{1}))\leq\tan(\angle(\widetilde{x}(t),e_{1})). ∎

Appendix B Setups for General Loss Functions

Before we start the analysis for Normalized GD for general loss functions in Appendix C, we need to introduce some new notations and terminologies to complete the formal setup. We start by first recapping some core assumptions and definitions in the main paper and provide the missing proof in the main paper.

We define Φ\Phi as the limit map of gradient flow below. We summarize various properties of Φ\Phi from LABEL:ch:diffusion_on_manifold in Section B.2.

Given any two points x,yx,y, we use xy‾\overline{xy} to denote the line segment between xx and yy, i.e., {z∣∃λ∈,z=(1−λ)x+λy}\{z\mid\exists\lambda\in,z=(1-\lambda)x+\lambda y\}.

The main result of this chapter focuses on the trajectory of Normalized GD from fixed initialization xinitx_{\text{init}} with LR η\eta converges to , which can be roughly split into two phases. In the first phase, Theorem 4.3 shows that the normalized GD trajectory converges to the gradient flow trajectory, ϕ(xinit,⋅)\phi(x_{\text{init}},\cdot). In second phase, Theorem 4.4 shows that the normalized GD trajectory converges to the limiting flow which decreases sharpness on Γ\Gamma, (5). Therefore, for sufficiently small η\eta, the entire trajectory of normalized GD will be contained in a small neighbourhood of gradient flow trajectory ZZ and limiting flow trajectory YY. The convergence rate given by our proof depends on the various local constants like smoothness of LL and Φ\Phi in this small neighbourhood, which intuitively can be viewed as the actual ”working zone” of the algorithm. The constants are upper bounded or lower bounded from zero because this ”working zone” is compact after fixing the stopping time of (5), which is denoted by T2T_{2}.

We construct the ”working zone” of the second phase, YρY^{\bm{\rho}} and YϵY^{\bm{\epsilon}} in Lemmas B.2 and B.5 respectively, where 0<ϵ<ρ0<{\bm{\epsilon}}<{\bm{\rho}}, implying Yϵ⊂YρY^{\bm{\epsilon}}\subset Y^{\bm{\rho}}. The reason that we need the two-level nested ”working zones” is that even though we can ensure all the points in YρY^{\bm{\rho}} have nice properties as listed in Lemma B.2, we cannot ensure the trajectory of gradient flow from x∈Yρx\in Y^{\bm{\rho}} to Φ(x)\Phi(x) or the line segment xΦ(x)‾\overline{x\Phi(x)} is in YρY^{\bm{\rho}}, which will be crucial for the geometric lemmas (in Section B.1) that we will heavily use in the trajectory analysis around the manifold. For this reason we further define YϵY^{\bm{\epsilon}} and Lemma B.5 guarantees the trajectory of gradient flow from xx to Φ(x)\Phi(x) or the line segment xΦ(x)‾\overline{x\Phi(x)} whenever x∈Yρx\in Y^{\bm{\rho}}.

A function LL is said to be μ\bm{\mu}-PL in a set UU iff for all x∈Ux\in U,

For convenience, we define \bm{\Delta}:=\frac{1}{2}\inf_{x\in Y}\big{(}\lambda_{1}(\nabla^{2}L(x))-\lambda_{2}(\nabla^{2}L(x)))\big{)} and μ:=14inf⁡x∈YλM(∇2L(x))\bm{\mu}:=\frac{1}{4}\inf_{x\in Y}\lambda_{M}(\nabla^{2}L(x)). By 4.1, we have μ>0\bm{\mu}>0. By 4.2, Δ>0\bm{\Delta}>0.

Given YY, there are sufficiently small ρ>0{\bm{\rho}}>0 such that

LL is μ\bm{\mu}-PL on YρY^{\bm{\rho}}; (see Definition B.1)

\inf_{x\in Y^{\bm{\rho}}}\big{(}\lambda_{1}(\nabla^{2}L(x))-\lambda_{2}(\nabla^{2}L(x)))\big{)}\geq\bm{\Delta}>0;

inf⁡x∈YρλM(∇2L(x))≥μ>0\inf_{x\in Y^{\bm{\rho}}}\lambda_{M}(\nabla^{2}L(x))\geq\bm{\mu}>0.

We first claim for every y∈Yy\in Y, for all sufficiently small ρy>0{\bm{\rho}}_{y}>0 (i.e. for all ρy{\bm{\rho}}_{y} smaller than some threshold depending on yy), the following three properties hold (1) B‾y(ρy)∩Γ\overline{B}_{y}({{\bm{\rho}}_{y}})\cap\Gamma is compact; (2) B‾y(ρy)∩Γ⊂U\overline{B}_{y}({{\bm{\rho}}_{y}})\cap\Gamma\subset U and (3) LL is μ\bm{\mu}-PL on B‾y(ρy∩Γ)\overline{B}_{y}({{\bm{\rho}}_{y}}\cap\Gamma).

Thus for any c′>0c^{\prime}>0, for sufficiently small ρy{\bm{\rho}}_{y}, (x−p(x))⊤∇2L(p(x))(x−p(x))≥c′∥x−p(x)∥3(x-p(x))^{\top}\nabla^{2}L(p(x))(x-p(x))\geq c^{\prime}\left\|x-p(x)\right\|^{3}. Combining Equations 14 and 15, we conclude that for sufficiently small ρy{\bm{\rho}}_{y},

Again for sufficiently small ρy{\bm{\rho}}_{y}, by Taylor expansion of LL at p(x)p(x), we have

Meanwhile, since λM(∇2L(p(x)))\lambda_{M}(\nabla^{2}L(p(x))) and λ1(∇2L(p(x)))−λ2(∇2L(p(x)))\lambda_{1}(\nabla^{2}L(p(x)))-\lambda_{2}(\nabla^{2}L(p(x))) are continuous functions in xx, we can also choose a sufficiently small ρy{\bm{\rho}}_{y} such that for all x∈B‾y(ρy)x\in\overline{B}_{y}({\bm{\rho}}_{y}), λM(∇2L(p(x)))≥12λM(∇2L(p(y)))=12λM(∇2L(y))>Δ\lambda_{M}(\nabla^{2}L(p(x)))\geq\frac{1}{2}\lambda_{M}(\nabla^{2}L(p(y)))=\frac{1}{2}\lambda_{M}(\nabla^{2}L(y))>\bm{\Delta} and \lambda_{1}(\nabla^{2}L(p(x)))-\lambda_{2}(\nabla^{2}L(p(x)))\geq\frac{1}{2}\big{(}\lambda_{1}(\nabla^{2}L(p(y)))-\lambda_{2}(\nabla^{2}L(p(y)))\big{)}=\frac{1}{2}\big{(}\lambda_{1}(\nabla^{2}L(y))-\lambda_{2}(\nabla^{2}L(y))\big{)}\geq\bm{\mu}. Further note Y⊂∪y∈YBy(ρy)Y\subset\cup_{y\in Y}B_{y}({\bm{\rho}}_{y}) and YY is a compact set, we can take a finite subset of YY, Y′Y^{\prime}, such that Y⊂∪y∈Y′By(ρy)Y\subset\cup_{y\in Y^{\prime}}B_{y}({\bm{\rho}}_{y}). Taking ρ:=min⁡y∈Y′ρy2{\bm{\rho}}:=\min_{y\in Y^{\prime}}\frac{{\bm{\rho}}_{y}}{2} completes the proof. ∎

Here, T(x1,⋯ ,x(k))=∑i1=1d1∑i2=1d2…∑ik=1dkti1i2…idxi1(1)xi2(2)…xik(k)\mathcal{T}\left(x^{1},\cdots,x^{(k)}\right)=\sum_{i_{1}=1}^{d_{1}}\sum_{i_{2}=1}^{d_{2}}\ldots\sum_{i_{k}=1}^{d_{k}}t_{i_{1}i_{2}\ldots i_{d}}x_{i_{1}}^{(1)}x_{i_{2}}^{(2)}\ldots x_{i_{k}}^{(k)}.

We define the following constants regarding smoothness of LL and Φ\Phi of various orders over YρY^{\bm{\rho}}.

Given ρ{\bm{\rho}} as defined in Lemma B.2, there is an ϵ∈(0,ρ){\bm{\epsilon}}\in(0,{\bm{\rho}}) such that

sup⁡x∈YϵL(x)−inf⁡x∈YϵL(x)<min⁡(μρ28,2μ5ν2ζ2)\sup_{x\in Y^{\bm{\epsilon}}}L(x)-\inf\limits_{x\in Y^{\bm{\epsilon}}}L(x)<\min(\frac{\bm{\mu}{\bm{\rho}}^{2}}{8},\frac{2\bm{\mu}^{5}}{\bm{\nu}^{2}\bm{\zeta}^{2}});

∀x∈Yϵ\forall x\in Y^{\bm{\epsilon}}, Φ(x)∈Yρ2\Phi(x)\in Y^{\frac{{\bm{\rho}}}{2}}.

For every y∈Yy\in Y, there is an ϵy{\bm{\epsilon}}_{y}, such that ∀x∈By(ϵy)\forall x\in B_{y}({\bm{\epsilon}}_{y}), it holds that L(x)<min⁡(μρ28,2μ4ν2ζ2)L(x)<\min(\frac{\bm{\mu}{\bm{\rho}}^{2}}{8},\frac{2\bm{\mu}^{4}}{\bm{\nu}^{2}\bm{\zeta}^{2}}) and Φ(x)∈Yρ2\Phi(x)\in Y^{\frac{{\bm{\rho}}}{2}}, as both L(x)L(x) and Φ(x)\Phi(x) are continuous. Further note Y⊂∪y∈YBy(ϵy)Y\subset\cup_{y\in Y}B_{y}({\bm{\epsilon}}_{y}) and YY is a compact set, we can take a finite subset of YY, Y′Y^{\prime}, such that Y⊂∪y∈Y′By(ϵy)Y\subset\cup_{y\in Y^{\prime}}B_{y}({\bm{\epsilon}}_{y}). Taking ϵ:=min⁡y∈Y′ϵy2{\bm{\epsilon}}:=\min_{y\in Y^{\prime}}\frac{{\bm{\epsilon}}_{y}}{2} completes the proof. ∎

Summary for Setups:

The initial point xinitx_{\text{init}} is chosen from an open neighborhood of manifold Γ\Gamma, UU, where the infinite-time limit of gradient flow Φ\Phi is well-defined and for any x∈Ux\in U, Φ(x)∈Γ\Phi(x)\in\Gamma. We consider normalized GD with sufficiently small LR η\eta such that the trajectory enters a small neighborhood of limiting flow trajectory, YρY^{\bm{\rho}}. Moreover, LL is μ\bm{\mu}-PL on YρY^{\bm{\rho}} and the eigengaps and smallest eigenvalues are uniformly lower bounded by positive Δ,μ\bm{\Delta},\bm{\mu} respectively on YρY^{\bm{\rho}}. Finally, we consider a proper subset of YρY^{\bm{\rho}}, YϵY^{\bm{\epsilon}}, as the final ”working zone” in the second phase (defined in Lemma B.5), which enjoys more properties than YρY^{\bm{\rho}}, including Lemmas B.7, B.8, B.9 and B.10.

B.1 Geometric Lemmas

In this subsection we present several geometric lemmas which are frequently used in the trajectory analysis of normalized GD. In this section, O(⋅)O(\cdot) only hides absolute constants. Below is a brief summary:

Lemma B.6: Inequalities connecting various terms: the distance between xx and Φ(x)\Phi(x), the length of GF trajectory from xx to Φ(x)\Phi(x), square root of loss and gradient norm;

Lemma B.7: For any x∈Yϵx\in Y^{\bm{\epsilon}}, the gradient flow trajectory from xx to Φ(x)\Phi(x) and the line segment between xx and Φ(x)\Phi(x) are all contained in YρY^{\bm{\rho}}, so it’s ”safe” to use Taylor expansions along GF trajectory or xΦ(x)‾\overline{x\Phi(x)} to derive properties;

Lemmas B.8, B.9 and B.10: for any x∈Yϵx\in Y^{\bm{\epsilon}}, the normalized GD dynamics at xx can be roughly viewed as approximately quadratic around Φ(x)\Phi(x) with positive definite matrix ∇2L(Φ(x))\nabla^{2}L(\Phi(x)).

Lemma B.11: In the ”working zone”, YρY^{\bm{\rho}}, one-step normalized GD update with LR η\eta only changes Φ(xt)\Phi(x_{t}) by O(η2)O(\eta^{2}).

Lemma B.13: In the ”working zone”, YρY^{\bm{\rho}}, one-step normalized GD update with LR η\eta decreases L(x)−min⁡y∈YL(y)\sqrt{L(x)-\min_{y\in Y}L(y)} by η2μ4\eta\frac{\sqrt{2\bm{\mu}}}{4} if ∥∇L(x)∥≥ζη\left\|\nabla L(x)\right\|\geq\frac{\bm{\zeta}}{\eta}.

If the trajectory of gradient flow starting from xx, ϕ(x,t)\phi(x,t), stays in YρY^{\bm{\rho}} for all t≥0t\geq 0, then we have

Since Φ(x)\Phi(x) is defined as lim⁡t→∞ϕ(x,t)\lim_{t\to\infty}\phi(x,t) and ϕ(x,0)=x\phi(x,0)=x, the left-side inequality follows immediately from triangle inequality. The right-side inequality is by the definition of PL condition. Below we prove the middle inequality.

Since ∀t≥0\forall t\geq 0, ϕ(x,t)∈Yρ\phi(x,t)\in Y^{\bm{\rho}}, it holds that ∥∇L(ϕ(x,t))∥2≥2μ(L(ϕ(x,t))−L(Φ(x)))\left\|\nabla L(\phi(x,t))\right\|^{2}\geq 2\bm{\mu}(L(\phi(x,t))-L(\Phi(x))) by the choice of ρ{\bm{\rho}} in Lemma B.2. Without loss of generality, we assume L(y)=0,∀y∈ΓL(y)=0,\forall y\in\Gamma. Thus we have

The proof is complete since ϕ(x,0)=x\phi(x,0)=x and we assume L(Φ(x))L(\Phi(x)) is . ∎

Let ρ,ϵ{\bm{\rho}},{\bm{\epsilon}} be defined in Lemmas B.2 and B.5. For any x∈Yϵx\in Y^{\bm{\epsilon}}, we have

The entire trajectory of gradient flow starting from xx is contained in YρY^{\bm{\rho}}, i.e., ϕ(x,t)∈Yρ\phi(x,t)\in Y^{\bm{\rho}}, ∀t≥0\forall t\geq 0;

Moreover, ∥Φ(x)−ϕ(x,t)∥≤min⁡(ρ,2μ2νζ)\left\|\Phi(x)-\phi(x,t)\right\|\leq\min({\bm{\rho}},\frac{2\bm{\mu}^{2}}{\bm{\nu}\bm{\zeta}}), ∀t≥0\forall t\geq 0.

Let time τ∗≥0\tau^{*}\geq 0 be the smallest time after which the trajectory of GF is completely contained in YρY^{\bm{\rho}}, that is, τ∗:=inf⁡{t≥0∣∀t′≥t,ϕ(x,t′)∈Yρ}\tau^{*}:=\inf\{t\geq 0\mid\forall t^{\prime}\geq t,\phi(x,t^{\prime})\in Y^{\bm{\rho}}\}. Since YρY^{\bm{\rho}} is closed and ϕ(x,⋅)\phi(x,\cdot) is continuous, we have ϕ(x,τ∗)∈Yρ\phi(x,\tau^{*})\in Y^{\bm{\rho}}.

Since ∀τ≥τ∗\forall\tau\geq\tau^{*}, ϕ(x,τ)∈Yρ\phi(x,\tau)\in Y^{\bm{\rho}}, by Lemma B.6, it holds that ∥ϕ(x,τ∗)−Φ(x)∥≤2(L(ϕ(x,τ∗))−L(Φ(x)))μ\left\|\phi(x,\tau^{*})-\Phi(x)\right\|\leq\sqrt{\frac{2(L(\phi(x,\tau^{*}))-L(\Phi(x)))}{\bm{\mu}}}.

Note that loss doesn’t increase along GF, we have L(ϕ(x,τ∗))−L(Φ(x))≤L(x)−L(Φ(x))≤μρ28L(\phi(x,\tau^{*}))-L(\Phi(x))\leq L(x)-L(\Phi(x))\leq\frac{\bm{\mu}{\bm{\rho}}^{2}}{8}, which implies that ∥ϕ(x,τ∗)−Φ(x)∥≤ρ2\left\|\phi(x,\tau^{*})-\Phi(x)\right\|\leq\frac{{\bm{\rho}}}{2}. Therefore τ∗\tau^{*} must be , otherwise there exists a 0<τ′<τ∗0<\tau^{\prime}<\tau^{*} such that ∥ϕ(x,τ)−Φ(x)∥≤ρ\left\|\phi(x,\tau)-\Phi(x)\right\|\leq{\bm{\rho}} for all τ′<τ<τ∗\tau^{\prime}<\tau<\tau^{*} by the continuity of ϕ(x,⋅)\phi(x,\cdot). This proves the first claim.

Given the first claim is proved, the second claim follows directly from Lemma B.6.

The following theorem shows that the projection of xx in the tangent space of Φ(x)\Phi(x) is small when xx is close to the manifold. In particular if we can show that in a discrete trajectory with a vanishing learning rate η\eta, the iterates {xη(t)}\{x_{\eta}(t)\} stay in YϵY^{{\bm{\epsilon}}}, we can interchangeably use ∥xη(t)−Φ(xη(t))∥\left\|x_{\eta}(t)-\Phi(x_{\eta}(t))\right\| with ∥Pt,Γ(xη(t)−Φ(xη(t)))∥\left\|P_{t,\Gamma}(x_{\eta}(t)-\Phi(x_{\eta}(t)))\right\|, with an additional error of O(η3)\mathcal{O}(\eta^{3}), when ∥Pt,Γ(xη(t)−Φ(xη(t)))∥≤O(η).\left\|P_{t,\Gamma}(x_{\eta}(t)-\Phi(x_{\eta}(t)))\right\|\leq\mathcal{O}(\eta).

For all x∈Yϵx\in Y^{{\bm{\epsilon}}}, we have that

First of all, we can track the decrease in loss along the Gradient flow trajectory starting from xx. At any time τ\tau, we have

where ϕ(x,0)=x\phi(x,0)=x. Without loss of generality, we assume L(y)=0,∀y∈ΓL(y)=0,\forall y\in\Gamma. Using the fact that LL is μ\bm{\mu}-PL on YρY^{{\bm{\rho}}} and the GF trajectory starting from any point in YϵY^{{\bm{\epsilon}}} stays inside YρY^{{\bm{\rho}}} (from Lemma B.7), we have

Moreover, we can relate L(ϕ(x,0)L(\phi(x,0) with ∥Φ(x)−x∥\left\|\Phi(x)-x\right\| with a second order taylor expansion:

where in the final step, we have used the fact that L(Φ(x))=0L(\Phi(x))=0 and ∇L(Φ(x))=0\nabla L(\Phi(x))=0. By Lemma B.7, we have xΦ(x)‾⊂Yρ\overline{x\Phi(x)}\subset Y^{\bm{\rho}}. Thus max⁡s∈∥∇2L(sx+(1−s)Φ(x))∥≤ζ\max_{s\in}\left\|\nabla^{2}L(sx+(1-s)\Phi(x))\right\|\leq\bm{\zeta} from Definition B.4 and it follows that

Finally we focus on the movement in the tangent space. It holds that

By Lemma B.7, we have ϕ(x,τ)Φ(x)‾⊂Yρ\overline{\phi(x,\tau)\Phi(x)}\subset Y^{\bm{\rho}} for all τ≥0\tau\geq 0 and thus

Since PΦ(x),Γ⊥P^{\perp}_{\Phi(x),\Gamma} is the projection matrix for the tangent space, PΦ(x),Γ⊥∇2L(Φ(x))=0P^{\perp}_{\Phi(x),\Gamma}\nabla^{2}L(\Phi(x))=0 and thus by Equation 16

Plug Equation 19 into Equation 18, we conclude that

The left-side inequality of the second inequality is proved by plugging the first claim into the above inequality Equation 20 and rearranging the terms. Note by the second claim in Lemma B.7, νζ4μ2∥x−Φ(x)∥≤12\frac{\bm{\nu}\bm{\zeta}}{4\bm{\mu}^{2}}\left\|x-\Phi(x)\right\|\leq\frac{1}{2}, the right-side inequality is also proved. ∎

At any point x∈Yϵx\in Y^{{\bm{\epsilon}}}, we have

Moreover, the normalized gradient of LL can be written as

Using taylor expansion at xx, we have using ∇L(Φ(x))=0\nabla L(\Phi(x))=0:

where we use Lemma B.8 since x∈Yϵx\in Y^{\bm{\epsilon}}. Thus, the normalized gradient at any step tt can be written as

Consider any point x∈Yϵx\in Y^{{\bm{\epsilon}}}. Then,

where θ=arctan⁡∥PΦ(x),Γ(2:M)x~∥∣⟨v1(x),x~⟩∣\theta=\arctan\frac{\left\|P_{\Phi(x),\Gamma}^{(2:M)}\widetilde{x}\right\|}{\left|\langle v_{1}(x),\widetilde{x}\rangle\right|}, with x~=∇2L(Φ(x))(x−Φ(x))\widetilde{x}=\nabla^{2}L(\Phi(x))(x-\Phi(x)).

For any xy‾∈Yϵ\overline{xy}\in Y^{\bm{\epsilon}} where y=x−η∇L(x)∥∇L(x)∥y=x-\eta\frac{\nabla L(x)}{\left\|\nabla L(x)\right\|} is the one step Normalized GD update from xx, we have

Moreover, we must have for every 1≤k≤M1\leq k\leq M,

By Lemma B.16, we have ∂Φ(x)∇L(x)=0\partial\Phi(x)\nabla L(x)=0 for all x∈Ux\in U. Thus we have

where the final step follows from using Definition B.4.

For the second claim, we have for every 1≤k≤M1\leq k\leq M,

where the first step involves Theorem F.2.

The third claim follows from using Theorem F.4. Again,

where we borrow the bound on ∥∇2L(Φ(x))−∇2L(Φ(y))∥\left\|\nabla^{2}L(\Phi(x))-\nabla^{2}L(\Phi(y))\right\| from our previous calculations. The final step follows from the constants defined in Definition B.4. ∎

For any xy‾∈Yϵ\overline{xy}\in Y^{\bm{\epsilon}} where y=x−η∇L(x)∥∇L(x)∥y=x-\eta\frac{\nabla L(x)}{\left\|\nabla L(x)\right\|} is the one step Normalized GD update from xx, we have that

Here θ=arctan⁡∥PΦ(x),Γ(2:M)x~∥∣⟨v1(x),x~⟩∣,\theta=\arctan\frac{\left\|P_{\Phi(x),\Gamma}^{(2:M)}\widetilde{x}\right\|}{\left|\langle v_{1}(x),\widetilde{x}\rangle\right|}, with x~=∇2L(Φ(x))(x−Φ(x))\widetilde{x}=\nabla^{2}L(\Phi(x))(x-\Phi(x)). Additionally, we have that

By Taylor expansion for Φ\Phi at xx, we have

where in the pre-final step, we used the property of Φ\Phi from Lemma B.16. In the final step, we have used a second order taylor expansion to bound the difference between ∂2Φ(x)\partial^{2}\Phi(x) and ∂2Φ(Φ(x)).\partial^{2}\Phi(\Phi(x)). Additionally, we have used y−x=η∇L(x)∥∇L(x)∥y-x=\eta\frac{\nabla L(x)}{\left\|\nabla L(x)\right\|} from the Normalized GD update rule.

Applying Taylor expansion on Φ\Phi again but at Φ(x)\Phi(x), we have that

Also, at Φ(x)\Phi(x), since v1(x)v_{1}(x) is the top eigenvector of the hessian ∇2L\nabla^{2}L, we have that from Corollary B.23,

Plug Equations 24 and 23 into Equation 22, we have that

For the second claim, continuing from Equation 22, we have that

where Σ=PΦ(x),Γ∇L(x)∥∇L(x)∥(PΦ(x),Γ∇L(x)∥∇L(Φ(x))∥)⊤\Sigma=P_{\Phi(x),\Gamma}\frac{\nabla L(x)}{\left\|\nabla L(x)\right\|}\left(P_{\Phi(x),\Gamma}\frac{\nabla L(x)}{\left\|\nabla L(\Phi(x))\right\|}\right)^{\top} and the last step is by Lemma B.9. Here PΦ(x),ΓP_{\Phi(x),\Gamma} denotes the projection matrix of the subspace spanned by v1(x),…,vM(x)v_{1}(x),\ldots,v_{M}(x).

By Lemmas B.22, B.18 and B.19, we have that

Let Lmin=min⁡y∈UL(y)L_{min}=\min_{y\in U}L(y). For any xy‾∈Yϵ\overline{xy}\in Y^{\bm{\epsilon}} where y=x−η∇L(x)∥∇L(x)∥y=x-\eta\frac{\nabla L(x)}{\left\|\nabla L(x)\right\|} is the one step Normalized GD update from xx, if ∥∇L(xη(t))∥≥ζη\left\|\nabla L(x_{\eta}(t))\right\|\geq\bm{\zeta}\eta, we have that

Thus for ∥∇L(xη(t))∥≥ζη\left\|\nabla L(x_{\eta}(t))\right\|\geq\bm{\zeta}\eta, we have that

where the last step is because LL is μ\mu-PL on YϵY^{\bm{\epsilon}}. In other words, we have that

where in the last step we use L(y)−L(x)≤0L(y)-L(x)\leq 0. This completes the proof. ∎

B.2 Properties of limiting map of gradient flow, ΦΦ\Phi

where ζK\bm{\zeta}_{K} denotes sup⁡x∈K∥∇2L(ϕ(x,t))∥\sup_{x\in K}\left\|\nabla^{2}L(\phi(x,t))\right\|. This implies that ∥∇L(ϕ(x,t))∥≤eζKT∥∇L(x)∥\left\|\nabla L(\phi(x,t))\right\|\leq e^{\bm{\zeta}_{K}T}\left\|\nabla L(x)\right\| and ∥ϕ(x,t)−x∥≤eζKT∥∇L(x)∥\left\|\phi(x,t)-x\right\|\leq e^{\bm{\zeta}_{K}T}\left\|\nabla L(x)\right\| for all t∈[0,T]t\in[0,T].

The following results Lemmas B.16, B.17, B.18, B.19, B.20, B.21 and B.22 are from [Li et al., 2022b].

For any x∈Ux\in U, it holds that (1). ∂Φ(x)∇L(x)=0\partial\Phi(x)\nabla L(x)=0 and (2). ∂2Φ(x)[∇L(x),∇L(x)]=−∂Φ(x)∇2L(x)∇L(x)\partial^{2}\Phi(x)[\nabla L(x),\nabla L(x)]=-\partial\Phi(x)\nabla^{2}L(x)\nabla L(x).

We will also use the following two corollaries of Lemma B.22.

For any x∈Γx\in\Gamma, let v1v_{1} be a top eigenvector of ∇2L(x)\nabla^{2}L(x), then

Simply note that L∇2L(x)−1(v1v1⊤)=12λ1(∇2L(x))v1v1⊤\mathcal{L}^{-1}_{\nabla^{2}L(x)}(v_{1}v_{1}^{\top})=\frac{1}{2\lambda_{1}(\nabla^{2}L(x))}v_{1}v_{1}^{\top} and apply Lemma B.22. ∎

For any x∈Γx\in\Gamma, let v1v_{1} be the unit top eigenvector of ∇2L(x)\nabla^{2}L(x), then

The proof follows from using Corollary B.23 and the derivative of λ1\lambda_{1} from Theorem F.1. ∎

As a variant of Corollary B.24, we have the following lemma.

For any x∈Γx\in\Gamma, let v1v_{1} be the unit top eigenvector of ∇2L(x)\nabla^{2}L(x), then

Appendix C Analysis of Normalized GD on General Loss Functions

We restate the theorem concerning Phase I for the Normalized GD algorithm. Recall the following notation for each 1≤j≤M1\leq j\leq M:

See 4.3 The intuition behind the above theorem is that for sufficiently small LR η\eta, xη(t)x_{\eta}(t) will track the normalized gradient flow starting from xinitx_{\text{init}}, which is a time-rescaled version of the standard gradient flow. Thus the normalized GF will enter YϵY^{\bm{\epsilon}} and so does normalized GD. Since LL satisfies PL condition in YϵY^{\bm{\epsilon}}, the loss converges quickly and the iterate xη(t)x_{\eta}(t) gets η\mathcal{\eta} to manifold. To finish, we need the following theorem, which is the approximately-quadratic version of Lemma 3.3 when the iterate is O(η){O}(\eta) close to the manifold.

Suppose {xη(t)}t≥0\{x_{\eta}(t)\}_{t\geq 0} are iterates of Normalized GD (4) with a learning rate η\eta and xη(0)=xinitx_{\eta}(0)=x_{\text{init}}. There is a constant C>0C>0, such that for any constant ς>1\bm{\varsigma}>1, if at some time t′t^{\prime}, xη(t′)∈Yϵx_{\eta}(t^{\prime})\in Y^{\bm{\epsilon}} and satisfies ∥xη(t′)−Φ(xη(t′))∥η≤ς\frac{\left\|x_{\eta}(t^{\prime})-\Phi(x_{\eta}(t^{\prime}))\right\|}{\eta}\leq\bm{\varsigma}, then for all tˉ≥t′+Cζςμlog⁡ςζμ\bar{t}\geq t^{\prime}+C\frac{\bm{\zeta}\bm{\varsigma}}{\bm{\mu}}\log\frac{\bm{\varsigma}\bm{\zeta}}{\bm{\mu}}, the following must hold true for all 1≤j≤M1\leq j\leq M:

provided that for all steps t∈{t′,…,tˉ−1}t\in\{t^{\prime},\ldots,\bar{t}-1\}, xη(t)xη(t+1)‾⊂Yϵ\overline{x_{\eta}(t)x_{\eta}(t+1)}\subset Y^{\bm{\epsilon}}.

The proof of the above theorem is in Section D.1.

Let TxT_{x} be the length of the GF trajectory starting from xx, and we know lim⁡τ→Txϕ‾(x,τ)=Φ(x)\lim_{\tau\to T_{x}}\overline{\phi}(x,\tau)=\Phi(x), where ϕ‾(x,τ)\overline{\phi}(x,\tau) is defined as the Normalized gradient flow starting from xx. In Lemmas B.5 and B.2 we show there is a small neighbourhood around Φ(xinit)\Phi(x_{\text{init}}), YϵY^{\bm{\epsilon}} such that LL is μ\bm{\mu}-PL in YϵY^{\bm{\epsilon}}. Thus we can take some time T0<TxinitT_{0}<T_{x_{\text{init}}} such that ϕ‾(xinit,T0)∈Yϵ/2\overline{\phi}(x_{\text{init}},T_{0})\in Y^{{\bm{\epsilon}}/2} and L(ϕ‾(xinit),T0)≤12LcriticalL(\overline{\phi}(x_{\text{init}}),T_{0})\leq\frac{1}{2}{L_{\text{critical}}}, where Lcritical:=ϵ2μ8{L_{\text{critical}}}:=\frac{{\bm{\epsilon}}^{2}\bm{\mu}}{8}. (Without loss of generality, we assume min⁡y∈YL(y)=0\min_{y\in Y}L(y)=0) By standard ODE approximation theory, we know there is some small η0\eta_{0}, such that for all η≤η0\eta\leq\eta_{0}, ∥xη(⌈T0/η⌉)−ϕ‾(xinit,T0)∥=O(η)\left\|x_{\eta}(\lceil T_{0}/\eta\rceil)-\overline{\phi}(x_{\text{init}},T_{0})\right\|={O}(\eta), where O(⋅){O}(\cdot) hides constants depending on the initialization xinitx_{\text{init}} and the loss function LL.

Without loss of generality, we can assume η0\eta_{0} is small enough such that xη(⌈T0/η⌉)∈Yϵx_{\eta}(\lceil T_{0}/\eta\rceil)\in Y^{\bm{\epsilon}} and L(xη(⌈T0/η⌉))≤LcriticalL(x_{\eta}(\lceil T_{0}/\eta\rceil))\leq{L_{\text{critical}}}. Now let tηt_{\eta} be the smallest integer (yet still larger than ⌈T0/η⌉\lceil T_{0}/\eta\rceil) such that xη(tη)xη(tη−1)‾⊄Yϵ\overline{x_{\eta}(t_{\eta})x_{\eta}(t_{\eta}-1)}\not\subset Y^{\bm{\epsilon}} and we claim that there is t∈{⌈T0/η⌉,…,tη}t\in\{\lceil T_{0}/\eta\rceil,\ldots,t_{\eta}\}, ∥∇L(xη(t))∥<ζη\left\|\nabla L(x_{\eta}(t))\right\|<\bm{\zeta}\eta. By the definition of tηt_{\eta}, we know for any t∈{⌈T0/η⌉+1,…,tη−1}t\in\{\lceil T_{0}/\eta\rceil+1,\ldots,t_{\eta}-1\}, by Lemma B.11 we have ∥Φ(xη(t))−Φ(xη(t−1))∥≤ξη2,\left\|\Phi(x_{\eta}(t))-\Phi(x_{\eta}(t-1))\right\|\leq\bm{\xi}\eta^{2}, and by Lemma B.13, L(xη(t))−xη(t−1)≤−η2μ4\sqrt{L(x_{\eta}(t))}-\sqrt{x_{\eta}(t-1)}\leq-\eta\frac{\sqrt{2\bm{\mu}}}{4} if ∥∇L(xη(t))∥≥ζη\left\|\nabla L(x_{\eta}(t))\right\|\geq\bm{\zeta}\eta. If the claim is not true, since L(xη(t))\sqrt{L(x_{\eta}(t))} decreases η2μ4\eta\frac{\sqrt{2\bm{\mu}}}{4} per step, we have

which implies that tη−⌈T0/η⌉−1≤ϵηt_{\eta}-\lceil T_{0}/\eta\rceil-1\leq\frac{{\bm{\epsilon}}}{\eta}, and therefore by Lemma B.11,

Meanwhile, by Lemma B.6, we have ∥Φ(xη(tη−1))−xη(tη−1)∥≤2L(xη(tη−1))μ≤2L(xη(⌈T0/η⌉))μ=ϵ2\left\|\Phi(x_{\eta}(t_{\eta}-1))-x_{\eta}(t_{\eta}-1)\right\|\leq\sqrt{\frac{2L(x_{\eta}(t_{\eta}-1))}{\bm{\mu}}}\leq\sqrt{\frac{2L(x_{\eta}(\lceil T_{0}/\eta\rceil))}{\bm{\mu}}}=\frac{{\bm{\epsilon}}}{2}. Thus for any κ∈\kappa\in, we have ∥κxη(tη)+(1−κ)xη(tη−1)−Φ(xinit)∥\left\|\kappa x_{\eta}(t_{\eta})+(1-\kappa)x_{\eta}(t_{\eta}-1)-\Phi(x_{\text{init}})\right\| is upper bounded by

which is smaller than ϵ{\bm{\epsilon}} since we can set η0\eta_{0} sufficiently small. In other words, Φ(xη(tη))Φ(xη(tη−1))‾⊂Yϵ\overline{\Phi(x_{\eta}(t_{\eta}))\Phi(x_{\eta}(t_{\eta}-1))}\subset Y^{\bm{\epsilon}}, which contradicts with the definition of tηt_{\eta}. So far we have proved our claim that there is some tη′∈{⌈T0/η⌉,…,tη}t^{\prime}_{\eta}\in\{\lceil T_{0}/\eta\rceil,\ldots,t_{\eta}\}, ∥∇L(xη(tη′))∥<ζη\left\|\nabla L(x_{\eta}(t^{\prime}_{\eta}))\right\|<\bm{\zeta}\eta. Moreover, since L(xη(t))\sqrt{L(x_{\eta}(t))} decreases η2μ4\eta\frac{\sqrt{2\bm{\mu}}}{4} per step before tη′t^{\prime}_{\eta}, we know tη′−⌈T0/η⌉≤ϵηt^{\prime}_{\eta}-\lceil T_{0}/\eta\rceil\leq\frac{{\bm{\epsilon}}}{\eta}. By Lemma B.6, we know ∥xη(tη′)−Φ(xη(tη′))∥≤ζημ\left\|x_{\eta}(t^{\prime}_{\eta})-\Phi(x_{\eta}(t^{\prime}_{\eta}))\right\|\leq\frac{\bm{\zeta}\eta}{\bm{\mu}}.

Now we claim that for any T1′T_{1}^{\prime}, there is some sufficiently small threshold η0\eta_{0}, tη≥T1′η+1t_{\eta}\geq\frac{T_{1}^{\prime}}{\eta}+1 if η≤η0\eta\leq\eta_{0}. Below we prove this claim by contradiction. If the claim is not true, that is, tη<T1′η+1t_{\eta}<\frac{T_{1}^{\prime}}{\eta}+1. if tη≤Cζςμlog⁡ςζμ+tη′t_{\eta}\leq C\frac{\bm{\zeta}\bm{\varsigma}}{\bm{\mu}}\log\frac{\bm{\varsigma}\bm{\zeta}}{\bm{\mu}}+t^{\prime}_{\eta} with ς=ζμ\bm{\varsigma}=\frac{\bm{\zeta}}{\bm{\mu}}, we know ∥xη(tη)−Φ(xinit)∥≤∥xη(tη)−xη(tη′)∥+∥xη(tη′)−Φ(xη(tη′))∥+∥Φ(xη(tη′))−Φ(xinit)∥=O(η)\left\|x_{\eta}(t_{\eta})-\Phi(x_{\text{init}})\right\|\leq\left\|x_{\eta}(t_{\eta})-x_{\eta}(t^{\prime}_{\eta})\right\|+\left\|x_{\eta}(t^{\prime}_{\eta})-\Phi(x_{\eta}(t^{\prime}_{\eta}))\right\|+\left\|\Phi(x_{\eta}(t^{\prime}_{\eta}))-\Phi(x_{\text{init}})\right\|={O}(\eta), which implies that xη(tη)xη(tη−1)‾∈Y\overline{x_{\eta}(t_{\eta})x_{\eta}(t_{\eta}-1)}\in Y. If tη≥Cζςμlog⁡ςζμ+tη′t_{\eta}\geq C\frac{\bm{\zeta}\bm{\varsigma}}{\bm{\mu}}\log\frac{\bm{\varsigma}\bm{\zeta}}{\bm{\mu}}+t^{\prime}_{\eta}, by Lemma C.1, we have ∥xη(tη)−Φ(xη(tη))∥=O(η)\left\|x_{\eta}(t_{\eta})-\Phi(x_{\eta}(t_{\eta}))\right\|={O}(\eta). By Lemma B.11, we have ∥Φ(xη(tη))−Φ(xη(⌈T0/η⌉))∥≤O(η)\left\|\Phi(x_{\eta}(t_{\eta}))-\Phi(x_{\eta}(\lceil T_{0}/\eta\rceil))\right\|\leq{O}(\eta). Thus again we have that ∥xη(tη)−Φ(xinit)∥≤∥xη(tη)−Φ(xη(tη))∥+∥Φ(xη(tη))−Φ(xη(⌈T0/η⌉))∥+∥Φ(xη(⌈T0/η⌉))−Φ(xinit)∥=O(η)\left\|x_{\eta}(t_{\eta})-\Phi(x_{\text{init}})\right\|\leq\left\|x_{\eta}(t_{\eta})-\Phi(x_{\eta}(t_{\eta}))\right\|+\left\|\Phi(x_{\eta}(t_{\eta}))-\Phi(x_{\eta}(\lceil T_{0}/\eta\rceil))\right\|\allowbreak+\left\|\Phi(x_{\eta}(\lceil T_{0}/\eta\rceil))-\Phi(x_{\text{init}})\right\|={O}(\eta), which implies that xη(tη)xη(tη−1)‾∈Y\overline{x_{\eta}(t_{\eta})x_{\eta}(t_{\eta}-1)}\in Y. In both cases, the implication is in contradiction to the definition of tηt_{\eta}.

Thus for any T1′T_{1}^{\prime}, tη≥T1′η+1t_{\eta}\geq\frac{T_{1}^{\prime}}{\eta}+1 for sufficiently small threshold η0\eta_{0} and η≤η0\eta\leq\eta_{0}. To complete the proof of Theorem 4.3, we pick T1T_{1} to be any real number strictly larger than ϵ+T0{\bm{\epsilon}}+T_{0}, as T1η>Cζςμlog⁡ςζμ+ϵη+⌈T0/η⌉≥Cζςμlog⁡ςζμ+tη′\frac{T_{1}}{\eta}>C\frac{\bm{\zeta}\bm{\varsigma}}{\bm{\mu}}\log\frac{\bm{\varsigma}\bm{\zeta}}{\bm{\mu}}+\frac{{\bm{\epsilon}}}{\eta}+\lceil T_{0}/\eta\rceil\geq C\frac{\bm{\zeta}\bm{\varsigma}}{\bm{\mu}}\log\frac{\bm{\varsigma}\bm{\zeta}}{\bm{\mu}}+t^{\prime}_{\eta} when η\eta is sufficiently small with ς=ζμ\bm{\varsigma}=\frac{\bm{\zeta}}{\bm{\mu}}. By Lemma C.1 the second claim of Theorem 4.3 is proved. Using the same argument again, we know ∀T1η≤t≤T1′η\forall\frac{T_{1}}{\eta}\leq t\leq\frac{T_{1}^{\prime}}{\eta}, it holds that ∥Φ(xη(t))−Φ(xinit)∥≤O(η)\left\|\Phi(x_{\eta}(t))-\Phi(x_{\text{init}})\right\|\leq{O}(\eta). ∎

C.2 Phase II, Limiting Flow

We first restate the main theorem that demonstrates that the trajectory implicitly minimizes sharpness. See 4.4

where v′(τ′+0):=lim⁡δ→0v(τ′+δ)−v(τ′)δv^{\prime}(\tau^{\prime}+0):=\lim_{\delta\to 0}\frac{v(\tau^{\prime}+\delta)-v(\tau^{\prime})}{\delta} is the right time derivative of vv at τ′\tau^{\prime}.

To prove the first claim, we first show the movement in the manifold for the discrete trajectory for Algorithm 1 by Lemma B.12: for each step tt, provided Φ(xη(t))Φ(xη(t+1))‾∈Yϵ\overline{\Phi(x_{\eta}(t))\Phi(x_{\eta}(t+1))}\in Y^{\bm{\epsilon}}, it holds that

The high-level idea for the proof of the first claim is to bound the gap between Equation 26 and Equation 5 using Theorem C.2. And the first claim eventually boils down to upper bound the average angle by O(η)O(\eta), which is exactly the second claim.

Formally, let t2t_{2} be the largest integer no larger than ⌊T2/η2⌋\lfloor T_{2}/\eta^{2}\rfloor such that for any 0≤t≤t20\leq t\leq t_{2}, it holds that Φ(xη(t))Φ(xη(t+1))‾∈Yϵ\overline{\Phi(x_{\eta}(t))\Phi(x_{\eta}(t+1))}\in Y^{\bm{\epsilon}}.

Since we started from a point that has max⁡1≤j≤MRj(xη(0))≤O(η2)\max_{1\leq j\leq M}R_{j}(x_{\eta}(0))\leq O(\eta^{2}), we have from Lemma C.1, that the iterate satisfies the condition max⁡1≤j≤MRj(xη(t))≤O(η2)\max_{1\leq j\leq M}R_{j}(x_{\eta}(t))\leq O(\eta^{2}) at step tt as well, meaning that ∥xη(t)−Φ(xη(t))∥≤O(η)\left\|x_{\eta}(t)-\Phi(x_{\eta}(t))\right\|\leq O(\eta).

Therefore, for any τ≤t2η2\tau\leq t_{2}\eta^{2}, note that v′(τ+0)=v′(⌊τ/η2⌋+0)v^{\prime}(\tau+0)=v^{\prime}(\lfloor\tau/\eta^{2}\rfloor+0) and that ∥f(v(⌊τ/η2⌋+0))−f(v(τ))∥=O(∥Φ(xη(⌊τ/η2⌋+1))−Φ(xη(⌊τ/η2⌋))∥)=O(η2)\left\|f(v(\lfloor\tau/\eta^{2}\rfloor+0))-f(v(\tau))\right\|=O(\left\|\Phi(x_{\eta}(\lfloor\tau/\eta^{2}\rfloor+1))-\Phi(x_{\eta}(\lfloor\tau/\eta^{2}\rfloor))\right\|)=O(\eta^{2}), we have that

where in the last step we use the second claim. This implies that t2t_{2} must be equal to ⌊T2/η2⌋\lfloor T_{2}/\eta^{2}\rfloor for sufficiently small η\eta otherwise xη(t2)xη(t2+1)‾⊆Yϵ\overline{x_{\eta}(t_{2})x_{\eta}(t_{2}+1)}\subseteq Y^{\bm{\epsilon}}. This is because ∥xη(t2+1)−xη(t2)∥=O(η)\left\|x_{\eta}(t_{2}+1)-x_{\eta}(t_{2})\right\|=O(\eta) and X(t2η2)∈YX(t_{2}\eta^{2})\in Y. The proof is completed by noting that ∥X(T2)−X(⌊T2/η2⌋)∥=O(η2)\left\|X(T_{2})-X(\lfloor T_{2}/\eta^{2}\rfloor)\right\|=O(\eta^{2}). ∎

Appendix D Phase I, Omitted Proofs of the Main Lemmas

The Normalized GD update at any step tt can be written as (from Lemma B.9)

From Lemma B.11, we have ∥Φ(xη(t))−Φ(xη(t+1))∥≤O(ξη2)\left\|\Phi(x_{\eta}(t))-\Phi(x_{\eta}(t+1))\right\|\leq{O}(\bm{\xi}\eta^{2}), which further implies, ∥∇2L(Φ(xη(t+1)))−∇2L(Φ(xη(t)))∥≤O(νξη2)\left\|\nabla^{2}L(\Phi(x_{\eta}(t+1)))-\nabla^{2}L(\Phi(x_{\eta}(t)))\right\|\leq{O}(\bm{\nu}\bm{\xi}\eta^{2}). Thus, using the notation x~=∇2L(Φ(x))(x−Φ(x))\widetilde{x}=\nabla^{2}L(\Phi(x))(x-\Phi(x)), we have

Below we will show that ∥xη(t)−Φ(xη(t))∥≤O(η)\left\|x_{\eta}(t)-\Phi(x_{\eta}(t))\right\|\leq{O}(\eta), and thus the trajectory of x~η\widetilde{x}_{\eta} is similar to the trajectory in the qudratic model with an O(η2){O}(\eta^{2}) error, with the hessian fixed at ∇2L(Φ(xη(t)))\nabla^{2}L(\Phi(x_{\eta}(t))), and hence we can apply the same techniques from Corollary A.4 and Lemma A.1.

First, we consider the norm of the vector x~η(t)\widetilde{x}_{\eta}(t) for t′+1≤t≤t‾t^{\prime}+1\leq t\leq\overline{t}. We will show the following induction hypothesis:

Base case: (t=t′)(t=t^{\prime}). We have ∥x~η(t′)∥=∥∇2L(Φ(xη(t′)))[xη(t′)−Φ(xη(t′))]∥≤ηλ1(t)ς≤ηζς\left\|\widetilde{x}_{\eta}(t^{\prime})\right\|=\left\|\nabla^{2}L(\Phi(x_{\eta}(t^{\prime})))[x_{\eta}(t^{\prime})-\Phi(x_{\eta}(t^{\prime}))]\right\|\leq\eta\lambda_{1}(t)\bm{\varsigma}\leq\eta\bm{\zeta}\bm{\varsigma}.

Induction case:(t>t′)(t>t^{\prime}). Suppose the hypothesis holds true for t−1t-1. Then,

If ∥x~η(t−1)∥≥ηλ1(t)\left\|\widetilde{x}_{\eta}(t-1)\right\|\geq\eta\lambda_{1}(t). We can directly apply Corollary A.3 on (28) to show that

where the final step follows if η\eta is sufficiently small. Hence, ∥x~η(t)∥<∥x~η(t−1)∥≤ηζς\left\|\widetilde{x}_{\eta}(t)\right\|<\left\|\widetilde{x}_{\eta}(t-1)\right\|\leq\eta\bm{\zeta}\bm{\varsigma}.

If ∥x~η(t−1)∥≤ηλ1(t)\left\|\widetilde{x}_{\eta}(t-1)\right\|\leq\eta\lambda_{1}(t). Then, we can directly apply Lemma A.1 on (28) to show that

Hence, we have shown that, ∥xη(t)−Φ(xη(t))∥≤1λM(t)∥x~η(t)∥≤1.01ηςζμ\left\|x_{\eta}(t)-\Phi(x_{\eta}(t))\right\|\leq\frac{1}{\lambda_{M}(t)}\left\|\widetilde{x}_{\eta}(t)\right\|\leq\frac{1.01\eta\bm{\varsigma}\bm{\zeta}}{\bm{\mu}} for all time t′≤t≤t‾t^{\prime}\leq t\leq\overline{t}.

We complete the proof of Lemma C.1 with a similar argument as that for the quadratic model (see Corollary A.4 and Lemma A.1). The major difference from the quadratic model is that here the hessian changes over time, along with its eigenvectors and eigenvalues. Hence, we need to take care of the errors introduced in each step by the change of hessian.

The high-level idea is to divide the eigenvalues at each step tt into groups such that eigenvalues in the same group are O(η)O(\eta) close and eigenvalues from different groups are at least 2η2\eta far away from each other. Formally, we divide [M][M] into disjoint subsets S1(t),⋯ ,Sp(t)(t)S^{(t)}_{1},\cdots,S^{(t)}_{p(t)} (with 1≤p(t)≤M1\leq p(t)\leq M) such that

Thus for any t′≤t≤t‾−1t^{\prime}\leq t\leq\overline{t}-1 and k∈[p(t)]k\in[p(t)], suppose i∈Sk(t)i\in S^{(t)}_{k} and j=min⁡Sk(t)j=\min S^{(t)}_{k}, we have that

and ηλi(t+1)≥ηλi(t)−O(η2)≥ηλj(t)−O(η2).\eta\lambda_{i}(t+1)\geq\eta\lambda_{i}(t)-O(\eta^{2})\geq\eta\lambda_{j}(t)-O(\eta^{2}).

Next we will use the results from the quadratic case to upper bound ∑h=jM⟨vh(t),x~η(t+1)⟩2\sqrt{\sum_{h=j}^{M}\langle v_{h}(t),\widetilde{x}_{\eta}(t+1)\rangle^{2}} using ∑h=jM⟨vh(t),x~η(t)⟩2\sqrt{\sum_{h=j}^{M}\langle v_{h}(t),\widetilde{x}_{\eta}(t)\rangle^{2}}. For all 1≤j≤M1\leq j\leq M, we consider the following two cases for any time t′+1≤t≤t‾t^{\prime}+1\leq t\leq\overline{t}:

If ∑h=jM⟨vh(t),x~η(t)⟩2>ηλj(t)\sqrt{\sum_{h=j}^{M}\langle v_{h}(t),\widetilde{x}_{\eta}(t)\rangle^{2}}>\eta\lambda_{j}(t), then we can apply Lemma A.2 on (28) to show that

If ∑h=jM⟨vh(t),x~η(t)⟩2≤ηλj(t)\sqrt{\sum_{h=j}^{M}\langle v_{h}(t),\widetilde{x}_{\eta}(t)\rangle^{2}}\leq\eta\lambda_{j}(t), then we can apply Lemma A.1 on (28) to show that

and therefore following the same proof of quadratic case Corollary A.4, for t‾≥t′+Ω(ςζμlog⁡ζςμ)\overline{t}\geq t^{\prime}+{\Omega}(\frac{\bm{\varsigma}\bm{\zeta}}{\bm{\mu}}\log\frac{\bm{\zeta}\bm{\varsigma}}{\bm{\mu}}), it holds that ∀j∈[M]\forall j\in[M], ∑i=jM⟨vi(tˉ),x~(tˉ)⟩2≤ηλj(tˉ)+O(η2).\sqrt{\sum_{i=j}^{M}\langle v_{i}(\bar{t}),\widetilde{x}(\bar{t})\rangle^{2}}\leq\eta\lambda_{j}(\bar{t})+{O}(\eta^{2}). ∎

D.2 Properties of the condition in Equation 25

By Lemma C.1, the following condition will continue to hold true for all 1≤j≤M1\leq j\leq M before x~η(t)\widetilde{x}_{\eta}(t) leaves YϵY^{\bm{\epsilon}}:

where x~η(t)=∇2L(Φ(xη(t)))(xη(t)−Φ(xη(t))).\widetilde{x}_{\eta}(t)=\nabla^{2}L(\Phi(x_{\eta}(t)))(x_{\eta}(t)-\Phi(x_{\eta}(t))). We will call the above condition as the alignment condition from now onwards.

From the alignment condition (29), we can derive the following property that continues to hold true throughout the trajectory, once the condition is satisfied:

The proof follows from using the noisy quadratic update for Normalized GD in Lemma B.9 (Equation 21) and the behavior in a quadratic model along the non-top eigenvectors in Lemma A.5.

Appendix E Phase II, Omitted Proofs of the Main Lemmas

The main lemma in this section is Lemma E.5 in Section E.2, which says the sum of the angles across the entire trajectory in any interval [0,t2][0,t_{2}] with t2=Ω(1/η2)t_{2}=\Omega(1/\eta^{2}), is at most O(ηt2)O(\eta t_{2}). Before proving the main lemma, we will first recap and introduce some notations that will be used.

In Phase II, we start from a point xη(0)x_{\eta}(0), such that (1) ∥xη(0)−Φ(xinit)∥≤O(η)\left\|x_{\eta}(0)-\Phi(x_{\text{init}})\right\|\leq O(\eta), (2) max⁡j∈[D]Rj(xη(t))≤O(η2)\max_{j\in[D]}R_{j}(x_{\eta}(t))\leq O(\eta^{2}), and additionally (3) ∣⟨v1(xη(0)),xη(0)−Φ(xη(0))⟩∣=Ω(η)\left|\langle v_{1}(x_{\eta}(0)),x_{\eta}(0)-\Phi(x_{\eta}(0))\rangle\right|=\Omega(\eta).

The condition (29) that was shown to hold true in Phase II is:

Further, we had proved in Lemma D.1 that:

The properties of the three sets N0,N1,N2N_{0},N_{1},N_{2} in an interval (t~,t‾)(\widetilde{t},\overline{t}) given directly by the algorithm in Algorithm 3 include:

∀t,t∈N1⟺t+1∈N2\forall t,t\in N_{1}\Longleftrightarrow t+1\in N_{2}.

N0∪N1∪N2=[t~,t‾]N_{0}\cup N_{1}\cup N_{2}=[\widetilde{t},\overline{t}], and the intersection between each pair of them is empty.

We also have the following lemmas, which is less direct:

For any step tt in N0N_{0}, t−1,t+2∈N2t-1,t+2\in N_{2} and t−2,t+1∈N1t-2,t+1\in N_{1}

tan⁡θt+1≤(1−min⁡(Δ,2μ)ζ)tan⁡θt+O(η2Gt)\tan\theta_{t+1}\leq\left(1-\frac{\min(\bm{\Delta},2\bm{\mu})}{\bm{\zeta}}\right)\tan\theta_{t}+O(\frac{\eta^{2}}{G_{t}})

tan⁡θt+2≤ηλ1Gttan⁡θt+O(η2Gt)\tan\theta_{t+2}\leq\frac{\eta\lambda_{1}}{G_{t}}\tan\theta_{t}+O(\frac{\eta^{2}}{G_{t}})

As a direct consequence of Lemma E.3, we have the following lemma:

Given any tt with θt=Ω(1)\theta_{t}=\Omega(1), let t~=max⁡N1∩{t~∣t~≤t}\widetilde{t}=\max N_{1}\cap\{\widetilde{t}\mid\widetilde{t}\leq t\}. If Gt~≥Ω(η)G_{\widetilde{t}}\geq\Omega(\eta), then θt~=Ω(1)\theta_{\widetilde{t}}=\Omega(1).

The claim is clearly true if t∈N1t\in N_{1}. If t∈N0t\in N_{0}, then Lemma E.1 shows that t−1∈N2,t−2∈N1t-1\in N_{2},t-2\in N_{1} and thus t~=t−2\widetilde{t}=t-2. The claim is true because of the second property of Lemma E.3. If t∈N2t\in N_{2}, then t~=t−1∈N1\widetilde{t}=t-1\in N_{1} and the proof is completed by applying the first property of Lemma E.3. ∎

E.2 Time Average of Angles Against Top Eigenspace

provided η\eta is set sufficiently small, and for all time 0≤t≤t2−10\leq t\leq t_{2}-1, xη(t)xη(t+1)‾⊂Yϵ\overline{x_{\eta}(t)x_{\eta}(t+1)}\subset Y^{\bm{\epsilon}}.

We analyze the behavior of a general t~i\widetilde{t}_{i} when it falls in any of the above cases:

Case (B).

From Lemma E.6 we have that the sum of angle over this time is

Case (C).

Now it remains to upper bound the number of occurrence of (A),(B) and (C). Since our goal is to show average angle is O(η)O(\eta), which is equal to the average angle in case (A), so the number of occurrence of case (A) doesn’t matter. For case (B), if it is followed by case (A), then there is an Ω(1/η2)\Omega(1/\eta^{2}) gap before next occurrence of (B). If (B) is followed by case (C), then by Lemma E.10, it takes at least Ω(1/η2)\Omega(1/\eta^{2}) steps to escape from (B). Thus we can have O(1)O(1) occurrence of case (B). For the same reason, there could be at most O(1)O(1) occurrence of case (C).

All in all, with probability at least 1−O(η12⋅η12)=1−O(η10)1-O(\eta^{12}\cdot\eta^{12})=1-O(\eta^{10}), we must have

where we use t2≥Ω(1η2)t_{2}\geq\Omega(\frac{1}{\eta^{2}}) in the last step and and the number of occurrence of case (B) is O(1)O(1) in the second to the last step. ∎

The noisy update rule for Normalized GD, as derived in Lemma B.9, which says that the Normalized GD update is very close to the update in a quadratic model with an additional O(η2)O(\eta^{2}) error. Keeping this in mind, we then divide our trajectory in the interval (t‾,t′)(\overline{t},t^{\prime}) as per Algorithm 3 into three subsets N0,N1,N2N_{0},N_{1},N_{2}. (Please see Section E.1 for a summary on the properties of these 3 sets.)

Consider any t∈N1t\in N_{1}. Using the behavior of GtG_{t} from Lemma E.10, we can show that in each of the time-frames, Gt+2≥(1+Ω(sin⁡2θt))Gt−O(η2(η+ηt))≥Gt+Ω(θt2η)−O(η2(η+θt))G_{t+2}\geq(1+\Omega(\sin^{2}\theta_{t}))G_{t}-O(\eta^{2}(\eta+\eta_{t}))\geq G_{t}+\Omega(\theta_{t}^{2}\eta)-O(\eta^{2}(\eta+\theta_{t})).

Next we want to telescope over Gt+2−GtG_{t+2}-G_{t} to get an upper bound for ∑t∈N1θt\sum_{t\in N_{1}}\theta_{t}. If t+2t+2 is also in N1N_{1} then it’s fine. If t+2∈N0t+2\in N_{0}, then t+3∈N1t+3\in N_{1} by Lemma E.1 and we proceed in the following two cases.

If θt+2≤C\theta_{t+2}\leq C for some sufficiently small constant CC, since Gt+2≤λ1(t+2)η/2−Ω(η)G_{t+2}\leq\lambda_{1}(t+2)\eta/2-\Omega(\eta), we have ∥x~η(t+2)∥≤Gt+2cos⁡θt+2=λ1(t+2)η/2−Ω(η)\left\|\widetilde{x}_{\eta}(t+2)\right\|\leq\frac{G_{t+2}}{\cos\theta_{t+2}}=\lambda_{1}(t+2)\eta/2-\Omega(\eta), and thus by Lemma E.9, we have Gt+3≤Gt+2G_{t+3}\leq G_{t+2} and therefore, Gt+3≥Gt+Ω(θt2η)−O(η2(η+θt))G_{t+3}\geq G_{t}+\Omega(\theta_{t}^{2}\eta)-O(\eta^{2}(\eta+\theta_{t})).

If θt+2≥C\theta_{t+2}\geq C, then by Lemma D.2, we have θt=Ω(1)\theta_{t}=\Omega(1), thus Gt+2≥Gt+Ω(η)G_{t+2}\geq G_{t}+\Omega(\eta) by Lemma E.10. Again by Lemma E.9, we have Gt+3≥Gt+2−O(η2)G_{t+3}\geq G_{t+2}-O(\eta^{2}). Thus again we conclude Gt+3≥Gt+Ω(η)≥Gt+Ω(θt2η)−O(η2(η+θt))G_{t+3}\geq G_{t}+\Omega(\eta)\geq G_{t}+\Omega(\theta_{t}^{2}\eta)-O(\eta^{2}(\eta+\theta_{t})), since θt\theta_{t} is always O(1)O(1).

Since total increase in GtG_{t} during this interval can is most O(η)O(\eta), we conclude that ∑t∈N1θt2=O(1)+η∑t∈N1(η+θt)\sum_{t\in N_{1}}\theta_{t}^{2}=O(1)+\eta\sum_{t\in N_{1}}(\eta+\theta_{t}) and thus it holds that

Moreover, by Lemma E.3, we must have θt<θt−1+O(η)\theta_{t}<\theta_{t-1}+O(\eta) for any time t∈N2t\in N_{2}, and t−1t-1 must be in N1N_{1}. By Lemma E.9, we have θt≤Ω(θt−2)\theta_{t}\leq\Omega(\theta_{t-2}) for any t∈N0t\in N_{0} and t−2t-2 must be in N2N_{2}. That implies,

Consider any coordinate 2≤k≤M2\leq k\leq M. For any constants 0<β0<\bm{\beta}, there is some constant α>0\bm{\alpha}>0 such that for any time step tt where xη(t~)x_{\eta}(\widetilde{t}) is in YϵY^{\bm{\epsilon}}, Gt~≥βηG_{\widetilde{t}}\geq\bm{\beta}\eta, condition (29) holds and ∣⟨vk(t~),x~(t~)⟩∣≥αη2\left|\left\langle v_{k}(\widetilde{t}),\widetilde{x}(\widetilde{t})\right\rangle\right|\geq\bm{\alpha}\eta^{2}, then there is some time t‾≤t+O(ln⁡1/η)\overline{t}\leq t+O\left(\ln 1/\eta\right) such that if for all time t~≤t′<t‾\widetilde{t}\leq t^{\prime}<\overline{t}, xη(t′)xη(t′+1)‾⊂Yϵ\overline{x_{\eta}(t^{\prime})x_{\eta}(t^{\prime}+1)}\subset Y^{\bm{\epsilon}}, then condition (29) holds at time t‾\overline{t} and at least one of the following two conditions hold:

Gt‾≥0.99gt(λk(t‾))G_{\overline{t}}\geq 0.99g_{t}(\lambda_{k}(\overline{t})).

We will prove by contradiction. Suppose neither of the two condition happens, we will show θt\theta_{t} grows exponentially and thus the condition (2) must be false in O(log⁡1/η)O(\log 1/\eta) steps.

Now, we can use Equation 21 (Lemma B.9) to show that the Normalized GD update is equivalent to update in quadratic model, up to an additional O(η2)O(\eta^{2}) error.

Similar to Lemma A.9, consider the coordinate kk, we have that

The third step follows from using the same argument as the one used for the quadratic update in Lemma A.9 and the assumption that Gt≥0.99gt(λk(t))G_{t}\geq 0.99g_{t}(\lambda_{k}(t)). The final step holds true because we can pick α\bm{\alpha} as a large enough constant and by assumption ∣⟨vk(t),x~η(t)⟩∣∣⟨v1(t),x~η(t)⟩∣≥αη\frac{\left|\langle v_{k}(t),\widetilde{x}_{\eta}(t)\rangle\right|}{\left|\langle v_{1}(t),\widetilde{x}_{\eta}(t)\rangle\right|}\geq\bm{\alpha}\eta.

We then bound ∥vk(t‾)−vk(t~)∥\left\|v_{k}(\overline{t})-v_{k}(\widetilde{t})\right\| and ∥Φ(xη(t‾)−Φ(xη(t~))∥\left\|\Phi(x_{\eta}(\overline{t})-\Phi(x_{\eta}(\widetilde{t}))\right\| by O(η2(t‾−t~))O(\eta^{2}(\overline{t}-\widetilde{t})) using Lemma B.11. Combining everything, we conclude that at least one of the two assumptions has to break for some t‾≤t~+O(log⁡1/η)\overline{t}\leq\widetilde{t}+O(\log 1/\eta). ∎

Consider any coordinate 2≤k≤M2\leq k\leq M. For any constants 0<β0<\bm{\beta}, suppose at time step tt, xη(t)x_{\eta}(t) is in YϵY^{\bm{\epsilon}}, (1.01)gt(λk(t))η≤Gt<0.5ηλ1(t)\left(1.01\right)g_{t}(\lambda_{k}(t))\eta\leq G_{t}<0.5\eta\lambda_{1}(t) and condition (29) holds, then there is some time t‾≤t+O(ln⁡1/η)\overline{t}\leq t+O\left(\ln 1/\eta\right) such that if for all time t≤t′<t‾t\leq t^{\prime}<\overline{t}, xη(t′)xη(t′+1)‾⊂Yϵ\overline{x_{\eta}(t^{\prime})x_{\eta}(t^{\prime}+1)}\subset Y^{\bm{\epsilon}}, then the following two conditions hold:

The proof of Lemma E.8 is very similar to the proof of Lemma E.7 and thus we omit the proof. The only difference will be that we need to use Lemma A.10 in place of Lemma A.9, when we use the result for the quadratic model.

E.3 Dynamics in the Top Eigenspace

Here, we will state two important lemmas that we used for the proof of Lemma E.5, which is about the behavior of the iterate along the top eigenvector. Lemma E.10 can be viewed as perturbed version for Lemma A.7 in the quadratic case, and We assume in all the lemmas, that Equation 29 holds true for the time under consideration, which we showed in Lemma C.1, and also that we start Phase II from a point where the alignment along the top eigenvector is non negligible.

The following lemmas give the properties of dynamics in the top eigenspace in Phase II for one-step and two-step updates respectively. Recall we use GtG_{t} to denote the quantity ∣⟨v1(t),x~(t)⟩∣\left|\left\langle v_{1}(t),\widetilde{x}(t)\right\rangle\right|.

provided that xη(t)xη(t+1)‾,xη(t+1)xη(t+2)‾⊂Yϵ\overline{x_{\eta}(t)x_{\eta}(t+1)},\overline{x_{\eta}(t+1)x_{\eta}(t+2)}\subset Y^{\bm{\epsilon}}.

provided that xη(t)xη(t+1)‾,xη(t+1)xη(t+2)‾⊂Yϵ\overline{x_{\eta}(t)x_{\eta}(t+1)},\overline{x_{\eta}(t+1)x_{\eta}(t+2)}\subset Y^{\bm{\epsilon}}.

First note that ∠(x~η(t),∇L(xη(t)))=O(∥x~η(t)−∇L(xη(t))∥∥x~η(t)∥)=O(η2Gt)=O(η)\angle(\widetilde{x}_{\eta}(t),\nabla L(x_{\eta}(t)))=O(\frac{\left\|\widetilde{x}_{\eta}(t)-\nabla L(x_{\eta}(t))\right\|}{\left\|\widetilde{x}_{\eta}(t)\right\|})=O(\frac{\eta^{2}}{G_{t}})=O(\eta), where the last step we use Lemma B.9. Let δ=∠(v1(t),∇L(xη(t)))−∠(v1(t),x~η(t))\delta=\angle(v_{1}(t),\nabla L(x_{\eta}(t)))-\angle(v_{1}(t),\widetilde{x}_{\eta}(t)) and we have ∣δ∣≤∠(x~η(t),∇L(xη(t)))=O(η)\left|\delta\right|\leq\angle(\widetilde{x}_{\eta}(t),\nabla L(x_{\eta}(t)))=O(\eta). Therefore, it holds that

From Lemma B.11, we have ∥Φ(xη(t))−Φ(xη(t+1))∥≤O(ξη2)\left\|\Phi(x_{\eta}(t))-\Phi(x_{\eta}(t+1))\right\|\leq O(\bm{\xi}\eta^{2}), which further implies, ∥∇2L(Φ(xη(t+1)))−∇2L(Φ(xη(t)))∥≤O(η2)\left\|\nabla^{2}L(\Phi(x_{\eta}(t+1)))-\nabla^{2}L(\Phi(x_{\eta}(t)))\right\|\leq O(\eta^{2}). Thus, we can use Theorem F.4 to have ∥v1(t)−v1(t+1)∥≤O(νξη2λ1(t)−λ2(t))=O(η2)\left\|v_{1}(t)-v_{1}(t+1)\right\|\leq O(\frac{\bm{\nu}\bm{\xi}\eta^{2}}{\lambda_{1}(t)-\lambda_{2}(t)})=O(\eta^{2}). From Lemma B.12, we have ∣⟨v1(t),Φ(xη(t+1))−Φ(xη(t))⟩∣≤O(η3)\left|\langle v_{1}(t),\Phi(x_{\eta}(t+1))-\Phi(x_{\eta}(t))\rangle\right|\leq O(\eta^{3}). Thus we have that

Therefore, we have the following inequality by applying the same argument above to t+1t+1:

By Lemma D.1, we know ∥x~(t+1)∥=Ω(η)\left\|\widetilde{x}(t+1)\right\|=\Omega(\eta). By Lemma D.2, we know that θt+1≤θt+O(η)\theta_{t+1}\leq\theta_{t}+O(\eta). Thus

Next we will show ∣∥x~η(t+1)∥−∥(I−η∇2L(Φ(xη(t)))∥x~η(t)∥)x~η(t)∥∣=O(η2θt)\left|\left\|\widetilde{x}_{\eta}(t+1)\right\|-\left\|(I-\frac{\eta\nabla^{2}L(\Phi(x_{\eta}(t)))}{\left\|\widetilde{x}_{\eta}(t)\right\|})\widetilde{x}_{\eta}(t)\right\|\right|=O(\eta^{2}\theta_{t}). For convenience, we denote ∇2L(Φ(xη(t)))\nabla^{2}L(\Phi(x_{\eta}(t))) by HH. First we have that

where α\alpha is the angle between ∇L(xη(t))∥∇L(xη(t))∥−x~η(t)∥x~η(t)∥\frac{\nabla L(x_{\eta}(t))}{\left\|\nabla L(x_{\eta}(t))\right\|}-\frac{\widetilde{x}_{\eta}(t)}{\left\|\widetilde{x}_{\eta}(t)\right\|} and 2Hx~η(t)−ηH2(∇L(xη(t))∥∇L(xη(t))∥+x~η(t)∥x~η(t)∥)2H\widetilde{x}_{\eta}(t)-\eta H^{2}\left(\frac{\nabla L(x_{\eta}(t))}{\left\|\nabla L(x_{\eta}(t))\right\|}+\frac{\widetilde{x}_{\eta}(t)}{\left\|\widetilde{x}_{\eta}(t)\right\|}\right). Note that and that both ∠(x~η(t),v1(t)),∠(∇L(xη(t)),v1(t))=O(ηt+η)\angle(\widetilde{x}_{\eta}(t),v_{1}(t)),\angle(\nabla L(x_{\eta}(t)),v_{1}(t))=O(\eta_{t}+\eta), we have that the angle between ∇L(xη(t))∥∇L(xη(t))∥+x~η(t)∥x~η(t)∥\frac{\nabla L(x_{\eta}(t))}{\left\|\nabla L(x_{\eta}(t))\right\|}+\frac{\widetilde{x}_{\eta}(t)}{\left\|\widetilde{x}_{\eta}(t)\right\|} and 2Hx~η(t)−ηH2(∇L(xη(t))∥∇L(xη(t))∥+x~η(t)∥x~η(t)∥)2H\widetilde{x}_{\eta}(t)-\eta H^{2}\left(\frac{\nabla L(x_{\eta}(t))}{\left\|\nabla L(x_{\eta}(t))\right\|}+\frac{\widetilde{x}_{\eta}(t)}{\left\|\widetilde{x}_{\eta}(t)\right\|}\right) is at most O(ηt+η)O(\eta_{t}+\eta). Further note that ∇L(xη(t))∥∇L(xη(t))∥−x~η(t)∥x~η(t)∥\frac{\nabla L(x_{\eta}(t))}{\left\|\nabla L(x_{\eta}(t))\right\|}-\frac{\widetilde{x}_{\eta}(t)}{\left\|\widetilde{x}_{\eta}(t)\right\|} is perpendicular to ∇L(xη(t))∥∇L(xη(t))∥+x~η(t)∥x~η(t)∥\frac{\nabla L(x_{\eta}(t))}{\left\|\nabla L(x_{\eta}(t))\right\|}+\frac{\widetilde{x}_{\eta}(t)}{\left\|\widetilde{x}_{\eta}(t)\right\|}, we know cos⁡α≤O(θt+η)\cos\alpha\leq O(\theta_{t}+\eta). Therefore we have that

Thus we have proved a perturbed version of Lemma A.6, that is,

Therefore a perturbed version of Lemma A.7 would give us:

The proof of the first inequality is completed by plugging the above equation into Equation 32.

The second inequality is immediate by noting that ηθt2+C2η3≥2Cη2θt\eta\theta^{2}_{t}+C^{2}\eta^{3}\geq 2C\eta^{2}\theta_{t} for any C>0C>0. ∎

E.4 Dynamics in Top Eigenspace When Dropping Below Threshold

Denote r=η100r=\eta^{100}. For any constant 0<β0<\bm{\beta}, there is a constant α>0\bm{\alpha}>0, such that for any step tt and xη(t)∈Yϵx_{\eta}(t)\in Y^{\bm{\epsilon}} with the following conditions hold:

∣⟨vi(t),x~η(t)⟩∣≤O(η2),\left|\langle v_{i}(t),\widetilde{x}_{\eta}(t)\rangle\right|\leq O(\eta^{2}), for all 2≤i≤M.2\leq i\leq M.

Lemma E.11 is a direct consequence of the following lemma.

where Pt,Γ(2:M)P_{t,\Gamma}^{(2:M)} denotes the subspace spanned by v2(t),…,vM(t)v_{2}(t),\ldots,v_{M}(t).

We will first prove Lemma E.11 and then we turn to the proof of Lemma E.12.

For convenience, we denote ∇2L(Φ(xη(t)))[u(t~)−Φ(xη(t))]\nabla^{2}L(\Phi(x_{\eta}(t)))[u(\widetilde{t})-\Phi(x_{\eta}(t))] by u~(t~)\widetilde{u}(\widetilde{t}) and ∇2L(Φ(xη(t)))[w(t~)−Φ(xη(t))]\nabla^{2}L(\Phi(x_{\eta}(t)))[w(\widetilde{t})-\Phi(x_{\eta}(t))] by w~(t~)\widetilde{w}(\widetilde{t}). Suppose both ∥Pt,Γ(2:M)u~(t~)∥,∥Pt,Γ(2:M)v~(t~)∥\left\|P_{t,\Gamma}^{(2:M)}\widetilde{u}(\widetilde{t})\right\|,\left\|P_{t,\Gamma}^{(2:M)}\widetilde{v}(\widetilde{t})\right\| are O(η2)O(\eta^{2}), we will show the following, which indicates the contradiction:

An important claim to note is the following:

Note that the condition has been slightly changed to use {vi(t)}\{v_{i}(t)\} as reference coordinate system and Φ(xη(t))\Phi(x_{\eta}(t)) as reference point. The above lemma follows from the fact that both u(0)u(0) and w(0)w(0) are rr-close to xη(t)x_{\eta}(t), which itself satisfies the alignment condition (Equation 29). Thus, both u(0)u(0) and w(0)w(0) initially follow the desired condition. Since, both the trajectories follow Normalized GD updates, the proof will follow from applying the same technique used in the proof of Lemma C.1. Another result to keep in mind is the following modified version of Corollary D.3, Lemma E.14.

The above lemma uses {vi(t)}\{v_{i}(t)\} as reference coordinate system and Φ(xη(t))\Phi(x_{\eta}(t)) as reference point. The above lemma follows from showcasing Normalized GD updates of u(t~)u(\widetilde{t}) and w(t~)w(\widetilde{t}) as equivalent to the update in a quadratic model, with an additional noise of O(νζμη2)O(\frac{\bm{\nu}\bm{\zeta}}{\bm{\mu}}\eta^{2}), similar to Equation 28.

Further, applying the same technique from Lemma E.10, we can show that

Initially, because uu was initialized close to xη(t)x_{\eta}(t), we must have

Now, we use taylor expansion of FF around u(t~)u(\widetilde{t}) to get

Using taylor expansion: ∇L(z(γ))=∇2L(Φ(xη(t)))(z(γ)−Φ(xη(t)))+O(ν∥z(γ)−Φ(xη(t))∥2)\nabla L(z(\bm{\gamma}))=\nabla^{2}L(\Phi(x_{\eta}(t)))(z(\bm{\gamma})-\Phi(x_{\eta}(t)))+O(\bm{\nu}\left\|z(\bm{\gamma})-\Phi(x_{\eta}(t))\right\|^{2}) and hence, we must have ∥∇L(z(γ))∥≥Ω(η)\left\|\nabla L(z(\bm{\gamma}))\right\|\geq\Omega(\eta).

With ∥u~(t~)∥=o(η)\left\|\widetilde{u}(\widetilde{t})\right\|=o(\eta), we can apply Lemma E.14 to show

That implies, ∥∇L(F(z(γ)))∥≥Ω(η)\left\|\nabla L(F(z(\bm{\gamma})))\right\|\geq\Omega(\eta)

Hence, μ(t~)=max⁡γ1∥∇L(z(γ))∥2+1∥∇L(F(z(γ)))∥2≤Ω(1/η2).\mu(\widetilde{t})=\max_{\bm{\gamma}}\frac{1}{\left\|\nabla L(z(\bm{\gamma}))\right\|^{2}}+\frac{1}{\left\|\nabla L(F(z(\bm{\gamma})))\right\|^{2}}\leq\Omega(1/\eta^{2}).

where ∂F(2)(u(t~))=At~+1At~\partial F^{(2)}(u(\widetilde{t}))=A_{\widetilde{t}+1}A_{\widetilde{t}} with

Now we define Bt~B_{\widetilde{t}} and claim At~A_{\widetilde{t}} can be approximated as below with ∥Bt~∥=O(η)\left\|B_{\widetilde{t}}\right\|=O(\eta). Furthermore, ∥At~∥≤O(1)\left\|A_{\widetilde{t}}\right\|\leq O(1).

with ∥At~+1∥≤O(1)\left\|A_{\widetilde{t}+1}\right\|\leq O(1) and ∥Bt~+1∥≤O(η)\left\|B_{\widetilde{t}+1}\right\|\leq O(\eta).

Finally, we use Lemma E.15 and Lemma E.16 to handle the main and error terms in Equation 41,

which completes the proof of Lemma E.12. ∎

For simplicity of presentation, we have used Mt~M_{\widetilde{t}} to define

Thus, the term under consideration can be simplified as follows,

We first recall the definition of the error term:

By Equation 37, the following property holds for all t~≥0\widetilde{t}\geq 0 for some ϱ>0\bm{\varrho}>0

First, by induction hypothesis at t~−2\widetilde{t}-2, we know

The proof is completed by picking CC large enough such that ϱCφ+O(η)≤C\bm{\varrho}\frac{C}{\bm{\varphi}}+O(\eta)\leq C. ∎

E.5 Proof for Operating on Edge of Stability

According to the proof of Theorem 4.4, we know for all tt, it holds that Rj(xη(t))≤O(η2)R_{j}(x_{\eta}(t))\leq O(\eta^{2}). Thus SL(xη(t),ηt)=ηt⋅sup⁡0≤s≤ηtλ1(∇2L(xη(t)−s∇L(xη(t))))=ηt(λ1(t)+O(η))S_{L}(x_{\eta}(t),\eta_{t})=\eta_{t}\cdot\sup_{0\leq s\leq\eta_{t}}\lambda_{1}(\nabla^{2}L(x_{\eta}(t)-s\nabla L(x_{\eta}(t))))=\eta_{t}(\lambda_{1}(t)+O(\eta)), which implies that [SL(xη(t),ηt)]−1=∥∇L(xη(t))∥ηλ1(t)+O(η)=∥x~η(t)∥ηλ1(t)+O(η)[S_{L}(x_{\eta}(t),\eta_{t})]^{-1}=\frac{\left\|\nabla L(x_{\eta}(t))\right\|}{\eta\lambda_{1}(t)}+O(\eta)=\frac{\left\|\widetilde{x}_{\eta}(t)\right\|}{\eta\lambda_{1}(t)}+O(\eta). The proof for the first claim is completed by noting that 1η(∥x~η(t)∥+∥x~η(t+1)∥)=λ1(t)+O(η+θt)\frac{1}{\eta}(\left\|\widetilde{x}_{\eta}(t)\right\|+\left\|\widetilde{x}_{\eta}(t+1)\right\|)=\lambda_{1}(t)+O(\eta+\theta_{t}) as an analog of the quadratic case.

For the second claim, it’s easy to check that L(xη(t))=∥x~η(t)∥2λ1(t)+O(ηθt)\sqrt{L(x_{\eta}(t))}=\frac{\left\|\widetilde{x}_{\eta}(t)\right\|}{\sqrt{2\lambda_{1}(t)}}+O(\eta\theta_{t}). Thus have L(xη(t))+L(xη(t+1))=∥x~η(t)∥2λ1(t)+∥x~η(t+1)∥2λ1(t+1)+O(η(θt+θt+1))\sqrt{L(x_{\eta}(t))}+\sqrt{L(x_{\eta}(t+1))}=\frac{\left\|\widetilde{x}_{\eta}(t)\right\|}{\sqrt{2\lambda_{1}(t)}}+\frac{\left\|\widetilde{x}_{\eta}(t+1)\right\|}{\sqrt{2\lambda_{1}(t+1)}}+O(\eta(\theta_{t}+\theta_{t+1})). Note that λ1(t)−λ1(t+1)=O(η2)\lambda_{1}(t)-\lambda_{1}(t+1)=O(\eta^{2}) and θt+1=O(θt)\theta_{t+1}=O(\theta_{t}), we conclude that L(xη(t))+L(xη(t+1))=ηλ1(∇2L(xη(t))2)+O(ηθt)\sqrt{L(x_{\eta}(t))}+\sqrt{L(x_{\eta}(t+1))}=\eta\sqrt{\frac{\lambda_{1}(\nabla^{2}L(x_{\eta}(t))}{2}})+O(\eta\theta_{t}). ∎

Appendix F Some Useful Lemmas About Eigenvalues and Eigenvectors

Moreover, the functions λ\lambda and uu are C∞\mathcal{C}^{\infty} on N(X0)N(X_{0}) and the differentials at X0X_{0} are

The next theorem is the Davis-Kahan sin⁡(θ)\sin(\theta) theorem, that bounds the change in the eigenvectors of a matrix on perturbation. Before presenting the theorem, we need to define the notion of unitary invariant norms. Examples of such norms include the frobenius norm and the spectral norm.

Appendix G Analysis of L𝐿\sqrt{L}

The analysis will follow the same line of proof used for the analysis of Normalized GD. Hence, we write down the main lemmas that are different from the analysis of Normalized GD. Rest of the lemmas are nearly the same and hence, we have omitted them.

The major difference between the results of Normalized GD and GD with L\sqrt{L} is in the behavior along the manifold Γ\Gamma (for comparison, see Lemma B.12 for Normalized GD and Lemma G.10 for GD with L\sqrt{L}). Another difference between the results of Normalized GD and GD with L\sqrt{L} is in the error rates mentioned in Theorem 4.4 and Theorem 4.6. The difference comes from the stronger behavior of the projection along the top eigenvector that we showed for Normalized GD in Lemma E.10, but doesn’t hold for GD with L\sqrt{L} (see Lemma G.6). This difference shows up in the sum of angles across the trajectory (for comparison, see Lemma E.5 for Normalized GD and Lemma G.4 for GD with L\sqrt{L}), and is finally reflected in the error rates.

The notations will be the same as Appendix B . However, here we will use x~η(t)\widetilde{x}_{\eta}(t) to denote (2∇2L(Φ(xη(t))))1/2(xη(t)−Φ(xη(t)))\left(2\nabla^{2}L(\Phi(x_{\eta}(t)))\right)^{1/2}(x_{\eta}(t)-\Phi(x_{\eta}(t))). We will now denote YY as the limiting flow given by Equation 7.

G.2 Phase I, convergence

Here, we will show a very similar stability condition for the GD update on L\sqrt{L} as the one (Lemma C.1) derived for Normalized GD. Recall our notation x~η(t)=2∇2L(Φ(xη(t)))(xη(t)−Φ(xη(t))).\widetilde{x}_{\eta}(t)=\sqrt{2\nabla^{2}L(\Phi(x_{\eta}(t)))}(x_{\eta}(t)-\Phi(x_{\eta}(t))).

Suppose {xη(t)}t≥0\{x_{\eta}(t)\}_{t\geq 0} are iterates of GD with L\sqrt{L} (6) with a learning rate η\eta and xη(0)=xinitx_{\eta}(0)=x_{\text{init}}. There is a constant C>0C>0, such that for any constant ς>0\bm{\varsigma}>0, if at some time t′t^{\prime}, xη(t′)∈Yϵx_{\eta}(t^{\prime})\in Y^{\bm{\epsilon}} and satisfies ∥xη(t′)−Φ(xη(t′))∥η≤ς\frac{\left\|x_{\eta}(t^{\prime})-\Phi(x_{\eta}(t^{\prime}))\right\|}{\eta}\leq\bm{\varsigma}, then for all tˉ≥t′+Cζςμlog⁡ςζμ\bar{t}\geq t^{\prime}+C\frac{\bm{\zeta}\bm{\varsigma}}{\bm{\mu}}\log\frac{\bm{\varsigma}\bm{\zeta}}{\bm{\mu}}, the following must hold true for all 1≤j≤M1\leq j\leq M:

provided that for all steps t∈{t,…,tˉ−1}t\in\{t,\ldots,\bar{t}-1\}, xη(t)xη(t+1)‾⊂Yϵ\overline{x_{\eta}(t)x_{\eta}(t+1)}\subset Y^{\bm{\epsilon}}.

The proof exactly follows the strategy used in Lemma C.1. We can use the noisy update formulation from Lemma G.7 and the bound on the movement in Φ\Phi from Lemma G.10 to get for any time tt with tˉ≥t≥t′\bar{t}\geq t\geq t^{\prime} (similar to Equation 28):

Hence, similar to Lemma D.1, we can derive the following property that continues to hold true throughout the trajectory, once the condition Equation 42 is satisfied:

We also have the counterpart of Corollary D.3 with the same proof, which follows from using the noisy update of GD on L\sqrt{L} from Lemma G.7 and using the quadratic update result from Lemma A.5.

G.3 Phase II, limiting flow

Let T2T_{2} be the time up until which solution to the limiting flow exists.

Lemma G.10 shows the movement in Φ\Phi, which can be informally given as follows: in each step tt,

provided Φ(xη(t))Φ(xη(t+1))‾∈Yϵ\overline{\Phi(x_{\eta}(t))\Phi(x_{\eta}(t+1))}\in Y^{\bm{\epsilon}}.

Motivated by this update rule, we show that the trajectory of Φ(xη(⋅))\Phi(x_{\eta}(\cdot)) is close to the limiting flow in Equation 7, for a small enough learning rate η\eta. The major difference from Theorem 4.4 comes from the fact that the total error introduced in Equation 43 over an interval [0,t2][0,t_{2}] is ∑t=0t2O(η2θt+η3)\sum_{t=0}^{t_{2}}O(\eta^{2}\theta_{t}+\eta^{3}), which is of the order O(η1/2)O(\eta^{1/2}) using the result of Lemma G.4.

The first lemma shows that the sum of the angles in an interval [0,t2][0,t_{2}] of length Ω(1/η2)\Omega(1/\eta^{2}) is at most O(t2η1/2).O(t_{2}\eta^{1/2}).

provided η\eta is sufficiently small and for all time 0≤t≤t2−10\leq t\leq t_{2}-1, xη(t)xη(t+1)‾⊂Yϵ\overline{x_{\eta}(t)x_{\eta}(t+1)}\subset Y^{\bm{\epsilon}}.

The proof is very similar to the proof of Lemma E.5, except we replace Lemma E.6 by Lemma G.5 in the analysis of case (B). Hence the final average angle becomes O(η)O(\sqrt{\eta}). ∎

The proof will follow exactly as Lemma E.6, except we replace Lemma E.10 by Lemma G.6, which changes the rate into O(t′−t‾+(t′−t‾)η)O(\sqrt{t^{\prime}-\overline{t}}+(t^{\prime}-\overline{t})\sqrt{\eta}) ∎

provided Gt≥Ω(η)G_{t}\geq\Omega(\eta) and xη(t)xη(t+1)‾,xη(t+1)xη(t+2)‾⊂Yϵ\overline{x_{\eta}(t)x_{\eta}(t+1)},\overline{x_{\eta}(t+1)x_{\eta}(t+2)}\subset Y^{\bm{\epsilon}}.

Here, we will follow a much simpler approach than Lemma E.10 to have a weaker error bound. The stronger error bounds in Lemma E.10 were due to the very specific update rule of Normalized GD.

First recall x~η(t)=2∇2L(Φ(x))(xη(t)−Φ(xη(t)))\widetilde{x}_{\eta}(t)=\sqrt{2\nabla^{2}L(\Phi(x))}(x_{\eta}(t)-\Phi(x_{\eta}(t))). By Lemma G.10, we have ∥Φ(xη(t+1))−Φ(xη(t))∥=O(η2)\left\|\Phi(x_{\eta}(t+1))-\Phi(x_{\eta}(t))\right\|=O(\eta^{2}), thus x~η(t+1)−x~η(t)=2∇2L(Φ(x))(xη(t+1)−xη(t))=η2∇2L(Φ(x))∇L(xη(t))2L(xη(t))\widetilde{x}_{\eta}(t+1)-\widetilde{x}_{\eta}(t)=\sqrt{2\nabla^{2}L(\Phi(x))}(x_{\eta}(t+1)-x_{\eta}(t))=\eta\sqrt{2\nabla^{2}L(\Phi(x))}\frac{\nabla L(x_{\eta}(t))}{2\sqrt{L(x_{\eta}(t))}}. From Lemma G.7, we have

where we have used the fact that ∥x~η(t)∥=O(η)\left\|\widetilde{x}_{\eta}(t)\right\|=O(\eta).

Hence, the update is similar to the update in a quadratic model, with ∇2L(Φ(xη(t)))\nabla^{2}L(\Phi(x_{\eta}(t))) guiding the updates with an additional O(η2)O(\eta^{2}) perturbation. As a result we also get a O(η2)O(\eta^{2}) perturbation in GtG_{t}. Here we use the assumption Gt=Ω(η)G_{t}=\Omega(\eta) so that GD updates are O(1)O(1)-lipschitz. ∎

G.4 Omitted Proof for Operating on Edge of Stability

This proof is similar to that of Theorem 4.7.

If M=1M=1, that is, the dimension of manifold Γ\Gamma is D−1D-1, we know xη(t)xη(t+1)‾\overline{x_{\eta}(t)x_{\eta}(t+1)} will cross Γ\Gamma, making the ∇2L\nabla^{2}\sqrt{L} diverges at the intersection and the first claim becomes trivial. If M≥2M\geq 2, we have ∇2L=2L∇2L−∇L∇L⊤4L3\nabla^{2}\sqrt{L}=\frac{2L\nabla^{2}L-\nabla L\nabla L^{\top}}{4\sqrt{L}^{3}} diverges at the rate of 1∥∇L∥\frac{1}{\left\|\nabla L\right\|}. It turns out that using basic geometry, one can show that the distance from Φ(xη(t))\Phi(x_{\eta}(t)) to xη(t)xη(t+1)‾\overline{x_{\eta}(t)x_{\eta}(t+1)} is O(η(θt+θt+1))O(\eta(\theta_{t}+\theta_{t+1})), thus sup⁡0≤s≤ηλ1(∇2L(xη(t)−s∇L(xη(t))))=Ω(1η(θt+θt+1))\sup_{0\leq s\leq\eta}\lambda_{1}(\nabla^{2}\sqrt{L}(x_{\eta}(t)-s\nabla\sqrt{L}(x_{\eta}(t))))=\Omega(\frac{1}{\eta(\theta_{t}+\theta_{t+1})}). The proof of the first claim is completed by noting that θt+1=O(θt)\theta_{t+1}=O(\theta_{t}).

For the second claim, it’s easy to check that L(xη(t))=∥x~η(t)∥+O(η)\sqrt{L(x_{\eta}(t))}=\left\|\widetilde{x}_{\eta}(t)\right\|+O(\eta). The proof for the first claim is completed by noting that ∥x~η(t)∥+∥x~η(t+1)∥=ηλ1(t)+O(η+θt)\left\|\widetilde{x}_{\eta}(t)\right\|+\left\|\widetilde{x}_{\eta}(t+1)\right\|=\eta\lambda_{1}(t)+O(\eta+\theta_{t}) as an analog of the quadratic case. ∎

G.5 Geometric Lemmas for L𝐿\sqrt{L}

First recall our notations, x~=2∇2L(Φ(x))(x−Φ(x))\widetilde{x}=\sqrt{2\nabla^{2}L(\Phi(x))}(x-\Phi(x)) and θ=arctan⁡∥PΦ(x),Γ(2:M)x~∥∣⟨v1(x),x~⟩∣\theta=\arctan\frac{\left\|P_{\Phi(x),\Gamma}^{(2:M)}\widetilde{x}\right\|}{\left|\langle v_{1}(x),\widetilde{x}\rangle\right|}.

At any point x∈Yϵx\in Y^{{\bm{\epsilon}}}, we have

Since Φ(x)\Phi(x) is a local minimizer of zero loss, we have ∇L(Φ(x))=0\nabla L(\Phi(x))=0, we have that

By Lemma B.8, we know ∂2L(Φ(x))[x−Φ(x),x−Φ(x)]≥Ω(∥x−Φ(x)∥2μ)\partial^{2}L(\Phi(x))[x-\Phi(x),x-\Phi(x)]\geq\Omega(\frac{\left\|x-\Phi(x)\right\|^{2}}{\bm{\mu}}) and therefore

For the second claim, with x~=2∇2L(Φ(x))(x−Φ(x))\widetilde{x}=\sqrt{2\nabla^{2}L(\Phi(x))}(x-\Phi(x)), we have that

By Lemma B.7, we have ∥x−Φ(x)∥≤2μζν\left\|x-\Phi(x)\right\|\leq\frac{2\bm{\mu}}{\bm{\zeta}\bm{\nu}}, thus ζ1/2νμ∥x−Φ(x)∥=O(μζ1/2)=O(ζ1/2)\frac{\bm{\zeta}^{1/2}\bm{\nu}}{\bm{\mu}}\left\|x-\Phi(x)\right\|=O(\frac{\bm{\mu}}{\bm{\zeta}^{1/2}})=O(\bm{\zeta}^{1/2}). ∎

The following two lemmas are direct implications of Lemma G.7.

At any point x∈Yϵx\in Y^{{\bm{\epsilon}}}, we have

Consider any point x∈Yϵx\in Y^{{\bm{\epsilon}}}. Then,

where θ=arctan⁡∥PΦ(x),Γ(2:M)x~∥∣⟨v1(x),x~⟩∣\theta=\arctan\frac{\left\|P_{\Phi(x),\Gamma}^{(2:M)}\widetilde{x}\right\|}{\left|\langle v_{1}(x),\widetilde{x}\rangle\right|}, with x~=2∇2L(Φ(x))(x−Φ(x)).\widetilde{x}=\sqrt{2\nabla^{2}L(\Phi(x))}(x-\Phi(x)).

For any xy‾∈Yϵ\overline{xy}\in Y^{\bm{\epsilon}} where y=x−η∇L(x)y=x-\eta\nabla\sqrt{L(x)} is the one step update on L\sqrt{L} loss from xx, we have

Here θ=arctan⁡∥PΦ(x),Γ(2:M)x~∥∣⟨v1(x),x~⟩∣\theta=\arctan\frac{\left\|P_{\Phi(x),\Gamma}^{(2:M)}\widetilde{x}\right\|}{\left|\langle v_{1}(x),\widetilde{x}\rangle\right|}, with x~=2∇2L(Φ(x))(x−Φ(x)).\widetilde{x}=\sqrt{2\nabla^{2}L(\Phi(x))}(x-\Phi(x)).

We outline the major difference from the proof of Lemma B.12. Using taylor expansion for the function Φ\Phi, we have

where in the final step, we used the property of Φ\Phi from Lemma B.16 to kill the first term and use the bound on ∇L(x)L(x)\frac{\nabla L(x)}{\sqrt{L(x)}} from Lemma G.7 for the third term.

Since the function Φ∈C3\Phi\in\mathcal{C}^{3}, hence ∂2Φ(x)=∂2Φ(Φ(x))+O(χ∥x−Φ(x)∥)\partial^{2}\Phi(x)=\partial^{2}\Phi(\Phi(x))+O(\bm{\chi}\left\|x-\Phi(x)\right\|).

Also, at Φ(x)\Phi(x), since v1(x)v_{1}(x) is the top eigenvector of the hessian ∇2L\nabla^{2}L, we have from Corollary B.23,

where recall our notation of θ=arctan⁡∥PΦ(x),Γ(2:M)(x−Φ(x))∥∣⟨v1(x),x−Φ(x)⟩∣\theta=\arctan\frac{\left\|P_{\Phi(x),\Gamma}^{(2:M)}(x-\Phi(x))\right\|}{\left|\langle v_{1}(x),x-\Phi(x)\rangle\right|}.

With further simplification, it turns out that

The proof is completed by using Corollary B.25. ∎

Appendix H Additional Experimental Details

For running GD on L\sqrt{L}, we start from (x,y)=(14.7,3.)(x,y)=(14.7,3.), and use a learning rate η=0.5\eta=0.5. For running Normalized GD on LL, we start from (x,y)=(14.7,−3)(x,y)=(14.7,-3), and use a learning rate η=5\eta=5.

For Figure 2:

We start Normalized GD from ⟨v1,x~(0)⟩=10−4,⟨v2,x~(0)⟩=0.45\langle v_{1},\widetilde{x}(0)\rangle=10^{-4},\langle v_{2},\widetilde{x}(0)\rangle=0.45. We use a learning rate of 11 for the optimization updates.

H.2 Implementation Details for Simulation for the Limiting Flow of Normalized GD

We provide the code for running a single step of the riemannian flow (5) corresponding to Normalized GD. The pseudocode is given in Algorithm 4.

Riemannian gradient update details:

Each update comprises of three major steps: a) computing ∇3L(x)[v1(x),v1(x)]\nabla^{3}L(x)[v_{1}(x),v_{1}(x)], b) a projection onto the tangent space of the manifold, and c) few steps of gradient descent with small learning rate to drop back to manifold.