What Happens after SGD Reaches Zero Loss? --A Mathematical Framework

Zhiyuan Li, Tianhao Wang, Sanjeev Arora

Introduction

The implicit bias underlies the generalization ability of machine learning models trained by stochastic gradient descent (SGD). But it still remains a mystery to mathematically characterize such bias. We study SGD in the following formulation

It is widely believed that large LR (or equivalently, small batch size) helps SGD find better minima. For instance, some previous works argued that large noise enables SGD to select a flatter attraction basin of the loss landscape which potentially benefits generalization (Li et al., 2019c; Jastrzebski et al., 2017). However, there is also experimental evidence (Li et al., 2020b) that small LR also has equally good implicit bias (albeit with higher training time), and that is the case studied here. Presumably low LR precludes SGD jumping between different basins since under general conditions this should require Ω(exp⁡(1/η))\Omega(\exp(1/\eta)) steps (Shi et al., 2020). In other words, there should be a mechanism to reach better generalization while staying within a single basin. For deterministic GD similar mechanisms have been demonstrated in simple cases (Soudry et al., 2018; Lyu & Li, 2019) and referred to as implicit bias of gradient descent. The current paper can be seen as study of implicit bias of Stochastic GD, which turns out to be quite different, mathematically.

The contribution of the current paper is a more general and global analysis of this type. We introduce a more powerful framework inspired by the classic paper (Katzenberger, 1991).

We start with an intuitive description of the implicit regularization effect described in Blanc et al. (2020). For simplification, we show it for the canonical SDE approximation (See Section B.1 for more details) of SGD (1) (Li et al., 2017; Cheng et al., 2020). Here W(t)W(t) is the standard Ξ\Xi-dimensional Brownian motion. The only property about label noise SGD we will use is that the noise covariance σσ⊤(x)=∇2L(x)\sigma\sigma^{\top}(x)=\nabla^{2}L(x) for every xx in the manifold Γ\Gamma (See derivation in Section 5).

However, the above approach only gives a local analysis for O(η−1.6)O(\eta^{-1.6}) time, where the total movement due to implicit regularization is O(η2−1.6)=O(η0.4)O(\eta^{2-1.6})=O(\eta^{0.4}) and thus is negligible when η→0\eta\to 0. In order to get a non-trivial limiting dynamics when η→0\eta\to 0, a global analysis for Ω(η−2)\Omega(\eta^{-2}) steps is necessary and it cannot be done by Taylor expansion with a single reference point. Recent work by Damian et al. (2021) glues analyses of multiple local phases into a global guarantee that SGD finds a (ϵ,γ)(\epsilon,\gamma)-stationary point for the regularized loss, but still doesn’t show convergence for trajectory when η→0\eta\to 0 and cannot deal with general noise types, e.g., noise lying in the tangent space of the manifold. The main technical difficulty here is that it’s not clear how to separate the slow and fast dynamics in different spaces and how to only take limit for the slow dynamics, especially when shifting to a new reference point in the Taylor series calculation.

2 Our Approach: Separating the Slow from the Fast

In this work, we tackle this problem via a different angle. First, since the anticipated limiting dynamics is of speed Θ(η2)\Theta(\eta^{2}), we change the time scaling to accelerate (2) by η−2\eta^{-2} times, which yields

Note the first term −η−1∂Φ(Xη)∇L(Xη)-\eta^{-1}\partial\Phi(X_{\eta})\nabla L(X_{\eta}) is going to diverge to ∞\infty when η→0\eta\to 0, so a natural choice for Φ\Phi is to kill the first term. Further note −∂Φ(X)∇L(X)-\partial\Phi(X)\nabla L(X) is indeed the directional derivative of Φ\Phi at XX towards −∇L-\nabla L, killing the first term becomes equivalent to making Φ\Phi invariant under Gradient Flow (GF) of −∇L(X)-\nabla L(X)! Thus it suffices to take Φ(X)\Phi(X) to be the limit of GF starting at XX. (Formally defined in Section 3; see Lemma C.2 for a proof of ∂Φ(X)∇L(X)≡0\partial\Phi(X)\nabla L(X)\equiv 0.)

Also intuitively XηX_{\eta} will be infinitely close to Γ\Gamma, i.e., d(Xη(t),Γ)→0d(X_{\eta}(t),\Gamma)\to 0 for any t>0t>0 as η→0\eta\to 0, so we have Φ(Xη)≈Xη\Phi(X_{\eta})\approx X_{\eta}. Thus we can rewrite the above equation as

and the solution of (4) shall converge to that of the following (in an intuitive sense):

The main contributions of this paper are summarized as follows.

In Section 4, we propose a mathematical framework to study the implicit bias of SGD with infinitesimal LR. Our main theorem (Theorem 4.6) gives the limiting diffusion of SGD with LR η\eta for Θ(η−2)\Theta(\eta^{-2}) steps as η→0\eta\to 0 and allows any covariance structure.

In Section 5, we give limiting dynamics of SGD with isotropic noise and label noise.

Related Works

A phenomenon known as mode connectivity has been observed that local minimizers of the loss function of a neural network are connected by simple paths (Freeman & Bruna, 2016; Garipov et al., 2018; Draxler et al., 2018), especially for overparametrized models (Venturi et al., 2018; Liang et al., 2018; Nguyen et al., 2018; Nguyen, 2019). Later this phenomanon is explained under generic assumptions by Kuditipudi et al. (2019). Moreover, it has been proved that the local minimizers of an overparametrized network form a low-dimensional manifold (Cooper, 2018, 2020) which possibly has many components. Fehrman et al. (2020) proved the convergence rate of SGD to the manifold of local minimizers starting in a small neighborhood.

Implicit Bias in Overparametrized Models

Modelling Stochastic First-Order Methods with Itô SDE

Apart from the discrete-time analysis, another popular approach to study SGD is through the continuous-time lens using SDE (Li et al., 2017, 2019b; Cheng et al., 2020). Such an approach is often more elegant and can provide fruitful insights like the linear scaling rule (Krizhevsky, 2014; Goyal et al., 2017) and the intrinsic learning rate (Li et al., 2020b). A recent work by Li et al. (2021) justifies such SDE approximation. Xie et al. (2020) gave a heuristic derivation explaining why SGD favors flat minima with SDE approximation. Wojtowytsch (2021) showed that the invariant distribution of the canonical SDE approximation of SGD will collapse to some manifold of minimizers and in particular, favors flat minima. By approximating SGD using a SDE with slightly modified covariance for the overparametrized linear model, Pesme et al. (2021) relates the strength of implicit regularization to training speed.

Notation and Preliminaries

Assume that UU is an open neighborhood of Γ\Gamma satisfying that gradient flow starting in UU converges to some point in Γ\Gamma, i.e., ∀x∈U\forall x\in U, Φ(x)∈Γ\Phi(x)\in\Gamma. (Then Φ\Phi is C2\mathcal{C}^{2} on UU by Falconer (1983).)

Limiting Diffusion of SGD

In Section 4.1 we first recap the main result of Katzenberger (1991). In Section 4.2 we derive the closed-form expressions of ∂Φ\partial\Phi and ∂2Φ\partial^{2}\Phi. We present our main result in Section 4.3. We remark that sometimes we omit the dependency on tt to make things clearer.

In particular, when the integrator sequence {An}n≥1\{A_{n}\}_{n\geq 1} increases infinitely fast, meaning that ∀ϵ>0,inf⁡t≥0(An(t+ϵ)−An(t))→∞\forall\epsilon>0,\inf_{t\geq 0}(A_{n}(t+\epsilon)-A_{n}(t))\to\infty as n→∞n\to\infty, we call (6) a Katzenberger process.

One difficulty for directly studying the limiting dynamics of Xn(t)X_{n}(t) is that the point-wise limit as n→∞n\to\infty become discontinuous at t=0t=0 if X(0)∉ΓX(0)\notin\Gamma. The reason is that clearly lim⁡n→∞Xn(0)=X(0)\lim_{n\to\infty}X_{n}(0)=X(0), but for any t>0t>0, since {An}n≥1\{A_{n}\}_{n\geq 1} increases infinitely fast, one can prove lim⁡n→∞Xn(t)∈Γ\lim_{n\to\infty}X_{n}(t)\in\Gamma! To circumvent this issue, we consider Yn(t)=Xn(t)−ϕ(X(0),An(t))+Φ(X(0))Y_{n}(t)=X_{n}(t)-\phi(X(0),A_{n}(t))+\Phi(X(0)). Then for each n≥1n\geq 1, we have Yn(0)=Φ(X(0))Y_{n}(0)=\Phi(X(0)) and lim⁡n→∞Yn(t)=lim⁡n→∞Xn(t)\lim_{n\to\infty}Y_{n}(t)=\lim_{n\to\infty}X_{n}(t). Thus Yn(t)Y_{n}(t) has the same limit on (0,∞)(0,\infty) as Xn(t)X_{n}(t), but the limit of the former is further continuous at t=0t=0.

Suppose the loss LL, manifold Γ\Gamma and neighborhood UU satisfies Assumptions 3.1 and 3.2. Let {Xn}n≥1\{X_{n}\}_{n\geq 1} be a sequence of Katzenberger process with {An}n≥1,{Zn}n≥1\{A_{n}\}_{n\geq 1},\{Z_{n}\}_{n\geq 1}. Let Yn(t)=Xn(t)−ϕ(X(0),An(t))+Φ(X0)Y_{n}(t)=X_{n}(t)-\phi(X(0),A_{n}(t))+\Phi(X_{0}). Under technical assumptions, it holds that if (Yn,Zn)(Y_{n},Z_{n}) converges to some (Y,W)(Y,W) in distribution, where {W(t)}t≥0\{W(t)\}_{t\geq 0} is the standard Brownian motion, then YY stays on Γ\Gamma and admits

Indeed, SGD (1) can be rewritten into a Katzenberger process as in the following lemma.

Let {ηn}n=1∞\{\eta_{n}\}_{n=1}^{\infty} be any positive sequence with lim⁡n→∞ηn=0\lim_{n\to\infty}\eta_{n}=0, An(t)=ηn⌊t/ηn2⌋A_{n}(t)=\eta_{n}\lfloor t/\eta^{2}_{n}\rfloor, and Zn(t)=ηn∑k=1⌊t/ηn2⌋Ξ(\mathds1ξk−1Ξ\mathds1)Z_{n}(t)=\eta_{n}\sum_{k=1}^{\lfloor t/\eta^{2}_{n}\rfloor}\sqrt{\Xi}(\mathds{1}_{\xi_{k}}-\frac{1}{\Xi}\mathds{1}), where ξ1,ξ2,…∼i.i.d.Unif([Ξ])\xi_{1},\xi_{2},\ldots\overset{\text{i.i.d.}}{\sim}\textrm{Unif}([\Xi]). Then with the same initialization Xn(0)=xηn(0)≡X(0)X_{n}(0)=x_{\eta_{n}}(0)\equiv X(0), Xn(kηn2)X_{n}(k\eta_{n}^{2}) defined by \eqrefeq:katzenbergerprocess\eqref{eq:katzenberger_process} is a Katzenberger process and is equal to xηn(k)x_{\eta_{n}}(k) defined in (1) with LR equal to ηn\eta_{n} for all k≥1k\geq 1. Moreover, the counterpart of (7) is

where Σ≡σσ⊤\Sigma\equiv\sigma\sigma^{\top} and {W(t)}t≥0\{W(t)\}_{t\geq 0} is a Ξ\Xi-dimensional standard Brownian motion.

However, there are two obstacles preventing us from directly applying Theorem 4.1 to SGD. First, the stochastic integral in (8) depends on the derivatives of Φ\Phi, ∂Φ\partial\Phi and ∂ijΦ\partial_{ij}\Phi, but Katzenberger (1991) did not give their dependency on loss LL. To resolve this, we explicitly calculate the derivatives of Φ\Phi on Γ\Gamma in terms of the derivatives of LL in Section 4.2.

