Label Noise SGD Provably Prefers Flat Global Minimizers

Alex Damian, Tengyu Ma, Jason D. Lee

Introduction

One of the central questions in modern machine learning theory is the generalization capability of overparametrized models trained by stochastic gradient descent (SGD). Recent work identifies the implicit regularization effect due to the optimization algorithm as one key factor in explaining the generalization of overparameterized models . This implicit regularization is controlled by many properties of the optimization algorithm including search direction , learning rate , batch size , momentum and dropout .

The parameter-dependent noise distribution in SGD is a crucial source of regularization . Blanc et al. initiated the study of the regularization effect of label noise SGD with square lossLabel noise SGD computes the stochastic gradient by first drawing a sample (xi,yi)(x_{i},y_{i}), perturbing yi′=yi+ϵy^{\prime}_{i}=y_{i}+\epsilon with ϵ∼{−σ,σ}\epsilon\sim\{-\sigma,\sigma\}, and computing the gradient with respect to (xi,yi′)(x_{i},y^{\prime}_{i}). by characterizing the local stability of global minimizers of the training loss. By identifying a data-dependent regularizer R(θ)R(\theta), Blanc et al. proved that label noise SGD locally diverges from the global minimizer θ∗\theta^{\ast} if and only if θ∗\theta^{\ast} is not a first-order stationary point of

The analysis is only able to demonstrate that with sufficiently small step size η\eta, label noise SGD initialized at θ∗\theta^{\ast} locally diverges by a distance of η0.4\eta^{0.4} and correspondingly decreases the regularizer by η0.4\eta^{0.4}. This is among the first results that establish that the noise distribution alters the local stability of stochastic gradient descent. However, the parameter movement of η0.4\eta^{0.4} is required to be inversely polynomially small in dimension and condition number and is thus too small to affect the predictions of the model.

HaoChen et al. , motivated by the local nature of Blanc et al. , analyzed label noise SGD in the quadratically-parametrized linear regression model . Under a well-specified sparse linear regression model and with isotropic features, HaoChen et al. proved that label noise SGD recovers the sparse ground-truth despite overparametrization, which demonstrated a global implicit bias towards sparsity in the quadratically-parametrized linear regression model.

This work seeks to identify the global implicit regularization effect of label noise SGD. Our primary result, which supports Blanc et al. , proves that label noise SGD converges to a stationary point of L(θ)+λR(θ)L(\theta)+\lambda R(\theta), where the regularizer R(θ)R(\theta) penalizes sharp regions of the loss landscape.

The focus of this paper is on label noise SGD due to its strong regularization effects in both real and synthetic experiments . Furthermore, label noise is used in large-batch training as an additional regularizer when the regularization from standard regularizers (e.g. mini-batch, batch-norm, and dropout) is not sufficient. Label noise SGD is also known to be less sensitive to initialization, as shown in HaoChen et al. . In stark contrast, mini-batch SGD remains stuck when initialized at any poor global minimizer. Our analysis demonstrates a global regularization effect of label noise SGD by proving it converges to a stationary point of a regularized loss L(θ)+λR(θ)L(\theta)+\lambda R(\theta), even when initialized at a zero error global minimum.

The learning rate and minibatch size in SGD are also known to be important sources of regularization . Our main theorem highlights the importance of learning rate and batch size as the hyperparameters that control the balance between the loss and the regularizer – larger learning rate and smaller batch size leads to stronger regularization.

Section 2 reviews the notation and assumptions used throughout the paper. Section 2.4 formally states the main result and Section 3 sketches the proof. Section 4 presents experimental results which support our theory. Finally, Section 6 discusses the implications of this work.

Problem Setup and Main Result

Section 2.1 describes our notation and the SGD with label noise algorithm. Section 2.2 introduces the explicit formula for the regularizer R(θ)R(\theta). Sections 2.3 and 2.4 formally state our main result.

Note that σ\sigma controls the strength of the label noise and will control the strength of the implicit regularization in Theorem 1. Throughout the paper we will use ∥⋅∥=∥⋅∥2\|\cdot\|=\|\cdot\|_{2}. We make the following standard assumption on ff:

In addition, we make the following local Kurdyka-Łojasiewicz assumption (KL assumption) which ensures that there are no regions where the loss is very flat. The KL assumption is very general and holds for some δ>0\delta>0 for any analytic function defined on a compact domain (see Lemma 17).

Let θ∗\theta^{*} be any global minimizer of LL. Then there exist ϵKL>0,μ>0\epsilon_{KL}>0,\mu>0 and 0<δ≤1/20<\delta\leq 1/2 such that if L(θ)−L(θ∗)≤ϵKLL(\theta)-L(\theta^{*})\leq\epsilon_{KL}, then L(θ)−L(θ∗)≤μ∥∇L(θ)∥1+δL(\theta)-L(\theta^{*})\leq\mu\|\nabla L(\theta)\|^{1+\delta}.

We assume L(θ∗)=0L(\theta^{*})=0 for any global minimizer θ∗\theta^{*}. Note that if LL satisfies 3 for some δ\delta then it also satisfies 3 for any δ′<δ\delta^{\prime}<\delta. 3 with δ=1\delta=1 is equivalent to the much stronger Polyak-Łojasiewicz condition which is equivalent to local strong convexity.

2 The Implicit Regularizer R​(θ)𝑅𝜃R(\theta)

Here log⁡\log refers to the matrix logarithm. To better understand the regularizer R(θ)R(\theta), let λ1,…,λd\lambda_{1},\ldots,\lambda_{d} be the eigenvalues of ∇2L(θ)\nabla^{2}L(\theta) and let R(λi)=−12ηlog⁡(1−ηλi2)R(\lambda_{i})=-\frac{1}{2\eta}\log(1-\frac{\eta\lambda_{i}}{2}). Then,

In the limit as η→0\eta\to 0, R(θ)→14tr⁡∇2L(θ)R(\theta)\to\frac{1}{4}\operatorname{tr}\nabla^{2}L(\theta), which matches the regularizer in Blanc et al. for infinitesimal learning rate near a global minimizer. However, in additional to the linear scaling rule, which is implicit in our definition of λ\lambda, our analysis uncovers an additional regularization effect of large learning rates that penalizes larger eigenvalues more than smaller ones (see Figure 1 and Section 6.1).

3 (ϵ,γ)italic-ϵ𝛾(\epsilon,\gamma)-Stationary Points

We begin with the standard definition of an approximate stationary point:

θ\theta is an ϵ\epsilon-stationary point of ff if ∥∇f(θ)∥≤ϵ.\|\nabla f(\theta)\|\leq\epsilon.

θ\theta is an (ϵ,γ)(\epsilon,\gamma)-stationary point of ff if there exists some θ∗\theta^{*} such that ∥∇f(θ∗)∥≤ϵ\|\nabla f(\theta^{*})\|\leq\epsilon and ∥θ−θ∗∥≤γ\|\theta-\theta^{*}\|\leq\gamma.

Intuitively, Algorithm 1 converges to an (ϵ,γ)(\epsilon,\gamma)-stationary point when it converges to a neighborhood of some ϵ\epsilon-stationary point θ∗\theta^{*}.

4 Main Result

Having defined an (ϵ,γ)(\epsilon,\gamma)-stationary point we can now state our main result:

Proof Sketch

where cc is a sufficiently large constant. Assume ff satisfies 1 and η\eta satisfies 2. Let θ\theta follow Algorithm 1 starting at θ∗\theta^{*} and assume that L(θ∗)≤LL(\theta^{*})\leq\mathscr{L} for some 0<δ≤1/20<\delta\leq 1/2. Then there exists a random process {ξk}\{\xi_{k}\} such that for any τ≤T\tau\leq\mathscr{T} satisfying max⁡k≤τ∥Φk(θ∗)−θ∗∥≤8M\max_{k\leq\tau}\|\Phi_{k}(\theta^{*})-\theta^{*}\|\leq 8\mathscr{M}, with probability at least 1−10dτe−ι1-10d\tau e^{-\iota} we have simultaneously for all k≤τk\leq\tau,

