betaFeedback

WorksComputer Science

A Rate Transfer Method: Convergence Rates in Stochastic Gradient Descent via Stochastic Calculus

Abstract

We develop a rate-transfer method that converts finite-time Lyapunov estimates for an associated stochastic differential equation (SDE) into finite-time convergence bounds for stochastic gradient algorithms. Under generic moment and smoothness conditions, the convergence analysis of the stochastic gradient method reduces to a calculus argument verifying a Lyapunov generator inequality for the SDE. The method recovers established rates for classical stochastic gradient methods and provides a way to establish convergence rates for new optimization algorithms through calculus arguments applied to their associated SDEs.

Introduction

Stochastic gradient descent (SGD) methods evolve through discrete noisy updates. Their associated continuous-time models can be easier to analyse. In particular, stochastic differential equations have a well-developed calculus for studying convergence. We ask when an SDE convergence bound can be transferred to the stochastic gradient algorithm. Consider the stochastic gradient recursion

Xn+1=Xn+αn{b(Xn)+ϵn+1}.X_{n+1} = X_n + \alpha_n\{b(X_n) + \epsilon_{n+1}\}.

Here b(Xn)b(X_n) is the mean update, αn>0\alpha_n > 0 is the stepsize, and the error term ϵn+1\epsilon_{n+1}, conditional on the past, has mean zero and covariance σ(Xn)σ(Xn)T\sigma(X_n)\sigma(X_n)^\mathsf{T}. The associated SDE is

dZt=b(Zt) dt+α(t)σ(Zt) dBt,\mathrm{d}Z_t = b(Z_t)\,\mathrm{d}t + \sqrt{\alpha(t)}\sigma(Z_t)\,\mathrm{d}B_t,

Let BtB_t be a standard Brownian motion. The function α(t)\alpha(t) expresses the stepsize sequence on the corresponding diffusion-time scale, defined in Section 2.2.

We can analyze convergence of the SDE through a Lyapunov argument. Let VV be a nonnegative, twice-differentiable function measuring the error of interest. The generator of the SDE above is a differential operator LtV(x)=b(x)⋅∇V(x)+α(t)2tr⁡(σ(x)σ(x)T∇2V(x))\mathcal{L}_tV(x) = b(x) \cdot\nabla V(x) + \frac{\alpha(t)}{2}\operatorname{tr}(\sigma(x)\sigma(x)^\mathsf{T}\nabla^2V(x)). We call VV a Lyapunov function when there are real functions λ\lambda and gg such that

LtV(x)≤−λ(t)V(x)+g(t).\mathcal{L}_tV(x) \le-\lambda(t)V(x) + g(t).

If the SDE starts at state X0X_0, the Lyapunov inequality gives the following finite-time bound for the SDE.

EV(Zt)≤e−∫0tλ(r) drEV(X0)+∫0te−∫stλ(r) drg(s) ds.\mathbb{E}V(Z_t) \le e^{-\int_0^t \lambda(r)\,\mathrm{d}r}\mathbb{E}V(X_0) + \int_0^t e^{-\int_s^t \lambda(r)\,\mathrm{d}r}g(s)\,\mathrm{d}s.

Under the smoothness and moment conditions of Assumption 1, and assuming that the required moments of the stochastic gradient iterates remain bounded, Theorem 2 transfers this SDE estimate to the stochastic gradient method:

EV(Xn)≤e−∫0tnλ(r) drEV(X0)+∫0tne−∫stnλ(r) dr{g(s)+Cα(s)} ds.\mathbb{E}V(X_n) \le e^{-\int_0^{t_n} \lambda(r)\,\mathrm{d}r}\mathbb{E}V(X_0) + \int_0^{t_n} e^{-\int_s^{t_n} \lambda(r)\,\mathrm{d}r}\{g(s) + C\alpha(s)\}\,\mathrm{d}s.

Here t0=0t_0 = 0 and tn=∑k=0n−1αkt_n = \sum_{k=0}^{n-1}\alpha_k for n≥1n \ge1, so tn+1−tn=αnt_{n+1} - t_n = \alpha_n.

Once we have established the finite-time bound for the SDE, it indicates the likely form of the SGD bound. The stochastic gradient method inherits the SDE contraction and forcing, while the comparison contributes an additional forcing term: in particular, g(s)↦g(s)+Cα(s)g(s) \mapsto g(s) + C\alpha(s). Theorem 2 then establishes the finite-time SGD bound.