The second difficulty comes from the convergence of (Yn,Zn)(Y_{n},Z_{n}) which we assume as granted for brevity in Theorem 4.1. In fact, the full version of Theorem 4.1 (see Theorem B.7) concerns the stopped version of YnY_{n} with respect to some compact K⊂UK\subset U, i.e., Ynμn(K)(t)=Yn(t∧μn(K))Y_{n}^{\mu_{n}(K)}(t)=Y_{n}(t\wedge\mu_{n}(K)) where μn(K)\mu_{n}(K) is the stopping time of YnY_{n} leaving KK. As noted in Katzenberger (1991), we need the convergence of μn(K)\mu_{n}(K) for Ynμn(K)Y_{n}^{\mu_{n}(K)} to converge, which is a strong condition and difficult to prove in our cases. We circumvent this issue by proving Theorem B.9, a user-friendly interface for the original theorem in Katzenberger (1991), and it only requires the information about the limiting diffusion. Building upon these, we present our final result as Theorem 4.6.

2 Closed-Form expression of the limiting diffusion

We can calculate the derivatives of Φ\Phi by relating to those of LL. Here the key observation is the invariance of Φ\Phi along the trajectory of GF. The proofs of this section are deferred into Appendix C.

For any x∈Γx\in\Gamma, ∂Φ(x)\partial\Phi(x) is the orthogonal projection matrix onto tangent space Tx(Γ)T_{x}(\Gamma).

To express the second-order derivatives compactly, we introduce the notion of Lyapunov operator.

3 Main Result

Now we are ready to present our main result. It’s a direct combination of Theorem B.9 and Lemma 4.5.

where Σ≡σσ⊤\Sigma\equiv\sigma\sigma^{\top} and Σ∥,Σ⊥,Σ⊥,∥\Sigma_{\parallel},\Sigma_{\perp},\Sigma_{\perp,\parallel} are defined in Lemma 4.5.

In Section B.4 we indeed prove a stronger version of Theorem 4.6 that the sample paths of SGD converge in distribution, i.e., let x~η(t)=xη(⌊t/η2⌋)\widetilde{x}_{\eta}(t)=x_{\eta}(\lfloor t/\eta^{2}\rfloor), then x~η\widetilde{x}_{\eta} weakly converges to YY on [0,T][0,T]. Moreover, we only assume the existence of a global solution for ease of presentation. As long as there exists a compact K⊆ΓK\subseteq\Gamma such that YY stays in KK on [0,T][0,T] with high probability, Theorem B.9 still provides the convergence of SGD iterates (stopped at the boundary of KK) before time TT with high probability.

Implications and Examples

In this section, we derive the limiting dynamics for two notable noise types, where we fix the expected loss LL and the noise distribution, and only drive η\eta to 0. The proofs are deferred into Section C.3.

Isotropic noise means Σ(x)≡ID\Sigma(x)\equiv I_{D} for any x∈Γx\in\Gamma (Shi et al., 2020). The following theorem shows that the limiting diffusion with isotropic noise can be viewed as a Brownian Motion plus Riemannian Gradient Flow with respect to the pseudo-determinant of ∇2L\nabla^{2}L.

If Σ≡ID\Sigma\equiv I_{D} on Γ\Gamma, SDE (10) is then

Type II: Label Noise.

In sharp contrast to the delicate discrete-time analysis in Blanc et al. (2020) and Damian et al. (2021), the following corollary recovers the same result but with much simpler analysis – taking derivatives is all you need. Under our framework, we no longer need to do Taylor expansion manually nor carefully control the infinitesimal variables of different orders together. It is also worth mentioning that our framework immediately gives a global analysis of Θ(η−2)\Theta(\eta^{-2}) steps for SGD, far beyond the local coupling analysis in previous works. In Section 6, we will see how such global analysis allows us to prove a concrete generalization upper bound in a non-convex problem, the overparametrized linear model (Woodworth et al., 2020; HaoChen et al., 2020).

If Σ≡c∇2L\Sigma\equiv c\nabla^{2}L on Γ\Gamma for some constant c>0c>0, SDE (10) can be simplified into (13) where the regularization is from the noise in the normal space.

Provable Generalization Benefit with Label Noise

In the setting of OLM, suppose the groundtruth is κ\kappa-sparse and n≥Ω(κln⁡d)n\geq\Omega(\kappa\ln d) training data are sampled from either i.i.d. Gaussian or Boolean distribution. Then for any initialization xinitx_{\text{init}} (except a zero-measure set) and any ϵ>0\epsilon>0, there exist η0,T>0\eta_{0},T>0 such that for any η<η0\eta<\eta_{0}, OLM trained with label noise SGD (12) with LR equal to η\eta for ⌊T/η2⌋\lfloor T/\eta^{2}\rfloor steps returns an ϵ\epsilon-optimal solution, with probability of 1−e−Ω(n)1-e^{-\Omega(n)} over the randomness of the training dataset.

The proof roadmap of Theorem 6.1 is the following:

Show Assumption 3.1 is satisfied, i.e., the set of local minimizers, Γ\Gamma, is indeed a manifold and the hessian ∇2L(x)\nabla^{2}L(x) is non-degenerate on Γ\Gamma (by Lemma 6.2);

Show Assumption 3.2 is satisfied, i.e., Φ(U)⊂Γ\Phi(U)\subset\Gamma (by Lemma 6.3);

Show the limiting flow (13) converges to the minimizer of the regularizer (by Lemma 6.5);

Show the minimizer of the regularizer recovers the groundtruth (by Lemma 6.6).

Our setting is more general than HaoChen et al. (2020), which assumes w∗∈{0,1}dw^{*}\in\{0,1\}^{d} and their reparametrization can only express positive linear functions, i.e., w=u⊙2w=u^{\odot 2}. Their O~(κ2)\widetilde{O}(\kappa^{2}) rate is achieved with a delicate three phase LR schedule, while our O(κln⁡d)O(\kappa\ln d) rate only uses a constant LR.

We verify that the above loss function LL and manifold Γ\Gamma satisfy Assumption 3.1 by Lemma 6.2, and that the neighborhood UU and Γ\Gamma satisfy Assumption 3.2 by Lemma 6.3.

In previous works (Woodworth et al., 2020; Azulay et al., 2021), the convergence of gradient flow is only assumed. Recently Pesme et al. (2021) proved it for a specific initialization, i.e., uj=vj=α,∀j∈[n]u_{j}=v_{j}=\alpha,\forall j\in[n] for some α>0\alpha>0. Lemma 6.3 completely removes the technical assumption.

The limiting behavior of label noise SGD is described by a Riemannian gradient flow on Γ\Gamma as follows:

The goal is to show that the above limiting flow will converge to the underlying groundtruth x∗=(u∗v∗)x^{*}=\binom{u^{*}}{v^{*}} where (u∗,v∗)=([w∗]+⊙1/2,[−w∗]+⊙1/2)(u^{*},v^{*})=([w^{*}]_{+}^{\odot 1/2},[-w^{*}]_{+}^{\odot 1/2}).

1 Limiting Flow Converges to Minimizers of Regularizer

Thus the non-compactness of Γ\Gamma brings challenges for both (a) and (b). For (a), the convergence for standard gradient flow is often for free, as long as the trajectory is bounded and the objective is analytic or smooth and semialgebraic. The latter ensures the so-called Kurdyka-Łojasiewicz (KL) inequality (Lojasiewicz, 1963), which implies finite trajectory length and thus the convergence. However, since our flow does not satisfy those nice properties, we have to show that the limiting flow satisfies Polyak-Łojasiewicz condition (a special case of KL condition) (Polyak, 1964) via careful calculation (by Lemma D.16).

For (b), the standard analysis based on center stable manifold theorem shows that gradient descent/flow converges to strict saddle (stationary point with at least one negative eigenvalue in hessian) only for a zero-measure set of initialization (Lee et al., 2016, 2017). However, such analyses cannot deal with the case where the flow is not differentiable at the sub-optimal stationary point. To circumvent this issue, we prove the non-convergence to sub-optimal stationary points with a novel approach: we show that for any stationary point xx, whenever there exists a descent direction of the regularizer RR at xx, we can construct a potential function which increases monotonically along the flow around xx, while the potential function is equal to −∞-\infty at xx, leading to a contradiction. (See proof of Lemma 6.5.)

2 Minimizer of the Regularizer Recovers the Sparse Groundtruth

3 Lower Bound for Gradient Descent in the Kernel Regime

In this subsection we show GD needs at least Ω(d)\Omega(d) samples to learn OLM, when initialized in the kernel regime. This lower bound holds for all learning rate schedules and numbers of steps. This is in sharp contrast to the O~(κln⁡d)\widetilde{O}(\kappa\ln d) sample complexity upper bound of SGD with label noise. Following the setting of kernel regime in (Woodworth et al., 2020), we consider the limit of u0=v0=α\mathds1u_{0}=v_{0}=\alpha\mathds{1}, with α→∞\alpha\to\infty. It holds that fi(u0,v0)=0f_{i}(u_{0},v_{0})=0 and ∇fi(u0,v0)=[αzi,−αzi]\nabla f_{i}(u_{0},v_{0})=[\alpha z_{i},-\alpha z_{i}] for each i∈[n]i\in[n]. Standard convergence analysis for NTK (Neural Tangent Kernel, Jacot et al. (2018)) shows that upon convergence, the distance traveled by parameter converges to , and thus the learned model shall converge in function space, so is the generalization performance. For ease of illustration, we directly consider the lower bound for test loss when the NTK is fixed throughout the training.

Conclusion and Future Work

We propose a mathematical framework to study the implicit bias of SGD with infinitesimal LR. We show that with arbitrary noise covariance, Θ(η−2)\Theta(\eta^{-2}) steps of SGD converge to a limiting diffusion on certain manifold of local minimizer, as the LR η→0\eta\to 0. For specific noise types, this allows us to recover and strengthen results regarding implicit bias in previous works with much simpler analysis. In particular, we show a sample complexity gap between label noise SGD and GD in the kernel regime for a overparametrized linear model, justifying the generalization benefit of SGD. For the future work, we believe our framework can be applied to analyze the implicit bias of SGD in more complex models towards better understanding of the algorithmic regularization induced by stochasticity. It will be valuable to extend our method to other stochastic optimization algorithms, e.g., ADAM, SGD with momentum.

Acknowledgement

We thank Yangyang Li for pointing us to Katzenberger (1991). We also thank Wei Zhan, Jason Lee and Lin Chen 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 Preliminaries on Stochastic Processes

Next, we review a few basics of stochastic processes that will be useful for proving our results, so that our paper will be self-contained. We refer the reader to classics like Karatzas & Shreve (2014); Billingsley (2013); Pollard (2012) for more systematic derivations.

Let T∈[0,∞]T\in[0,\infty]. A function g:[0,T)→Eg:[0,T)\to E is càdlàg if for all t∈[0,T)t\in[0,T) it is right-continuous at tt and its left limit g(t−)g(t-) exists. Let DE[0,T)\mathcal{D}_{\mathcal{E}}[0,T) be the set of all càdlàg function mapping [0,T)[0,T) into E\mathcal{E}. We also use DE[0,T)\mathcal{D}_{\mathcal{E}}[0,T) to denote the set of all continuous function mapping [0,T)[0,T) into E\mathcal{E}. By definition, CE[0,T)⊂DE[0,T)\mathcal{C}_{\mathcal{E}}[0,T)\subset\mathcal{D}_{\mathcal{E}}[0,T).

For any function f:[0,∞)→Ef:[0,\infty)\to\mathcal{E} and any interval I⊆[0,∞)I\subseteq[0,\infty), we define

Moreover, the continuity modulus of càdlàg f∈DE[0,∞)f\in\mathcal{D}_{\mathcal{E}}[0,\infty) is defined as