Toward simplifying the update in Algorithm 1, we define L(k)L^{(k)} to be the true loss without label noise on batch B(k)\mathcal{B}^{(k)}. The label-noise update L^(k)(θk)\hat{L}^{(k)}(\theta_{k}) is an unbiased perturbation of the mini-batch update: ∇L^(k)(θk)=∇L(k)(θk)−1B∑i∈B(k)ϵi(k)∇fi(θk)\nabla\hat{L}^{(k)}(\theta_{k})=\nabla L^{(k)}(\theta_{k})-\frac{1}{B}\sum_{i\in\mathcal{B}^{(k)}}\epsilon_{i}^{(k)}\nabla f_{i}(\theta_{k}). We decompose the update rule into three parts:

Let mk=−η[∇L(k)(θk)−∇L(θk)]m_{k}=-\eta[\nabla L^{(k)}(\theta_{k})-\nabla L(\theta_{k})] denote the minibatch noise. Throughout the proof we will show that the minibatch noise is dominated by the label noise. We will also decompose the label noise into two terms. The first, ϵk∗\epsilon_{k}^{*} will represent the label noise if the gradient were evaluated at θ∗\theta^{*} whose distribution does not vary with kk. The other term, zkz_{k} represents the change in the noise due to evaluating the gradient at θk\theta_{k} rather than θ∗\theta^{*}. More precisely, we have

We define G(θ)=1n∑i∇fi(θ)∇fi(θ)TG(\theta)=\frac{1}{n}\sum_{i}\nabla f_{i}(\theta)\nabla f_{i}(\theta)^{T} to be the covariance of the model gradients. Note that ϵk∗\epsilon_{k}^{*} has covariance ηλG(θ∗)\eta\lambda G(\theta^{*}). To simplify notation in the Taylor expansions, we will use the following shorthand to refer to various quantities evaluated at θ∗\theta^{*}:

First we need the following standard decompositions of the Hessian:

The matrix GG in Proposition 1 is known as the Gauss-Newton term of the Hessian. We can now Taylor expand Algorithm 1 and Equation 2 to first order around θ∗\theta^{*}:

We define vk=θk−Φk(θ∗)v_{k}=\theta_{k}-\Phi_{k}(\theta^{*}) to be the deviation from the regularized trajectory. Then subtracting these two equations gives

where we used Proposition 1 to replace ∇2L\nabla^{2}L with GG. Temporarily ignoring the higher order terms, we define the random process ξ\xi by

The process ξ\xi is referred to as an Ornstein Uhlenbeck process and it encodes the movement of θ\theta to first order around θ∗\theta^{*}. We defer the proofs of the following properties of ξ\xi to Appendix B:

We can now analyze the effect of ξk\xi_{k} on the second order Taylor expansion. Let rk=θk−Φk(θ∗)−ξkr_{k}=\theta_{k}-\Phi_{k}(\theta^{*})-\xi_{k} be the deviation of θ\theta from the regularized trajectory after removing the Ornstein Uhlenbeck process ξ\xi. Lemma 1 is equivalent to Pr⁡[∥rτ∥≥D]≤10τde−ι\Pr[\|r_{\tau}\|\geq\mathscr{D}]\leq 10\tau de^{-\iota}.

We will prove by induction that ∥rk∥≤D\|r_{k}\|\leq\mathscr{D} for all k≤tk\leq t with probability at least 1−10tde−ι1-10tde^{-\iota} for all t≤τt\leq\tau. The base case follows from r0=0r_{0}=0 so assume the result for some t≥0t\geq 0. The remainder of this section will be conditioned on the event ∥rk∥≤D\|r_{k}\|\leq\mathscr{D} for all k≤tk\leq t. O(⋅)O(\cdot) notation will only be used to hide absolute constants that do not change with tt and will additionally not hide dependence on the absolute constant cc. The following proposition fills in the missing second order terms in the Taylor expansion around θ∗\theta^{*} of rkr_{k}:

With probability at least 1−2de−ι1-2de^{-\iota},

The intuition for the implicit regularizer R(θ)R(\theta) is that by Propositions 2 and 1,

Therefore, when averaged over long timescales,

The second equality follows from the more general equality that for any matrix function AA and any scalar function hh that acts independently on each eigenvalue, ∇(tr⁡h(A(θ)))=(∇A(θ))(h′(A(θ)))\nabla(\operatorname{tr}h(A(\theta)))=(\nabla A(\theta))(h^{\prime}(A(\theta))) which follows from the chain rule. The above equality is the special case when A(θ)=∇2L(θ)A(\theta)=\nabla^{2}L(\theta) and h(x)=−1ηlog⁡(1−η2x)h(x)=-\frac{1}{\eta}\log\left(1-\frac{\eta}{2}x\right), which satisfies h′(x)=12−ηxh^{\prime}(x)=\frac{1}{2-\eta x}.

Like Blanc et al. , Lemma 1 shows that θ\theta locally follows the trajectory of gradient descent on an implicit regularizer R(θ)R(\theta). However, there are a few crucial differences:

Unlike in Blanc et al. , we do not require the learning rate η\eta to be small. Instead, we only require that λ\lambda scales with ϵ\epsilon which can be accomplished either by decreasing the learning rate η\eta or increasing the batch size BB. This allows for stronger implicit regularization in the setting when η\eta is large (see Section 6.1). In particular, our regularizer R(θ)R(\theta) changes with η\eta and is only equal to the regularizer in Blanc et al. in the limit η→0\eta\to 0.

2 Global Convergence

To be able to repeat the local analysis in Lemma 1 with multiple reference points, we need a more general coupling lemma that allows the random process ξ\xi defined in each coupling to continue where the random process in the previous coupling ended. To accomplish this, we define ξ\xi outside the scope of the local coupling lemma:

Given a sequence of reference points {θm∗}\{\theta_{m}^{*}\} and a sequence of coupling times {τm}\{\tau_{m}\}, we define the random process ξ\xi by ξ0=0\xi_{0}=0, and for k∈[Tm,Tm+1)k\in[T_{m},T_{m+1}),

Then we can prove the following more general coupling lemma:

Let X,L,D,M,T\mathscr{X},\mathscr{L},\mathscr{D},\mathscr{M},\mathscr{T} be defined as in Lemma 1. Assume ff satisfies 1 and η\eta satisfies 2. Let Δm=θTm−ξTm−θm∗\Delta_{m}=\theta_{T_{m}}-\xi_{T_{m}}-\theta_{m}^{*} and assume that ∥Δm∥≤D\|\Delta_{m}\|\leq\mathscr{D} and L(θm∗)≤LL(\theta_{m}^{*})\leq\mathscr{L} for some 0<δ≤1/20<\delta\leq 1/2. Then for any τm≤T\tau_{m}\leq\mathscr{T} satisfying max⁡k∈[Tm,Tm+1)∥Φk−Tm(θm∗+Δm)−θm∗∥≤8M\max_{k\in[T_{m},T_{m+1})}\|\Phi_{k-T_{m}}(\theta_{m}^{*}+\Delta_{m})-\theta_{m}^{*}\|\leq 8\mathscr{M}, with probability at least 1−10dτme−ι1-10d\tau_{m}e^{-\iota} we have simultaneously for all k∈(Tm,Tm+1]k\in(T_{m},T_{m+1}],

Unlike in Lemma 1, we couple to the regularized trajectory starting at θm∗+Δm\theta_{m}^{*}+\Delta_{m} rather than at θm∗\theta_{m}^{*} to avoid accumulating errors (see Figure 2). The proof is otherwise identical to that of Lemma 1.

Let F=D2ηνT\mathscr{F}=\frac{\mathscr{D}^{2}}{\eta\nu\mathscr{T}}. Let Δm=θTm−ξTm−θm∗\Delta_{m}=\theta_{T_{m}}-\xi_{T_{m}}-\theta_{m}^{*} and assume ∥Δm∥≤D\|\Delta_{m}\|\leq\mathscr{D} and L(θm∗)≤LL(\theta_{m}^{*})\leq\mathscr{L}. Then if θTm\theta_{T_{m}} is not an (ϵ,γ)(\epsilon,\gamma)-stationary point, there exists some τm<T\tau_{m}<\mathscr{T} such that if we define

then with probability 1−10dτme−ι1-10d\tau_{m}e^{-\iota},

We defer the proofs of Lemma 2 and Lemma 3 to Appendix B. Theorem 1 now follows directly from repeated applications of Lemma 3:

Experiments

In order to test the ability of SGD with label noise to escape poor global minimizers and converge to better minimizers, we initialize Algorithm 1 at global minimizers of the training loss which achieve 100%100\% training accuracy yet generalize poorly to the test set. Minibatch SGD would remain fixed at these initializations because both the gradient and the noise in minibatch SGD vanish at any global minimizer of the training loss. We show that SGD with label noise escapes these poor initializations and converges to flatter minimizers that generalize well, which supports Theorem 1. We run experiments with two initializations:

Full Batch Initialization: We run full batch gradient descent with random initialization until convergence to a global minimizer. We call this minimizer the full batch initialization. The final test accuracy of the full batch initialization was 76%.

Adversarial Initialization: Following Liu et al. , we generate an adversarial initialization with final test accuracy 48%48\% that achieves zero training loss by first teaching the network to memorize random labels and then training it on the true labels. See Appendix D for full details.

Experiments were run with ResNet18 on CIFAR10 without data augmentation or weight decay. The experiments were conducted with randomized label flipping with probability 0.20.2 (see Appendix E for the extension of Theorem 1 to classification with label flipping), cross entropy loss, and batch size 256. Because of the difficulty in computing the regularizer R(θ)R(\theta), we approximate it by its lower bound tr⁡∇2L(θ)\operatorname{tr}\nabla^{2}L(\theta). Figure 3 shows the test accuracy and tr⁡∇2L\operatorname{tr}\nabla^{2}L throughout training.

SGD with label noise escapes both zero training loss initializations and converges to flatter minimizers that generalize much better, reaching the SGD baseline from the fullbatch initialization and getting within 1%1\% of the baseline from the adversarial initialization. The test accuracy in both cases is strongly correlated with tr⁡∇2L\operatorname{tr}\nabla^{2}L. The strength of the regularization is also strongly correlated with η\eta, which supports Theorem 1. See Figure 4 for experimental results for SGD with momentum.

Extensions

We make the following mild assumption on the smoothed loss lˉ\bar{l} which is explicitly verified for the logistic loss, exponential loss, and square loss in Section E.2:

In addition, we assume that lˉ′,lˉ′′\bar{l}^{\prime},\bar{l}^{\prime\prime} are ρl\rho_{l}, κl\kappa_{l} Lipschitz respectively restricted to the set {x:lˉ(x)≤ϵQ}\{x:\bar{l}(x)\leq\epsilon_{Q}\}.

Then we define the per-sample loss and the sample loss as:

Now note that the noise per sample from label smoothing at a zero loss global minimizer θ∗\theta^{*} can be written as

which will determine the strength of the regularization in Theorem 2. Finally, in order to study the local behavior around cc we define α=lˉ′′(c)>0\alpha=\bar{l}^{\prime\prime}(c)>0 by 4. Corresponding values for c,σ2,αc,\sigma^{2},\alpha for logistic loss, exponential loss, and square loss are given in Table 1.

Our main result is a version of Theorem 1:

2 SGD with Momentum

We consider heavy ball momentum with momentum β\beta, i.e. we replace the update in Algorithm 1 with

As in Lemma 1, the error is 88 times smaller than the maximum movement of the regularized trajectory. Note that momentum increases the regularization parameter λ\lambda by 11−β\frac{1}{1-\beta}. For the commonly used momentum parameter β=0.9\beta=0.9, this represents a 10×10\times increase in regularization, which is likely the cause of the improved performance in Figure 4 (β=0.9\beta=0.9) over Figure 3 (β=0\beta=0).

3 Arbitrary Noise Covariances

Let θ\theta be initialized at a minimizer θ∗\theta^{*} of LL. Assume ∇2L\nabla^{2}L is Lipschitz, let H=∇2L(θ∗)H=\nabla^{2}L(\theta^{*}) and assume that Σ(θ∗)⪯CH\Sigma(\theta^{*})\preceq CH for some absolute constant CC. Let X=Cdλιν\mathscr{X}=\sqrt{\frac{Cd\lambda\iota}{\nu}}, D=cλ3/4ι\mathscr{D}=c\lambda^{3/4}\iota, and T=1c2ηXι\mathscr{T}=\frac{1}{c^{2}\eta\mathscr{X}\iota} for a sufficiently large constant cc. Then there exists a mean zero random process ξ\xi such that for any τ≤T\tau\leq\mathscr{T} satisfying max⁡k<τ∥Φk(θ∗)−θ∗∥≤8D\max_{k<\tau}\|\Phi_{k}(\theta^{*})-\theta^{*}\|\leq 8\mathscr{D} and with probability 1−10dτe−ι1-10d\tau e^{-\iota}, we have simultaneously for all k≤τk\leq\tau:

As in Lemma 1, the error is 88 times smaller than the maximum movement of the regularized trajectory. Although Proposition 5 couples to gradient descent on RSR_{S}, SS is defined in terms of the Hessian and the noise covariance at θ∗\theta^{*} and therefore depends on the choice of reference point. Because RSR_{S} is changing, we cannot repeat Proposition 5 as in Section 3.2 to prove convergence to a stationary point because there is no fixed potential. Although it is sometimes possible to relate RSR_{S} to a fixed potential RR, we show in Section F.2 that this is not generally possible by providing an example where minibatch SGD perpetually cycles. Exploring the properties of these continuously changing potentials and their connections to generalization is an interesting avenue for future work.

Discussion

Various factors can control the strength of the implicit regularization in Theorem 1. Most important is the implicit regularization parameter λ=ησ2∣B∣\lambda=\frac{\eta\sigma^{2}}{|B|}. This supports the hypothesis that large learning rates and small batch sizes are necessary for implicit regularization , and agrees with the standard linear scaling rule which proposes that for constant regularization strength, the learning rate η\eta needs to be inversely proportional to the batch size ∣B∣|B|.

However, our analysis also uncovers an additional regularization effect of large learning rates. Unlike the regularizer in Blanc et al. , the implicit regularizer R(θ)R(\theta) defined in Equation 1 is dependent on η\eta. It is not possible to directly analyze the behavior of R(θ)R(\theta) as η→2/λ1\eta\to 2/\lambda_{1} where λ1\lambda_{1} is the largest eigenvalue of ∇2L\nabla^{2}L, as in this regime R(θ)→∞R(\theta)\to\infty (see Figure 1). If we let η=2−νλ1\eta=\frac{2-\nu}{\lambda_{1}}, then we can better understand the behavior of R(θ)R(\theta) by normalizing it by log⁡2/ν\log 2/\nu. This givesHere we assume λ1>λ2\lambda_{1}>\lambda_{2}. If instead λ1=…=λk>λk+1\lambda_{1}=\ldots=\lambda_{k}>\lambda_{k+1}, this limit will be k∥∇2L(θ)∥2k\|\nabla^{2}L(\theta)\|_{2}.

so after normalization, R(θ)R(\theta) becomes a better and better approximation of the spectral norm ∥∇2L(θ)∥\|\nabla^{2}L(\theta)\| as η→2/λ1\eta\to 2/\lambda_{1}. R(θ)R(\theta) can therefore be seen as interpolating between tr⁡∇2L(θ)\operatorname{tr}\nabla^{2}L(\theta), when η≈0\eta\approx 0, and ∥∇2L(θ)∥2\|\nabla^{2}L(\theta)\|_{2} when η≈2/λ1\eta\approx 2/\lambda_{1}. This also suggests that SGD with large learning rates may be more resilient to the edge of stability phenomenon observed in Cohen et al. as the implicit regularization works harder to control eigenvalues approaching 2/η2/\eta.

The sharpness-aware algorithm (SAM) of is also closely related to R(θ)R(\theta). SAM proposes to minimize max⁡∥δ∥2≤ϵL(θ+δ)\max_{\|\delta\|_{2}\leq\epsilon}L(\theta+\delta). At a global minimizer of the training loss,

The SAM algorithm is therefore explicitly regularizing the spectral norm of ∇2L(θ)\nabla^{2}L(\theta), which is closely connected to the large learning rate regularization effect of R(θ)R(\theta) when η≈2/λ1\eta\approx 2/\lambda_{1}.

2 Generalization Bounds

