Scaling laws of optimization
Scaling laws have been one of the key achievements of theoretical analysis in various fields of applied mathematics and computer science, answering the following key question: How fast does my method or my algorithm converge as a function of (potentially partially) observable problem parameters.
For supervised machine learning and statistics, probably the simplest and oldest of all such scaling laws is the classical rate for ordinary least-squares (where is the number of features, the number of observations, and the noise variance). This has been extended over the years in the statistics community for various non-linear function estimation, with excess risks for regression essentially proportional to , where is now the order of derivatives that exist for the optimal prediction function (see, e.g., these two nice books [1, 2]). Such scaling laws also have a long history in the part of statistical physics that looks into high-dimensional statistical estimation problems (see, e.g., [3]), as well in random matrix theory (see, e.g., [4, 28]). Note that a particular feature of a theoretical scaling law is that it should be an asymptotic equivalent rather than an upper bound, which is the traditional set up in learning theory (and for good reasons, see, e.g., my soon to be published book [5]).
While there is a long history of scaling laws in theoretical circles, empirical variants have recently emerged for large-scale neural networks [26, 27], where new quantities (such as the amount of computing power available) have appeared. Here, the algorithm is run with several values of the problem parameters, and a parameterized scaling law is fit to the empirical performance, with the hope of predicting performance outcomes in future experiments. See a comprehensive summary here.
In this blog post, I want to tackle the following question: are there standard scaling laws for optimization with (stochastic) gradient descent? In other words, how many iterations should I really expect as a function of simple problem parameters?
As for scaling laws for predictive performance, answers have to be dedicated to a specific class of problems. In this post, I will focus on the simplest possible set-up: unconstrained convex quadratic optimization problems. Why?
- Because the analysis can be made asymptotic without too much effort using linear algebra (convex optimization problems classically leads to upper bounds on performance, as covered in an earlier blog post, but not typically to simple equivalents).
- Many of the concepts in convex optimization are often seen (at least locally) in this class of functions. Clearly, other posts are needed to go beyond. Even more, I will focus on deterministic gradient descent in this post, showing in a future post how this extends to the stochastic version (I will also briefly mention accelerated gradient descent).
What does classical optimization theory say?
We consider a convex quadratic function . If we assume that it is lower-bounded, then it has a minimizer , and a minimal value, denoted . If denotes its positive semidefinite Hessian matrix, the function can be written as
The gradient descent algorithm is then an iterative algorithm starting at some , with the following iteration, for :
Exponential convergence. As reviewed in Section 5.2.1 of my book [5], the classical “strongly convex” analysis assumes that all eigenvalues of are between and , with . Then, for , the matrix only has nonnegative eigenvalues less than
Rate in . The classical “non strongly convex” analysis considers explicitly the case , and uses that the function is maximized at with maximal value for , leading to the bound, for ,
Why is this not good enough? The two bounds in equations and are too crude for the following reasons:
- The exponentially convergent bound in equation is only meaningful if the condition number is not too large, and for modern machine learning problems, strong convexity is only obtained through a regularizer, with condition numbers that often grow up linearly in (this corresponds to a common regularizer proportional to a constant times ). Thus, the strongly convex analysis is often meaningless when doing not much more than iterations of the algorithm.
- The rate in in equation totally misestimates the actual dependence in , as it relies on a crude bound. As shown in the examples below, it often (non surprisingly) underestimates the actual performance, but, in early iterations, it may also overestimate it (which is more surprising as it comes from an upper bound).
Two classical behaviors. Below, we present two examples obtained from the model we detail below, outlining two behaviors that can be expected from running gradient descent in machine learning contexts (and quadratic objective functions). The two cases correspond to small strong convexity constant , so that we observe lines in log-log plot (thus a convergence rate as a power of ) until a dip indicative of exponential convergence, around .
The first case corresponds to an underestimation of the non-strongly convex bound (here, the scaling law is in in early iterations).

Comparison between observed performance and the classical bounds from optimization, for a problem following the model below, with , , , .
The second case corresponds to a worse situation regarding the bound: the rate may in fact be optimistic, as shown below (where the rate for small is proportional to ).