For any g∈DE[0,T)g\in\mathcal{D}_{\mathcal{E}}[0,T), we define the jump of gg at tt to be

For any δ>0\delta>0, we define hδ:[0,∞)→[0,∞)h_{\delta}:[0,\infty)\to[0,\infty) by

For each finite T>0T>0 and each pair of functions f,g∈DE[0,∞)f,g\in\mathcal{D}_{\mathcal{E}}[0,\infty), define dT(f,g)d_{T}(f,g) as the infimum of all those values of δ\delta for which there exist grids 0≤t0<t1<⋯<tm0\leq t_{0}<t_{1}<\cdots<t_{m} and 0<s0<s1<⋯<⋯<sm0<s_{0}<s_{1}<\cdots<\cdots<s_{m}, with tk,sk≥Tt_{k},s_{k}\geq T, such that ∣ti−si∣≤δ|t_{i}-s_{i}|\leq\delta for i=0,…,ki=0,\ldots,k, and

for i=0,…,k−1i=0,\ldots,k-1. The Skorokhod metric on DE[0,∞)\mathcal{D}_{\mathcal{E}}[0,\infty) is defined to be

A.2 Stochastic Processes and Stochastic Integral

in probability as the mesh size of 0=t0<t1<⋯<tm=t0=t_{0}<t_{1}<\cdots<t_{m}=t goes to 0, if it exists. Moreover, for YY itself, we write

Let {X(t)}t≥0\{X(t)\}_{t\geq 0} be a {Ft}t≥0\{\mathcal{F}_{t}\}_{t\geq 0}-adapted stochastic process. If for all 0≤s≤t0\leq s\leq t, it holds that

Let {X(t)}t≥0\{X(t)\}_{t\geq 0} be a {Ft}t≥0\{\mathcal{F}_{t}\}_{t\geq 0}-adapted stochastic process. If there exists a sequence of {Ft}t≥0\{\mathcal{F}_{t}\}_{t\geq 0}-stopping time, {τk}k≥0\{\tau_{k}\}_{k\geq 0}, such that

and {Xτk(t)}t≥0\{X^{\tau_{k}}(t)\}_{t\geq 0} is a {Ft}t≥0\{\mathcal{F}_{t}\}_{t\geq 0}-adapted martingale,

Let {X(t)}t≥0\{X(t)\}_{t\geq 0} be a {Ft}t≥0\{\mathcal{F}_{t}\}_{t\geq 0}-adapted stochastic process. If there exists a local martingale {M(t)}t≥0\{M(t)\}_{t\geq 0} and a càdlàg {Ft}t≥0\{\mathcal{F}_{t}\}_{t\geq 0}-adapted process {A(t)}t≥0\{A(t)\}_{t\geq 0} with bounded total variation that X(t)=M(t)+A(t)X(t)=M(t)+A(t), then XX is called a semimartingale.

Since all deterministic process are adapted, the above definition of integral also makes sense for deterministic functions and is a generalization of standard Riemman-Stieltjes Integral. The difference is that in the above Itô’s Stochastic Integral we use the left-end value of the integrand but the existence of Riemman-Stieltjes Integral requires the limit exists for any point within the interval. When XX and YY don’t jump together, Riemman-Stieltjes Integral exists and coincides with the Itô’s Integral.

Let {X(t)}t≥0\{X(t)\}_{t\geq 0} be defined through the following Itô drift-diffusion process:

where {W(t)}t≥0\{W(t)\}_{t\geq 0} is the standard Brownian motion. Then for any twice differentiable function ff, it holds that

A.3 Weak Convergence for Stochastic Processes

Let (DE[0,∞),A,d)(\mathcal{D}_{\mathcal{E}}[0,\infty),\mathcal{A},d) be a metric space equipped with a σ\sigma-algebra A\mathcal{A} and the Skorokhod metric defined in the previous subsection.

Though we define weak convergence for a countable sequence of stochastic processes, but it is still valid if we index the stochastic processes by real numbers, e.g., {Xη}η≥0\{X_{\eta}\}_{\eta\geq 0}, and consider the weak convergence of XηX_{\eta} as η→0\eta\to 0. This is because the convergence in (20) is for a sequence of real numbers, which is also well-defined if we replace lim⁡n→∞\lim_{n\to\infty} by lim⁡η→0\lim_{\eta\to 0}.

Let δ>0\delta>0. For any two probability measures PP and QQ on a metric space with metric dd, let (X,Y)(X,Y) be a coupling such that PP is the marginalized law of XX and QQ that of YY. We define

Note this distance is not a metric because it does not satisfy triangle inequality.

For any two probability measures PP and QQ on a metric space with metric dd, let (X,Y)(X,Y) be a coupling such that PP is the marginalized law of XX and QQ that of YY. Denote the marginal laws of XX and YY by L(X)\mathcal{L}(X) and L(Y)\mathcal{L}(Y) respectively. We define the Prohorov metric as

It can be shown that Xn⇒XX_{n}\Rightarrow X is equivalent to lim⁡n→∞ρ(Xn,X)=0\lim_{n\to\infty}\rho(X_{n},X)=0.

For each finite T>0T>0 and each pair of functions f,g∈DE[0,T)f,g\in\mathcal{D}_{\mathcal{E}}[0,T), the uniform metric is defined to be

The uniform metric on DE[0,∞)\mathcal{D}_{\mathcal{E}}[0,\infty) is defined to be

Appendix B Limiting Diffusion of SGD

First, as mentioned in Assumption 3.2, we verify that the mapping Φ\Phi is C2\mathcal{C}^{2} in Lemma B.1. In Section B.1 we discuss how different time scalings could affect the coefficients in SDE (2) and (3). Then we check the necessary conditions for applying the results in Katzenberger (1991) in Section B.2 and recap the corresponding theorem for the asymptotically continuous case in Section B.3. Finally, we provide a user-friendly interface for Katzenberger’s theorem in Section B.4.

Under Assumption 3.2, Φ\Phi is C2\mathcal{C}^{2} on UU.

Applying Theorem 5.1 of Falconer (1983) with f(⋅)=ϕ(⋅,1)f(\cdot)=\phi(\cdot,1) suffices. ∎

where the time correspondence is t=kηt=k\eta, i.e., X(kη)≈xη(k)X(k\eta)\approx x_{\eta}(k).

Now rescale the above SDE by considering X~(t)=X(tη)\widetilde{X}(t)=X(t\eta), which then yields

where the time correspondence is t=kt=k, i.e., X~(k)≈xη(k)\widetilde{X}(k)\approx x_{\eta}(k). The above SDE is exactly the same as (2).

Then, to accelerate the above SDE by η−2\eta^{-2} times, let’s define Xˉ(t)=X~(t/η2)\bar{X}(t)=\widetilde{X}(t/\eta^{2}). Then it follows that

Again note that ηW(t/η2)=dW(t)\eta W(t/\eta^{2})\overset{d}{=}W(t) in sample paths and thus is also a Ξ\Xi-Brownian motion. Here the time correspondence is t=kη2t=k\eta^{2}, i.e., evolving for constant time with the above SDE approximates Ω(1/η2)\Omega(1/\eta^{2}) steps of SGD. In this way, we derive SDE (3) in the main context.

B.2 Necessary Conditions

Below we collect the necessary conditions imposed on {Zn}n≥1\{Z_{n}\}_{n\geq 1} and {An}n≥1\{A_{n}\}_{n\geq 1} in Katzenberger (1991). Recall that we consider the following stochastic process

For any stopping time τ\tau, the stopped process is defined as Xnτ(t)=Xn(t∧τ)X_{n}^{\tau}(t)=X_{n}(t\wedge\tau). For any compact K⊂UK\subset U, we define the stopping time of XnX_{n} leaving KK as λn(K)=inf⁡{t≥0∣Xn(t−)∉K˚ or Xn(t)∉K˚}\lambda_{n}(K)=\inf\{t\geq 0\mid X_{n}(t-)\notin\mathring{K}\text{ or }X_{n}(t)\notin\mathring{K}\}.

The integrator sequence {An}n≥1\{A_{n}\}_{n\geq 1} is asymptotically continuous: sup⁡t>0∣An(t)−An(t−)∣⇒0\sup\limits_{t>0}|A_{n}(t)-A_{n}(t-)|\Rightarrow 0 where An(t−)=lim⁡s→t−An(s)A_{n}(t-)=\lim_{s\to t-}A_{n}(s) is the left limit of AnA_{n} at tt.

The integrator sequence {An}n≥1\{A_{n}\}_{n\geq 1} increases infinitely fast: ∀ϵ>0\forall\epsilon>0, inf⁡t≥0(An(t+ϵ)−An(t))⇒∞\inf\limits_{t\geq 0}(A_{n}(t+\epsilon)-A_{n}(t))\Rightarrow\infty.

For every T>0T>0, as n→∞n\to\infty, it holds that

for every ϵ>0\epsilon>0 and T>0T>0, where Tt(⋅)T_{t}(\cdot) denotes total variation on the interval [0,t][0,t].

For SGD iterates defined using the notation in Lemma 4.2, the sequences {An}n≥1\{A_{n}\}_{n\geq 1} and {Zn}n≥1\{Z_{n}\}_{n\geq 1} satisfy Condition B.2, B.3, B.4 and B.5.

Condition B.2 is obvious from the definition of {An}n≥1\{A_{n}\}_{n\geq 1}.

Next, for any ϵ>0\epsilon>0 and t∈[0,T]t\in[0,T], we have

which implies that inf⁡0≤t≤T(An(t+ϵ)−An(t))>ϵ/(2ηn)\inf_{0\leq t\leq T}(A_{n}(t+\epsilon)-A_{n}(t))>\epsilon/(2\eta_{n}) for small enough ηn\eta_{n}. Then taking n→∞n\to\infty yields the Condition B.3.

Therefore, we have ∥ΔZn(t)∥2≤2ηnΞ\|\Delta Z_{n}(t)\|_{2}\leq 2\eta_{n}\sqrt{\Xi} for all t>0t>0. This implies that ∥ΔZn(t)∥2→0\|\Delta Z_{n}(t)\|_{2}\to 0 uniformly over t>0t>0 as n→∞n\to\infty, which verifies Condition B.4.

We proceed to verify Condition B.5. By the definition of ZnZ_{n}, we know that {Zn(t)}t≥0\{Z_{n}(t)\}_{t\geq 0} is a jump process with independent increments and thus is a martingale. Therefore, by decomposing Zn=Mn+FnZ_{n}=M_{n}+F_{n} with MnM_{n} being a local martingale and FnF_{n} a finite variation process, we must have Fn=0F_{n}=0 and MnM_{n} is ZnZ_{n} itself. It then suffices to show that [Mn](t∧τnm)[M_{n}](t\wedge\tau_{n}^{m}) is uniformly integrable for every t≥0t\geq 0 and m≥1m\geq 1. Since MnM_{n} is a pure jump process, we have

This implies that [Mη](t∧τηm)[M_{\eta}](t\wedge\tau_{\eta}^{m}) is universally bounded by 4t4t, and thus [Mη](t∧τηm)[M_{\eta}](t\wedge\tau_{\eta}^{m}) is uniformly integrable. This completes the proof. ∎

For any n≥1n\geq 1, it suffices to show that given Xn(kηn2)=xηn(k)X_{n}(k\eta_{n}^{2})=x_{\eta_{n}}(k), we further have Xn((k+1)ηn2)=xηn(k+1)X_{n}((k+1)\eta_{n}^{2})=x_{\eta_{n}}(k+1). By the definition of Xn(t)X_{n}(t) and note that An(t),Zn(t)A_{n}(t),Z_{n}(t) are constants on [kηn2,(k+1)ηn2)[k\eta_{n}^{2},(k+1)\eta_{n}^{2}), we have that Xn(t)=Xn(kηn2)X_{n}(t)=X_{n}(k\eta_{n}^{2}) for all t∈[kηn2,(k+1)ηn2)t\in[k\eta_{n}^{2},(k+1)\eta_{n}^{2}), and therefore