The implicit regularizer R(θ)R(\theta) is intimately connected to data-dependent generalization bounds, which measure the Lipschitzness of the network via the network Jacobian. Specifically, Wei and Ma propose the all-layer margin, which bounds the generalization error≲∑l=1LCln1n∑i=1n1mF(xi,yi)2\textup{generalization error}\lesssim\frac{\sum_{l=1}^{L}\mathcal{C}_{l}}{\sqrt{n}}\sqrt{\frac{1}{n}\sum_{i=1}^{n}\frac{1}{m_{F}(x_{i},y_{i})^{2}}}, where Cl\mathcal{C}_{l} depends only on the norm of the parameters and mFm_{F} is the all-layer margin. The norm of the parameters is generally controlled by weight decay regularization, so we focus our discussion on the all-layer margin. Ignoring higher-order secondary terms, Wei and Ma [30, Heuristic derivation of Lemma 3.1] showed for a feed-forward network f(θ;x)=θLσ(θL−1…σ(θ1x))f(\theta;x)=\theta_{L}\sigma(\theta_{L-1}\ldots\sigma(\theta_{1}x)), the all-layer margin satisfiesThe output margin is defined as min⁡ifi(θ)yi\min_{i}f_{i}(\theta)y_{i}. The following uses Equation (3.3) and the first-order approximation provided Wei and Ma and the chain rule ∂f∂θl=∂f∂hl∂hl∂θl−1=∂f∂hlhl−1⊤\frac{\partial f}{\partial\theta_{l}}=\frac{\partial f}{\partial h_{l}}\frac{\partial h_{l}}{\partial\theta_{l-1}}=\frac{\partial f}{\partial h_{l}}h_{l-1}^{\top}.:

as R(θ)R(\theta) is an upper bound on the squared norm of the Jacobian at any global minimizer θ\theta. We emphasize this bound is informal as we discarded the higher-order terms in controlling the all-layer margin, but it accurately reflects that the regularizer R(θ)R(\theta) lower bounds the all-layer margin mFm_{F} up to higher-order terms. Therefore SGD with label noise implicitly regularizes the all-layer margin.

Acknowledgements

AD acknowledges support from a NSF Graduate Research Fellowship. TM acknowledges support of Google Faculty Award and NSF IIS 2045685. JDL acknowledges support of the ARO under MURI Award W911NF-11-1-0303, the Sloan Research Fellowship, NSF CCF 2002272, and an ONR Young Investigator Award.

The experiments in this paper were performed on computational resources managed and supported by Princeton Research Computing, a consortium of groups including the Princeton Institute for Computational Science and Engineering (PICSciE) and the Office of Information Technology’s High Performance Computing Center and Visualization Laboratory at Princeton University.

We would also like to thank Honglin Yuan and Jeff Z. HaoChen for useful discussions throughout various stages of the project.

References

Appendix A Limitations

In Section 2 we make three main assumptions: 1 (smoothness), 2 (learning rate separation), and 3 (KL).

1 imposes the necessary smoothness conditions on ff to enable second order Taylor expansions of ∇L\nabla L. These smoothness conditions may not hold, e.g. if ReLU activations are used. This can be easily resolved by using a smooth activation like softplus or SiLU .

Appendix B Missing Proofs

In addition if we define ei(θ)=fi(θ)−yie_{i}(\theta)=f_{i}(\theta)-y_{i},

We define the quadratic variation [⋅][\cdot] and quadratic covariation [⋅,⋅][\cdot,\cdot] of a martingale XX to be

therefore by Corollary 1, with probability at least 1−2de−ι1-2de^{-\iota}, ∥ξk∥≤X\|\xi_{k}\|\leq\mathscr{X}. ∎

We prove the following version of Proposition 2 for the setting of Lemma 2:

Let ξk\xi_{k} be defined as in Definition 3. Then for any t≥0t\geq 0, with probability 1−2de−ι1-2de^{-\iota}, ∥ξt∥≤X\|\xi_{t}\|\leq\mathscr{X}.

For k∈(Tm,Tm+1]k\in(T_{m},T_{m+1}] define Gk=G(θm∗)G_{k}=G(\theta_{m}^{*}). Then we can write for any k≥0k\geq 0,

Let Ft=σ{B(k),ϵ(k):k<t}\mathcal{F}_{t}=\sigma\{\mathcal{B}^{(k)},\epsilon^{(k)}:k<t\}. To each kk we will associate a martingale {Xj(k)}j≤k\{X^{(k)}_{j}\}_{j\leq k} adapted to F\mathcal{F} as follows. First let X0(k)=0X^{(k)}_{0}=0. Then for all k≥0k\geq 0 and all j≥0j\geq 0,

First we need to show X(k)X^{(k)} is in fact a martingale. We will show this by induction on kk. The base case of k=0k=0 is trivial. Next, it is easy to see that Xj(k)∈FjX_{j}^{(k)}\in\mathcal{F}_{j}. Therefore,

where the second line followed from the induction hypothesis and the third line followed from the definition of Xj(k)X_{j}^{(k)}. Therefore X(k)X^{(k)} is a martingale for all kk.

Next, I claim that ξk=Xk(k)\xi_{k}=X_{k}^{(k)}. We can prove this by induction on kk. The base case is trivial as ξ0=X0(0)=0\xi_{0}=X^{(0)}_{0}=0. Then,

Finally, I claim that [X(k),X(k)]k⪯nλνI[X^{(k)},X^{(k)}]_{k}\preceq\frac{n\lambda}{\nu}I. We will prove this by induction on kk. The base case is trivial as X0(0)=0X^{(0)}_{0}=0. Then,

Therefore by Corollary 1, ∥ξk∥≤X\|\xi_{k}\|\leq\mathscr{X} with probability at least 1−2de−ι1-2de^{-\iota}. ∎

We will prove Proposition 3 and Proposition 4 in the more general setting of Lemma 2. For notational simplicity we will apply the Markov property and assume that m=0m=0. We define Δ=Δ0\Delta=\Delta_{0} and θ∗=θ0∗\theta^{*}=\theta_{0}^{*} and note that due to this time change that ξ0\xi_{0} is not necessarily . We define vk=θk−Φk(θ∗+Δ)v_{k}=\theta_{k}-\Phi_{k}(\theta^{*}+\Delta) and rk=θk−ξk−Φk(θ∗+Δ)r_{k}=\theta_{k}-\xi_{k}-\Phi_{k}(\theta^{*}+\Delta).

First, by Proposition 6, ∥ξt∥≤X\|\xi_{t}\|\leq\mathscr{X} with probability at least 1−2de−ι1-2de^{-\iota}. Then note that for k≤tk\leq t,

so Taylor expanding the update in Algorithm 1 and Equation 2 to second order around θ∗\theta^{*} and subtracting gives

Note that for each i∈B(k)i\in\mathcal{B}^{(k)},

Therefore by Lemma 5, with probability 1−2de−ι1-2de^{-\iota},

Next, by a second order Taylor expansion around θ∗\theta^{*} we have

Now we will turn to concentrating ξkξkT\xi_{k}\xi_{k}^{T}. We will use the shorthand gi=∇fi(θ∗)g_{i}=\nabla f_{i}(\theta^{*}). Let

We can expand out ∇3L\nabla^{3}L using the fact that LL is square loss to get

so it suffices to bound the contribution of the first two terms individually. Starting with the second term, we have tr⁡[(Sk−S∗)Hi]=O(X2)\operatorname{tr}\left[(S_{k}-S^{*})H_{i}\right]=O(\mathscr{X}^{2}), so by Lemma 12,

so this difference contributes at most O(η2λtL)=O(ηtXL)O(\eta^{2}\lambda t\sqrt{\mathscr{L}})=O(\eta t\mathscr{X}\sqrt{\mathscr{L}}) so it suffices to bound

and thatThis identity directly follows from multiplying both sides by 2−ηG2-\eta G and the fact that all of these matrices commute .

Let Dk=Sk−SˉD_{k}=S_{k}-\bar{S}. Then subtracting these two equations gives

Let Wk=(I−ηG)ξk(ϵk∗)T+ϵk∗ξkT(I−ηG)W_{k}=(I-\eta G)\xi_{k}(\epsilon_{k}^{*})^{T}+\epsilon_{k}^{*}\xi_{k}^{T}(I-\eta G) and let Zk=((ϵk∗)(ϵk∗)T−ηλG)Z_{k}=((\epsilon_{k}^{*})(\epsilon_{k}^{*})^{T}-\eta\lambda G) so that

so we are left with the martingale part in the second term. The final term to bound is therefore

We can switch the order of summations to get

Now if we extract the inner sum, note that

is a martingale difference sequence. Recall that