We use two examples to illustrate what the rate-transfer method provides. For strongly convex stochastic gradient descent, the transferred SDE estimate recovers the classical convergence rates obtained by direct discrete-time analyses such as Moulines and Bach [2011]. For stochastic Heavy Ball, based on the momentum dynamics introduced by Polyak [1964], the same argument recovers the familiar geometric transient together with an O(h)O(h) neighbourhood. In both cases, the purpose is not to improve the known rates, but to obtain them from the same continuous-time Lyapunov calculation and finite-window transfer argument.

The basic idea presented here also extends to other forms of Lyapunov analysis. More broadly, the benefit of a transfer theorem is that it removes much of the detailed discrete-time analysis from the convergence proof. A new stochastic gradient method can be analysed by identifying an associated SDE and proving an appropriate Lyapunov inequality. Convergence rates can therefore often be established through a comparatively short calculus argument, rather than a bespoke discrete-time proof.

Related work.

Our motivation is stochastic gradient descent methods. However, like prior work, we formulate the transfer theory in the broader language of stochastic approximation, of which SGD is a special case.

Continuous time methods have a long history in stochastic approximation. Stochastic approximation is a noisy Euler discretization of its mean dynamics. Ljung [1977] introduced the ODE viewpoint for recursive stochastic algorithms; contemporaneous work of Kushner [1977] developed closely related convergence methods, and Kushner and Clark [1978] substantially extended and systematized the differential-equation approach. This programme was developed further by Métivier and Priouret [1984], Benveniste et al. [1990], and Benaïm [1996]; see also the monographs of Kushner and Yin [2003] and Borkar [2008]. The central principle is that a simpler continuous model can reveal the stability and asymptotic behaviour of a stochastic recursion. Transfer principles also appear in other areas. For example, Dai [1995] shows that, when every trajectory of the corresponding fluid limit model reaches zero and remains there, the associated queueing network is positive Harris recurrent. This provides an analogue of the SDE-to-SGD transfer principle considered here.

Diffusion approximations also appear early in this literature. Kushner and Huang [1979, 1981] used weak convergence of appropriately normalized stochastic-approximation errors to diffusion processes. Later work developed strong diffusion approximations for more general recursive stochastic algorithms [Pezeshki-Esfahani and Heunis, 1997], while diffusion methods continue to be used to describe rates and fluctuations; see, Kushner and Yin [2003]. Here the focus is on asymptotic scaling under which the normalized error converges weakly to a nondegenerate Gaussian or diffusion limit. This is distinct from the finite-time convergence bounds studied here, which control the error at each iteration.

A methodological precursor is Borkar and Mitter [1999], who use finite-time diffusion approximations on successive fixed intervals to obtain long-time information for a constant-stepsize stochastic recursion. More recently, SDEs have been used as quantitative continuous-time models of stochastic gradient algorithms. Stochastic modified equations and weak diffusion approximations have been developed for SGD and related methods [18, 19, 9], while continuous-time convergence arguments have also been used to guide corresponding discrete analyses [Orvieto and Lucchi, 2019]. Uniform-in-time weak approximations are available in strongly convex settings [7, 17]. Particularly close to our decreasing-step setting, Fontaine et al. [2021] establish finite-horizon approximations of SGD by a time-inhomogeneous SDE and derive, in parallel, corresponding continuous- and discrete-time convergence rates. From the numerical-analysis viewpoint, Gaussian stochastic approximation is an Euler–Maruyama discretisation of the associated SDE, whose finite-horizon approximation theory is classical [10]. A central difficulty is that trajectory-error estimates generally deteriorate as the time horizon grows, a familiar issue in the numerical analysis of dynamical systems [Stuart, 1994]; under additional dissipativity or stability conditions, time-uniform control may sometimes be recovered [Fang et Giles, 2020].

The main challenge addressed by this paper is how to retain a useful SDE estimate over arbitrarily long times when the underlying diffusion approximation is only accurate on finite horizons. Strong approximation approaches seek to keep the stochastic recursion and the diffusion close as processes; however, approximation errors accumulate as the time horizon grows. We instead use only the weaker distributional comparison applied to the Lyapunov function. To establish this comparison over finite times, we use stochastic flow theory of Kunita [1990], in the forms given by Varadhan [2006] and Matsumoto and Taniguchi [2016]. On each fixed diffusion-time epoch, the SDE is restarted from the current iterate and the local comparison error enters the Lyapunov estimate as an additional forcing term. The key point is that the Lyapunov function is now allowed to attenuate the errors introduced on earlier epochs, without requiring a single diffusion approximation to remain accurate over a growing time horizon. Iterating this argument propagates the SDE Lyapunov estimate over arbitrarily many epochs and yields a quantitative bound at every discrete iteration.

The finite window SDE transfer framework