where the second equality is because An(t)A_{n}(t) and Zn(t)Z_{n}(t) are constant on interval [kηn2,(k+1)ηn2)[k\eta_{n}^{2},(k+1)\eta_{n}^{2}). This confirms the alignment between {Xn(kηn2)}k≥1\{X_{n}(k\eta_{n}^{2})\}_{k\geq 1} and {xηn(k)}k≥1\{x_{\eta_{n}}(k)\}_{k\geq 1}.

B.3 Katzenberger’s Theorem for Asymptotically Continuous Case

The full Katzenberger’s theorem deals with a more general case, which only requires the sequence of intergrators to be asymptotically continuous, thus including SDE (3) and SGD (1) with η\eta goes to .

for all t≤λn(K)t\leq\lambda_{n}(K) where λn(K)=inf⁡{t≥0∣Xn(t−)∉K˚ or Xn(t)∉K˚}\lambda_{n}(K)=\inf\{t\geq 0\mid X_{n}(t-)\notin\mathring{K}\text{ or }X_{n}(t)\notin\mathring{K}\} is the stopping time of XnX_{n} leaving KK.

We note that by Lemma A.16, convergence in distribution under skorohod metric is equivalent to convergence in distribution under uniform metric Definition A.15, therefore in the rest of the paper we will only use the uniform metric in the rest of the paper, e.g., whenever we mention Prohorov metric and δ\delta-Prohorov distance, the underlying metric is the uniform metric.

B.4 A User-friendly Interface for Katzenberger’s Theorem

Based on the Lemma B.6, we can immediately apply Theorem B.7 to obtain the following limiting diffusion of SGD.

Let the manifold Γ\Gamma and its open neighborhood UU satisfy Assumptions 3.1 and 3.2. Let K⊂UK\subset U be any compact set and fix some x0∈Kx_{0}\in K. Consider the SGD formulated in Lemma 4.2 where Xηn(0)≡x0X_{\eta_{n}}(0)\equiv x_{0}. Define

where {W(s)}s≥0\{W(s)\}_{s\geq 0} is the standard Brownian motion and σ(⋅)\sigma(\cdot) is as defined in Lemma 4.2.

However, the above theorem is hard to parse and cannot be directly applied if we want to further study the implicit bias of SGD through this limiting diffusion. Therefore, we develop a user-friendly interface to it in below. In particular, Theorem 4.6 is the a special case of Theorem B.9. In Theorem 4.6, we replace ∂Φ(Y(t))σ(Y(t))\partial\Phi(Y(t))\sigma(Y(t)) with Σ∥12(Y(t))\Sigma_{\parallel}^{\frac{1}{2}}(Y(t)) to simplify the equation, since ∂Φ(Y(t))σ(Y(t))(∂Φ(Y(t))σ(Y(t)))⊤=Σ∥(Y(t))\partial\Phi(Y(t))\sigma(Y(t))\left(\partial\Phi(Y(t))\sigma(Y(t))\right)^{\top}=\Sigma_{\parallel}(Y(t)) and thus this change doesn’t affect the distribution of the sample paths of the solution.

which means there is a coupling between the distribution of the stopped processes Yημη(K)∧TY_{\eta}^{\mu_{\eta}(K)\wedge T} and Yμ(K)∧TY^{\mu(K)\wedge T}, such that the uniform metric between them is smaller than ϵ\epsilon with probability at least 1−2δ1-2\delta. In other words, lim⁡η→0ρ2δ(Yημη(K)∧T,Yμ(K)∧T)=0\lim_{\eta\to 0}\rho^{2\delta}(Y_{\eta}^{\mu_{\eta}(K)\wedge T},Y^{\mu(K)\wedge T})=0.

Moreover, when {Y(t)}t≥0\{Y(t)\}_{t\geq 0} is a global solution to the following limiting diffusion

For clarity, we break the proof of Theorem B.9 into two parts, devoted to the two claims respectively.

First, Theorem B.8 guarantees there exists a stopping time μ~\widetilde{\mu} and a stochastic process {Y~(t)}t≥0\{\widetilde{Y}(t)\}_{t\geq 0} such that

(Y~,μ~)(\widetilde{Y},\widetilde{\mu}) satisfies Equation 23;

μ~≥μ~(K):=inf⁡{t≥0∣Y~(t)∉K˚}\widetilde{\mu}\geq\widetilde{\mu}(K):=\inf\{t\geq 0\mid\widetilde{Y}(t)\notin\mathring{K}\}.

Let ET\mathcal{E}_{T} be the event such that μ~(K)>T\widetilde{\mu}(K)>T on ET\mathcal{E}_{T}. Then restricted on ET\mathcal{E}_{T}, we have Y~(T∧μ~)=Y~(T∧μ~(K))\widetilde{Y}(T\wedge\widetilde{\mu})=\widetilde{Y}(T\wedge\widetilde{\mu}(K)) as μ~≥μ~(K)\widetilde{\mu}\geq\widetilde{\mu}(K) holds a.s. We first prove the claim for any convergent subsequence of {Yη}η>0\{Y_{\eta}\}_{\eta>0}.

Now, let {ηm}m≥1\{\eta_{m}\}_{m\geq 1} be a sequence of LRs such that ηm→0\eta_{m}\to 0 and Yηmμηm(K)⇒Y~μ~Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)}\Rightarrow\widetilde{Y}^{\widetilde{\mu}} as m→∞m\to\infty. By applying the Skorohod representation theorem, we can put {Yηm}m≥1\{Y_{\eta_{m}}\}_{m\geq 1} and Y~\widetilde{Y} under the same probability space such that Yηmμηm(K)→Y~μ~Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)}\to\widetilde{Y}^{\widetilde{\mu}} a.s. in the Skorohod metric, or equivalently the uniform metric (since Y~μ~\widetilde{Y}^{\widetilde{\mu}} is continuous) i.e.,

which further implies that for any ϵ>0\epsilon>0, there exists some N>0N>0 such that for all m>Nm>N,

Restricted on ET\mathcal{E}_{T}, we have dU(Yηmμηm(K)∧T,Y~μ~∧T)=dU(Yηmμηm(K)∧T,Y~μ~(K)∧T)d_{U}(Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)\wedge T},\widetilde{Y}^{\widetilde{\mu}\wedge T})=d_{U}(Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)\wedge T},\widetilde{Y}^{\widetilde{\mu}(K)\wedge T}), and it follows that for all m>Nm>N,

where we denote the complement of ET\mathcal{E}_{T} by ETc\mathcal{E}_{T}^{c}.

By the definition of the Prohorov metric in Definition A.13, we then get ρ2δ(Yηmμηm(K)∧T,Y~μ~(K)∧T)≤ϵ\rho^{2\delta}(Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)\wedge T},\widetilde{Y}^{\widetilde{\mu}(K)\wedge T})\leq\epsilon for all m>Nm>N. Therefore, we have

Now we claim that it indeed holds that lim⁡η→0ρ2δ(Yημη(K)∧T,Y~μ~(K)∧T)=0\lim_{\eta\to 0}\rho^{2\delta}(Y_{\eta}^{\mu_{\eta}(K)\wedge T},\widetilde{Y}^{\widetilde{\mu}(K)\wedge T})=0. We prove this by contradiction. Suppose otherwise, then there exists some ϵ>0\epsilon>0 such that for all η0>0\eta_{0}>0, there exists some η<η0\eta<\eta_{0} with ρ2δ(Yημη(K)∧T,Y~μ~(K)∧T)>ϵ\rho^{2\delta}(Y_{\eta}^{\mu_{\eta}(K)\wedge T},\widetilde{Y}^{\widetilde{\mu}(K)\wedge T})>\epsilon. Consequently, there is a sequence {ηm}m≥1\{\eta_{m}\}_{m\geq 1} satisfying lim⁡m→∞ηm=0\lim_{m\to\infty}\eta_{m}=0 and ρ2δ(Yηmμηm(K),Y~μ~(K)∧T)>ϵ\rho^{2\delta}(Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)},\widetilde{Y}^{\widetilde{\mu}(K)\wedge T})>\epsilon for all mm. Since {(Yηmμηm(K)∧T,Zηm,μηm(K))}m≥1\{(Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)\wedge T},Z_{\eta_{m}},\mu_{\eta_{m}}(K))\}_{m\geq 1} is relatively compact, there exists a subsequence (WLOG, assume it is the original sequence itself) converging to (Y~μ~∧T,W,μ~)(\widetilde{Y}^{\widetilde{\mu}\wedge T},W,\widetilde{\mu}) in distribution. However, repeating the exactly same argument as above, we would have ρ2δ(Yηmμηm(K)∧T,Y~μ~(K)∧T)≤ϵ\rho^{2\delta}(Y_{\eta_{m}}^{\mu_{\eta_{m}}(K)\wedge T},\widetilde{Y}^{\widetilde{\mu}(K)\wedge T})\leq\epsilon for all sufficiently large mm, which is a contradiction. This completes the proof. ∎

Note that ρδ(Yμ(K)∧T,Yμ(K′)∧T)=0\rho^{\delta}(Y^{\mu(K)\wedge T},Y^{\mu(K^{\prime})\wedge T})=0, so we have for all η≤η0\eta\leq\eta_{0},

On the other hand, if μη(K′)>T\mu_{\eta}(K^{\prime})>T, then YηT=Yημη(K′)∧TY_{\eta}^{T}=Y_{\eta}^{\mu_{\eta}(K^{\prime})\wedge T}. Thus we can conclude that dU(Yμ(K)∧T,YηT)≥2−⌈T⌉ϵ′d_{U}(Y^{\mu(K)\wedge T},Y_{\eta}^{T})\geq 2^{-\lceil T\rceil}\epsilon^{\prime} implies dU(Yμ(K)∧T,Yημη(K′)∧T)≥2−⌈T⌉ϵ′d_{U}(Y^{\mu(K)\wedge T},Y_{\eta}^{\mu_{\eta}(K^{\prime})\wedge T})\geq 2^{-\lceil T\rceil}\epsilon^{\prime}. Therefore, we further have

Finally, since ρδ(YT,Yμ(K)∧T)=0\rho^{\delta}(Y^{T},Y^{\mu(K)\wedge T})=0, we have for all η≤η0\eta\leq\eta_{0},

Now, we provide the proof of Theorem 4.6 as a direct application of Theorem B.9.

which means YY always stays on Γ\Gamma.

Then recall the decomposition of Σ=Σ∥+Σ⊥+Σ∥,⊥+Σ⊥,∥\Sigma=\Sigma_{\parallel}+\Sigma_{\perp}+\Sigma_{\parallel,\perp}+\Sigma_{\perp,\parallel} as defined in Lemma 4.5. Since YY never leaves Γ\Gamma, by Lemma 4.5, we can rewrite Equation 10 as

where the second equality follows from the definition that Σ∥=∂ΦΣ∂Φ=∂Φσσ⊤∂Φ\Sigma_{\parallel}=\partial\Phi\Sigma\partial\Phi=\partial\Phi\sigma\sigma^{\top}\partial\Phi. This coincides with the formulation of the limiting diffusion in Theorem B.9. Therefore, further combining Lemma 4.2 and the second part of Theorem B.9, we obtain the desired result. ∎

Our result suggests that for tiny LR η\eta, SGD dynamics have two phases. In Phase I of Θ(1/η)\Theta(1/\eta) steps, the SGD iterates move towards the manifold Γ\Gamma of local minimizers along GF. Then in Phase II which is of Θ(1/η2)\Theta(1/\eta^{2}) steps, the SGD iterates stay close to Γ\Gamma and diffuse approximately according to (10). See Figure 2 for an illustration of this two-phase dynamics. However, since the length of Phase I gets negligible compared to that of Phase II when η→0\eta\to 0, Theorem 4.6 only reflects the time scaling of Phase II.