The inner sums are bounded by O(Xη−1)O(\mathscr{X}\eta^{-1}) by Lemma 14. Therefore by Lemma 5, with probability at least 1−2de−ι1-2de^{-\iota}, the contribution of the WW term in Equation 72 is at most O(ηλkιX)=O(ηkX2)O(\sqrt{\eta\lambda k\iota}\mathscr{X})=O(\sqrt{\eta k}\mathscr{X}^{2}). The final remaining term to bound is the ZZ term in (72). We can write the inner sum as

which by Lemma 14 is bounded by O(λ)O(\lambda). Therefore by Lemma 5, with probability at least 1−2de−ι1-2de^{-\iota}, the full contribution of ZZ to Equation 72 is O(ηλtι)=O(ηtX2)O(\eta\lambda\sqrt{t\iota})=O(\sqrt{\eta t}\mathscr{X}^{2}). Putting all of these bounds together we get with probability at least 1−10de−ι1-10de^{-\iota},

The following lemma is necessary for some of the proofs below:

Assume that L(θ)≤LL(\theta)\leq\mathscr{L}. Then for any k≥0k\geq 0, L(Φk(θ))≤LL(\Phi_{k}(\theta))\leq\mathscr{L}.

By induction it suffices to prove this for k=1k=1. Let θ′=Φ1(θ)\theta^{\prime}=\Phi_{1}(\theta). First consider the case when

Then by 3, L(θ′)≤LL(\theta^{\prime})\leq\mathscr{L} so we are done. Otherwise, note that

and for cc sufficiently large, the second term is larger than the third so L(θ′)≤L(θ)≤LL(\theta^{\prime})\leq L(\theta)\leq\mathscr{L}. ∎

In the context of Lemma 3, if θTm\theta_{T_{m}} is not an (ϵ,γ)(\epsilon,\gamma)-stationary point, there exists τm≤T\tau_{m}\leq\mathscr{T} such that:

Let G=G(θm∗)G=G(\theta_{m}^{*}) and let τm\tau_{m} be chosen as in Proposition 7. Then, θm+1∗−Φτm(θm∗)=(I−ηG)τmΔm+r\theta_{m+1}^{*}-\Phi_{\tau_{m}}(\theta_{m}^{*})=(I-\eta G)^{\tau_{m}}\Delta_{m}+r where ∥r∥=O(ητmM2)\|r\|=O(\eta\tau_{m}\mathscr{M}^{2}) and ∥r∥G2=O(ητmM4)\|r\|_{G}^{2}=O(\eta\tau_{m}\mathscr{M}^{4}).

Combining Propositions 8 and 10, we have that

The following corollary also follows from the choice of τm\tau_{m}, Proposition 9, and Lemma 2:

∥Φτm(θm∗+Δm)−θm∗∥≤8M\|\Phi_{\tau_{m}}(\theta_{m}^{*}+\Delta_{m})-\theta_{m}^{*}\|\leq 8\mathscr{M} and with probability at least 1−8dτme−ι1-8d\tau_{m}e^{-\iota}, ∥Δm+1∥≤D\|\Delta_{m+1}\|\leq\mathscr{D}.

The proof of Lemma 3 follows directly from Equation 89, Proposition 11, and Corollary 2. The proofs of the above propositions can be found below:

Then we can upper bound each element in this sum by

for sufficiently large cc. Therefore there must exist τm\tau_{m} such that

Therefore there must exist some kk such that

by the choice of λ\lambda in Theorem 1. In addition,

again by the choice of λ\lambda. Therefore θTm\theta_{T_{m}} is an (ϵ,γ)(\epsilon,\gamma)-stationary point. ∎

Let vk=Φk(θm∗+Δm)−Φk(θm∗)v_{k}=\Phi_{k}(\theta_{m}^{*}+\Delta_{m})-\Phi_{k}(\theta_{m}^{*}), so that v0=Δmv_{0}=\Delta_{m} and let rk=vk−(I−ηG)τmr_{k}=v_{k}-(I-\eta G)^{\tau_{m}} so that r0=0r_{0}=0. Let CC be a sufficiently large absolute constant. We will prove by induction that rk≤CητmM2r_{k}\leq C\eta\tau_{m}\mathscr{M}^{2}. Note that

because of the values chosen for M\mathscr{M}, T\mathscr{T}. Therefore Taylor expanding around θm∗\theta_{m}^{*} gives:

where ∥sk∥=O(ηM2)\|s_{k}\|=O(\eta\mathscr{M}^{2}) by the definition of M\mathscr{M}. Therefore

so if gi=∇fi(θm∗)g_{i}=\nabla f_{i}(\theta_{m}^{*}),

We will need the following lemma before the next proof:

Let v=θm+1−Φτm(θm∗)=(I−ηG)τmΔm+rv=\theta_{m+1}-\Phi_{\tau_{m}}(\theta_{m}^{*})=(I-\eta G)^{\tau_{m}}\Delta_{m}+r where by Proposition 9, ∥r∥=O(ητmM2)\|r\|=O(\eta\tau_{m}\mathscr{M}^{2}), G=G(θm∗)G=G(\theta_{m}^{*}), and rTGr=O(ητmM4)r^{T}Gr=O(\eta\tau_{m}\mathscr{M}^{4}). Then,

for sufficiently large cc. Therefore by Lemma 7 and Proposition 7,

for sufficiently large cc. Finally, the remainder term is bounded by

for sufficiently large cc for the same reason as above. Putting it all together,

Assume otherwise for the sake of contradiction. Because ∇R\nabla R is Lipschitz, R(θm+1∗)−R(θm∗)=O(M)R(\theta_{m+1}^{*})-R(\theta_{m}^{*})=O(\mathscr{M}). Therefore by Equation 89,

Then by the same arguments as in Proposition 10, we can Taylor expand around Φτm(θm∗)\Phi_{\tau_{m}}(\theta_{m}^{*}) to get

because δ≤1/2\delta\leq 1/2. Therefore L(θm+1∗)=O(λ1+δ)≤LL(\theta_{m+1}^{*})=O(\lambda^{1+\delta})\leq\mathscr{L} for sufficiently large cc. ∎

Appendix C Reaching a global minimizer with NTK

It is well known that overparameterized neural networks in the kernel regime trained by gradient descent reach global minimizers of the training loss . In this section we describe how to extend the proof in to show that SGD with label noise (Algorithm 1) converges to a neighborhood of a global minimizer θ∗\theta^{*} as required by Theorem 1. We will use the following lemma from :

Let ξ0=0\xi_{0}=0 and θ0∗=θ0\theta_{0}^{*}=\theta_{0}. We will define ξk,θk∗\xi_{k},\theta_{k}^{*} iteratively as follows:

Let vk=θk−θk∗v_{k}=\theta_{k}-\theta_{k}^{*} and let rk=vk−ξkr_{k}=v_{k}-\xi_{k}. We will prove by induction that for all t≤T=4log⁡[L(θ0)λ0/λ2]ηλ0t\leq T=\frac{4\log\left[L(\theta_{0})\lambda_{0}/\lambda^{2}\right]}{\eta\lambda_{0}} we have ∥rk∥≤D\|r_{k}\|\leq\mathscr{D}. The base case follows from r0=0r_{0}=0. For k≥0k\geq 0 we have

which completes the induction. Therefore it suffices to show that the loss of θT∗\theta_{T}^{*} is small. We have

where the last line follows from Young’s inequality. Therefore,

Let JJ be the Jacobian of ff and ee be the vector of residuals. Then ∇L=Je\nabla L=Je. Now so long as ∥θk∗−θ0∥≤R\|\theta_{k}^{*}-\theta_{0}\|\leq R,

for small λ\lambda by the choice of TT. It only remains to check that ∥θk∗−θ0∥≤R\|\theta_{k}^{*}-\theta_{0}\|\leq R. Note that

Note that a direct application of Theorem 1 requires starting ξ\xi at . However, this does not affect the proof in any way and the ξ\xi from this proof can simply be continued as in Lemma 2.

Appendix D Additional Experimental Details

The model used in our experiments is ResNet18 with GroupNorm instead of BatchNorm to maintain independence of sample gradients when computed in a batch. We used a fixed group size of 32.

For the full batch initialization, we trained ResNet18 on the CIFAR10 training set (50k images, 5k per class) , with cross entropy loss. CIFAR10 images are provided under an MIT license. We trained using SGD with momentum with η=1\eta=1 and β=0.9\beta=0.9 for 20002000 epochs. We used learning rate warmup starting at which linearly increased until η=1\eta=1 at epoch 600600 and then it decayed using a cosine learning rate schedule to between epochs 600600 and 20002000. We also used a label smoothing value of 0.20.2 (non-randomized) so that the expected objective function is the same for when we switch to SGD with label flipping (see Appendix E). The final test accuracy was 76%76\%.