Comparison between observed performance and the classical bounds from optimization, for a problem following the model below, with , , , .
What’s happening? Since the problem is invariant by rotation, without loss of generality, for the analysis only, we can place ourselves in a basis of eigenvectors of , and thus consider
The strongly convex bound relies on upper bounding all exponentials by the slowest one, while the non strongly convex bound relies on uniformly replacing by its maximal value. This is too crude, and the “correct” way to study the collective behavior of all eigenvalues is through Laplace’s method, which was studied in an earlier post. Note that a difficulty we will have to face is the presence of two different regimes: one with polynomial convergence and then one with exponential convergence.
Before doing so, we need to define a good model for the sequences and .
What is a good model for machine learning problems?
Optimization is much broader than machine learning, but I’ll focus on what I know well and a model that suits well some classical machine learning optimization problems (if you have any other model which is relevant in other applications, please let me know). Other models can be considered using random matrix theory (see, e.g., [6, 16]).
In this blog post, I will consider the following asymptotic model (it does not need to be true exactly for all , just asymptotically when tends to infinity):
- Infinite-dimensional problem, i.e., : large-dimensional problems often require tools from infinite dimensions, and we follow this approach here.
- Eigenvalues of Hessian matrix as with , which corresponds to a regularization by , on top of a decaying spectrum with finite trace (e.g., sum of eigenvalues). Here, since we have a sequence decaying to zero, the strong-convexity parameter is , and we will sometimes take it as in our analysis.
- Components of deviation to optimum: when , we consider a polynomial decay A natural assumption would be that , so that is bounded, but we can go further. In fact, the only constraints is that is finite (that is, finite function value at initialization), which leads to . We could keep the same model even with a regularizer (), but an alternative model that is equivalent for but closer to machine learning examples isThis idealized model has the nice consequence to have always finite for any and , which always allows comparisons with the non-strongly convex bound obtained in . Note that we can obtain the same asymptotic result “in probability”, if we multiply by an independent random variable with and finite (as shown below, this corresponds to a random prediction function in machine learning problems).
I provide a justification why this a relevant model for machine learning later in the post, and start with the asymptotic analysis with Laplace’s method (which can be easily extended to series [7], see also [24] in the context of prediction performance).
Asymptotical analysis
Given the model defined above, we can find asymptotic equivalents, starting with the simpler case with no regularizer ().
Starting with (no regularization). We have, with assumptions above and , with :
We equivalently study the integral instead of the series (they are asymptotically equivalent because the first terms in the series are exponentially negligible):
The rate above can be analyzed as follows:
- The rate is faster than as soon as is finite (), that is, the usual optimization rate is too pessimistic, not only in the constant, but in the power itself as well.
- When is infinite (), then we get a rate slower than , which seems counter-intuitive given that equation is an upper bound. This is explained at the end of the post in the context of (but you can already note that there is no contradiction here as the constant in front of is infinite).
General . We first have to deal with the presence of two asymptotic regimes. This can be done by assuming that jointly goes to infinity and goes to zero, with a fixed value of .
With the assumption in equation , we have:
This is the performance for in equation , multiplied by an exponentially converging sequence. We can then see two behaviors that are often seen in optimization: first slow convergence in like in the unregularized case, then exponential convergence at rate , which starts to be visible when (remember that is typically quite small). We exactly see these two regimes in the two experiments above, which exactly used our deterministic model.
Extension to random deviations to optimum. As mentioned earlier, we can consider the stochastic model
Relationship to other upper bounds in optimization. Other quantities than have been considered, that use the Hessian matrix, such as for (see [18], and [19, 20, 21] in the context of SGD, more on this next post), often referred to as a “source condition” (as described by [25] for statistical rates of convergence). Indeed, we have:
Before illustrating the asymptotic results above, we first provide a justification of the model in a machine learning context, using random features.
Random feature models
Within machine learning, gradient descent is typically used on the potentially regularized empirical risk (I will consider SGD in another post). To obtain a quadratic problem, we need a linear model and square loss, that is,
The function has minimizer
Random features. We consider a random feature model of the form , where is random (each of them sampled independently from the same distribution), for . When tends to infinity, then the associated kernel function
The kernel matrix is a classical quantity of interest in this context, and has the same non-zero eigenvalues as . As shown in last post, the sequence of eigenvalues of is asymptotically equivalent to times the eigenvalues of an infinite-dimensional covariance operator that depends only on the kernel and the distribution of inputs. Moreover, for specific choices of kernels and input distributions, the decay of these eigenvalues is exactly as , for the -th eigenvalue, as reviewed in section 2.3 of [8], with the following classical examples that will be used in experiments below:
- Periodic translation-invariant kernels on : Using Fourier features for random (with the appropriate distribution), then we obtain kernels of the form . For the uniform distribution (of inputs) on , and a distribution for such that , we obtain eigenvalue decays as (with the Fourier basis as eigenvectors), i.e., , for positive integer. The space of associated models is the Sobolev space of functions with integrable -th order derivative (see [9, 5] for details).
- Infinitely-wide one-hidden layer neural networks: For , we consider , for a random vector (with uniform distribution on the sphere), and an activation function. This corresponds to a one-hidden layer neural network with random input weights, and where only the output layer is optimized. On the unit -sphere and using the -th power of the rectified linear unit, we obtain , with an eigenbasis composed of spherical harmonics (see [10]).
Thus, with both a diverging number of random features (so that we approach the limiting kernel function), and a diverging number of observations (so that the eigenvalue decay of the covariance operator is reached), the model of decay for the unregularized part of the Hessian has the desired asymptotic behavior as .
Label vector from Gaussian process. We assume that the function such that , is sampled from a Gaussian process with covariance function / kernel . Thus, if we denote the corresponding kernel matrix, then is Gaussian with covariance matrix . The regularity of depends on the regularity of the covariance function (see [17]).
There are thus two kernels and kernel matrices in our model: for our inputs, and for our labels. Note that there is no “match” between model and labels if ; that is, if we sample a function from a Gaussian process with a certain covariance function it almost surely does not belong to the associated function space from this kernel function; this is well explained in [11] (and I personally find it surprising).
For our model to be asymptotically correct when tends to infinity, we assume that the two kernel functions and have integral operators that lead to the same eigenfunctions, which implies that when is large, the largest eigenvectors of and are the same and that essentially, and commute. This assumption is true for the two cases highlighted above and used in our experiments (Fourier basis for periodic kernels on and spherical harmonics for neural networks [10]).
If we denote the asymptotic eigenvalue equivalents as for and for , then, is decomposed in this shared eigenbasis with components , with a standard Gaussian vector. This leads to, using equation ,
Note that this is only asymptotic when goes to infinity, and obtained with rather informal arguments, but, as shown in experiments, it already gives good prediction of the actual performance for reasonable .
Adding noise. We could add noise to the labels, which corresponds to adding to a component with and . When goes to infinity and is fixed, then the effect of the noise (unsurprisingly) goes away. We could also consider a dependence of in , but we ignore it here as we focus on optimization.
Experiments
We use the model above to test our asymptotic equivalents and compare them to actual performance. We first start with a situation, where all parameters are known, before moving to a situation where there are not.
Translation-invariant kernels in . In this context, we can exactly plant values of and , by taking kernel functions based on Bernoulli polynomials, where we have and , for integers , and (see section 7.3.2 in [5]). Given that the kernel functions can be obtained in closed form, we can consider infinitely many random features by simply using as a square root of the kernel matrix. We use , and or , with the known values of . The two plots below show that even with the model is quite accurate.
The first plot corresponds to an initial decay in , faster than the usual .