Appendix C Explicit Formula of the Limiting Diffusion

In this section, we demonstrate how to compute the derivatives of Φ\Phi by relating to those of the loss function LL, and then present the explicit formula of the limiting diffusion.

For any x∈Γx\in\Gamma and any v∈Tx(Γ)v\in T_{x}(\Gamma), it holds that ∇2L(x)v=0\nabla^{2}L(x)v=0.

Evaluating the above equation at t=0t=0 yields ∂Φ(x)∇L(x)=0\partial\Phi(x)\nabla L(x)=0. Moreover, take the second order derivative and we have

Evaluating at t=0t=0 completes the proof. ∎

Now we can prove Lemma 4.3, restated in below. See 4.3

This implies that ∂Φ(x)v=v\partial\Phi(x)v=v for all v∈Tx(Γ)v\in T_{x}(\Gamma).

Next, for any u∈Tx⊥(Γ)u\in T_{x}^{\perp}(\Gamma) and t≥0t\geq 0, consider expanding ∇L(x+t∇2L(x)†u)\nabla L(x+t\nabla^{2}L(x)^{\dagger}u) at t=0t=0:

where the second equality follows from the assumption that ∇2L(x)\nabla^{2}L(x) is full-rank when restricted on Tx⊥(Γ)T_{x}^{\perp}(\Gamma). Then since ∂Φ\partial\Phi is continuous, it follows that

By Lemma C.2, we have ∂Φ(x+t(∇2L(x))†u))∇L(x+t(∇2L(x))†u)=0\partial\Phi(x+t(\nabla^{2}L(x))^{\dagger}u))\nabla L(x+t(\nabla^{2}L(x))^{\dagger}u)=0 for all t>0t>0, which then implies that ∂Φ(x)u=0\partial\Phi(x)u=0 for all u∈Tx⊥(Γ)u\in T_{x}^{\perp}(\Gamma).

Therefore, under the basis {v1,…,vD}\{v_{1},\ldots,v_{D}\}, ∂Φ(x)\partial\Phi(x) is given by

that is, the projection matrix onto Tx(Γ)T_{x}(\Gamma). ∎

For any x∈Γx\in\Gamma, it holds that ∂Φ(x)∇2L(x)=0\partial\Phi(x)\nabla^{2}L(x)=0.

It directly follows from Lemma C.1 and Lemma 4.3. ∎

Next, we proceed to compute the second-order derivatives.

Denote the derivative of P(t),P⊥(t)P(t),P^{\perp}(t) and H(t)H(t) with respect to tt as P′(t),(P⊥)′(t)P^{\prime}(t),(P^{\perp})^{\prime}(t) and H′(t)H^{\prime}(t). Then differentiating with respect to tt, we have

Then combining (25) and (26) and evaluating at t=0t=0, we have

We can decompose P′(0)P^{\prime}(0) and H(0)H(0) as follows

This implies that we must have P22′(0)=0P^{\prime}_{22}(0)=0 and P12′(0)H22(0)=H12′(0)P^{\prime}_{12}(0)H_{22}(0)=H^{\prime}_{12}(0). Similarly, by taking transpose in (27), we also have H22(0)P21′(0)=−H21′(0)H_{22}(0)P_{21}^{\prime}(0)=-H_{21}^{\prime}(0).

It then remains to determine the value of P11′(0)P^{\prime}_{11}(0). Note that since P(t)P(t)=P(t)P(t)P(t)=P(t), we have P′(t)P(t)+P(t)P′(t)=P′(t)P^{\prime}(t)P(t)+P(t)P^{\prime}(t)=P^{\prime}(t), evaluating which at t=0t=0 yields

Therefore, we must have P11′(0)=0P_{11}^{\prime}(0)=0. Combining the above results, we obtain

Finally, recall that P(t)=∂Φ(v(t))P(t)=\partial\Phi(v(t)), and thus

Similarly, we have H′(0)=∂2(∇L)(x)[v]H^{\prime}(0)=\partial^{2}(\nabla L)(x)[v], and it follows that

For any x∈Γx\in\Gamma and u∈Tx⊥(Γ)u\in T_{x}^{\perp}(\Gamma), it holds that

For any u∈Tx⊥(Γ)u\in T_{x}^{\perp}(\Gamma), we define u(t)=x+t∇2L(x)†uu(t)=x+t\nabla^{2}L(x)^{\dagger}u for t≥0t\geq 0. By Taylor approximation, we have

Combine (28) and (29) and apply Lemma C.2, and it follows that

where the last equality follows from Lemma C.3. Dividing both sides by t2t^{2} and letting t→0t\to 0, we get

Rearranging the above equation completes the proof. ∎

With the notion of Lyapunov Operator in Definition 4.4, Lemma C.5 can be further simplified into Lemma C.6.

Let A=uu⊤+∇2L(x)†uu⊤∇2L(x)A=uu^{\top}+\nabla^{2}L(x)^{\dagger}uu^{\top}\nabla^{2}L(x) and B=∇2L(x)†uu⊤B=\nabla^{2}L(x)^{\dagger}uu^{\top}. The key observation is that A+A⊤=L∇2L(x)(B+B⊤)A+A^{\top}=\mathcal{L}_{\nabla^{2}L(x)}(B+B^{\top}). Therefore, by Lemma C.5, it holds that

Then Lemma 4.5 directly follows from Lemma C.4 and C.6.

C.2 Tangent Noise Compensation only Dependends on the Manifold Itself

Here we show that the second term of (10), i.e., the tangent noise compensation for the limiting dynamics to stay on Γ\Gamma, only depends on Γ\Gamma itself.

For any x∈Γx\in\Gamma, suppose there exist a neighborhood UxU_{x} of xx and two loss functions LL and L′L^{\prime} that define the same manifold Γ\Gamma locally in UxU_{x}, i.e., Γ∩Ux={x∣∇L(x)=0}={x∣∇L′(x)=0}\Gamma\cap U_{x}=\{x\mid\nabla L(x)=0\}=\{x\mid\nabla L^{\prime}(x)=0\}. Then for any v∈Tx(Γ)v\in T_{x}(\Gamma), it holds that (∇2L(x))†∂2(∇L)(x)[v,v]=(∇2L′(x))†∂2(∇L′)(x)[v,v](\nabla^{2}L(x))^{\dagger}\partial^{2}(\nabla L)(x)\left[v,v\right]=(\nabla^{2}L^{\prime}(x))^{\dagger}\partial^{2}(\nabla L^{\prime})(x)\left[v,v\right].

C.3 Proof of results in Section 5

Now we are ready to give the missing proofs in Section 5 which yield explicit formula of the limiting diffusion for label noise and isotropic noise.

Set Σ∥=∂Φ\Sigma_{\parallel}=\partial\Phi, Σ⊥=ID−∂Φ\Sigma_{\perp}=I_{D}-\partial\Phi and Σ⊥,∥=Σ∥,⊥=0\Sigma_{\perp,\parallel}=\Sigma_{\parallel,\perp}=0 in the decomposition of Σ\Sigma by Lemma 4.5, and we need to show ∇(ln⁡∣Σ∣+)=∂2(∇L)[(∇2L)†]\nabla(\ln|\Sigma|_{+})=\partial^{2}(\nabla L)[(\nabla^{2}L)^{\dagger}].

C.4 Example: k𝑘k-Phase Motor

We also give an example with rigorous proof where the implicit bias induced by noise in the normal space cannot be characterized by a fixed regularizer, which was first discovered by Damian et al. (2021) but was only verified via experiments.

Note the normal regularization in both cases of label noise and isotropic noise induces Riemmanian gradient flow against some regularizer, it’s natural to wonder if the limiting flow induced by the normal noise can always be characterized by certain regularizer. Interestingly, Damian et al. (2021) answers this question negatively via experiments in their Section E.2. We adapt their example into the following one, and rigorously prove the limiting flow moves around a cycle at a constant speed and never stops using our framework.

The basic idea is that we can add noise in the ‘auxiliary dimensions’ for j=3,…,Dj=3,\ldots,D to get the regularization force on the circle {x12+x22=1}\{x_{1}^{2}+x_{2}^{2}=1\}, and the goal is to make the vector field induced by the normal regularization always point to the same direction, say anti-clockwise. However, this cannot be done with a single auxiliary dimension because from the analysis for label noise, we know when L∇2L−1(Σ⊥)\mathcal{L}^{-1}_{\nabla^{2}L}(\Sigma_{\perp}) is identity, the normal regularization term in Equation 10 has path integral along the unit circle and thus it must have both directions. The key observation here is that we can align the magnitude of noise with the strength of the regularization to make the path integral positive. By using k≥3k\geq 3 auxiliary dimensions, we can further ensure the normal regularization force is anti-clockwise and of constant magnitude, which is reminiscent of how a three-phase induction motor works.

Note that for any x∈Γx\in\Gamma, it holds that

Then clearly Σ\Sigma only brings about noise in the normal space, and specifically, it holds that L∇2L(x)−1(Σ(x))=diag(0,0,1+⟨Qα0v,Q−π/2x1:2⟩,…,1+⟨QαD−3v,Q−π/2x1:2⟩)\mathcal{L}_{\nabla^{2}L(x)}^{-1}(\Sigma(x))={\rm diag}(0,0,1+\left\langle Q_{\alpha}^{0}v,Q_{-\pi/2}x_{1:2}\right\rangle,\ldots,1+\left\langle Q_{\alpha}^{D-3}v,Q_{-\pi/2}x_{1:2}\right\rangle). Further note that, by the special structure of the hessian in (33) and Lemma C.3, for any x∈Γx\in\Gamma, we have ∂Φ(x)=(x2,−x1,0,…,0)⊤(x2,−x1,0,…,0)=(Q−π/2x1:20)(Q−π/2x1:20)⊤\partial\Phi(x)=(x_{2},-x_{1},0,\ldots,0)^{\top}(x_{2},-x_{1},0,\ldots,0)=\binom{Q_{-\pi/2}x_{1:2}}{0}\binom{Q_{-\pi/2}x_{1:2}}{0}^{\top}. Combining these facts, the dynamics of the first two coordinates in SDE (10) can be simplified into

The proof is completed by noting that the solution of x1:2x_{1:2} is

exp⁡((0−110))=(cos⁡1−sin⁡1sin⁡1cos⁡1)\exp(\left(\begin{smallmatrix}0&-1\\ 1&0\end{smallmatrix}\right))=\left(\begin{smallmatrix}\cos 1&-\sin 1\\ \sin 1&\cos 1\end{smallmatrix}\right).

By definition, for matrix A=(0−110)A=\left(\begin{smallmatrix}0&-1\\ 1&0\end{smallmatrix}\right), exp⁡(A)=∑t=0∞Att!\exp(A)=\sum_{t=0}^{\infty}\frac{A^{t}}{t!}. Note that A2=−IA_{2}=-I, A3=−AA^{3}=-A and A4=IA^{4}=I. Using this pattern, we can easily check that

Appendix D Proof of results in Section 6

In this section, we present the missing proofs in Section 6 regarding the overparametrized linear model.

In this subsection, we provide the proof of Theorem 6.1.

First, by Lemma 6.6, it holds with probability at least 1−e−Ω(n)1-e^{-\Omega(n)} that the solution to (18), x∗x_{*}, is unique up to and satisfies ∣x∗∣=ψ(w∗)|x_{*}|=\psi(w_{*}). Then on this event, for any ϵ>0\epsilon>0, by Lemma 6.5, there exists some T>0T>0 such that xTx_{T} given by the Riemannian gradient flow (17) satisfies that xTx_{T} is an ϵ/2\epsilon/2-optimal solution of the OLM. For this TT, by Theorem 4.6, we know that the ⌊T/η2⌋\lfloor T/\eta^{2}\rfloor-th SGD iterate, xη(⌊T/η2⌋)x_{\eta}(\lfloor T/\eta^{2}\rfloor), satisfies ∥xη(⌊T/η2⌋)−xT∥2≤ϵ/2\|x_{\eta}(\lfloor T/\eta^{2}\rfloor)-x_{T}\|_{2}\leq\epsilon/2 with probability at least 1−e−Ω(n)1-e^{-\Omega(n)} for all sufficiently small η>0\eta>0, and thus xη(⌊T/η2⌋)x_{\eta}(\lfloor T/\eta^{2}\rfloor) is an ϵ\epsilon-optimal solution of the OLM. Finally, the validity of applying Theorem 4.6 is guaranteed by Lemma 6.2 and 6.3. This completes the proof. ∎