For the adversarial initialization, we first created an augmented adversarial dataset as follows. We duplicate every image in CIFAR10 10×10\times, for a total of 500k images. In each image, we randomly zero out 10%10\% of the pixels in the image and we assign each of the 500k images a random label. We trained ResNet18 to interpolate this dataset without label smoothing with the following hyperparameters: η=0.01\eta=0.01, 300300 epochs, batch size 256256. Starting from this initialization we ran SGD on the true dataset with η=0.01\eta=0.01 and a label smoothing value of 0.20.2 with batch size 256256 for 10001000 epochs. The final test accuracy was 48%48\%.

For the remaining experiments starting at these two initializations we ran both with and without momentum (see Figure 4 for the results with momentum) for 10001000 epochs per run. We used a fixed batch size of 256256 and varied the maximum learning rate η\eta. We used learning rate warmup by linearly increasing the learning rate from to the max learning rate over 300300 epochs, and we kept the learning rate constant from epochs 300300 to 10001000. The regularizer was estimated by computing the strength of the noise in each step and then averaging over an epoch. More specifically, we compute the average of ∥∇L^(k)(θk)−∇L(k)(θk)∥2\|\nabla\hat{L}^{(k)}(\theta_{k})-\nabla L^{(k)}(\theta_{k})\|^{2} over an epoch and then renormalize by the batch size.

The experiments were run on NVIDIA P100 GPUs through Princeton Research Computing. Code was written in Python using PyTorch and PyTorch Lightning , and experiments were logged using Wandb . Code can be found at https://github.com/adamian98/LabelNoiseFlatMinimizers.

Appendix E Extension to Classification

The proof of Theorem 2 is virtually identical to that of Theorem 1. First we make a few simplifications without loss of generality:

Next note that without loss of generality we can replace each fif_{i} with yifiy_{i}f_{i} and set all of the true labels yiy_{i} to 11. Therefore from now on we will simply speak of fif_{i}.

Let {τm}\{\tau_{m}\} be a sequence of coupling times and {θm∗}\{\theta_{m}^{*}\} a sequence of reference points. Let Tm=∑j<mτmT_{m}=\sum_{j<m}\tau_{m}. Then for k∈[Tm,Tm+1)k\in[T_{m},T_{m+1}), if L(k)L^{(k)} denotes true value of the loss on batch B(k)\mathcal{B}^{(k)}, we can decompose the loss as

We decompose ϵk=ϵk∗+zk\epsilon_{k}=\epsilon_{k}^{*}+z_{k} where

and zk=ϵk−ϵk∗z_{k}=\epsilon_{k}-\epsilon_{k}^{*}. Note that ϵk∗\epsilon_{k}^{*} has covariance ηλG(θm∗)\eta\lambda G(\theta_{m}^{*}). We define ξ0=0\xi_{0}=0 and for k∈[Tm,Tm+1)k\in[T_{m},T_{m+1}),

Then we have the following version of Proposition 6:

Let X=max⁡(p1−p,1−pp)⋅2λdιν\mathscr{X}=\sqrt{\max\left(\frac{p}{1-p},\frac{1-p}{p}\right)\cdot\frac{2\lambda d\iota}{\nu}}. Then for any t≥0t\geq 0, with probability 1−2de−ι1-2de^{-\iota}, ∥ξt∥≤X\|\xi_{t}\|\leq\mathscr{X}.

Let P=max⁡(p1−p,1−pp)P=\max\left(\frac{p}{1-p},\frac{1-p}{p}\right). Define the martingale sequence Xj(k)X^{(k)}_{j} as in Proposition 6. I claim that [X(k),X(k)]k⪯nλPνI[X^{(k)},X^{(k)}]_{k}\preceq\frac{n\lambda P}{\nu}I. We will prove this by induction on kk. The base case is trivial as X0(0)=0X^{(0)}_{0}=0. Then,

Define ι,D,M,T,L\iota,\mathscr{D},\mathscr{M},\mathscr{T},\mathscr{L} as in Lemma 1. Then we have the following local coupling lemma:

Assume ff satisfies 1, η\eta satisfies 2, and ll satisfies 4. Let Δm=θTm−ξTm−θm∗\Delta_{m}=\theta_{T_{m}}-\xi_{T_{m}}-\theta_{m}^{*} and assume that ∥Δm∥≤D\|\Delta_{m}\|\leq\mathscr{D} and L(θm∗)≤LL(\theta_{m}^{*})\leq\mathscr{L} for some 0<δ≤1/20<\delta\leq 1/2. Then for any τm≤T\tau_{m}\leq\mathscr{T} satisfying max⁡k∈[Tm,Tm+1)∥Φk−Tm(θm∗+Δm)−θm∗∥≤8M\max_{k\in[T_{m},T_{m+1})}\|\Phi_{k-T_{m}}(\theta_{m}^{*}+\Delta_{m})-\theta_{m}^{*}\|\leq 8\mathscr{M}, with probability at least 1−10dτme−ι1-10d\tau_{m}e^{-\iota} we have simultaneously for all k∈(Tm,Tm+1]k\in(T_{m},T_{m+1}],

The proof of Lemma 9 follows directly from the following decompositions:

Let ∇2L=∇2L(θm∗)\nabla^{2}L=\nabla^{2}L(\theta_{m}^{*}), ∇3L=∇3L(θm∗)\nabla^{3}L=\nabla^{3}L(\theta_{m}^{*}), G=G(θm∗)G=G(\theta_{m}^{*}), fi=fi(θm∗)f_{i}=f_{i}(\theta_{m}^{*}), gi=∇fi(θm∗)g_{i}=\nabla f_{i}(\theta_{m}^{*}), Hi=∇2fi(θm∗)H_{i}=\nabla^{2}f_{i}(\theta_{m}^{*}). Then,

These are the exact same decompositions used Proposition 3 and Proposition 4, so Lemma 9 immediately follows. In addition, as we never used the exact value of the constant in X\mathscr{X} in the proof of Theorem 1, the analysis there applies directly as well showing that we converge to an (ϵ,γ)(\epsilon,\gamma)-stationary point and proving Theorem 2.

E.2 Verifying 4

We verify 4 for the logistic loss, the exponential loss, and the square loss and derive the corresponding values of c,σ2c,\sigma^{2} found in Table 1.

For logistic loss, we let l(x)=log⁡(1+e−x)l(x)=\log(1+e^{-x}), and lˉ(x)=pl(−x)+(1−p)l(x)\bar{l}(x)=pl(-x)+(1-p)l(x). Then

which is negative when x<log⁡1−ppx<\log\frac{1-p}{p} and positive when x>log⁡1−ppx>\log\frac{1-p}{p} so it is minimized at c=log⁡1−ppc=\log\frac{1-p}{p}. To show the quadratic approximation holds at cc, it suffices to show that lˉ′′′(x)\bar{l}^{\prime\prime\prime}(x) is bounded. We have lˉ′′(x)=ex(1+ex)2\bar{l}^{\prime\prime}(x)=\frac{e^{x}}{(1+e^{x})^{2}} and

so we are done. Finally, to calculate the strength of the noise at cc we have

E.2.2 Exponential Loss

We have l(x)=e−xl(x)=e^{-x} and lˉ(x)=pl(−x)+(1−p)l(x)\bar{l}(x)=pl(-x)+(1-p)l(x). Then,

which is negative when x<12log⁡1−ppx<\frac{1}{2}\log\frac{1-p}{p} and positive when x>12log⁡1−ppx>\frac{1}{2}\log\frac{1-p}{p} so it is minimized at c=12log⁡1−ppc=\frac{1}{2}\log\frac{1-p}{p}. Then we can compute

because cosh⁡x≥1+x22\cosh x\geq 1+\frac{x^{2}}{2}. Finally to compute the strength of the noise we have

E.2.3 Square Loss

We have l(x)=12(1−x)2l(x)=\frac{1}{2}(1-x)^{2} and lˉ(x)=pl(−x)+(1−p)l(x)\bar{l}(x)=pl(-x)+(1-p)l(x). Then,

which is a quadratic minimized at c=1−2pc=1-2p. The quadratic approximation trivially holds and the strength of the noise is:

Appendix F Arbitrary Noise

We follow the proof of Lemma 2. First, let ϵk=ηλΣ1/2(θk)xk\epsilon_{k}=\sqrt{\eta\lambda}\Sigma^{1/2}(\theta_{k})x_{k} with xk∼N(0,I)x_{k}\sim N(0,I) and define ϵk∗=ηλΣ1/2(θ∗)xk\epsilon_{k}^{*}=\sqrt{\eta\lambda}\Sigma^{1/2}(\theta^{*})x_{k} and zk=ϵk−ϵk∗z_{k}=\epsilon_{k}-\epsilon_{k}^{*}. Let H=∇2L(θ∗)H=\nabla^{2}L(\theta^{*}), Σ=Σ(θ∗)\Sigma=\Sigma(\theta^{*}), and ∇RS=∇RS(θ∗)\nabla R_{S}=\nabla R_{S}(\theta^{*}). Let α\alpha be the smallest nonzero eigenvalue of HH. Unlike in Lemma 1, we will omit the dependence on α\alpha.

First we need to show SS exists. Consider the update

Restricted to the span of HH, this is a contraction so it must converge to a fixed point. In fact, we can write this fixed point in a basis of HH explicitly. Let {λi}\{\lambda_{i}\} be the eigenvalues of HH. The following computation will be performed in an eigenbasis of HH. Then the above update is equivalent to:

Therefore if λi,λj≠0\lambda_{i},\lambda_{j}\neq 0 we can set

so by Corollary 1, ∥ξk∥≤X\|\xi_{k}\|\leq\mathscr{X} with probability 1−2de−ι1-2de^{-\iota}. Define vk=θk−Φk(θ0)v_{k}=\theta_{k}-\Phi_{k}(\theta_{0}) and rk=θk−ξk−Φk(θ0)r_{k}=\theta_{k}-\xi_{k}-\Phi_{k}(\theta_{0}). We will prove by induction that ∥rt∥≤D\|r_{t}\|\leq\mathscr{D} with probability at least 1−8dte−ι1-8dte^{-\iota}. First, with probability 1−2de−ι1-2de^{-\iota}, ∥ξt∥≤X\|\xi_{t}\|\leq\mathscr{X}. In addition, for k≤tk\leq t,

Therefore from the second order Taylor expansion:

Because zkz_{k} is Gaussian with covariance bounded by O(ηλX2)O(\eta\lambda\mathscr{X}^{2}) by the assumption that Σ1/2\Sigma^{1/2} is Lipschitz, we have by the standard Gaussian tail bound that its contribution after summing is bounded by ηλXkι\sqrt{\eta\lambda\mathscr{X}k\iota} with probability at least 1−2de−ι1-2de^{-\iota} so summing over kk gives

Now denote Sk=ξkξkTS_{k}=\xi_{k}\xi_{k}^{T}. Then we need to bound

Let Dk=Sk−SD_{k}=S_{k}-S. Then plugging this into the recurrence for SkS_{k} gives

where ΠH\Pi_{H} is the projection onto HH. We switch the order of summation for the next two terms to get

Note that conditioned on ϵl∗\epsilon_{l}^{*}, l<jl<j, the WjW_{j} part of the inner sum is Gaussian with variance bounded by O(ηλX2)O(\eta\lambda\mathscr{X}^{2}) so by Lemma 16, with probability at least 1−2de−ι1-2de^{-\iota}, the contribution of WW is bounded by O(ηλtιX)O(\sqrt{\eta\lambda t\iota}\mathscr{X}).

With probability 1−2dte−r2/21-2dte^{-r^{2}/2} we can assume that xjxjT=xˉjxˉjTx_{j}x_{j}^{T}=\bar{x}_{j}\bar{x}_{j}^{T} for all j≤tj\leq t so the first term is zero. For the second term the inner sum is bounded by O(r2η−1)O(r^{2}\eta^{-1}) and has variance bounded by O(η−2)O(\eta^{-2}) by the same arguments as above. Therefore by Bernstein’s inequality, the whole term is bounded by O(ηλtι+r2ηλι)O(\eta\lambda\sqrt{t\iota}+r^{2}\eta\lambda\iota) with probability 1−2de−ι1-2de^{-\iota}. Finally, to bound the third term note that

Therefore the whole term is bounded by O(ηλte−r2/4)O(\eta\lambda te^{-r^{2}/4}). Finally, pick r=4ιlog⁡Tr=\sqrt{4\iota\log\mathscr{T}}. Then the final bound is

for sufficiently large cc. This completes the induction.

F.2 SGD Cycling

Let θ=(x,y,z1,z2,z3,z4)\theta=(x,y,z_{1},z_{2},z_{3},z_{4}). We will define a set of functions fif_{i} as follows:

The intuition for the definition of ff above is as follows. When x=1x=1 and y=0y=0, due to the constraints from f9f_{9} to f12f_{1}2, only z1z_{1} can grow to become nonzero. Then locally, f1=z1−1f_{1}=z_{1}-1 and f2=z1+1f_{2}=z_{1}+1 so this will cause oscillations in the z1z_{1} direction, so SS will concentrate in the z1z_{1} direction which will bias minibatch SGD towards decreasing the corresponding entry in ∇2L(θ)\nabla^{2}L(\theta) which is proportional to (1−x)2+2(1−y)2(1-x)^{2}+2(1-y)^{2}, which means it will increase yy. Similarly when x=0,y=1x=0,y=1 there is a bias towards decreasing xx, when x=−1,y=0x=-1,y=0 there is a bias towards decreasing yy, and when x=0,y=−1x=0,y=-1 there is a bias towards increasing xx. Each of these is handled by a different Ornstein Uhlenbeck process ziz_{i}. f13f_{13} ensures that θ\theta remains on x2+y2=1x^{2}+y^{2}=1 throughout this process. This cycling is a result of minimizing a rapidly changing potential and shows that the implicit bias of minibatch SGD cannot be recovered by coupling to a fixed potential.

Appendix G Weak Contraction Bounds and Additional Lemmas

where we used that the function xe−x<1exe^{-x}<\frac{1}{e} is bounded. ∎

where we used the fact that the function xe−x≤1exe^{-x}\leq\frac{1}{e} is bounded. ∎

The following concentration inequality is from Jin et al. :

we have that for any ι>0\iota>0 there exists an absolute constant cc such that with probability at least 1−2de−ι1-2de^{-\iota},

Assume that LL is analytic and θ\theta is restricted to some compact set D\mathcal{D}. Then there exist δ>0,μ>0,ϵKL>0\delta>0,\mu>0,\epsilon_{KL}>0 such that 3 is satisfied.

It is known that there exist μθ,δθ\mu_{\theta},\delta_{\theta} satisfying the KL-inequality in the neighborhood of any critical point θ\theta of LL, i.e. for every critical point θ\theta, there exists a neighborhood UθU_{\theta} of θ\theta such that for any θ′∈Uθ\theta^{\prime}\in U_{\theta},

Let S={θ∈D:L(θ)=L(θ∗)}S=\{\theta\in\mathcal{D}:L(\theta)=L(\theta^{*})\} for any global minimizer θ∗\theta^{*}. For every global min θ∈S\theta\in S, let UθU_{\theta} be a neighborhood of θ\theta such that the KL inequality holds with constants μθ,δθ\mu_{\theta},\delta_{\theta}. Because D\mathcal{D} is compact and SS is closed, SS is compact and there must exist some θ1,…,θn\theta_{1},\ldots,\theta_{n} such that S⊂⋃i∈[k]UθiS\subset\bigcup_{i\in[k]}U_{\theta_{i}}. Let δ=min⁡iδθi\delta=\min_{i}\delta_{\theta_{i}}. Then for all ii, there must exist some μi\mu_{i} such that μi,δ\mu_{i},\delta satisfies the KL inequality and let μ=max⁡iμi\mu=\max_{i}\mu_{i}. Finally, let U=⋃iUθiU=\bigcup_{i}U_{\theta_{i}} which is an open set containing SS. Then D∖U\mathcal{D}\setminus U is a compact set and therefore LL must achieve a minimum ϵKL\epsilon_{KL} on this set. Note that ϵKL>0\epsilon_{KL}>0 as S⊂US\subset U. Then if L(θ)≤ϵKLL(\theta)\leq\epsilon_{KL}, θ∈U\theta\in U so μ,δ\mu,\delta satisfy the KL inequality at θ\theta. ∎