Our motivation is stochastic gradient descent and related methods. We formulate the transfer theory for stochastic approximation, which includes SGD and also covers discrete stochastic recursions that need not arise from a gradient. We use stochastic approximation for the general recursion and retain SGD terminology when discussing optimization applications.

Notation

For a vector-valued map b:Rd→Rdb : \mathbb{R}^{d} \to\mathbb{R}^{d}, DbDb denotes its Jacobian and DjbD^{j}b its higher derivatives, viewed as multilinear maps. For σ:Rd→Rd×q\sigma: \mathbb{R}^{d} \to\mathbb{R}^{d \times q}, σj\sigma_{j} denotes its jjth column. The symbols CC, cc, CTC_{T}, …\ldots denote finite positive constants whose values may change from line to line, with subscripts indicating relevant dependence.

⟨⟨x⟩⟩:=(1+∥x∥22)1/2.\langle\langle x\rangle\rangle:= (1 + \lVert x\rVert_{2}^{2})^{1/2}.

We use ⟨⟨x⟩⟩p\langle\langle x\rangle\rangle^{p} for the polynomial weight of order pp.

Stochastic approximation

We now make this broader stochastic-approximation setup precise. Let (Ω,F,{Fn}n≥0,P)(\Omega, \mathcal{F}, \{\mathcal{F}_{n}\}_{n \ge0}, \mathbb{P}) be a filtered probability space, and let Xn∈RdX_{n} \in\mathbb{R}^{d} be adapted. The stepsizes αn>0\alpha_{n} > 0 are deterministic, and the total increment Hn+1H_{n+1} is Fn+1\mathcal{F}_{n+1}-measurable. Write

Xn+1=Xn+αnHn+1,Hn+1=b(Xn)+ϵn+1.(1)X_{n+1} = X_{n} + \alpha_{n}H_{n+1}, \qquad H_{n+1} = b(X_{n}) + \epsilon_{n+1}. \tag*{(1)}

Let BB be a qq-dimensional standard Brownian motion. For functions b:Rd→Rdb : \mathbb{R}^{d} \to\mathbb{R}^{d}, A:Rd→Rd×dA : \mathbb{R}^{d} \to\mathbb{R}^{d \times d}, and σ:Rd→Rd×q\sigma: \mathbb{R}^{d} \to\mathbb{R}^{d \times q}, the noise satisfies E[ϵn+1∣Fn]=0\mathbb{E}[\epsilon_{n+1} \mid\mathcal{F}_{n}] = 0 and E[ϵn+1ϵn+1T∣Fn]=A(Xn)\mathbb{E}[\epsilon_{n+1}\epsilon_{n+1}^{\mathsf{T}} \mid\mathcal{F}_{n}] = A(X_{n}). The covariance factorization is A(x)=σ(x)σ(x)TA(x) = \sigma(x)\sigma(x)^{\mathsf{T}}. The drift bb and covariance factor σ\sigma specify the associated diffusion. The total increment Hn+1H_{n+1} remains the quantity used in the moment assumptions below. We also need a clock relating algorithmic iterations to diffusion time.

We introduce the diffusion times t0=0t_{0} = 0, and

tn=∑k=0n−1αk,t_{n} = \sum_{k=0}^{n-1} \alpha_{k},

and refer to tnt_{n} as the diffusion time associated with iteration nn. Throughout the paper we assume tn→∞t_{n} \to\infty as n→∞n \to\infty, or equivalently ∑nαn=∞\sum_{n} \alpha_{n} = \infty. We define the piecewise-constant stepsize:

α(t)=αn,t∈[tn,tn+1),αmax⁡:=sup⁡k≥0αk<∞.\alpha(t) = \alpha_{n}, \quad t \in[t_{n},t_{n+1}), \qquad\alpha_{\max} := \sup_{k \ge0} \alpha_{k} < \infty.

Throughout the paper, T>0T > 0 denotes a fixed diffusion time horizon, independent of the iteration indices. We define, for every mm,

NT(m)=min⁡{n>m:tn−tm≥T}.(2)N_{T}(m) = \min\{n > m : t_{n} - t_{m} \ge T\}. \tag*{(2)}

Thus NT(m)N_{T}(m) is the next iteration after mm at which TT units of diffusion time have passed. By construction, T≤tNT(m)−tm<T+αmax⁡T \le t_{N_{T}(m)} - t_{m} < T + \alpha_{\max}. We now use these quantities to define the associated SDE.

The associated SDE

The associated diffusion evolves on the diffusion time clock defined above. Its SDE is