In the following subsections, we provide the proofs of all the components used in the above proof.

D.2 Proof of Lemma 6.2

Recall that for each i∈[n]i\in[n] fi(x)=f(u,v)=zi⊤(u⊙2−v⊙2),∇fi(x)=2(zi⊙uzi⊙v)f_{i}(x)=f(u,v)=z_{i}^{\top}(u^{\odot 2}-v^{\odot 2}),\nabla f_{i}(x)=2\binom{z_{i}\odot u}{z_{i}\odot v}, and K(x)=(Kij(x))i,j∈[n]K(x)=(K_{ij}(x))_{i,j\in[n]} where each Kij(x)=⟨∇fi(x),∇fj(x)⟩K_{ij}(x)=\langle\nabla f_{i}(x),\nabla f_{j}(x)\rangle. Then

which implies that ∑i=1nλi∇fi(x)=0\sum_{i=1}^{n}\lambda_{i}\nabla f_{i}(x)=0. This is a contradiction since by assumption {∇fi(x)}i∈[n]\{\nabla f_{i}(x)\}_{i\in[n]} is linearly independent. ∎

(1) By preimage theorem (Banyaga & Hurtubise, 2013), it suffices to check the jacobian [∇f1(x),…,∇fn(x)]=2[(z1⊙u−z1⊙v),…,(zn⊙u−zn⊙v)][\nabla f_{1}(x),\ldots,\nabla f_{n}(x)]=2[\binom{z_{1}\odot u}{-z_{1}\odot v},\ldots,\binom{z_{n}\odot u}{-z_{n}\odot v}] is full rank. Similarly, for the second claim, due to (34). it is also equivalent to show that {(zi⊙u−zi⊙v)}i∈[n]\{\binom{z_{i}\odot u}{-z_{i}\odot v}\}_{i\in[n]} is of rank nn.

Since (uv)∈Γ⊂U\binom{u}{v}\in\Gamma\subset U, each coordinate is non-zero, thus we only need to show that {zi}i∈[n]\{z_{i}\}_{i\in[n]} is of rank nn. This happens with probability 1 in the Gaussian case, and probability at least 1−cd1-c^{d} for some constant c∈(0,1)c\in(0,1) by Kahn et al. (1995). This completes the proof. ∎

D.3 Proof of Lemma 6.3

We first establish some auxiliary results. The following lemma shows the PL condition along the trajectory of gradient flow.

Along the gradient flow generated by −∇L-\nabla L, it holds that ∥∇L(x(t))∥2≥16nλmin⁡(ZZ⊤)⋅min⁡i∈[d]∣ui(0)vi(0)∣L(x(t)),∀t≥0\left\|\nabla L(x(t))\right\|^{2}\geq\frac{16}{n}\lambda_{\min}(ZZ^{\top})\cdot\min_{i\in[d]}|u_{i}(0)v_{i}(0)|L(x(t)),\forall t\geq 0.

To prove Lemma D.2, we need the following invariance along the gradient flow.

Therefore, any sign change of uj(t),vj(t){u_{j}}(t),{v_{j}}(t) would enforce uj(t)=0{u_{j}}(t)=0 or vj(t)=0{v_{j}}(t)=0 for some t>0t>0 since uj(t),vj(t){u_{j}}(t),{v_{j}}(t) are continuous in time tt. This immediately leads to a contradiction to the invariance of uj(t)vj(t)u_{j}(t)v_{j}(t). ∎

where K(x)K(x) is a n×nn\times n p.s.d. matrix with Kij(x)=⟨∇fi(x),∇fj(x)⟩K_{ij}(x)=\left\langle\nabla f_{i}(x),\nabla f_{j}(x)\right\rangle. Below we lower bound λmin⁡(K(x))\lambda_{\min}(K(x)), the smallest eigenvalue of K(x)K(x). Note that Kij(x(t))=4∑h=1dzi,hzj,h((uh(t))2+(vh(t))2)K_{ij}(x(t))=4\sum_{h=1}^{d}z_{i,h}z_{j,h}((u_{h}(t))^{2}+(v_{h}(t))^{2}), and we have

where (∗)(*) is by Lemma D.3. Thus λmin⁡(K(x(t))≥8min⁡i∈[d]∣ui(0)vi(0)∣λmin⁡(ZZT)\lambda_{\min}(K(x(t))\geq 8\min_{i\in[d]}|u_{i}(0)v_{i}(0)|\lambda_{\min}(ZZ^{T}) for all t≥0t\geq 0, which completes the proof. ∎

We also need the following characterization of the manifold Γ\Gamma.

All the stationary points in UU are global minimizers, i.e., Γ={x∈U∣∇L(x)=0}\Gamma=\{x\in U\mid\nabla L(x)=0\}.

Now, we are ready to prove Lemma 6.3 which is restated below. See 6.3

Below we prove lim⁡t→∞x(t)\lim_{t\to\infty}x(t) exists. Denote C=16nmin⁡i∈[d]∣ui(0)vi(0)∣λmin⁡(ZZ⊤)C=\frac{16}{n}\min_{i\in[d]}|u_{i}(0)v_{i}(0)|\lambda_{\min}(ZZ^{\top}), then it follows from Lemma D.2 that

D.4 Proof of results in Section 6.2

Without loss of generality, we will assume ∑i=1zi,j2>0\sum_{i=1}z_{i,j}^{2}>0 for all j∈[d]j\in[d], because otherwise we can just delete the unused coordinate, since there won’t be any update in the parameter corresponding to that coordinate. Moreover, in both gaussian and boolean setting, it can be shown that with probability 1, ∑i=1zi,j2>0\sum_{i=1}z_{i,j}^{2}>0 for all j∈[d]j\in[d].

Here we slightly abuse the notation of RR and the parameter dimension will be clear from the context. We can relate the optimal solution to (18) to that of (35) via a canonical parametrization defined as follows.

Indeed, we can show that if (35) has a unique optimal solution, it immediately follows that the optimal solution to (18) is also unique up to sign flips of each coordinate, as summarized in the lemma below.

Suppose the optimal solution to (35) is unique and equal to w∗w^{*}. Then the optimal solution to (18) is also unique up to sign flips of each coordinate. In particular, one of them is given by (u~∗,v~∗)=ψ(w∗)(\widetilde{u}^{*},\widetilde{v}^{*})=\psi(w^{*}), that is, the canonical parametrization of w∗w^{*}.

Let (u^,v^)(\widehat{u},\widehat{v}) be any optimal solution of (18) and we define w^=u^⊙2−v^⊙2\widehat{w}=\widehat{u}^{\odot 2}-\widehat{v}^{\odot 2}, which is also feasible to (35). By the optimality of w∗w^{*}, we have

On the other hand, (u~∗,v~∗)=ψ(w∗)(\widetilde{u}^{*},\widetilde{v}^{*})=\psi(w^{*}) is feasible to (18). Thus, it follows from the optimality of (u^,v^)(\widehat{u},\widehat{v}) that

which implies that u^⊙2−v^⊙2\widehat{u}^{\odot 2}-\widehat{v}^{\odot 2} is also an optimal solution of (35). Since w∗w^{*} is the unique optimal solution to (35), we have u^⊙2−v^⊙2=w∗\widehat{u}^{\odot 2}-\widehat{v}^{\odot 2}=w^{*}. Moreover, by (38), we must have u^⊙2=[w∗]+\widehat{u}^{\odot 2}=[w^{*}]_{+} and u^⊙2=[w∗]+\widehat{u}^{\odot 2}=[w^{*}]_{+}, otherwise the equality would not hold. This completes the proof. ∎

Therefore, the unique optimality of (18) can be reduced to that of (35). In the sequel, we show that the latter holds for both Boolean and Gaussian random vectors. We divide Lemma 6.6 into to Lemma D.8 and D.7 for clarity.

then with probability at least 1−e−cn21-e^{-cn^{2}}, the optimal solution of (18), (u^,v^)(\widehat{u},\widehat{v}), is unique up to sign flips of each coordinate and recovers the groundtruth, i.e., u^⊙2−v^⊙2=w∗\widehat{u}^{\odot 2}-\widehat{v}^{\odot 2}=w^{*}.

This model exactly fits the Example 6.2 in Tropp (2015) with σ=1\sigma=1 and α=1/2\alpha=1/\sqrt{2}. Then applying Equation (4.2) and Theorem 6.3 in Tropp (2015), (39) has a unique optimal solution equal to (u∗)⊙2−(v∗)⊙2(u^{*})^{\odot 2}-(v^{*})^{\odot 2} with probability at least 1−e−ch21-e^{-ch^{2}} for some constant c>0c>0, given that the sample size satisfies

for some absolute constant C>0C>0. Choosing h=n2Ch=\frac{n}{2C} and then adjusting the choices of C,cC,c appropriately yield the desired result. Finally, applying Lemma D.6 finishes the proof. ∎

The Gaussian case requires more careful treatment.

Let z1,…,zn∼i.i.d.N(0,Id)z_{1},\ldots,z_{n}\overset{\text{i.i.d.}}{\sim}\mathcal{N}(0,I_{d}). There exist some constants C,c>0C,c>0 such that if the sample size satisfies

then with probability at least 1−(2d+1)e−cn1-(2d+1)e^{-cn}, the optimal solution of (18), (u^,v^)(\widehat{u},\widehat{v}), is unique up to sign flips of each coordinate of u^\widehat{u} and v^\widehat{v} and recovers the groundtruth, i.e., u^⊙2−v^⊙2=w∗\widehat{u}^{\odot 2}-\widehat{v}^{\odot 2}=w^{*}.

Since z1,…,zn∼i.i.d.N(0,Id)z_{1},\ldots,z_{n}\overset{\text{i.i.d.}}{\sim}\mathcal{N}(0,I_{d}), we have

for some constant c>0c>0, and we denote this event by En\mathcal{E}_{n}. Therefore, on En\mathcal{E}_{n}, we have

Define w∗=(u∗)⊙2−(v∗)⊙2w^{*}=(u^{*})^{\odot 2}-(v^{*})^{\odot 2}, and (35) is equivalent to the following convex optimization problem

The point w=0w=0 is feasible for (40), and we claim that this is the unique optimal solution when nn is large enough. In detail, assume that there exists a non-zero feasible point ww for (40) in the descent cone (Tropp, 2015) D(g,w∗)\mathcal{D}(g,w^{*}) of gg, then

where the equality follows from that ww is feasible. Therefore, we only need to show that λmin⁡(Z;D(g,x∗))\lambda_{\min}(Z;\mathcal{D}(g,x^{*})) is bounded from below for sufficiently large nn.

On En\mathcal{E}_{n}, it holds that gg belongs to the following function class

We identify gυ∈Gg_{\upsilon}\in\mathcal{G} with υ∈Υ\upsilon\in\Upsilon, then D(g,w∗)⊆∪υ∈ΥD(gυ,w∗)):=DΥ\mathcal{D}(g,w^{*})\subseteq\cup_{\upsilon\in\Upsilon}\mathcal{D}(g_{\upsilon},w^{*})):=\mathcal{D}_{\Upsilon}, which further implies that

Recall the definition of minimum conic singular value (Tropp, 2015):