Appendix H Extension to SGD with Momentum

We now prove Lemma 4. We will copy all of the notation from Section 3.1. As before we define vk=θk−Φk(θ∗)v_{k}=\theta_{k}-\Phi_{k}(\theta^{*}). Define ξ\xi by ξ0=0\xi_{0}=0 and

We now define the following block matrices that will be crucial in our analysis:

Then we are ready to prove the following proposition:

With probability 1−2de−ι1-2de^{-\iota}, ∥ξk∥≤X\|\xi_{k}\|\leq\mathscr{X}.

Define ξˉk=(ξkξk−1)\bar{\xi}_{k}=\begin{pmatrix}\xi_{k}\\ \xi_{k-1}\end{pmatrix}. Then the above can be written as:

The partial sums form a martingale and by Proposition 21, the quadratic covariation is bounded by

We will prove Lemma 4 by induction on tt. Assume that ∥rk∥≤D\|r_{k}\|\leq\mathscr{D} for k≤tk\leq t. First, we have the following version of Proposition 3:

Let rˉk=(rkrk−1)\bar{r}_{k}=\begin{pmatrix}r_{k}\\ r_{k-1}\end{pmatrix}. Then,

and subtracting the definition of ξk\xi_{k} proves the top block of the proposition. The bottom block is equivalent to the identity rk=rkr_{k}=r_{k}. ∎

We have from the previous proposition that

By Corollary 3, we know that BkB_{k} is bounded by 11−β\frac{1}{1-\beta} so the remainder term is bounded by O(ηtX(L+M+X2))O(\eta t\mathscr{X}(\sqrt{\mathscr{L}}+\mathscr{M}+\mathscr{X}^{2})). Similarly, by the exact same concentration inequalities used in the proof of Proposition 4, we have that the contribution of the mk,zkm_{k},z_{k} terms is at most O(ηλt(L+X))O\left(\sqrt{\eta\lambda t}\left(\sqrt{\mathscr{L}}+\mathscr{X}\right)\right) which completes the proof. ∎

As in the proof of Proposition 4, we define

Then note that ∇R=12∇3L(S∗)\nabla R=\frac{1}{2}\nabla^{3}L(S^{*}) so it suffices to bound

We will begin by bounding the second term. Note that

so this difference contributes at most O(η2λtL)=O(ηtXL)O(\eta^{2}\lambda t\sqrt{\mathscr{L}})=O(\eta t\mathscr{X}\sqrt{\mathscr{L}}). For the first term, let Dk=Sk−SˉD_{k}=S_{k}-\bar{S}. We will decompose ∇3L\nabla^{3}L as before to get

The third term can be bound by the triangle inequality by Corollary 3 to get O(ηtLX2)O(\eta t\sqrt{\mathscr{L}}\mathscr{X}^{2}). The second term can be bound by Proposition 22 to get O(ηtX2)O(\sqrt{\eta t}\mathscr{X}^{2}).

The final remaining term is the first term. Define

From the proof of Proposition 21, we can see that Sˉ′\bar{S}^{\prime} satisfies

Let Dk′=ξˉkξˉkT−Sˉ′D_{k}^{\prime}=\bar{\xi}_{k}\bar{\xi}_{k}^{T}-\bar{S}^{\prime}. Then,

where Wk=Jϵk∗ξˉkTAT+Aξˉk(ϵk∗)TJTW_{k}=J\epsilon_{k}^{*}\bar{\xi}_{k}^{T}A^{T}+A\bar{\xi}_{k}(\epsilon_{k}^{*})^{T}J^{T} and Zk=J[ϵk∗ϵk∗−(1−β)ηλG]JTZ_{k}=J[\epsilon_{k}^{*}\epsilon_{k}^{*}-(1-\beta)\eta\lambda G]J^{T}. Then,

Plugging this into the first term, which we have not yet bounded, we get

For the first term in this expression we can use Proposition 22 to bound it by O(ηtλ)≤O(ηtX2)O(\sqrt{\eta t}\lambda)\leq O(\sqrt{\eta t}\mathscr{X}^{2}). Therefore we are just left with the second term. Changing the order of summation gives

Recall that ϵj∗=ηB∑l∈B(j)ϵl(j)gl\epsilon_{j}^{*}=\frac{\eta}{B}\sum_{l\in\mathcal{B}^{(j)}}\epsilon^{(j)}_{l}g_{l}. First, isolating the inner sum for the WW term, we get

The inner sums are bounded by O(Xη−1)O(\mathscr{X}\eta^{-1}) by Proposition 24. Therefore by Lemma 5, with probability at least 1−2de−ι1-2de^{-\iota}, the contribution of the WW term in Equation 72 is at most O(ηλkιX)=O(ηkX2)O(\sqrt{\eta\lambda k\iota}\mathscr{X})=O(\sqrt{\eta k}\mathscr{X}^{2}). The final remaining term to bound is the ZZ term in (72). We can write the inner sum as

which by Proposition 24 is bounded by O(λ)O(\lambda). Therefore by Lemma 5, with probability at least 1−2de−ι1-2de^{-\iota}, the full contribution of ZZ is O(ηλtι)=O(ηtX2)O(\eta\lambda\sqrt{t\iota})=O(\sqrt{\eta t}\mathscr{X}^{2}). ∎

Putting all of these bounds together we get with probability at least 1−10de−ι1-10de^{-\iota},

for sufficiently large cc which completes the induction.

Let the eigenvalues of AiA_{i} be ai,bia_{i},b_{i} so

Note that these satisfy ai+bi=1−ηλi+βa_{i}+b_{i}=1-\eta\lambda_{i}+\beta and aibi=βa_{i}b_{i}=\beta.

First, if (1−ηλi+β)2−4B≤0(1-\eta\lambda_{i}+\beta)^{2}-4B\leq 0 then ∣ai∣=∣bi∣=β<1\left\lvert a_{i}\right\rvert=\left\lvert b_{i}\right\rvert=\sqrt{\beta}<1 so we are done. Otherwise, we can assume WLOG that ηλi<1+β\eta\lambda_{i}<1+\beta because ρ(Ai)\rho(A_{i}) remains fixed by the transformation ηλi→2(1+β)−ηλi\eta\lambda_{i}\to 2(1+\beta)-\eta\lambda_{i}. Then ai>bi>0a_{i}>b_{i}>0 so it suffices to show ai<1a_{i}<1. Let x=1−ηλi+βx=1-\eta\lambda_{i}+\beta. Then,

and similarly for ≤\leq in place of << so we are done. ∎

Let sk=∑j<kaik−j−1bijs_{k}=\sum_{j<k}a_{i}^{k-j-1}b_{i}^{j}. Then,

We proceed by induction on kk. The base case is clear as s2=ai+bi=1−ηλi+βs_{2}=a_{i}+b_{i}=1-\eta\lambda_{i}+\beta, s1=1s_{1}=1, and s0=0s_{0}=0. Now assume the result for some k≥0k\geq 0. Then,

because (ai+bi)sk−βsk−1=(ai+bi)sk−aibisk−1=sk+1(a_{i}+b_{i})s_{k}-\beta s_{k-1}=(a_{i}+b_{i})s_{k}-a_{i}b_{i}s_{k-1}=s_{k+1}. ∎

where the second inequality follows from the rearrangement inequality as {∣ai∣k−j}j\{\left\lvert a_{i}\right\rvert^{k-j}\}_{j} is an increasing sequence and {∣bi∣j}j\{\left\lvert b_{i}\right\rvert^{j}\}_{j} is a decreasing sequence. ∎

Consider ∑j=0∞AjJGJT(AT)j\sum_{j=0}^{\infty}A^{j}JGJ^{T}(A^{T})^{j}. We will rewrite this expression in the basis Uˉ\bar{U}. Then the iith diagonal block will be equal to

If λi=0\lambda_{i}=0 then this term is . Otherwise, we know that ∣ai∣,∣bi∣<1\left\lvert a_{i}\right\rvert,\left\lvert b_{i}\right\rvert<1 so this infinite sum converges to some matrix S=[s11s12s21s22]S=\begin{bmatrix}s_{11}&s_{12}\\ s_{21}&s_{22}\end{bmatrix}. Then plugging this into the fixed point equation gives

and solving this system entry wise for s11,s12,s21,s22s_{11},s_{12},s_{21},s_{22} gives

Converting back to the original basis gives the desired result. ∎