dZt=b(Zt) dt+α(t) σ(Zt) dBt,(3)\mathrm{d}Z_{t} = b(Z_{t})\,\mathrm{d}t + \sqrt{\alpha(t)}\,\sigma(Z_{t})\,\mathrm{d}B_{t}, \tag*{(3)}

The factor α(t)\sqrt{\alpha(t)} is chosen so that, over [tn,tn+1)[t_{n},t_{n+1}), the local drift and covariance scales are αnb(x)\alpha_{n}b(x) and αn2A(x)\alpha_{n}^{2}A(x), matching the first two conditional moment scales of the stochastic approximation increment.

For any diffusion time s≥0s \ge0 and state xx, let Zs,x=(Zts,x:t≥s)Z^{s,x} = (Z_{t}^{s,x} : t \ge s) denote the solution to (3) with Zss,x=xZ_{s}^{s,x} = x. We refer to (3) with this initial condition as the restarted SDE. The restart construction is important to the finite window argument. At iteration mm, we compare the stochastic approximation over the next fixed diffusion time window with the continuous model restarted from (tm,Xm)(t_{m}, X_{m}). At the next block boundary the comparison is restarted again.

Thus the method requires controlled SA–SDE approximation only on fixed diffusion time windows, rather than over an ever-growing time interval. We assume that the SDE is well posed for every restart (s,x)(s,x) and is non-explosive on finite intervals. The corresponding restarted solutions define the evolution operators Ps,tP_{s,t} below, with the usual composition property.

To describe the evolution of functions under the restarted diffusion, let VV be any function for which the expectation below is finite and define

Ps,tV(x)=E[V(Zts,x)],s≤t.P_{s,t}V(x) = \mathbb{E}[V(Z_t^{s,x})], \qquad s \le t.

Thus Ps,tV(x)P_{s,t}V(x) is the expected value of VV at diffusion time tt when the diffusion starts from xx at diffusion time ss. Later, VV will typically be the Lyapunov function used to measure the error of the stochastic approximation. The family {Ps,t}s≤t\{P_{s,t}\}_{s\le t} is the evolution family associated with the time-inhomogeneous SDE. It satisfies Ps,s=IP_{s,s}=I and

Ps,t=Ps,uPu,t,s≤u≤t.(4)P_{s,t}=P_{s,u}P_{u,t}, \qquad s \le u \le t. \tag*{(4)}

We refer to (4) as the composition property. For a fixed terminal index nn, define

References

  1. [7]Yuanyuan Feng, Tingran Gao, Lei Li, Jian-Guo Liu, and Yulong Lu. Uniform-in-time weak error analysis for stochastic gradient descent algorithms via diffusion approximation. Communications in Mathematical Sciences, 18(1):163–188, 2020. doi: 10.4310/CMS.2020.v18.n1.a7.DOI
  2. [8]Xavier Fontaine, Valentin De Bortoli, and Alain Durmus. Convergence rates and approximation results for SGD and its continuous-time counterpart. In Mikhail Belkin and Samory Kpotufe, editors, Proceedings of Thirty Fourth Conference on Learning Theory, volume 134 of Proceedings of Machine Learning Research, pages 1965–2058. PMLR, 2021. URL https://proceedings.mlr.press/v134/fontaine21a.html.arxiv.org/abs/2004.04193
  3. [9]Wenqing Hu, Chris Junchi Li, Lei Li, and Jian-Guo Liu. On the diffusion approximation of nonconvex stochastic gradient descent. Annals of Mathematical Sciences and Applications, 4(1):3–32, 2019. doi: 10.4310/amsa.2019.v4.n1.a1.DOI
  4. [10]Peter E. Kloeden and Eckhard Platen. Numerical Solution of Stochastic Differential Equations, volume 23 of Stochastic Modelling and Applied Probability. Springer, Berlin, Heidelberg, 1992. doi: 10.1007/978-3-662-12616-5.DOI
  5. [11]Hiroshi Kunita. Stochastic Flows and Stochastic Differential Equations, volume 24 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1990.
  6. [17]Lei Li and Yuliang Wang. On uniform-in-time diffusion approximation for stochastic gradient descent. Methods and Applications of Analysis, 30(3):95–112, 2023. doi: 10.4310/maa.2023.v30.n3.a1.DOI
  7. [18]Qianxiao Li, Cheng Tai, and Weinan E. Stochastic modified equations and adaptive stochastic gradient algorithms. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 2101–2110. PMLR, 2017. URL https://proceedings.mlr.press/v70/li17f.html.
  8. [19]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.arxiv.org/abs/1811.01558

Paper details

vlnc:W_5h6ryrvu
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

AI tools

View statement
Looking for related papers…
Contents