Take the intersection of this event with En\mathcal{E}_{n}, and we obtain from a union bound that

with probability at least 1−e−h2/2−2de−cn1-e^{-h^{2}/2}-2de^{-cn}. It remains to determine w(DΥ)w(\mathcal{D}_{\Upsilon}), which is defined as

Without loss of generality, we assume that w∗=(w1∗,…,wκ∗,0,…,0)⊤w^{*}=(w^{*}_{1},\ldots,w^{*}_{\kappa},0,\ldots,0)^{\top} with w1∗,…,wκ∗>0w^{*}_{1},\ldots,w^{*}_{\kappa}>0, otherwise one only needs to specify the signs and the nonzero set of w∗w^{*} in the sequel. For any υ∈Υ\upsilon\in\Upsilon and any p∈D(gυ,w∗)∩Sd−1p\in\mathcal{D}(g_{\upsilon},w^{*})\cap{\mathcal{S}}^{d-1}, there exists some τ>0\tau>0 such that gυ(w∗+τ⋅p)≤gυ(w∗)g_{\upsilon}(w^{*}+\tau\cdot p)\leq g_{\upsilon}(w^{*}), i.e.,

where the second inequality follows from the triangle inequality. Then since each υj∈\upsilon_{j}\in, it follows that

where the last inequality follows from the fact that p∈Sd−1p\in{\mathcal{S}}^{d-1}. Therefore, combine the above inequality with (42), and we obtain that

Therefore, combining (44) and (41), we obtain

Therefore, choosing h=n−1/2h=\sqrt{n-1}/2, as long as nn satisfies that n≥C(κln⁡d)n\geq C(\kappa\ln d) for some constant C>0C>0, we have λmin⁡(Z;D(g,w∗))>0\lambda_{\min}(Z;\mathcal{D}(g,w^{*}))>0 with probability at least 1−(2d+1)e−cn1-(2d+1)e^{-cn}. Finally, the uniqueness of the optimal solution to (18) in this case follows from Lemma D.6. ∎

Denote M=max⁡i∈[d]∣zi∣M=\max_{i\in[d]}|z_{i}|. For any λ>0\lambda>0, by Jensen’s inequality, we have

Choosing λ=2ln⁡(2d)\lambda=\sqrt{2\ln(2d)} yields the desired result. ∎

D.5 Proof of Lemma 6.5

For any λ\lambda such that ∇xL(x;λ)=F(x)\nabla_{x}\mathcal{L}(x;\lambda)=F(x), we must have ∇h(λ)=0\nabla h(\lambda)=0 by the definition of F(x)F(x), which by the above implies

for all i∈[n]i\in[n]. This finishes the proof. ∎

Hence, with any initialization x(0)∈Γx(0)\in\Gamma, the limiting flow (17) is equivalent to the following dynamics

Thus Lemma 6.5 can be proved by showing that the above x(t)x(t) converges to x∗x^{*} as t→∞t\to\infty. We first present a series of auxiliary results in below.

Since F(x)=0F(x)=0, it holds for all j∈[d]j\in[d] that,

If there exists some j∈[d]j\in[d] such that uj≠0{u_{j}}\neq 0 and vj≠0{v_{j}}\neq 0, then it follows from the above two identities that

which happens with probability 0 in both the Boolean and Gaussian case. Therefore, we must have uj=0{u_{j}}=0 or vj=0{v_{j}}=0 for all j∈[d]j\in[d]. ∎

Thus such λ\lambda is unique and given by

Since K(x)K(x) is continuous around x∗x^{*}, there exists a sufficiently small δ>0\delta>0 such that for any x∈Bδ(x∗)x\in B_{\delta}(x^{*}), K(x)K(x) is full-rank, which further implies that K(x)−1K(x)^{-1} is also continuous in Bδ(x)B_{\delta}(x). Therefore, by the above characterization of λ\lambda, we see that λ(x)\lambda(x) is continuous for x∈Bδ(x∗)x\in B_{\delta}(x^{*}), and so is F(x)=∇R(x)+∑i=1nλi(x)∇fi(x)F(x)=\nabla R(x)+\sum_{i=1}^{n}\lambda_{i}(x)\nabla f_{i}(x).

where the first and third inequalities follow from the definition of F(x)F(x). Let x→x∗x\to x^{*}, by the continuity of ∇R(x)\nabla R(x) and {∇fi(x)}i∈[n]\{\nabla f_{i}(x)\}_{i\in[n]}, we have

Denote K~(x)=(K~ij(x))(i,j)∈[q′]2=(⟨∇fi(x)1:(2q),∇fi(x)1:(2q)⟩)(i,j)∈[q′]2\widetilde{K}(x)=(\widetilde{K}_{ij}(x))_{(i,j)\in[q^{\prime}]^{2}}=(\langle\nabla f_{i}(x)_{1:(2q)},\nabla f_{i}(x)_{1:(2q)}\rangle)_{(i,j)\in[q^{\prime}]^{2}}. By applying the same argument as in Case I, since K~(x∗)\widetilde{K}(x^{*}) is full-rank, it also holds that lim⁡x→x∗λˉ(x)=λˉ(x∗)\lim_{x\to x^{*}}\bar{\lambda}(x)=\bar{\lambda}(x^{*}), and thus

Moreover, since ∥F(2q+1):D(x)∥2=∥F(x)∥22−∥F1:(2q)(x)∥22\|F_{(2q+1):D}(x)\|_{2}=\sqrt{\|F(x)\|_{2}^{2}-\|F_{1:(2q)}(x)\|_{2}^{2}}, we also have

It then remains to show that lim⁡x→x∗F1:(2q)(x)=F1:(2q)(x∗)\lim_{x\to x^{*}}F_{1:(2q)}(x)=F_{1:(2q)}(x^{*}), which directly follows from lim⁡x→x∗λ1:q′(x)=λ1:q′(x∗)=λˉ(x∗)\lim_{x\to x^{*}}\lambda_{1:q^{\prime}}(x)=\lambda_{1:q^{\prime}}(x^{*})=\bar{\lambda}(x^{*}).

Now, for any ϵ>0\epsilon>0, due to the convergence of λˉ(x)\bar{\lambda}(x) and that K~(x∗)≻0\widetilde{K}(x^{*})\succ 0, we can pick a sufficiently small δ1\delta_{1} such that for some constant α>0\alpha>0 and all x∈Bδ1(x∗)x\in B_{\delta_{1}}(x^{*}), it holds that ∥λˉ(x)−λˉ(x∗)∥2≤ϵ/2\|\bar{\lambda}(x)-\bar{\lambda}(x^{*})\|_{2}\leq\epsilon/2 and

where the second equality follows from (52) and the second equality is due to (51). Therefore, we can pick a sufficiently small δ2\delta_{2} such that

for all x∈Bδ2(x∗)x\in B_{\delta_{2}}(x^{*}). Setting δ=min⁡(δ1,δ2)\delta=\min(\delta_{1},\delta_{2}), it follows from (54) and (55) that

Recall that we already have ∥λˉ(x)−λˉ(x∗)∥≤ϵ/2\|\bar{\lambda}(x)-\bar{\lambda}(x^{*})\|\leq\epsilon/2, and thus

for all x∈Bδ(x∗)x\in B_{\delta}(x^{*}). Therefore, we see that lim⁡x→x∗λ1:q′(x)=λ(x∗)1:q′\lim_{x\to x^{*}}\lambda_{1:q^{\prime}}(x)=\lambda(x^{*})_{1:q^{\prime}}.

Finally, it follows from the triangle inequality that

where, as x→x∗x\to x^{*}, the first term vanishes by the convergence of λ1:q′(x)\lambda_{1:q^{\prime}}(x) and the continuity of each ∇fi(x)\nabla f_{i}(x), the second term converges to 0 by the continuity of ∇R(x)\nabla R(x) and the third term vanishes by (53). Therefore, we conclude that

For any initialization x∗∈Γx^{*}\in\Gamma, the Riemmanian Gradient Flow (17) (or equivalently, (45)) is defined on [0,∞)[0,\infty).

Let [0,T)[0,T) be the right maximal interval of existence of the solution of Riemannian gradient glow and suppose T≠∞T\neq\infty. Since R(x(t))R(x(t)) is monotone decreasing, thus R(x(t))R(x(t)) is upper bounded by R(x(0))R(x(0)) and therefore ∥∇R(x(t))∥\left\|\nabla R(x(t))\right\| is also upper bounded. Since ∥dx(t)dt∥2≤∥∇R(x(t))∥2\left\|\frac{dx(t)}{dt}\right\|_{2}\leq\left\|\nabla R(x(t))\right\|_{2} for any t<Tt<T, the left limit x(T−):=lim⁡τ→T−x(τ)x(T-):=\lim_{\tau\to T^{-}}x(\tau) must exist. By Corollary 1, Perko (2001), x(T−)x(T-) belongs to boundary of UU, i.e., uj(T−)=0u_{j}(T-)=0 or vj(T−)=0v_{j}(T-)=0 for some j∈[d]j\in[d] by Lemma D.11. By the definition of the Riemannian gradient flow in (17), we have

By the expression of F(x(t))=∇R(x(t))+∑i=1nλi(x(t))∇fi(x(t))F(x(t))=\nabla R(x(t))+\sum_{i=1}^{n}\lambda_{i}(x(t))\nabla f_{i}(x(t)), we then have

Denote sj=4n∑i=1nzi,j2s_{j}=\frac{4}{n}\sum_{i=1}^{n}z_{i,j}^{2}. It follows that ∣uj(t)vj(t)∣=∣uj(0)vj(0)∣e−sjt|u_{j}(t)v_{j}(t)|=|u_{j}(0)v_{j}(0)|e^{-s_{j}t} for all t∈[0,T)t\in[0,T). Taking the limit we have ∣uj(T−)vj(T−)∣≥∣uj(0)vj(0)∣e−sjT>0|u_{j}(T-)v_{j}(T-)|\geq|u_{j}(0)v_{j}(0)|e^{-s_{j}T}>0. Contradiction with T≠∞T\neq\infty! ∎

For any point vv in QQ and any z∈Br2(0)z\in B^{2}_{r}(0), we take a random direction in SS, denoted by ω\omega. If ω≥0\omega\geq 0 or ω≤0\omega\leq 0, we denote by yy the first intersection between {v+z−λ∣ω∣}λ≥0\{v+z-\lambda|\omega|\}_{\lambda\geq 0} and the boundary of UU. Clearly y≤vy\leq v. Since y∈P∩(u⋆+S+Br2(0))∩Hi⊂P∩(ui+S∩Hi+Bαir2(0)∩Hi)y\in P\cap(u_{\star}+S+B^{2}_{r}(0))\cap H_{i}\subset P\cap(u_{i}+S\cap H_{i}+B^{2}_{\alpha_{i}r}(0)\cap H_{i}), by the induction hypothesis, there exists a u∈c(P∩(u⋆+S)∩Hi)u\in c(P\cap(u_{\star}+S)\cap H_{i}) such that u≤yu\leq y. Thus z≤v+zz\leq v+z and z∈c(P∩(u⋆+S))=c⋅Qz\in c(P\cap(u_{\star}+S))=c\cdot Q.

(Polyak-Łojasiewicz condition for FF.) For any x∗x^{*} such that L(x∗)=0L(x^{*})=0, i.e., x∗∈Γ‾x^{*}\in\overline{\Gamma}, there exist a neighbourhood U′U^{\prime} of x∗x^{*} and a constant c>0c>0, such that ∥F(x)∥22≥c⋅max⁡(R(x)−R(x∗),0)\left\|F(x)\right\|_{2}^{2}\geq c\cdot\max(R(x)-R(x^{*}),0) for all x∈U′∩Γ‾x\in U^{\prime}\cap\overline{\Gamma}. Note this requirement is only non-trivial when ∥F(x∗)∥2=0\left\|F(x^{*})\right\|_{2}=0 since FF is continuous.

