{
  "File Number": "1111",
  "Title": "Implicit Regularization or Implicit Conditioning? Exact Risk Trajectories of SGD in High Dimensions",
  "Limitation": "Finally, we demonstrated limitations in using streaming SGD alone as a tool for studying generalization. As future work, a major outstanding problem (both theoretically and empirically) is extending the analysis above to non-quadratic losses, both train and test, and especially to other high-dimensional problems not in the kernel regime. Finally, data augmentation can naturally be considered by randomly augmenting each sample from D̂n in Eq. (30). Acknowledgments and Disclosure of Funding\nC. Paquette’s research was supported by CIFAR AI Chair, MILA, a Discovery Grant from the Natural Science and Engineering Council (NSERC), and the FRQNT New University Researcher’s Start-up Program. Research by E. Paquette was supported by a Discovery Grant from the Natural Science and Engineering Council (NSERC). Additional revenues related to this work: C. Paquette has part-time employment at Google Research, Brain Team, Montreal, QC.",
  "Reviewer Comment": "Reviewer_3: Strengths\nThe implicit conditioning could be an interesting perspective to understand the effectiveness of SGD.\nWeakness\nI find the statement of related literature could be improved.\nplease correct the bib formate of reference [36]\nLine 49, could have mentioned [55]. In particular, [55] showed a similar result that multi-pass SGD generalizes worse than GD in the linear regression setting. The authors should mention this when stating their contribution and in Sec 3.1\nThm 1 and Thm2 seem to from [39]. The authors should explicitly mention [39] after their Thms 1 and 2. Moreover, could you please explain the delta of thms 1 & 2 compared to that in [39]?\nThms 4 and 5 are from [36, 37, 38] (as explicitly mentioned in line 901 in Appendix). In this sense, the authors should explicitly clarify this issue in their main text. The current writing has caused a huge misunderstanding about its true contribution when I first go through the paper.\nLine 90. Could you explain why SGD with momentum degenerates to SGD?\nLemma 1. What is\nγ\nhere? Note that a somewhat related lemma has been shown in [55].\nLine 119-124. I am actually confused, because it has been long known that a continuous SME approximates SGD, see [L 2017] and [H 2017].\nLine 148. I believe [21] is a wrong citation here. Could you point out where in [21] iid sub gaussian is assumed?\nLine 158. The notation is a bit confusing, is\nγ\nstill referring to the stepsize?\nThm 1 is hard for me to interpret. First of all, how do you compare this result to the SME approximation proved by [L 2017] and [H 2017]? Secondly, Could you provide some examplar regime where the approximation error is small? It seems for the error to be small one needs\nd\nto be large, but on the other hand that implies\nn\nneeds to be large. How is the error affected by stepsize?\nThm 2 is also hard for me to interpret.\n[L 2017] Li Q, Tai C, Weinan E. Stochastic modified equations and adaptive stochastic gradient algorithms. InInternational Conference on Machine Learning 2017 Jul 17 (pp. 2101-2110). PMLR.\n[H 2017] Hu W, Li CJ, Li L, Liu JG. On the diffusion approximation of nonconvex stochastic gradient descent. arXiv preprint arXiv:1705.07562. 2017 May 22.\nQuestions:\nPlease see above.\nLimitations:\nPlease see above. It seems most of the theorems are from existing works. Thus this particular work presents little delta to me. Another thing bothers me is that, the authors did not try to explicitly discuss this issue in their main text.\nEthics Flag: Yes\nEthics Review Area: I don’t know\nSoundness: 2 fair\nPresentation: 1 poor\nContribution: 2 fair\n\nReviewer_4: Overall, the strengths of this paper include\n(1) establishing an approximation result between SGD and HSGD. (2) showing that SGD negatively impacts generalization performance. (3) showing how SGD accelerates convergence. (4) showing the inability of streaming SGD.\nWeaknesses are as follows: (1) Although the authors provide a precise characterization of the generalization error of SGD, the formula of the\nP\ns\ni\nt\nand\nΩ\nt\nare still difficult to follow. There lacks a good interpretation of the developed results, especially in the non-asymptotic setting that\nt\nis not approaching infinity. Note that for many high-dimensional linear regression problems, GD/SGD with early stopping can give good generalizable solutions while the overfitting will occur if\nt\n→\n∞\n.\n(2) Additionally, in some cases the condition number\nκ\ncould be extremely large (when the matrix\nT\nor\nA\nhas a fast decaying eigenspectrum). Then the convergence rate to\nΨ\n∞\nand\nΩ\n∞\nmay not be that interesting as they will be super slow and people tend to early stop the optimization algorithm.\n(3) In section 3.2, a detailed explanation about why SGD is more efficient than GD is missing. It seems that the authors only claim that SGD with a constant learning rate can match the convergence of GD, but how this lead to the argument that SGD is more efficient is missing. The authors may need to provide a rigorous comparison between the efficiency of SGD and GD/M-GD.\n(4) Lemma 1 is not new in the literature (at least in the case of\nδ\n=\n0\n). The following work (see their Theorem 1) has shown that for any feasible learning rate, the excess risk of multi-pass SGD must be greater than or equal to GD, then taking the limit\nl\ne\na\nr\nn\ni\nn\ng\nr\na\nt\ne\n→\n0\ncan imply the results of Lemma for the case of\nδ\n=\n0\nThe authors may need to comment this in the surrounding text.\nD. Zou, J. Wu, V. Braverman, Q. Gu, and S. M. Kakade. Risk Bounds of Multi-Pass SGD for Least Squares in the Interpolation Regime. arXiv preprint arXiv:2203.03159, 2022.\nQuestions:\nPlease refer to the weakness section.\nLimitations:\nPlease refer to the weakness section.\nEthics Flag: No\nSoundness: 3 good\nPresentation: 2 fair\nContribution: 3 good\n\nReviewer_5: Strengths\nFirst I have to say that the paper is well written, pleasant to follow and well illustrated by the experiments.\nSecond and more importantly, I really like the results concerning the high dimensional set-up: comparing the losses dynamics to the one of an explicit SDE that can be studied is a good idea. And even I had no time to check the proof, the result seems sound. Then, concentration to Lotka-Volterra dynamics is also a nice development of the analysis!\nWeaknesses\nPerhaps the first weakness is the limitation of the result: the authors are very precise in the specific setting of linear regression, provide some good material to analyse it, but it is hard to conclude anything deep from their analysis.\nI know this is a large tendency in the ML community, but I think that overselling the results is counter productive when writing a paper. A good example is the title of the paper where the fact that the focus is on Least-squares should be written. Also, trying to systematically conclude that SGD is \"better\" or that this can explain the amazing performance of SGD in practice is a bit overselling. The results of the authors being already strong, there is no need to oversell the paper like this.\nIn the same direction, I find the introduction confusing and the references to the literature incomplete. I think that the authors should be more specific and really focus on the least squares literature, and not try to refer to the deep learning one (or maybe just at the end to motivate further investigations). In terms of literature, lign 50, the multipass is not properly covered and [1,2] among others are worth mentioning.\nThe paragraph on Diffusion approximations and homogenized SGD should be rewritten. A lot of work has been done to model SGD as a diffusion. [3] properly explains how to model SGD with a SDE, [4] analyses it respecting the geometry of the noise and the sentence we lack a precise connection between a concrete SLD and a practical nonconvex learning problem is simply wrong as [5] studied exactly a SDE model in a non-convex setting. Finally, to be consistent with the rest of the paper, it would be great that\nγ\nappears in the noise term of equation (5). Note also that in the isotropic case, if\nΣ\nis proportional to the identity, the invariant measure is not proportional to\ne\n−\nf\nbut to\ne\n−\nC\nγ\nf\n, with\nC\nγ\n>\n0\nsome constant.\n[1] Junhong Lin and Lorenzo Rosasco. Optimal rates for multi-pass stochastic gradient methods. Journal of Machine Learning Research, 18(97):1–47, 2017\n[2] Loucas Pillaud-Vivien, Alessandro Rudi, and Francis Bach. Statistical optimality of stochastic gradient descent on hard learning problems through multiple passes. In Advances in Neural Information Processing Systems, pages 8125–8135, 2018.\n[3] Qianxiao Li, Cheng Tai, and Weinan E. Stochastic modified equations and dynamics of stochastic gradient algorithms i: Mathematical foundations. Journal of Machine Learning Research, 20(40):1–47, 2019.\n[4] Stephan Wojtowytsch. Stochastic gradient descent with noise of machine learning type. Part II: Continuous time analysis, Preprint, 2021.\n[5] Scott Pesme, Loucas Pillaud-Vivien, and Nicolas Flammarion. Implicit bias of sgd for diagonal linear networks: a provable benefit of stochasticity. Advances in Neural Information Processing Systems, 34, 2021.\nMinor Flaws\n[36] is an empty reference\nlign 92: miss a\nd\nt\nin equation (5) for the drift\nlign 166: explain with you take\nt\nn\nas the time for SGD\nlign 250: parenthesis problems\nQuestions:\nI have one question for the SDE limit of the model: could the authors explain why the quadratic case is special to derive the SDE limit ? How could it be extended to a general convex loss ? or even to a non-convex setup ?\nLimitations:\nAs I already discussed the limitations in the previous boxes, I'll put the conclusion of my review here. I truly think this is a nice paper, with solid result and an interesting high-dimensional limit dynamics. I now put a weak accept, but will be happy to raise my score if the authors temper a bit the overselling part, correct the minor flaws and the referencing.\nEthics Flag: No\nSoundness: 3 good\nPresentation: 3 good\nContribution: 3 good\n\nReviewer_6: Strengths\nThe most interesting result is to show that SGD has a different condition number for convex quadratic functions. In particular, SGD outperforms GD if the spectrum of the Hessian has some outliers, which is usual in realistic applications, see Figure 2.\nThe Volterra Dynamic, though not first proposed by this paper, its analysis might be of independent interest to study the behavior of SGD.\nWeaknesses\nIn Figure 2, they run random feature models for realistic applications, i.e., CIFAR-10, CIFAR-5m, showing that in these cases the Hessian is ill-conditioned, supporting their main arguments that SGD outperforms GD on these realistic applications. However, note that the random feature model is a convex optimization problem, which differs a lot from realistic neural networks. Hence, small ICR on the random feature model cannot be used to show that SGD outperforms GD on realistic optimization problems directly. Next, the author should provide the \"real\" convergence comparison between SGD and GD even for the random feature models to support their main observation. ICR is just an indicator for the comparison between SGD and GD. There might be an approximation error due to the usage of HSGD and also the dimension, iteration time is finite. Hence, without this simulation, I am not convinced that SGD does outperform GD in terms of convergence speed.\nThe argument that there is no implicit regularization might be trivial. For convex optimization, any algorithms, if convergent, then they should converge to the same function value (for strongly convex cases, they converge exactly to the same point). To my best knowledge, all the previous papers studying the implicit regularization focus on nonconvex optimization.\nThe introduction of Volterra Dynamics is limited, which is very unfriendly to those unfamiliar with it. It would be good if additional background information can be provided.\nMissing title in the reference [36].\nQuestions:\nPlease see the weakness.\nLimitations:\nPlease see the weakness.\nEthics Flag: No\nSoundness: 2 fair\nPresentation: 2 fair\nContribution: 2 fair",
  "abstractText": "Stochastic gradient descent (SGD) is a pillar of modern machine learning, serving as the go-to optimization algorithm for a diverse array of problems. While the empirical success of SGD is often attributed to its computational efficiency and favorable generalization behavior, neither effect is well understood and disentangling them remains an open problem. Even in the simple setting of convex quadratic problems, worst-case analyses give an asymptotic convergence rate for SGD that is no better than full-batch gradient descent (GD), and the purported implicit regularization effects of SGD lack a precise explanation. In this work, we study the dynamics of multi-pass SGD on high-dimensional convex quadratics and establish an asymptotic equivalence to a stochastic differential equation, which we call homogenized stochastic gradient descent (HSGD), whose solutions we characterize explicitly in terms of a Volterra integral equation. These results yield precise formulas for the learning and risk trajectories, which reveal a mechanism of implicit conditioning that explains the efficiency of SGD relative to GD. We also prove that the noise from SGD negatively impacts generalization performance, ruling out the possibility of any type of implicit regularization in this context. Finally, we show how to adapt the HSGD formalism to include streaming SGD, which allows us to produce an exact prediction for the excess risk of multi-pass SGD relative to that of streaming SGD (bootstrap risk).",
  "1 Introduction": "Stochastic gradient descent (SGD) is the algorithm of choice for optimization in modern machine learning and has been hailed as a major reason for deep learning’s success [11, 21]. Explanations for the effectiveness of SGD typically refer to its computational efficiency and to its favorable generalization properties, but theoretical understanding of these purported benefits is far from complete.\nThe efficiency of SGD has been the subject of extensive research, dating back to the original work of Robbins and Monro [68] and extending to modern large-scale machine learning applications (see e.g. [10, 12]). However, despite its widespread adoption and algorithmic simplicity, surprisingly little is known about how SGD performs in the types of high-dimensional optimization problems that occur in practice. Part of the challenge in deriving robust high-level conclusions about the efficiency of SGD is simply that those conclusions can depend on precisely which quantities are measured and what assumptions are leveraged. For example, in the extreme setting where the samples are one-hot vectors, running SGD on a quadratic function is actually identical to running full-batch gradient descent; as such, any statements about the two algorithms’ relative efficiency must be data-dependent.\n36th Conference on Neural Information Processing Systems (NeurIPS 2022).\nFurthermore, the majority of prior analyses focus on the streaming or single-pass setting, where each sample is seen a single time. While this setting is appropriate when the number of samples n is much larger than the dimensionality d, it does not adequately describe the practically-relevant overparameratized or high-dimensional settings where d & n.\nMoreover, the practical success of SGD has been so remarkable in recent years that a growing body of literature has suggested that its benefit to generalization extends beyond what any improved efficiency might reasonably afford [76, 31, 14, 72, 74]. Some of the myriad explanations for SGD’s favorable generalization properties include the local geometry of minimizers [32, 26, 82, 24], connections to approximate Bayesian inference [49], and the regularization properties of noise [75], among many others. While some of the these perspectives are intuitive and compelling, they are often difficult to rigorously establish from either an empirical or a theoretical perspective. Empirically, simulations at large scale command significant computational resources, and it can be challenging to push to sufficiently late times or sufficiently large batches to establish the appropriate baselines [72, 75]. Theoretically, the strongest existing results are again in the single-pass setting, for which a number of works have established excess risk bounds for quadratic problems [6, 18, 20, 81]. Much less is known in the multi-pass setting, though stability results were established by [25], and some recent works have begun examining generalization [39].\nIn this work, we study the dynamics of multi-pass SGD on high-dimensional convex quadratic functions and derive exact asymptotic predictions for the learning and risk trajectories. Our analysis establishes an asymptotic equivalence to a stochastic differential equation, which we call homogenized stochastic gradient descent (HSGD), whose solutions we characterize explicitly in terms of a Volterra integral equation. These results allow us to define a precise data-dependent implicit-conditioning ratio (ICR) that determines whether SGD is more efficient than its full-batch cousins. The ICR favors SGD for many practical datasets, providing some explanation for the observed superior efficiency of SGD; interestingly, we also highlight settings for which SGD is less efficient than full-batch momentum gradient descent, underscoring the data-dependence of the conclusions. Moreover, our results also show that SGD does not improve generalization performance, whether measured in-distribution or out-of-distribution, and therefore that SGD does not offer any form of implicit regularization in this setting. We emphasize that our results do not rule out possible benefits for non-convex problems, but they do provide some of the first explicit negative results in the convex quadratic case.",
  "1.1 Contributions": "Our primary contributions are to:\n1. Establish the equivalence of quadratic statistics computed on the iterates of SGD and on a particular stochastic Langevin diffusion process called homogonized SGD (Theorem 1);\n2. Exactly characterize the asymptotic training and risk trajectories as the solutions of a deterministic Volterra integral equation (Theorem 2);\n3. Prove that the noise from SGD negatively impacts generalization performance, both in- and out-of-distribution (Section 3.1), but explain why the impact is often minimal in practice;\n4. Introduce the implicit-conditioning ratio that describes when and by how much SGD accelerates convergence relative to the best full-batch methods (Section 3.2);\n5. Analyze the limit of streaming SGD to show its inability to capture many salient features of the dynamics of multi-pass SGD (Appendix C).",
  "2 Preliminaries and background": "Problem setting. We consider high-dimensional `2-regularized least squares problems defined by,\nmin x∈Rd\n{ f(x) def = 1\n2 ‖Ax− b‖22 +\nδ 2 ‖x‖2 = n∑ i=1 1 2 ( (aix− bi)2 + δ n ‖x‖2 ) ︸ ︷︷ ︸\ndef =fi(x)\n} , (1)\nwhere δ ≥ 0 is the ridge-regularization parameter. We denote the ridgeless empirical risk as\nL(x) def =\n1 2 ‖Ax− b‖22. (2)\nOn the problem (1), the steps taken by gradient decent (GD) can be written recursively as\nxm-gdk+1 = x m-gd k −γk∇f(x m-gd k ) = x m-gd k −γkA T (Axm-gdk −b)−γkδx m-gd k +∆(x m-gd k −x m-gd k−1), (3)\nwhere ∆ > 0 is the momentum parameter, γk is the learning rate schedule, and x0 ∈ Rd is an initial vector assumed to be independent of all other randomness and having norm at most 1. When A is large, computing these updates can be expensive, so an unbiased estimator for the true gradient is often used, where a subset of the data points are selected uniformly at random. We focus on the setting with batch size equal to one and without momentum, which we refer to as stochastic gradient descent (SGD), and for which the iterates can be written recursively as\nxsgdk+1 = x sgd k − γk∇fik(x sgd k ) = x sgd k − γkA Teike T ik (Axsgdk − b)− γkδ n x sgd k , (4)\nwhere the ik ∼ Unif([n]) iid. While it would also be possible to consider mini-batch SGD, previous work has shown that batch sizes that are vanishingly small as a fraction of the number of samples are equivalent to the single-batch analysis, after appropriately adjusting the time by a factor of the batch size [60, Theorem 1]; similarly, we do not consider high-dimensional SGD with momentum as it degenerates to SGD [58]. See also [30].\nDiffusion approximations and homogenized SGD. A common paradigm for understanding SGD is through stochastic Langevin diffusions (SLD), i.e. solutions of equations of the form\ndXt = −γ(∇f(Xt) dt+ √ Σt dBt) , (5)\nwhere γ is the step size of SGD, f is the loss function, Bt is a d-dimensional standard Brownian motion, and the matrix 0 Σt ∈ Rd×d models the noise covariance. In many analyses, no concrete connection between SGD and SLD is developed, and the diffusion is merely used to build intuition. A common example is the isotropic case (Σt ∝ Id), for which the Fokker-Planck equation implies that the dynamics are reversible with respect to a density proportional to e−Cγf(x) with Cγ > 0 some constant. Consequently, the process can escape local minima, exhibiting a trade-off between the entropy and depth of minima and thereby highlighting a possible mechanism of implicit regularization. In the general anisotropic case, describing the stationary distribution is more difficult; nonetheless, the local geometry near minima of f can be analyzed, see [14, 35].\nWhile this type of implicit entropic regularization might ultimately underlie the generalization benefits of SGD for nonconvex problems, currently we lack a precise connection between a concrete SLD and a practical nonconvex learning problem. As such, the implicit regularization effects of SGD on nonconvex losses remains a largely unsolved problem.\nFor convex quadratics, however, the implications of Eq. (5) are quite clear: there is no notion of implicit regularization as the noise in SLD negatively impacts generalization performance. Note that because the noise is mean zero, any SLD is centered around gradient flow (GF) Xgft , which solves\ndXgft = −∇f(X gf t ) , (6)\nleading to the following conclusion for generalization (see also [88]): Lemma 1. Suppose the objective function is f(x) = 12 ( ‖Ax− b‖2 + δ‖x‖2 ) . Suppose (Xt : t ∈ [0,∞)) is an SLD (i.e.Xt solves (5)) with ‖Σt‖op almost surely bounded by some C <∞. Suppose the population riskR : Rd → R is a convex function and denote x∗ def = limt→∞X gf t , then\nE[R(Xt)]︸ ︷︷ ︸ pop. risk of SLD ≥ R(Xgfγt)︸ ︷︷ ︸ pop. risk of\ngradient flow\nfor all t ≥ 0 and hence, lim inf t→∞ E[R(Xt)]︸ ︷︷ ︸ limiting pop. risk of SLD ≥ R(x∗)︸ ︷︷ ︸ limiting pop. risk\ngradient flow\n.\nIf in additionR is strictly convex, and Σt → Σ∞ with Σ∞ 0, then the inequality is strict.\nProof. The mean E[Xt], by the linearity of the gradient∇f , is GF. Under the conditions given, the law ofXt converges to a Gaussian variable centered at x∗. Hence by Fatou’s lemma and Jensen’s inequality, the inequality follows.\nWe emphasize that this conclusion applies even under general distribution shifts, so long as the risk remains a convex function. Still, the utility of Lemma 1 may not be immediately clear, as it pertains\nto SLD and we have not yet established any concrete connection between SLD and the process of interest, SGD. Nor is it evident what form such a connection should take—the agreement between SGD and an SLD cannot occur at the level of individual states since the randomness from each process is not assumed to be coupled. Instead, the most we can hope for is that statistics of the processes agree. Specifically, we might hope that matching the noise structure of SGD with a careful choice of SLD will cause relevant statistics, like the population risk, to be equal.\nIt turns out that such a choice of SLD exists for convex quadratic problems in high dimensions, and is given by homogenized SGD (HSGD), introduced simultaneously in [52, 58]. Both the empirical and population risks (L,R resp.) of HSGD agree with the same of SGD in the high-dimensional limit (see Thm. 1). Mathematically, HSGD is the strong solution of the stochastic differential equation:\ndXt def = −γ(t)∇L(Xt) dt+ γ(t) √ 2 nL(Xt)∇2L(Xt) dBt, for quadratic L, (7)\nwhere againBt is a d-dimensional standard Brownian motion, γ(t) is the learning rate schedule, and the initial condition is X0 = x0. Roughly, HSGD is a diffusion approximation to SGD that gains explanatory power when the dimensionality is large. In particular, it does not require the step size γ to be small, in contrast to the usual paradigm of SLD approximations. Note that as with other universality results, the details of the noise distribution are not relevant and only the second-order correlations contribute, which are carefully matched by HSGD to SGD.\nThe precise sense of the comparison requires us to evaluate low-dimensional statistics of the highdimensional dynamics; “low-dimensional” must be effective, in that the univariate statistics of the SGD iterates concentrate around the same statistic evaluated on HSGD. For understanding generalization or implicit regularization properties, a important statistic is the population risk,R.\nAssumptions. For all parts of our analysis to hold, the pair (A, b) of the data matrixA ∈ Rn×d and target vector b ∈ Rn must satisfy some quasi-random assumptions—a set of deterministic conditions on the pair (A, b) that are satisfied with high probability by natural classes of random matrix-vector pairs (see Appendix B for specifics). We use the convention that the target and initialization vectors are bounded independent of n, ‖b‖22 ≤ C and ‖x0‖22 ≤ C, respectively. We illustrate some examples below that we have shown to satisfy the quasi-random assumptions.\n• Gaussian linear regression. Here the rows of A are iid and drawn from a Gaussian with norm-bounded covariance Σ and the target b is drawn from a generative model, b = Ax̃+η for some unknown signal x̃ ∈ Rd and independent noise η ∈ Rn.\n• Subgaussian linear designs. In the example above, we can relax the Gaussian assumption to be of the form xΣ1/2 for x a vector of iid centered subgaussian random variables [88, 30].\n• Gaussian random features with a linear ground truth [51, 3, 66, 4]. Suppose A is given by σ(XW ) for an iid standard Gaussian weight matrix W and Gaussian data matrix X . Suitable assumptions on the activation function σ and the covariance Σ ofX added.\nAssumption 1. The population riskR : Rd → R is a quadratic, that is, it is a degree-2 polynomial or, equivalently, can be represented by\nR(x) = 1 2 xTTx+ uTx+ c\nfor some d × d symmetric matrix T , vector u ∈ Rd, and scalar c ∈ R. We further assume that ‖∇2R‖op ≤ C, ‖∇R(0)‖22 ≤ C, and |R(0)| ≤ C.\nA natural population risk is given byR(x) = 12E [(a · x− b) 2] where (a, b) ∼ D. This distribution D may or may not be the same as the distribution that generated the data [A | b] used in training. As we work in the high-dimensional limit, we suppose that γk = γ(k/n) for a smooth, bounded function γ(·) such that γ(t)→ γ ∈ [0,∞) and γ̂ def= supt≥0 γ(t) <∞.",
  "3 Main results": "Our main results are analyzable (non-asymptotic) expressions for the empirical risk L and the population riskR of SGD at any time t for the high-dimensional least squares problem (1). To begin, we first establish the following equivalence between SGD and HGSD.\nTheorem 1 (Equivalence of SGD and HSGD). Suppose the pair (A, b) ∈ Rn×d × Rd satisfy the quasi-random assumptions with dε ≤ n ≤ d1/ε for some ε ∈ (0, 1]. Let the iterates xt = xsgdbtc be generated from multi-pass SGD Eq. (4) andXt be the solution of Eq. (7). Then for any deterministic T > 0 and any D > 0, there is a C > 0 such that\nPr [ sup\n0≤t≤T\n∥∥∥∥(L(xbtnc)R(xbtnc) ) − ( L(Xt) R(Xt) )∥∥∥∥ 2 > d−ε/2 ] ≤ Cd−D.\nThe rigorous proof is given in [61]. For the rest of this paper, we will use homogenized SGD to analyze the behavior of multi-pass SGD. See also Appendix C where we heuristically extend this to the case of streaming SGD.\nWhile the comparison of SGD to HSGD requires relatively strong assumptions on A and b, the analysis of HSGD can be performed under weaker assumptions (no quasirandomness assumptions are needed). It suffices to suppose the problem is high dimensional in the following sense: Assumption 2. The empirical risk L satisfies tr∇2L = n and 0 ∇2L nd− for some > 0.\nThis corresponds to the normalization where∇2L = ATA and each row ofA is length 1 and hence tr∇2L = n.\nUnder Assumptions 1 and 2, the dynamics of the empirical and population risk under HSGD concentrate around a deterministic dynamical system driven by a Volterra integral equation:\nVolterra Dynamics, Multi-pass. The following deterministic dynamical system is the high-dimensional limit for L(Xt) andR(Xt), respectively\nΨt = L ( X gf Γ(t) ) + ∫ t 0 K(t, s;∇2L)Ψs ds (Empirical risk) (8)\nΩt = R ( X gf Γ(t) ) + ∫ t 0 K(t, s;∇2R)Ψs ds (Population risk) (9)\nwhere the integrated learning rate Γ and kernel K, for any d× d matrix P , respectively are\nΓ(t)= ∫ t 0 γ(s) ds, K(t, s;P )= γ 2(s) n tr ( (∇2L)P exp ( −2(∇2L + δId)(Γ(t)− Γ(s)) )) . (10)\nTheorem 2 (Concentration of HSGD around Volterra dynamics). Under Assumptions 1 and 2, for any T > 0 and for any D > 0 there exists sufficiently large C > 0 such that for all d > 0\nPr [ sup\n0≤t≤T\n∥∥∥∥(L(Xt)R(Xt) ) − ( Ψt Ωt )∥∥∥∥ > d− /2] ≤ Cd−D, where Ψt and Ωt solve (8) and (9).\nWe give a formal proof of the concentration result in Appendix D.1 in Theorem 11.",
  "3.1 No implicit regularization from SGD": "From (9), for convexR we observe immediately that the population risk Ωt is only larger than the population risk of GF. Moreover, we have an explicit formula for the excess risk due to SGD noise,\nΩt −R ( X gf Γ(t) )︸ ︷︷ ︸ excess risk due to SGD def = ∫ t 0 K(t, s;∇2R)×Ψs︸︷︷︸ limiting loss L ds.\nNote that the population risk of SGD tracks that of GF. If GF overfits, SGD overfits as well; there is no statistical regularization due to the noise of SGD applied to empirical risk minimization (ERM).\nWe can further analyze the long-time behavior of SGD with exact limiting values for this excess risk.\nTheorem 3 (Time infinity risk values). If γ(t) → 0 as t → ∞ but Γ(t) → ∞ (i.e. the usual Robbins-Monro setting), then the excess population risk of SGD over GF tends to 0. If on the other hand γ(t)→ γ ∈ (0, 2( 1n tr { (ATA)2 ATA+δId } )−1 , then with Ψ∞ given by the limiting empirical risk,\nΨ∞ = L ( Xgf∞ ) × (\n1− γ 2n tr\n{ (∇2L)2\n∇2L + δId })−1 the excess risk due to SGD converges to\nΩt −R ( X gf Γ(t) ) → γΨ∞\n2n × tr { (∇2R)(∇2L) ∇2L + δId } .\nThere are a few conclusions to draw directly from this. In the interpolation regime, that is where Ψ∞ = 0, there is no excess risk due to SGD and there is no need to send γ to 0. Moreover, if the empirical risk Ψ∞ is small, the excess risk due to SGD is proportional to γΨ∞, and hence it is frequently orders of magnitude smaller than other potential sources of error. Furthermore, the excess risk is affected by how similar the population and empirical risks are, in the large directions. Ridge regularization can substantially reduce excess risk due to SGD in cases where population risk has many small eigenvalues. In summary, either by sending γ → 0, working in the interpolation regime, or otherwise in a regime Ψ∞ is small, the excess risk incurred by running SGD is minimal.",
  "3.2 Implicit conditioning of SGD": "In contrast, the algorithmic advantages of SGD are substantial. To simplify the discussion, we consider only the case of constant learning rate γ. In this case, the kernel in (8) and (9) simplifies to a convolution kernel, which has a much simpler theory. To characterize the rates, we define λmin as the smallest non-zero eigenvalue of∇2L. Then for generic initial conditions, (in particular almost surely ifX0 is nonzero isotropic), GF has the following convergence rate\nlim t→∞\n( L(Xgfγt)− L(X gf ∞) )1/t = { e−γ(λmin(∇\n2L)+δ), if δ > 0, e−2γλmin(∇ 2L), otherwise.\nHere we use the notation that λmin(H) and λmax(H) are the smallest and largest eigenvalues of the matrixH . The rate of convergence of Ψt to Ψ∞ can be no faster than the underlying GF, given by the rate above. On the other hand, for larger γ the Volterra term in (8) can frustrate the convergence. The Malthusian exponent of the convolution Volterra equation is given by\nλ∗=inf { x : 1 = ∫ ∞ 0 extK(t;∇2L) dt def= γ2 ∫ ∞ 0 ext tr (( ∇2L )2 exp ( −2γ(∇2L + δId)t )) dt } . (11)\nAs∇2L is finite dimensional, we have that λ∗ ≤ 2γ(λmin(∇2L) + δ), owing to the divergence of the integral as x approaches this value from below. Note that in principal the Malthusian exponent can be negative, in which case SGD is divergent. The Malthusian exponent gives the effective rate of convergence of constant learning rate SGD. Define\nΞ(γ) def = { min{γ(λmin(∇2L) + δ), λ∗(γ)} if δ > 0, λ∗(γ) if δ = 0.\n(12)\nTheorem 4 (SGD convergence rates, average-case). Then the rates of convergence of both the empirical and population risk are controlled by this parameter\nlim t→∞\n( Ψt −Ψ∞ )1/t = e−Ξ(γ) = lim\nt→∞\n( Ωt − Ω∞ )1/t .\nFurthermore, when γ = n(tr(ATA))−1, we have the rate guarantee Ξ(γ) ≥ λmin(∇ 2L)+δ\n2 .\nThe major difference between SGD and full batch methods such as momentum gradient descent (MGD; see Appendix F.2 for definitions) is that they have different sensitivities to the Hessian spectrum of the empirical risk L(x) = 12‖Ax− b‖ 2. Define the condition numbers\nκ def = λmax(∇2L) + δ λmin(∇2L) + δ and κ def= 1 n tr(∇ 2L) λmin(∇2L) + δ .\nThe first of these is the classical condition number of the ridge problem, while the second is the averaged condition number that regulates the behavior of SGD in the high-dimensional limit. MGD has been long established to have a rate of convergence, with proper tuning, controlled by the square root of the condition number [65], which is known to be optimal amongst first order algorithms.\nTheorem 5 (Convergence rates for MGD). For isotropic random initialization x0 or noisy b, δ > 0, and strictly convex population riskR( L(xm-gdk )− L(x∗) )1/k a.s.−−−−→ k→∞ (√ κ− 1√ κ+ 1 ) and ( R(xm-gdk )−R(x∗) )1/k a.s.−−−−→ k→∞ (√ κ− 1√ κ+ 1 ) .\nSee Appendix F.2 for elaboration.\nIn light of Theorems 4 and 5, we can define the implicit-conditioning ratio as\nICR def = κ√ κ ≈ log (√ κ− 1√ κ+ 1 ) κ,\nwhich measures the efficiency of SGD over MGD in that SGD with constant learning rate n/ tr(∇2L) trains in an ICR-multiple of the number of epochs that MGD requires (lower is better for SGD).\nProblems favor SGD when there are large outlier eigenvalues, a common feature of Hessian spectra in practice [69, 70, 1]. Indeed, if the largest eigenvalues are on the same order as the unnormalized trace, individual SGD iterates are as effective as full-batch gradient. In contrast, when the Hessian spectrum is tightly packed, which is less common in practice but can occur after some preprocessing techniques or e.g. for uncorrelated Gaussian samples, then MGD is favored. See Fig. 2.",
  "3.3 Numerical results on ICR": "In Fig. 3, we illustrate how ICR affects the relative performance of full batch MGD versus single batch SGD in a synthetic least squares setting where we have tight control over the all the particulars of the problem and in a neural network setting.We control the ICR by controlling the covariance singular value spectrum of the rows ofA, which we take as Pareto distributed with exponent s for varying s > 2. This choice allows us to affect the ICR of the problem without changing the minimum curvature of the Hessian. The results, comparing SGD, MGD, and GD, are given in Figure 3.\nWe note a few key qualitative observations. First, even in MGD favored configurations, SGD will outperform MGD on short time scales. When optimizing the hyperparameters in MGD for longtime performance, minimal curvature (which in this case is just the minimal eigenvalue of AAT ) plays a major role in the choices; being tuned for long-time performance, MGD typically performs suboptimally at initialization. In contrast, the learning rate in SGD only depends on average curvature, and so it generally performs better at initialization on problems with a larger interval of Hessian spectra.\nSecond, we note that the problem setup was chosen to hold the minimum curvature roughly constant while varying s. When s tends to 2 from above, the largest eigenvalues ofAAT grows with feature dimension d, but the average and minimum eigenvalue stays bounded with feature dimension. Hence we can send the ICR to 0 by choosing an s above 2 and increasing d (or n).1 On the other hand, by sending s → ∞, we send the covariance matrix to the identity, which tends to be momentum favored.2\nIn Fig. 4, we run SGD on a fully-connected 2-layer neural network on a subset of CIFAR-10 in order to examine the dynamics of the ICR for a non-trivial problem and to see how our insights might play out in practice. Owing to the non-convexity of this problem, we define the ICR in terms of the Gauss-Newton approximation to the Hessian, or equivalently in terms of the Neural Tangent Kernel [29]. By changing the activation function of the network, we can vary the initial ICR from an SGD-favored to a momentum-favored value. While the ICR does change over the course of training, we find that, at least in this setting, the initial ICR can nevertheless predict the relative performance of SGD versus MGD. Indeed, for activation functions for which the ICR remains above 1.0, the training remains MGD-favored over sufficiently long times, and we observe that MGD with optimal parameters does converge faster than SGD. In contrast, when the ICR remains below 1.0, we find that SGD outperforms MGD.",
  "4 Conclusion.": "Using a specific type of SLD (called HSGD) that matches the second-order correlations in the noise of SGD, we demonstrated that their empirical and population risks match in the high-dimensional limit. Moreover, the risks of HSGD behavior deterministically, as described by a Volterra equation. With this connection, we investigated the benefits of SGD on a convex objective. While there is no statistical benefit to generalization from the noise of SGD, in overparameterized, interpolating settings little is lost compared to GD. Moreover, when computational restrictions are imposed, SGD can be radically faster than GD because of its dependence on a different condition number of the Hessian. We characterized this speed up using the ICR, which when calculated for datasets common in deep learning clearly favors SGD. This should highlight the difficulty in studying implicit regularization for SGD empirically: any experiment necessarily has a finite computational budget and may find\n1The relevance of s > 2 is that the Pareto has moments up to and including the second moment. For values less than 2, the covariance spectra is sufficiently heavy that the maximum eigenvalue of AAT dominates the trace. In that regime, the problem becomes effectively sparse, with an intrinsic dimension depending only on s, and it should be expected that GD/SGD are approximately equivalent and outperform MGD.\n2Furthermore, the ’average curvature’ speedup of SGD on short time scales becomes muted, owing to all curvatures being the same.\nlower population risks with SGD simply via its improved conditioning. Finally, we demonstrated limitations in using streaming SGD alone as a tool for studying generalization.\nAs future work, a major outstanding problem (both theoretically and empirically) is extending the analysis above to non-quadratic losses, both train and test, and especially to other high-dimensional problems not in the kernel regime. Finally, data augmentation can naturally be considered by randomly augmenting each sample from D̂n in Eq. (30).\nAcknowledgments and Disclosure of Funding\nC. Paquette’s research was supported by CIFAR AI Chair, MILA, a Discovery Grant from the Natural Science and Engineering Council (NSERC), and the FRQNT New University Researcher’s Start-up Program. Research by E. Paquette was supported by a Discovery Grant from the Natural Science and Engineering Council (NSERC). Additional revenues related to this work: C. Paquette has part-time employment at Google Research, Brain Team, Montreal, QC.",
  "Reviewer Summary": "Reviewer_3: This work proposes HSGD as a continuous approximation to SGD (multi pass version). It first shows an approximation theorem that justifies the closeness between the continuous HSGD and the discrete SGD. Then by studying HSGD it characterizes the limiting training and population risks through Volterra dynamics. Based on the theorems, the paper concludes that (1) multi-pass SGD does not have implicit bias over GD, at least in the setting of least square, (2) SGD has an effect of implicitly conditioning, that accelerates the convergence.\n\nReviewer_4: This paper studies the generalization ability of the multi-pass SGD on high-dimensional convex quadratics by relating it to a stochastic differential equation called homogenized stochastic gradient descent (HSGD). The authors show that using the HSGD, a precise risk trajectory of SGD can be established, which reveals the conditions on the data distribution that SGD is more efficient than GD. The authors further extend the analysis to streaming SGD and show its inability to capture certain salient features compared to multi-pass SGD.\n\nReviewer_5: The authors of the paper present the following contributions:\nThey show that, in the high dimensional limit, multipass SGD behaves, in terms of empirical and population loss, as a SDE with a particular noise covariance\nThey further show that, in the high dimensional limit, this SDE converges to a deterministic Volterra Dynamics\nThey analyse this dynamics to compare to the one of the gradient flow showing that noise negatively impact the population loss but can accelerate convergence.\n\nReviewer_6: This paper uses SDE (so-called HSGD) to study the optimization property of both streaming and multi-pass SGD over the quadratic functions. First, they show that the risk of SGD is no better than GD, showing that there is no implicit regularization in this setting. Next, they show the connection between SGD and HSGD, enabling them to use HSGD to study the properties of SGD. Their main contribution is to show that SGD enjoys a different condition number that sometimes leads to a better convergence rate over GD. Moreover, they also study the streaming SGD using the same framework and relate them to compare the generalization."
}