Comparison between observed performance and the classical bounds from optimization, for a random problem in with observations, with , , . CYAN
The second plot corresponds to an initial decay in , slower than the usual .

Comparison between observed performance and the classical bounds from optimization, for a random problem in , with observations, with , , .
Neural networks with random features. We consider the same set up, but with now random features obtained by one-hidden layer neural network with sign activation function, with the two kernels and being equal. We use the same number of random features as the number of observations. We consider data on the unit sphere in , for which we know that we have , but no knowledge of the constant . To obtain it, we fit an affine function in log-log scale to the first eigenvalues of the kernel matrices .
For reasonably large (e.g., below), the estimation of model parameters works well, and the asymptotic estimate is close to the actual performance, while for larger , the estimation is not as good, but while it qualitatively reflects the behavior. In particular, we can see a rate in being too optimistic. Note also the weird behavior where the non-strongly convex bound starts way off and then almost touches the actual performance; this is explained at the end of the blog.

Comparison between observed performance and the classical bounds from optimization, for a random problem in the unit sphere in dimensions, with observations, with , and .
Acceleration
Because we have asymptotic bounds, we can compare performance of two different algorithms. We now consider a recursion that stores two iterates and and compute for , as
As for gradient descent, with our assumptions we obtain, with , a similar integral equivalent:
Note that the asymptotic equivalent requires that , which excludes a comparison with gradient descent for . A similar (more complicated) result holds as well in the strongly-convex case, and similar computations can be carried out for the heavy-ball method.
Going beyond
In this post, I provided a model of scaling laws specifically adapted to quadratic optimization problems minimized with (accelerated) gradient descent. An immediate worthwhile extension is stochastic gradient descent, which I will tackle in the next post, still using least-squares tools [14, 15], with similar scaling laws. Still in the convex domain, going beyond quadratics using tools from performance estimation problems (see [23] for a nice software package) remains an open problem. Even further (and even more an open problem), it would be great to obtain such theoretical scaling laws that match empirical performance for nonconvex optimization problems such as the minimization of all layers of deep neural networks.
Acknowledgements. I would like to thank Adrien Taylor, Raphaël Berthier, and Nicolas Flammarion for proofreading this blog post and making good clarifying suggestions.
References
[1] Larry Wasserman. All of Nonparametric Statistics. Springer Science & Business Media, 2006. [2] Alexandre B. Tsybakov. Introduction to Nonparametric Estimation. Springer, 2009. [3] Sebastian H. Seung, Haim Sompolinsky, and Naftali Tishby. Statistical mechanics of learning from examples. Physical Review A, 45(8):6056-6091, 1992. [4] Marc Potters and Jean-Philippe Bouchaud. A First Course in Random Matrix Theory: for Physicists, Engineers and Data Scientists. Cambridge University Press, 2020. [5] Francis Bach. Learning Theory from First Principles. MIT Press, 2024. [6] Zhenyu Liao and Romain Couillet. The dynamics of learning: A random matrix approach. International Conference on Machine Learning, 2018. [7] Richard B. Paris. The discrete analogue of Laplace’s method. Computers & Mathematics with Applications. 61(10):3024:3034, 2011. [8] Francis Bach. On the equivalence between kernel quadrature rules and random feature expansions. Journal of Machine Learning Research, 18(21):1-38, 2017. [9] Grace Wahba. Spline Models for Observational Data. Society for Industrial and Applied Mathematics, 1990. [10] Francis Bach. Breaking the Curse of Dimensionality with Convex Neural Networks. Journal of Machine Learning Research, 18(19):1-53, 2017. [11] Motonobu Kanagawa, Philipp Hennig, Dino Sejdinovic, and Bharath K. Sriperumbudur. Gaussian processes and kernel methods: A review on connections and equivalences. arXiv preprint arXiv:1807.02582, 2018. [12] Yurii Nesterov. A method of solving a convex programming problem with convergence rate . Soviet Mathematics Doklady, 27(2):372–376, 1983. [13] Nicolas Flammarion and Francis Bach. From Averaging to Acceleration, There is Only a Step-size. International Conference on Learning Theory (COLT), 2015. [14] Arie Feuer and Ehud Weinstein. Convergence analysis of LMS filters with uncorrelated Gaussian data. IEEE Transactions on Acoustics, Speech, and Signal Processing, 33(1):222-230, 1985. [15] Alexandre Défossez and Francis Bach. Averaged least-mean-square: bias-variance trade-offs and optimal sampling distributions. International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. [16] Alnur Ali, J. Zico Kolter, and Ryan J. Tibshirani. A continuous-time view of early stopping for least squares regression. International Conference on Artificial Intelligence and Statistics, 2019. [17] Christopher K. I. Williams and Carl Edward Rasmussen. Gaussian Processes for Machine Learning. MIT Press, 2006. [18] Arkadi S. Nemirovsky. Information-based complexity of linear operator equations. Journal of Complexity, 8(2), 153-175, 1992. [19] Aymeric Dieuleveut, Nicolas Flammarion, and Francis Bach. Harder, Better, Faster, Stronger Convergence Rates for Least-Squares Regression. Journal of Machine Learning Research, 18(101):1-51, 2017. [20] 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 (NeurIPS), 2018. [21] Raphaël Berthier, Francis Bach, and Pierre Gaillard. Tight Nonparametric Convergence Rates for Stochastic Gradient Descent under the Noiseless Linear Model**.**Advances in Neural Information Processing Systems (NeurIPS), 2020. [22] Adrien B. Taylor, Julien M. Hendrickx, and François Glineur. Exact worst-case convergence rates of the proximal gradient method for composite convex minimization. Journal of Optimization Theory and Applications, 178: 455-476, 2018. [23] Baptiste Goujaud, Céline Moucer, François Glineur, Julien M. Hendrickx, Adrien B. Taylor, Aymeric Dieuleveut. PEPit: computer-assisted worst-case analyses of first-order optimization methods in Python, Mathematical Programming Computation, 2024. [24] Marcus Hutter. Learning curve theory. arXiv preprint arXiv:2102.04074, 2021. [25] Andrea Caponnetto and Ernesto De Vito. Optimal rates for the regularized least-squares algorithm. Foundations of Computational Mathematics, 7(3):331–368, 2007. [26] Jared Kaplan, Sam McCandlish, et al. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020. [27] Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, et al. Training Compute-Optimal Large Language Models. Advances in Neural Information Processing (NeurIPS), 2022. [28] Terence Tao. Topics in random matrix theory. American Mathematical Society, 2012.
Asymptotic expansion – strongly convex case
We aim to find an asymptotic equivalent to
When tends to zero, then tends to one (leading to the non-strongly convex result), while if is tending to infinity, then it is equivalent to , leading to exponential convergence. The overall behavior is essentially the same as .
Random minimizer
For , we can consider a model , where is such that and is finite. If we denote the random performance, we have shown that , while we can also show with the exact same techniques (Laplace’s method) that
“Weird” behavior explained
In the last plot (neural network simulation), we see a weird phenomenon where the non-strongly convex upper bound becomes almost tight at a certain point, when the early rate is such that .
Here is an explanation: the traditional bound is proportional to , which has the following equivalent (still using Laplace’s method), when :