It suffices to show the PL condition for {x∣F(x)=0}\{x\mid F(x)=0\}. We need to show for any x∗x^{*} satisfying F(x∗)=0F(x^{*})=0, there exist some ϵ>0\epsilon>0 and C>0C>0, such that for all x∈Γ‾∩Bϵ2(x∗)x\in\overline{\Gamma}\cap B_{\epsilon}^{2}(x^{*}) with R(x)>R(x∗)R(x)>R(x^{*}), it holds that ∥F(x)∥22≥C(R(x)−R(x∗))\left\|F(x)\right\|^{2}_{2}\geq C(R(x)-R(x^{*})).

We temporarily reorder the coordinates as x=(u1,v1,u2,v2,…,ud,vd)⊤x=(u_{1},v_{1},u_{2},v_{2},\ldots,u_{d},v_{d})^{\top}. Recall that Z=[z1,…,zn]⊤Z=[z_{1},\ldots,z_{n}]^{\top} is a nn-by-dd matrix, and we have

Now suppose R′(w)−R′(w∗)=gb⊤wb=δR^{\prime}(w)-R^{\prime}(w^{*})=g_{b}^{\top}w_{b}=\delta for some sufficiently small δ\delta (which can be controlled by ϵ\epsilon). We will proceed in the following two cases separately.

Case I.1: ∥Δλa∥2=Ω(δ)\left\|\Delta\lambda_{a}\right\|_{2}=\Omega(\sqrt{\delta}). Since ZAZ_{A} has full row rank, ∥(ZA⊤Δλa)⊙2∥1=∥(ZA⊤Δλa)∥22≥∥Δλa∥22λmin⁡2(ZA)\left\|(Z_{A}^{\top}\Delta\lambda_{a})^{\odot 2}\right\|_{1}=\left\|(Z_{A}^{\top}\Delta\lambda_{a})\right\|_{2}^{2}\geq\left\|\Delta\lambda_{a}\right\|_{2}^{2}\lambda_{\min}^{2}(Z_{A}) is lower-bounded. On the other hand, we can choose ϵ\epsilon small enough such that ∀i∈[q]∣(wa)i2∣≥12(wa∗)i2\forall i\in[q]|(w_{a})_{i}^{2}|\geq\frac{1}{2}(w^{*}_{a})_{i}^{2}. Thus the first term of Equation 57 is lower bounded by ∥Δλa∥22λmin⁡2(ZA)⋅min⁡i∈[q]12(wa∗)i2=Ω(δ)=Ω(R′(w)−R′(w∗))\left\|\Delta\lambda_{a}\right\|_{2}^{2}\lambda_{\min}^{2}(Z_{A})\cdot\min_{i\in[q]}\frac{1}{2}(w^{*}_{a})_{i}^{2}=\Omega(\delta)=\Omega(R^{\prime}(w)-R^{\prime}(w^{*})).

On the other hand, we have u⊤wb=δ>0u^{\top}w_{b}=\delta>0 for all wb∈δ∥gb∥22gb+Aw_{b}\in\frac{\delta}{\left\|g_{b}\right\|_{2}^{2}}g_{b}+A and u∈Su\in S, by ZDgb=0Z_{D}g_{b}=0 and the definition of AA. This implies there exists at least one i∈[d−q′]i\in[d-q^{\prime}] such that w2,iui>0w_{2,i}{u_{i}}>0, which further implies ⟨u⊙2,wb⟩>0\left\langle u^{\odot 2},w_{b}\right\rangle>0. Therefore, we conclude that ∥F′(w)∥22=Ω(R′(w)−R′(w0))\left\|F^{\prime}(w)\right\|_{2}^{2}=\Omega(R^{\prime}(w)-R^{\prime}(w_{0})).

General Case.

Next, for any general x=(uv)x=\binom{u}{v}, we define w=u⊙2−v⊙2w=u^{\odot 2}-v^{\odot 2} and m=min⁡{u⊙2,v⊙2}m=\min\{u^{\odot 2},v^{\odot 2}\}, where min⁡\min is taken coordinate-wise. Then we can rewrite ∥F(x)∥22\|F(x)\|_{2}^{2} as

Then applying the result for the previous case yields the following for some constant C∈(0,1)C\in(0,1):

where the first equality follows from the fact that x∗=ψ(w∗)x^{*}=\psi(w^{*}) and the last inequality is due to the fact that both R(ψ(w)−R(ψ(w∗))R(\psi(w)-R(\psi(w^{*})) and R(x)−R(ψ(w))R(x)-R(\psi(w)) are non-negative. This completes the proof. ∎

Now, based on the PL condition, we can show that (17) indeed converges.

Note that along the Riemannian gradient flow, R(x(t))R(x(t)) is non-increasing, thus ∥x(t)∥2\left\|x(t)\right\|_{2} is bounded over time and {x(t)}t≥0\{x(t)\}_{t\geq 0} has at least one limit point, which we will call x∗x^{*}. Therefore, R(x∗)R(x^{*}) is a limit point of R(x(t))R(x(t)), and again since R(x(t))R(x(t)) is non-increasing, it follows that R(x(t))≥R(x∗)R(x(t))\geq R(x^{*}) and lim⁡t→∞R(x(t))=R(x∗)\lim_{t\to\infty}R(x(t))=R(x^{*}). Below we will show lim⁡t→∞x(t)=x∗\lim_{t\to\infty}x(t)=x^{*}.

Thus it holds that for t∈[T0,T1)t\in[T_{0},T_{1}),

Thus if we pick T0T_{0} such that R(x(T0))−R(x∗)R(x({T_{0}}))-R(x^{*}) is sufficiently small, R(T1)R(T_{1}) will remain in UU, which implies that T1T_{1} cannot be finite and has to be ∞\infty. Therefore, Equation 59 shows that the trajectory of x(t)x(t) is of finite length, so x(∞):=lim⁡t→∞x(t)x(\infty):=\lim_{t\to\infty}x(t) exists and is equal to x∗x^{*}. As a by-product, F(x∗)F(x^{*}) must be . ∎

Finally, collecting all the above lemmas, we are able to prove Lemma 6.5. In Lemma D.17 we already show the convergence of x(t)x(t) as t→∞t\to\infty, the main part of the proof of Lemma 6.5 is to show the x(∞)x(\infty) cannot be sub-optimal stationary points of RR on Γ‾\overline{\Gamma}, the closure of Γ\Gamma. The key idea here is that we can construct a different potential ϕ\phi for each such sub-optimal stationary point x∗x^{*}, such that (1) ϕ(xt)\phi(x_{t}) is locally increasing in a sufficiently neighborhood of x∗x^{*} and (2) lim⁡x→x∗ϕ(x)=−∞\lim_{x\to x^{*}}\phi(x)=-\infty. See 6.5

We will prove by contradiction. Suppose x(∞)=(u(∞)v(∞))=lim⁡t→∞x(t)x(\infty)=\binom{u(\infty)}{v(\infty)}=\lim_{t\to\infty}x(t) is not the optimal solution to (18). Denote w(t)=(u(t))⊙2−(v(t))⊙2w(t)=(u(t))^{\odot 2}-(v(t))^{\odot 2}, then w(∞)=lim⁡t→∞w(t)w(\infty)=\lim_{t\to\infty}w(t) is not the optimal solution to (35). Thus we have R(w(t))>R(w∗)R(w(t))>R(w^{*}). Without loss of generality, suppose there is some q∈[d]q\in[d] such that (ui(∞))2+(vi(∞))2>0(u_{i}(\infty))^{2}+(v_{i}(\infty))^{2}>0 for all i=1,…,qi=1,\ldots,q and ui(∞)=vi(∞)=0u_{i}(\infty)=v_{i}(\infty)=0 for all i=q+1,…,di=q+1,\ldots,d. Again, as argued in the proof of Lemma D.12, we can assume that, for some q′∈[q]q^{\prime}\in[q],

Since both w(∞)w(\infty) and w∗w^{*} satisfy the constraint that Zw(∞)=Zw∗=YZw(\infty)=Zw^{*}=Y, we further have

Clearly lim⁡t→∞φ(x(t))=−∞\lim_{t\to\infty}\varphi(x(t))=-\infty if lim⁡t→∞x(t)=x(∞)\lim_{t\to\infty}x(t)=x(\infty). Below we will show contradiction if x(∞)x(\infty) is suboptimal. Consider the dynamics of φ(x)\varphi(x) along the Riemannian gradient flow:

where FF is defined previously in Lemma D.10. Recall the definition of FF, and we have

To show ⟨∇φ(x(t)),F(x(t))⟩<0\langle\nabla\varphi(x(t)),F(x(t))\rangle<0, we analyze I1\mathcal{I}_{1} and I2\mathcal{I}_{2} separately. By the definition of φ(x)\varphi(x), we have

where the last equality follows from (61).

Therefore, we can compute the derivative with respect to ss at s=0s=0 as

where the second equality follows from the fact that w(q+1):d(∞)=0w_{(q+1):d}(\infty)=0. Since x(t)x(t) converges to x(∞)x(\infty), we must have F(x(∞))=0F(x(\infty))=0, which implies that for each j∈{1,…,q}j\in\{1,\ldots,q\},

Combining the above two equalities yields

Apply the above identity together with (D.5), and we obtain

On the other hand, by directly evaluating ∇R(x(t))\nabla R(x(t)) and each ∇fi(x(t))\nabla f_{i}(x(t)), we can compute I1\mathcal{I}_{1} as

We already know that λ1:q′(x)\lambda_{1:q^{\prime}}(x) is continuous at x(∞)x(\infty) by the proof of Lemma D.12, so the third term converges to 0 as x(t)x(t) tends to x(∞)x(\infty). Now, applying (D.5), we immediately see that there exists some δ>0\delta>0 such that I1<−c\mathcal{I}_{1}<-c for x(t)∈Bδ(x(∞))x(t)\in B_{\delta}(x(\infty)). As we have shown in the above that I2=0\mathcal{I}_{2}=0, it then follows from (62) and (D.5) that

Since lim⁡t→∞x(t)=x(∞)\lim_{t\to\infty}x(t)=x(\infty), there exists some T>0T>0 such that x(t)∈Bδ(x(∞))x(t)\in B_{\delta}(x(\infty)) for all t>Tt>T. By the proof ofLemma D.13, we know that φ(x(T))>−∞\varphi(x(T))>-\infty, then it follows from (67) that

which is a contradiction. This finishes the proof. ∎

D.6 Proof of Theorem 6.7

Here we present the lower bound on the sample complexity of GD in the kernel regime.

We first simplify the loss function by substituting x′=x−x(0)x^{\prime}=x-x(0), so correspondingly x0′=0x^{\prime}_{0}=0 and we consider L′(x′):=L(x)=(⟨∇fi(x(0)),x′⟩−yi)2L^{\prime}(x^{\prime}):=L(x)=(\left\langle\nabla f_{i}(x(0)),x^{\prime}\right\rangle-y_{i})^{2}. We can think as if GD is performed on L′(x′)L^{\prime}(x^{\prime}). For simplicity, we still use the xx and L(x)L(x) notation in below.

Note x(T)∈span{∇fx(x(0))}x(T)\in\textrm{span}\{\nabla f_{x}(x(0))\}, which is at most an nn-dimensional space spanned by the gradients of model output at x(0)x(0), so is u(T)−v(T)u(T)-v(T). We denote the corresponding space for u(T)−v(T)u(T)-v(T) by SS, so dim⁡(S)≤n\dim(S)\leq n and it holds that ∥w∗−(u(T)−v(T))∥22≥∥(ID−PS)w∗∥22\left\|w^{*}-(u(T)-v(T))\right\|_{2}^{2}\geq\left\|(I_{D}-P_{S})w^{*}\right\|_{2}^{2}, where PSP_{S} is projection matrix onto space SS.

The expected test loss is lower bounded by