Derivatives of Stochastic Gradient Descent in parametric optimization
Authors: Franck Iutzeler
Edouard Pauwels
Samuel Vaiter
Venue: NeurIPS 2024 poster (2024)
Keywords: automatic differentiation
stochastic gradient descent
optimization
Primary area: optimization
TL;DR: The derivatives of the iterates of stochastic gradient descent converge.

Abstract: We consider stochastic optimization problems where the objective depends on some parameter, as commonly found in hyperparameter optimization for instance. We investigate the behavior of the derivatives of the iterates of Stochastic Gradient Descent (SGD) with respect to that parameter and show that they are driven by an inexact SGD recursion on a different objective function, perturbed by the convergence of the original SGD. This enables us to establish that the derivatives of SGD converge to the derivative of the solution mapping in terms of mean squared error whenever the objective is strongly convex. Specifically, we demonstrate that with constant step-sizes, these derivatives stabilize within a noise ball centered at the solution derivative, and that with vanishing step-sizes they exhibit $O(\log(k)^2 / k)$ convergence rates. Additionally, we prove exponential convergence in the interpolation regime.  Our theoretical findings are illustrated by numerical experiments on synthetic tasks.

Derivatives of Stochastic Gradient Descent in parametric optimization
Franck Tutzeler Université Paul Sabatier, Institut de Mathématiques Toulouse, France.
Edouard Pauwels Toulouse School of Economics, Université Toulouse Capitole, Toulouse, France.
Samuel Vaiter CNRS & Université Côte d' Azur, Laboratoire J. A. Dieudonné. Nice, France.
Abstract
We consider stochastic optimization problems where the objective depends on some parameter, as commonly found in hyperparameter optimization for instance. We investigate the behavior of the derivatives of the iterates of Stochastic Gradient Descent (SGD) with respect to that parameter and show that they are driven by an inexact SGD recursion on a different objective function, perturhed by the conver- gence the original SGD. This enables us to establish that the derivatives of SGD converge to the derivative of the solution mapping terms of mean squared error whenever the objective strongly convex. Specifically, we demonstrate that with constant step-sizes, these derivatives stabilize within noise ball centered at the solution derivative, and that with vanishing step-sizes they exhibit O (log (k)) //) convergence rates. Additionally, prove exponential convergence in the inter- polation regime. Our theoretical findings are illustrated by numerical experiments synthetic tasks.
Introduction
The differentiation of iterative algorithms has been subject of research since the 1990s (Gilbert, 1992; Christianson, 1994; Beck, 1994), and was succinctly described as "piggyback differentia- tion" by Griewank and Faure (2003). This idea has gained renewed interest within the machine learning community, particularly for applications such as hyperparameter optimization (Maclaurin al., 2015; Franceschi al., 2017), meta-learning (Finn et al., 2017: Rajeswaran et al., 2019), and learning discretization of total variation (Chambolle and Pock, 2021; Bogensperger et al., 2022). When applied to an optimization problem, important theoretical concern the convergence of the derivatives of iterates to the derivatives of the solution. Traditional guarantees focus on asymp- totic convergence the solution derivative, as described by the implicit function theorem (Gilbert, 1992: Christianson, 1994; Beck, 1994). This issue has inspired recent works for smooth optimiza- tion algorithms (Mehmood and Ochs, 2020, 2022), generic nonsmooth iterations (Bolte al., 2022), and second-order methods (Bolte et al., 2023).
Convergence analysis of iterative processes have predominantly focused on deterministic algorithms such as the gradient descent. In this work, we extend these results in the context of strongly convex parametric optimization by studying the iterative differentiation of the Stochastic Gradient Descent (SGD) algorithm. Since the seminal work of Robbins and Monro (1951), 1), SGD has been workhorse of stochastic optimization and is extensively employed in training various machine learning mod- els (Bottou et al., 2018: Gower et al., 2019). A critical aspect of our work is based on the fact that the sequence of iterative derivatives in this stochastic setting itself stochastic gradient sequence.
The goal of this work is to answer the following question:
38th Conference on Neural Information Processing Systems (NcurIPS 2024).

---

What is the dynamics of the derivatives of the iterates of stochastic gradient de- scent in the context of minimization of parametric strongly convex finctiin??
Our motivation for studying this question is twofold. First, while iterative differentiation through SGD sequences is possibly not the most efficient way to differentiate solutions of convex programs, it is very natural in the context of differentiable programming and has already been motivated and explored in the machine learning literature (Maclaurin al.. 2015; Pedregosa, 2016: Finn et al., 2017: Ji et al., 2022). Second, existing attempts to provide stochastic oracle based methods to dif- ferentiate through convex programming solutions require more intricate algorithmic schemes than the conceptually simple iterative differentiation of SGD. Despite its conceptual simplicity, the an- swer to this question is not direct in the first place due to the joint effect of noise on the iterate sequence and its derivatives.
The strongly convex setting ensures that the solution mapping is single valued and differentiable under appropriate smoothness assumptions. In this setting, we prove in Theorem 2.2 the convergence of the derivatives of the SGD recursion toward the derivative of the solution mapping, in the sense of mean squared errors:
Contributions.
We first provide a general result for non-increasing step-sizes converging to some 1j 2 (covering constant step-sizes schedules), for which we prove that the derivatives of SGD eventually fluctuate in ball centered at the solution derivative, of size proportional to vīj.
With vanishing steps, this result implies that the derivatives of SGD converge toward the solution derivatives, and we obtain O [1)og())//3 convergence rates for ((1/k) step-size decay schedules.
We also study the interpolation regime, for which we show that the derivatives converge exponen- tially fast toward the derivative of the solution mapping.
All these results suggest that derivatives of SGD sequences behave qualitatively similarly as the original SGD sequence under typical step size regimes.
The key insight in proving these results is to interpret the recursion describing the derivatives of SGD as a perturbed SGD sequence, or SGD with errors, related to a quadratic parametric op- timization problem involving the second order derivatives at the solution of the original problem. We perform general abstract analysis of inexact SGD recursions, that is, SGD with an additional error term which is not required to have zero mean. This constitutes result of independent inter- est, which we apply to the sequence of SGD derivatives in order to prove their convergence toward the derivative of the solution mapping. The developed theory is illustrated with numerical experi- ments on synthetic tasks. We believe our work paves the way to a better understanding of stochastic hyperparameter optimization, and more generally stochastic meta-learning strategies.
Related works. Differentiating through algorithms closely associated with the broader concept of automatic differentiation (Griewank, 1989). In practice, it is implemented using either the for- ward mode (Wengert, 1964), or the more common reverse mode (Rumelhart et al., 1986) known as backpropagation. For detailed surveys, see (Griewank et al., 1993) or (Griewank and Walther, 2008; Baydin et al., 2018). Modern machine learning is intrinsically linked to this idea through the use of Python frameworks like Tensorflow (Abadi et al., 2015), PyTorch (Paszke et al., 2019), and JAX (Bradbury et al., 2018; Blondel et al., 2022). When using the reverse mode, a limitation of this method is the need to retain every iteration of the inner optimization process in memory, although this challenge can be mitigated by employing checkpointing, invertible optimization al- gorithms (Maclaurin et al., 2015), by utilizing truncated backpropagation (Shaban al., 2019), Jacobian-free backpropagation (Fung et al., 2022) or one-step differentiation (Bolte et al., 2023).
Along with iterative differentiation (ITD), (approximate) implicit differentiation (AID) plays an in- creasing important role, sometimes under the name implicit deep Icarning. El Ghaoui et al. (2021) highlights the utility of fixed-point equations in defining hidden features, and (Bai et al., 2019) pro- poses equilibrium points for sequence models, reducing memory consumption significantly. Fur- ther, (Bertrand et al., 2020; Agrawal et al., 2019) expands implicit differentiation's 's applications to high-dimensional, non non-smooth problems and convex programs. Ablin et al. (2020) emphasizes the computational benefits of automatic differentiation, particularly in min-min optimization. In partic- ular, OptNet (Amos and Kolter, 2017) and Deep Equilibrium Models (DEQ) (Bai et al., 2019) are examples of relevant applications.
Hypergradient estimation through iterative differentiation or implicit differentiation has a long story in machine learning (Pedregosa, 2016; Lorraine et al., 2020). In the context of imaging, itera-

---

tive differentiation was used to perform hyperparameter selection through the Stein's 's unbiased risk estimator (Deledalle et al., 2014), and also for refitting procedure (Deledalle et al., 2017). Model- agnostic Meta-learning (MAML) was introduced by Finn et al. (2017) as a methodology to train neural architectures that adapt to new tasks through iterative differentiation (meta-learning). later adapted to implicit differentiation (Rajeswaran et al., 2019). These developments motivated further studies of the bilevel programming problem in a machine learning context (Franceschi et al., 2018; Grazzi et al., 2020).
was
The literature on the stochastic iterative and implicit differentiation is more limited. In the stochastic setting, Grazzi et al. (2021, 2023, 2024) considered implicit differentiation, mostly as a stochastic approximation to solve the implicit differentiation linear equation or use independent copies for the derivative part. In general stochastic approaches for bilevel optimization sample different batches for the iterate and derivative recursions. Here we jointly analyze both recursion with the same samples. Despite this lack of systemic theoretical analysis of convergence, differentiating through the SGID iterates is mentioned in Maclaurin et al. (2015) which focused on an efficient implementation of backpropagation through SGD, Pedregosa (2016) which explicitly calls for the development of differentiation techniques for stochastic optimization algorithms. Furhtermore Finn et al. (2017); Ji et al. (2021) suggests explicitely to use differentiation through stochastic first order solvers and this was further explicitely considered by Ji et al. (2022) in a meta-learning context.
Closely related to the general issue of differentiating parametric optimization problems is solving bilevel optimization, where the Jacobian of the inner problem is crucial to analyze. Chen et al. (2021) introduces a method, demonstrating improved convergence rates for stochastic nested prob- lems through a unified SGD approach. the same vein, Arbel and Mairal (2021) leverages inexact implicit differentiation and warm-start strategies to match the computational efficiency of oracle methods, proving effective in hyperparameter optimization. Additionally, the work (Ji et al., 2021) provides thorough convergence analysis for AID and ITD-based methods, proposing the novel stocBiO algorithm for enhanced sample complexity. Furthermore, (Dagréou et al., 2022; Dagréou et al., 2024) introduce novel framework allowing unbiased gradient estimates and variance reduc- tion methods for stochastic bilevel optimization.
Although this is not the initial focus of this work, the technical bulk of our arguments requires an analysis of perturbed, or inexact, SGD sequences. This amounts to study the robustness of the stochastic gradient algorithm with non-centered noise, or equivalently non-vanishing deterministic errors. Such questioning around robustness to errors have existed for decades in the stochastic approximation literature, see for example (Ermoliev, 1983; Chen et al., 1987) and references therein. Many existing results presented in the literature are qualitative and relate to nonconvex optimization (Solodov and Zavriev, 1998; Borkar, 2009; Doucet and Tadic, 2017: Ramaswamy and Bhatnagar, 2017; Dieuleveut et al., 2023). Let us also mention the smooth convex setting for which inexact oracles have been studied by (Nedić and Bertsekas, 2010; Devolder et al., 2014). A recent account of existing convergence results for biased SGD is given by Demidovich et al. (2023). As a by- product of our arguments, provide general mean squared error convergence analysis of inexact SGD for a diversity of step size regimes, in the smooth, strongly convex setting. Our analysis allows to handle random non stationary bias terms, whose magnitude depend This is customary as the errors in the sequence of derivatives are due to the suboptimality of the sequence of iterates. These errors thus depend on the realization of the iterate sequence, requiring dedicated analysis not covered by existing art Demidovich et al. (2023).
the iteration counter k.
2
The derivative of SGD is inexact SGD
2.1 Intuitive overview
We consider a parametric stochastic optimization problem of the form
x² (0) = arg min F(r, 0) := [ 0)
(Opt)
where F: Fd x e R is smooth and strongly convex in for fixed 0. The stochastic gradient descent algorithm, stochastic gradient descent (SGD), is defined by an initialization zo((), and for k E N
Fe++ (8) = Fz (f) - 7% V.f((a Ex41)
(SGD)
3

---

where (mh JEEN is a sequence of positive step-sizes and ($x)RES is a sequence of independent random variables with common distribution P. Precise assumptions on the problem and the algorithm will be given in Section 2.2 to ensure convergence. We highlight here that both the objective (xx 0, {) and the initialization of the algorithm (f) depend on some parameter iterates and optimal solution.
C I and so do the
For any 0 E ④ and any k 2 O, under appropriate assumptions, the Jacobian of 2x((0) w.r.t. 0, denoted by (0xx(0) E Rdxm is well defined and obeys the following recursion from the chain rule of differentiation:
0g (0) (0)x The f 0: (k+1)0gZxx(( (0) 7/ V f Ek+1). (SGD')
The natural limit candidate for this recursion is the Jacobian of the solution, Osx* (0), which, from the implicit function theorem, is the unique solution to the following linear system
V2 F(x" (0),0)D+ 22 F("" (0), Eg-r V (0),0EE) (=)) 0.
As noted in (Arbel and Mairal, 2021, Proposition 1), this is equivalently characterized as solution the following stochastic minimization problem
(( (0), (z0((x"0))
Oax (0) arg peg EgEP
(Opt')
where we use the standard Frobenius inner product over matrices. Our key insight is to formally understand the recursion in (SGD') as an inexact SGD sequence applied problem (Opt').
Consider two maps & + Q(E) E Rdxd and + BBE) E Rdxm Let fæz () = 2 Q(E)= x B())8, then the recursion (SGD') becomes
Intuition from the quadratic case.
0. (0) = da (0) - mu (Q((x+ + B({x+1)).
which is exactly a stochastic gradient descent sequence for problem (Opt'). Hence, choosing appro- priate step sizes ensures convergence. Beyond the quadratic setting, one needs to take into consid- eration the fact that the second order derivatives of f are not constant, leading to our interpretation as perturbed stochastic gradient iterates for the derivatives, as detailed below.
The general case.
We rewrite the recursion (SGD') follows
0g (0) 0pa (0)
7/ fx= (0), 0; Ex+ (0xx((0) (111))))zzz00((0) V (x= Ex+1) ex+1, (1)
where the error term Cx+1 is defined as
Ck+1 = Th (V f(x
f Ex+1)) 0gmx
+ T (x" (z)()))))) (0), 0: Ex+1) - (x+ 0: Ex+1))
Assuming that the second derivative of f is Lipschite-continuuus the error term cx+11 is of the same (0) Our main contribution is careful analysis of a specific version of inexact SGD which covers the above recursion. Under typical stochastic approximation assumptions, the convergence of x (0) toward x (0) essentially entails the convergence of 2gæz (0) toward 04 (0). This allows us to carry out joint convergence analysis of both sequences in (SGD) and (SGD'). We now describe the assumptions required to make this intuition rigorous.
order as The [0) 2
2.2 Main assumptions
We start with the stochastic objective, f (Opt) and then specify assumptions on the underlying random variable ç. The crucial assumption for our results is strong convexity. The rest of the assumptions are typically satisfied in applications such as hyper parameter tuning. We point out that both examples in the numerical section satisfy our assumptions and are implemented in the regime described by our main theorem.
Assumption 1. Let θ be open Euclidean subset of T and E be measure space. The function f: Rd x θ x E + IR satisfies the following conditions:
(a) Differentiability: f(:)))) is C², with M-Lipschitz Hessian (in Frobenius norm), for all & E.

---

(b) Smoothness: V v= is L-Lipschitz and vzf(z, L' L'ppsshcit for all 0 and & E. (c) Strong convexity: f(; () is j-strongly convex for all 0 Q and & E.
Assumption ((b) entails that V and / are uniformly bounded in operator norm by L and L' respectively. We remark that our smoothness assumption is global in æ, but possibly only local in 0 since θ is an arbitrary open neighborhood, so that Assumption 1(b) does not require global Lipschicity with respect to the variable 8. Assumption I(c) implies that F(.,0) has a unique mini- mizer that we will denote by x" (0); it also implies that V is positive definite. This is actually the strongest part of Assumption it somewhat a requirement since the problem differentiating the solution to optimization problem, not necessarily strongly convex, is not settled for the moment.
As consequence of Assumption 1, the derivative sequence in (SGD') is almost surely bounded!. This is proved in Appendix B.
Lemma 2.1. Under Assumption 1, assuming that Tkk S 1, for all k, we have almost surely (0)] max[]]doro /mLl /p)
We now specify the structure of the random variables (Ex (En) appearing in the recursions (SGD) and (SGD'). In particular, we follow the classical approach of (Bottou et al., 2018; Gower et al., 2019) among a rich literature for our variance condition.
Assumption 2. The observed noise sequence (Ex)KeN is independent identically distributed with common distribution P Furthermore.
(a) Variance control: there is such that for all 0 E O, E [[IV=f(x' 0: 1) < o², B[IV (0), ())x0 (0) (20f(=((0, s a².
(b) Integrability: fzz .)- and V fxx,0;) are integrable w.r.t. P for a certain fixed pair Rdd O.
Note that we control the second moment only at the solution, which means that the case σ² corresponds to the interpolation scenario but does not mean that the algorithm is noiseless. Fur- thermore, we also control the second moment of the second derivative (in Frobenius norm). This is not typical in the SGD literature but is required here to analyze the sequence of derivatives (this illustrated in the simple interpolation case of Fig. 1). Assumption (a) and (b) together with Assumption 2 imply that one can permute expectation and derivative up to order 2, as detailed in Appendix
In this setting, we use the natural filtration (FR) where for all k. Fú is defined as the o-algebra generated by co...., Ek. Note that Ex+1 and thus (x 0; Ex+1) is not Fe-measurable but F++1-measurable
2.3 Main result on the convergence of the derivatives of SGD
The following is the main result of this paper. Its proof is postponed to Section 3.2.
Theorem 2.2 (Convergence of the derivatives of SGD). Let θ R be open, be measure spuce and f: I x θ x = R. be as in Assumption 1. Set = L/u, the condition number. Let (Ex) ken be a sequence of independent variables on E, as Assumption 2, Let (Tp² be a positive, non-increusing, non-summable sequence with TJo I 12.
1 4x² and (Ix (0)) be defined as in
(SGD). Then:
General estimates: setting 1 limm- The we have
402n
(1 (1+ 3M(1 + max (1000(0000000011 vmL'/ul)
lim sup
E [[((0ox(()) 00." (0)
1
11
Sublinear rate: for all k. Tik K+8K then
(
(log(k + Sn:22 1: + 8162
E [[110ox1(0) dex (0)
'This does not depend the randomness structure detailed in Assumption 2.
5

---

where the constants in the big O are polynomials in K, || x= (0)11. (10gz((00) - 0xx== (0)
o², n. M and /m.
Interpolation regime: if = O and nk - for all ls E N, then
12] = 1: (1(01-10 1 ")
8k(2 )
E [1) Ogz" (0)x((0)11
The first part of the result provides general estimate which allows covering virtually all small step-size cases, This includes: i) vanishing step-sizes, for which our result implics convergence of derivatives; and ii) constant step-sizes 1) for which we provide bound on the distance to the true derivative that is proportional to 1). For the second part, using step-sizes decreasing as 1/k, which is typical setup for the convergence of SGD derivatives converge as well, with a rate that is asymptotically of the same order, up to log factors. Finally, the last part of the result relates to the interpolation regime which has drawn lot of attention in recent years because it captures some of the features of overparameterized deep neural network training Ma et al. (2018); Varre al. (2021); Garrigos and Gower (2023). Note that the condition = O in Assumption 2 entails that interpolation occurs for both problems (Opt) and (Opt'), ) and in this case we obtain exponential convergence of both the iterates and their derivatives, with constant stepsize, as in the deterministic setting (Mehmood and Ochs, 2020).
strongly convex objectives, our result shows that the
Remark 2.3. The specific stepsize used to obtain the sublinear rate actually applies to any stepsize (ck + 8u) for given c, u. >> such that < c S I and u 2 //cc.. One
of the form Qhk obtains the same result with Jr, I. respectively replaced in the expressions by jı == c I and L= -uc L. This corresponds using lower estimate for the strong convexity constant and a higher estimate for the smoothness constant, which remain valid. A similar remark holds for the interpolation regime where any stepsize n smaller than pu/4L²) will bring the same result with replaced by K == 1/(ALr in the statement.
Remark 2.4. We consider step sizes at most 41œ which is smaller than +, typically used in optimiza- tion. Asside from the 1/ factor, which could possibly be improved, it important to relate it to the the fact that we have obtain O(1/k) rates which represent fast rates for SGD for convex optimization, limited to strongly convex objectives. Second, we do not have any Lipschicity assumption on the objective function itself. This, and the use of small steps to obtain fast rate is in line with related literature such as (Bottou al., 2018, Theorem 4.6), the discussion following (Moulines and Bach, 2011 1, Theorem 1) or (Garrigos and Gower, 2023, Corollary 5.8 and Theorem 5.9). The possibility to obtain convergence of derivatives of SGD for larger step sizes will be topic of future research.
3 Proof of the main result
Our result relies on the interpretation of the recursion (SGD') as an inexact SGD sequence for the problem (Opt'). We start with a detailed analysis of inexact SGD under appropriate assumptions. This is an abstract result which we formulate using an abstract function g different from the objective in problems (Opt) and (Opt') in order to avoid any possible confusion. In particular g is static (does not depend on external parameters) and the obtained convergence result will be then applied to both sequences (SGD) and (SGD').
3.1 Detour through an auxiliary result: convergence of inexact SGD
We provide here our template results for the convergence of inexact SGD, As template, we consider a function G: IR. + IR defined as
G(x) = Re
Our generic assumptions stand as follows.
Assumption 3. is a probability distribution on the measure space E, and the function g: IRd RR satisfies the following conditions:
(a) Smoothness: g(::E) is C*l with L-Lipschitz gradient, i.e., there is L 2 0 such that [V {) - v=g(z';)) (l)l I L||z x'
for all x E RR, and all ş E E.

---

(b) Strong convexity: there is x* E R2 and 0 such that (x x"",,", E. =x; 2 ul| - x= for all R2.
(c) Variance control: there is 0 S a < too such that [ V : <
We remark that under Assumptions I and 2, Assumption 3 is satisfied for both problems (Opt) and (Opt'). We will consider an inexact SGD recursion of the form
F++1 I& Ths (Vag(Txi Ex+1) + cR+1)
where we will need the following assumption on noise and errors.
Assumption 4. The observed noise sequence (Ge) is independent and identically distributed with common distribution P on E. Denote by (FR))en the natural filtration (i.e., for all k. F3 is the o-algebra generated by Eo. ..... Ex), the errors (ER)REN form a sequence (Fe)xen-adapted random variables such that Bi[ [ S BY where (Bx kee is deterministic non-increasing sequence.
The following reduces the analysis of inexact SGD sequences to the study deterministic recur- sion, its proof is given in Appendix B.
Proposition 3.1 (Convergence inexact SGD). Let Assumption 3 and Assumption hold. Consider
the ierrtes in (2) where (1T keN is a positive, non-increasing, non-summable sequence with no S ttz. Setting D3 / x 1=1 we have for all N:
D S (1 pmm)) D 2n 20²) + 2m Bg
(3)
Studying the deterministic recursion (3) leads to the following results by relying on different helper lemmas laid out in Appendix C:
Lemma
Stepsizes
Errors
Noise
Result
Lemma C.1
1] > 1) 2 0
By + B α V
2
lim sup
Dr /
Lemma C.2
17, p=k+8L=
BB =
D 0
1og(k+88r")
K+8K*
Lemma C.3 Tik p22+
B O
(o k-t-8x2
D2 O
(og((k+-8x' 2
Lemma C.4
TJk = 1) < 2p
B O ((1
Dj O (k(1
en )k)
These results will be used to prove Theorem 2.2 in the coming section. They are of independent interest regarding the convergence analysis of inexact SGD sequences. The first lemma allows to prove the first point in Theorem 2.2, the second and third lemmas allow to treat the second point, and the last lemma allows to treat the interpolation regime in the third point. See Appendix for detailed statements.
3.2 Proof of the main result
We first show that Proposition 3.1 can be applied to the recursion (SGD') in relation (Opt') and then explicit its consequences using the lemmas of Appendix C.
Proof of Theorem 2.2. Following (1), we have that (0bzx(())) is inexact SGD sequence for problem (Opt') as in (2), with an error term of the form
Ck++ (V 2 (0),
(Ix, 0, (0xx(()
+ (0), Ex+1) (zo (: Es+1))
Under Assumption 1 and Assumption 2, Problem (Opt') satisfies Assumption 3, and we have the same values for T., μ and a for both problems (Opt) and (Opt'). Furthermore, the error term ex+1 satisfies Assumption 4, and, thanks to Lemma 2.1 and Assumption on Lipschitz continuity of the Hessian of f. we have almost surely
| |l < M 1|x x² (0) +
(0)I,, VmL'/
(4)
The various bounds are obtained by considering different regimes. We first estimate a bound on E [0]) x² [ using Proposition 3.1 with B₁ 0 for all k. This allows to obtain estimate
7

---

on E | [Io] using (4). We conclude for the derivative sequence by applying Proposition 3.1 with its different corollaries. We treat all these results separately.
General estimate. From Proposition 3.1 with Bg = O, we obtain, by considering g(x, = [a,,0;; and Lemma C.I that lim supx->c E (1))=x(()) x (0)1l3 soinn For the derivative
P quence, combining this first estimate with (4), we can consider decreasing sequence of mean squared upper bounds (BE)REN, such that
2 ML max(|]0 (mL//p))
lim B3 = B = 20 k0000
The upper bound given by Proposition 3.1 and Lemma C.I is of the form
B + 4umoa +
/B² + 2uu B² + 2 B
3B 1
S 20 V
which corresponds to the claimed bound.
Convergence rate. From Proposition 3.1 with B₁ = 0, we obtain, by considering g(r
fxr,0; () and Lemma C.2 that IE| [xx x (0) o log( k +88") as given in Lemma C.2.
As consequence, combining this first estimate with (4), we may set B O result follows from Lemma C.3.
(k- and the k+8x2
Interpolation regime. Setting p 40 1 8. for o² = 0 and Bg = 0 for all l E N, it clear from (3) that E (0)=x((0) x (0)11²) (0) x- 10) for all k E N. Using (4), we may choose Bg (p²). Plugging this estimate in (3), the result then given by Lemma C.4.
Numerical illustration
In this section, we illustrate the results of Theorem 2.2 by examining the numerical behavior of the iterates and their derivatives under various settings. Specifically, we provide insights into the behavior of classical regularized methods, such Ridge regression, logistic regression, Huber gression. Furthermore, we explore potential extensions to the nonsmooth case by also considering the Hinge loss. All the experiments are performed for the empirical risk minimization structure, i.e., the randomness & is drawn from the uniform distribution over {1....,m, All the experiments were performed in jax (Bradbury et al., 2018) MacBook Pro M3 Max.
Ordinary least squares. We consider a simple linear regression problem solved by ordinary least- squares as:
m Σ 8=1
xx (0) arg minzerd F(x, 0) = 2m
(a) - b(0)))²,
The data A= (ag) E x here is random matrix with d < m. The finite sum structure naturally suggests a stochastic gradient decomposition as (SGD), by choosing uniformly in {1..... m) with replacement. We consider three generative models for the function b:
1. Standard setting: E Rm, and we have is the identity Rm In this case, our theory corresponds to the differenniaaionn of the least squares solution seen as a function of the output observations.
2. Simple interpolation setting: The setting is the same as the standard one, except that we consider specific value of 8 = Aç for some Ç Rdd. In this case, we do not differen- tiate through the linear relation 0 = AÇ, the function b remains the identity, we simply evaluate at specific point which corresponds to data interpolation. We call this simple interpolation, because it corresponds to a 0 for the sequence (SGD), but not for (SGD').
3. Double interpolation setting: The parameter variable 0 is in Rd and we set b: 0 + A0. Here this corresponds to an interpolation regime which uniform O. We call this double interpolation because it corresponds to = 0 for both sequences (SGD) and (SGD').

---

monitor the Constant stepsize
Decreasing stepsize
Double interpolation
Simple interpolation
10
10"4
10
10
10
f(a)
10:94
10
10-91
10
22
50000
100000
50000
100000
50000
100000
0
50000
100000
10-2
10-9
2
10-12
10
50000
100000
50000
100000
1000000
50000
100000
9b/ /10
0b/ logg
Figure 1: Numerical behavior of SGD iterates and their derivatives (Jacobians) in a linear regression problem solved by ordinary least squares. The plots depict the convergence of the suboptimality (=²x(0) f(= (0)) and the Frobenius norm of the derivative error ||0bz (0) Ohr" (0)ll across different experimental settings: constant step-size (first column), decreasing step-size (second column), double interpolation (third column), and simple interpolation (fourth column).
experiments utilize varying step-size strategies to illustrate general estimates, sublinear rates, and the impacts of interpolation regimes, validating theoretical predictions of Theorem 2.2.
Note the the difference between setting 2. and 3. are that linear map A in setting 2. Furthermore Assumption and Assumption are satisfied for these three settings. Figure 1 illustrates the behavior of (SGD) and (SGD'). More precisely, convergence of the suboptimality [(xx - ((x*(0) and of the derivatives error measured in Frobenius norm [1))z Ogx² * [O)]]r. p. We consider various step size regimes and set f/o 4f for all experiments. This allow us to clearly identify the three regimes of Theorem 2.2:
not differentiating through the
Constant stepsize: in setting 1., employing a constant step-size, we observe convergence of both the iterates (consistent with classical SGD theory) and their derivatives to neighbor- hood of the solution whose diameter decreases with the step size.
Decreasing stepsize: in setting 1., employing step-size proportional to 1 1/k: we observe a sublinear decay of both the iterates and their derivatives. The convergence is difficult to observe since the decay leads to very small updates.
Double Interpolation regime: in setting 3., employing a constant step-size, we observe both iterates and derivatives linear decays.
Simple Interpolation regime:
in setting 2., Assumption 2(a) is satisfied with 0 only for the iterates, but not for the derivatives, we observe linear convergence of the iterates, but the derivatives converge to neighborhood of the solution in the setting 1.
Ridge, Logistic, Huber and SVM regression. In addition to the previous illustration of Theo- rem 2.2, we provide numerical experiments for constant learning rate for four different models: ridge regression, logistic regression, Huber regression and Support Vector Machines (SVM) regres- sion. All of them are written as
1 Σ (x,0;E) +
x (0) = arg min F(x, 0) =
5=1
where f(x, (a w 0²)² for ridge regression, f(x O) logg1 + (ppp--caa x)) for logistic regression,
[1(0== x)2
if 10 aT 5 otherwise,
f(x,0:5) 10 10 a 10)
for Huber regression for some 8 > 0 (here 5 0.1), and f(x,0; 0: max(0, Aça x) for SVM regression (hinge loss). In all cases, the finite sum structure naturally suggests a stochastic gradient decomposition as (SGD), by choosing uniformly in (1...., m)) with replacement All experiences are performed with m, d 100, 10 and μ 0.05. In Figure 2, we show the convergence

---

Ridge regression
Logistic regression
Huber regression
SVM regression
10
10
10-3
10
10
10-5
10
100000
200000
100000
200000
100000
200000
100000
200000
(86fba) -afft)))
10-3
10
10-3
10-3
10-1
10-1
10
10-1
100000
200000
100000
200000
100000
200000
100000 200000
0.05
0.005
0.0005
Figure 2: Numerical behavior of the objective function and its derivatives with respect for ridge regression, logistic regression, Huber regression, and Support Vector Machines (SVM) regression using constant learning rate. We report the suboptimality (x)) (0) for the SGD iterates, along (bottom) with the norm of derivatives errors [0azz Ogx [ for different constant step-size. Each line corresponds different step-size.
of the objective function and the derivatives with respect to 0 for the four models with a constant learning rate. Note that the SVM loss is not differentiable. We refer to (Bolte al., 2022) for formal treatment of nonsmooth iterative differentiation, but one could expect similar results for conservative Jacobians.
Experiments on real data. We display in Figure 3 the behaviour of SGD iterates and their deriva- tives for regularized logistic regression problem on ijenn1.
1012
Figure 3: Numerical behavior of SGD iterates and their derivatives (Jacobians) for regularized logistic re- gression problem. The plots depict the convergence of the suboptimality f(xx f(x" (0)) (left) and the derivative error 10pz (f) Ogx" (0)] (right) for different constant step size. The dataset used is ij cnn1 from libavm with 49,990 observations and 22 features. The observations are qualitatively identical to our synthetic experiments.
Conclusion
In conclusion, study of stochastic optimization problems where the objective depends parameter reveals insights into the behavior of SGD derivatives. We demonstrated that these derivatives follow inexact SGD recursion, converging the solution mapping's derivative under strong convexity, with constant step-sizes leading to stabilization and vanishing step-sizes achieving (loog(k)2 //)) rates. Future research could refine the analysis by comparing stochastic implicit and iterative differentiation, develop minibatch version, and explore outcomes in non-strongly convex or nonsmooth settings. Additionally, the feasibility of stochastic iterative differentiation warrants further investigation, given its potential benefits and challenges in such scenarios.
10

---

Acknowledgements
The authors acknowledge the support of ANR MAD ANR-24-CE23-1522, Edouard P. and Franck and ANR REG- ULIA. Edouard acknowledges the support the Air Force Office Scientific Research FA8655- 22-1-7012, and TSE partnership. Samuel V. is supported by the Al Interdisciplinary Institute 31A Côte Azur LANR-19-P3IA-0002 and ANR Gra Va ANR- ANR-18-CEAN 18-CE40-0005.
I. are supported by the AI Interdisciplinary Institute ANITI
References
M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, R. Jozefow- icz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore. D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Va- sudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. URL https: www.teensorfov...oom org/ Software available from tensorflow.org.
P. Ablin, G. Peyré, and T. Moreau. Super-efficiency of automatic differentiation for functions defindd as a minimum. In JCML, volume 119, pages 32 22-41. PMLR, 2020.
A. Agrawal, B. Amos, Barratt, Boyd, S. Diamond, and J. Z. Kolter. Differentiable convex optimization layers. In NeurlPS, volume 32, 2019.
B. Amos and J. Z. Kolter. OptNet: Differentiable optimization as layer in neural networks. In ICML, 2017.
M. Arbel and J. Mairal. Amortized implicit differentiation for stochastic bilevel optimization. In ICLR, 2021.
S. Bai, J. Z. Kolter, and V. Koltun. Deep equilibrium models. NeurlPS, 32, 2019.
A. G. Baydin, B. A. Pearlmutter. A. A. Radul, and J. M. Siskind. Automatic differentiation in machine learning: survey. J. Mach. Learn. Res., 18(153):1 2018.
Beck. Automatic differentiation of iterative processes. Comput. Appl. Math., 50(1-3):109-118, 1994.
Q. Bertrand, Q. Klopfenstein, M. Blondel, S. Vaiter, A. Gramfort, and J. Salmon. Implicit differen- tiation of lasso-type models for hyperparameter optimization. In ICMI., pages 810-821. PMLR, 2020.
M. Blondel, Q. Berthet, M. Cuturi, R. Frostig, S. Hoyer, F. Llinares-Lóóez, F. Pedregosa, and J.-P. Vert. Efficient and modular implicit differentiation. NeurlPS, 35:5230-5242, 2022.
Bogensperger, Chambolle, and T. Pock. Convergence of piggyback-style method for the differentiation of solutions of standard saddle-point problems. SIAM J. Math. Data Sci., 4(3): 1003-1030, 2022.
Bolte, E. Pauwels, and S. Vaiter. Automatic differentiation of nonsmooth iterative algorithms. NeurIPS, 35:26404-26417,, 2022.
J. Bolte, E. Pauwels, and S. Vaiter. One-step differentiation of iterative algorithms. NeurIPS, 36, 2023.
V.S. Borkar. Stochastic upproximation: a dynamical systems viewpoint, volume 48. Springer, 2009.
L. Bottou, F. E. Curtis, and J. Nocedal. Optimization methods for large-scale machine learning. SIAM Rev,, 2031)1 2018
J. Bradbury, R. Frostig, P. Hawkins, M. J. Johnson, C. Leary, D. Maclaurin, G. Necula, A. Paszke, VanderPlas, Wanderman-Milne and Q. Zhang. JAX: composable transformations of Python+NumPPy programs, 2018. URL httt:://githie cot/ ham//goole//eae
A. Chambolle and T. Pock. Learning consistent discretizations of the total variation. SIAM J. Imag. Sci., 14(2):778-813, 2021.
H.-F. Chen, L. Guo, and A.-J Gao. Convergence and robustness of the robbins-monre algorithm truncated at randomly varying bounds. Stoch. Process. their Appl., 27:217-231, 1987.
11

---

T. Chen, Y. Sun, and W. Yin. Closing the gap: Tighter analysis of alternating stochastic gradient methods for bilevel problems. NeurIPS, 34:25294-25307, 2021.
B. Christianson. Reverse accumulation and attractive fixed points. Optim. Methods Softw., 3(4): 311-326, 1994.
M. Dagréou, T. Moreau, Vaiter, and P. Ablin. A lower bound and a near-optimal algorithm for bilevel empirical risk minimization. In AISTATS, pages 82-90. PMLR, 2024.
M. Dagréou, P. Ablin, S. Vaiter, and T. Moreau. A framework for bilevel optimization that enables stochastic and global variance reduction algorithms. In NeurIPS, 2022.
C.-A. Deledalle, S. Vaiter, J. M. Fadili, and G. Peyré. Stein Unbiased GrAdient estimator of the Risk (SUGAR) for multiple parameter selection. SIAM. Imag. Sci., 7(4):2448 2487, 2014.
C.-A. Deledalle, N. Papadakis, J. Salmon, and S. Vaiter. Clear: Covariant least-square refitting with applications to image restoration. SIAM J. Imaging Sci., 10(1):243-28) 284, 2017. doi: 10.1137/ 16M1080318.
Y. Demidovich, G. Malinovsky, I. Sokolov, and P. Richtárik. A guide through the zoo of biased sgd. NeurIPS, 36, 2023.
O. Devolder, F. Glineur, and Nesterov. First-order methods of smooth convex optimization with inexact oracle. Math. Prog., 146:37-75, 2014.
A. Dieuleveut, G. Fort, E. Moulines, and H.-T. Wai. Stochastic approximation beyond gradient for signal processing and machine learning. IEEE Trans. Sig. Proc., 2023.
A. Doucet and V. Tadic. Asymptotic bias of stochastic gradient search. Ann. Appl. Probab., 27(6), 2017.
L. El Ghaoui, Gu, B. Travacca, A. Askari, and Tsai. Implicit deep learning. SIAM Math. Data Sci., 3(3):930-98) 9089930099990000 2021. doi: 10.1 13772011118888
Y. Ermoliev. Stochastic quasigradient methods and their application to system optimization. Stochastics: An International Journal of Probability and Stochastic Processes, (1-2):11-3, 1983.
C. Finn, P. Abbeel, and S. Levine. Model-agnostic meta-learning for fast adaptation of deep net- works. In ICML, pages 1126-1135. PMLR, 2017.
G. B. Folland. Real analysis: modern techniques and their applications, volume 40. John Wiley & Sons, 1999.
L. Franceschi, M. Donini, P. Frasconi, and M. Pontil. Forward and reverse gradient-based hyperpa- rameter optimization. In ICML, pages 1165-1173, PMLR, 2017.
L. Franceschi, P. Frasconi, S. Salzo, R. Grazzi, and M. Pontil. Bilevel programming for hyperpa- rameter optimization and meta-learning. In JCML., pages 1568-1577. PMLR, 2018.
S. W. Fung, H. Heaton, Q. Li, D. McKenzie, S. Osher, and W. Yin. Jfb: Jacobian-free backpropaga- tion for implicit models. Proceedings of the AAAI Conference on Artificial Intelligence, 2022.
G. Garrigos and R. M. Gower, Handbook of convergence theorems for (stochastic) gradient methods. arXiv preprint 2rX1vv 2023.
J. C. Gilbert. Automatic differentiation and iterative processes. Optim. Methods Softw., 1(1):13-11, 1992. doi: 10.108001055578920005555
R. M. Gower, N. Loizou, X. Qian, A. Sailanbayev, E. Shulgin, and P. Richtárik. Sgd: General analysis and improved rates. In ICML, pages 5200-5209, PMLR, 2019.
R. Grazzi, Franceschi, M. Pontil, and Salzo. On the iteration complexity of hypergradient computation. In ICML, pages 3748-3758. PMLR, 2020.
R. Grazzi, M. Pontil, and S. Salzo. Convergence properties of stochastic hypergradients. In AISTATS, pages 3826-3834. PMLR, 2021.
R. Grazzi, M. Pontil, and S. Salzo. Bilevel optimization with lower-level contraction: Optimal sample complexity without warm-start. J. Mach. Learn. Res., 24(167):1-37, 2023.
R. Grazzi, M. Pontil, and Salzo. Nonsmooth implicit differentiation: Deterministic and stochastic convergence rates. arXiv preprint arXiv:2403. 11687, 2024.
A. Griewank. On automatic differentiation. Mathematical Programming: recent developments and applications, 666):83-177 1989.
12

---

A. Griewank and C. Faure. Piggyback differentiation and optimization. In Large-scale PDE- constrained optimization, pages 148-164. Springer, 2003.
A. Griewank and A. Walther. Evaluating derivatives: principles and techniques of algorithmic differentiation. SIAM, 2008.
A. Griewank, C. Bischof, G. Corliss, A. Carle, and K. Williamson. Derivative convergence for iterative equation solvers. Optim. Methods Softw. 2(3-4)321-3555 1993. doi: 10.1080/
1055678930890544.
K. Ji, J. Yang, and Y. Liang. Bilevel optimization: Convergence analysis and enhanced design. In ICML,, pages 4882-4892. PMLR, 2021.
K. Ji, J. Yang, and Y. Liang. Theoretical convergence of multi-step model-agnostic meta-learning. Journal of machine learning research, 23(29): 2022.
J. Lorraine, P. Vicol, and D. Duvenaud. Optimizing millions of hyperparameters by implicit differ- entiation. In AISTATS, volume 108, pages 1540-1552. PMLR, 2020.
Ma, Bassily, and M. Belkin. The power of interpolation: Understanding the effectiveness of sgd in modern wver-parametrized learning. In International Conference on Machine Learning, pages 3325-3334. PMLR, 2018.
D. Maclaurin, D. Duvenaud, and Adams. Gradient-based hyperparameter optimization through reversible learning. In ICML, pages 2113-2122. PMLR, 2015.
Mehmood and P. Ochs. Automatic differentiation of some first-order methods in parametric optimization. In AISTATS, pages 1584-1594. PMLR, 2020.
S. Mehmood and P. Ochs. Fixed-point automatic differentiation of howaadd-bacwaadd splitting al- gorithms for partly smooth functions. arXiv preprint arXiv:2208.033 107, 2022.
E. Moulines and F. Bach. Non-asymptotic analysis of stochastic approximation algorithms for ma- chine learning. Advances in neural information processing systems, 24, 2011.
A. Nedić and D. P. Bertsekas. The effect of deterministic noise in subgradient methods. Math. Prog., 125(1):75-999 2010.
Y. Nesterov. Introductory lectures convex optimization: A basic course, volume 87. Springer Science & Business Media, 2013.
A. Paszke, S. Gross, Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein,
L. Antiga, A. Desmaison, A. Kopf, E. Yang, Z. Vetito, M. Raison, A. Tejani, S. Chilamkurthy, B. Steiner, L. Fang, Bai, and S. Chintala. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, pages 8024-8035. 2019.
Pedregosa. Hyperparameter optimization with approximate gradient. In ICML., pages 737-746.
PMLR, 2016.
A. Rajeswaran, C. Finn, S. M. Kakade, and S. Levine. Meta-learning with implicit gradients. NeurlPS, 32, 2019.
A. Ramaswamy and S. Bhatnagar. Analysis of gradient descent methods with nondiminishing bounded errors. IEEE Trans. Autom. Control, 6365):1465-1471, 2017.
H. Robbins and S. Monro. stochastic approximation method, Ann. Math. Stat., pages 400-407, 1951.
D. E. Rumelhart, G. E. Hinton, and R. J. Williams. Learning representations by back poockproppggting crrors. Nature, 323(6088) 1986. ISSN 1476-4687. doi: 10. 10300/3333333..
A. Shaban, C.-A. Cheng, N. Hatch, and Boots. Truncated back-propagation for bilevel optimiza- tion. In AISTATS, pages 1723-1732, 2019.
M. V. Solodov and S. Zavriev. Error stability properties of generalized gradient-type algorithms. J.
Optim. Theory Appl., 98:663-680, 1998.
A. V. Varre, L. Pillaud- Vivien, and N. Flammarion. Last iterate convergence of sgd for least-squares in the interpolation regime. Advances in Neural Information Processing Systems, 34:21581- 21591, 2021.
R. F. Wengert. A simple automatic derivative evaluation program. Commun. ACM., 7(8):463 464, Aug. 1964. ISSN 0001-0782 doi: 10.1 10.1145/355586.364499.
13

---

A Justiffcation of the permutation of integrals and derivatives
We may assume without loss of generality that both f(0, O; {) and (0,,,))(000;; 0; are integrable thanks to Assumption 2(b). Concatenate the variables x and 8, such that (xr, 0) and consider the function
g: (z: + {(z
| +1
Since the gradient of L-Lipschitz in 2 by Assumption 1(b), we have using the descent lemma (Nesterov, 2013, Lemma 1.2.3)
()(z;)) - [(0; e) S II /V; III + 1|=1
so that is upper bounded by an integrable function uniformly in = as
[0(=;() < [ [) + ((; OlI L
(5)
We also have
2f(z:
29(2; E) || 2 +
V2g(ziE) (zi
fzz
| + (||=| 1)3
||=1|=
2g(z; E)
(=](0:))
| (V=[(z; - v=)(0:
|| +1
21=112+ +1
Using again Lipschitz continuity of the gradient of f, V=g(z; is upper bounded by an integrable function, uniformly in 2, as
[ < [0; e + Eg(= s < 1 + 2L + (0;
(6)
Hence, we have that i) V =2; exists for all (as C²) and ii) both & + g(2:{) and & H {2) are bounded by functions in L'(P) uniformly in z thanks to (5) and (6) since (0; E and (0; E)ll belong to L (P)... Hence,
have the appropriate domination assumptions to
differentiate under the integral for the function g so that for all the function G : + [[] is (see e.g., (Folland, 1999, Th. 2.27)).
differentiable and V=G(=) = E[[=g(<:;
Now, turning back to f. since for all z, f(; (1]==11 + 1), F(z) G[=) + and
thus V F()) V ((= + +)
Also, for all
v=f(=; = V(o(=:)((|=|| + 1) + 2zg(2;E)
whose right hand side integrable as shown above. This enables us to conclude that for all 2,
B[v.((z; = [z) + 1) 2=E]g(2;
= <\>
+
As for the second derivative, [zf(z; is C¹ with uniformly bounded derivatives so that we may apply differentiation under the integral once again obtain that the Hessian of the expectation is the expectation of the Hessian.
B Proofs from the main text
B.1 Proof of Lemma 2.1
Lemma B.I. Let μ > and (18² kEN be a sequence of positive numbers. Assume that (Dk)ken is sequence of mutrices of fixed size, such that DE+1 = Ag Dr + BBy, for matrices (Ax Aeeee and (Bx) ket of appropriate size where |Aellop S 1 - pint and BB S Buj for all k. Then for all k
Dall S Dax(] B/μ}.
14

---

Proof. We have, using the fact that D - |AA
||Dx+1ll = Dx + BII < DA || + Bx - ||Ax | + || & - p + Bn
There are Iwo cases.
. If || 2 B/μs then | s (1 (m)] | m/ B < [
. |I - B/μ, then [ < (1 -mm)))) + m = B/μ.
The proof is then by induction: if D max Doll B/u); the property extends to D&+1 by using one of the two cases.
Proof of Lemma 2.1. The recursion (SGD') can be written
DK+1 = A Dz. + Bx
where for all k. D2 (0), A
mh f (0). 0: Ek+1) and B₁ V (z) O: Ex+1). Using Assumption 1, we have that ||Abllop 1 meff and
|| |Bll
<
/ml Ba lop S vmllmp mn.- The result follows from Lemma B.1.
B.2 Proof of Proposition 3.1
Proof of Proposition 3.1. First, we recall that the expected norm of a stochastic gradient can be controlled for any k E N as
[
2B VIIVV < + V (x+1) - V=g(<"; FR
20 21 1 11
where we used Assumption 3(a) and (c) in the second inequality.
By definition (2), we have for & E
|| xx1 =| Ix x* 11 n V > + ex41112 2n (ox x², Veg(zsi Ex+1) + cx+1)
S | x" 1| 2n (lVvg(<Tx 11+2 + |lext1 12) 21 ( x", (ag(iiiSx+1))
+ 27, | - x- I1l
Taking the expectation conditioned on FR. we get with our assumption on the errors that x"
E [|]2241
|| < | - x² 112 n
112 + 40² + 21E 22 [|ex+1 2|3 Fil)
2m (ox x² E V V 11
+ 2mp 10 x² [|[[|ex+ + [[F
< (1 27a + 4n ?) || - x=11 + n (4o² + (1eeet++111
+ 2mp 1 - x" |||[|| ( [[]Fa]
(8)
where we used successively Eq. (7) and Assumption 3(b). Now using Jensen's 's incquality and the Cauchy-Schwand inequality: E[XY] < E for square integrable random variables, we have the following bound the full expectation of the last product,
[| x [
|| [i]] - Bi] - xr 12 Elllex+1 1|
S E Di x 112
E E
[[ellect 2 F(
my x= 101
E ||
Now, our condition on the stepsize parameters implics that -217. 4n L2 - m.p. By taking full expectation both sides of (8), obtain that
B[[|+++1 - [3] < (1 - 7a/1 E [[ - x + vi (4o² + 2BB) + 21/ Bl| x= 1|2
We set DR = /E[l Kz - x || so that we have the following deterministic recursion:
D4 - (1 - wmn) DE + 2n + 20 + 27, Br.
15

---

C Technical Lemmas
Lemma C.1. Let (mx kEN and (Bx) LeN be non-negative and non-increasing. Assume that (mh keN is non-summable and that 0 < nh S f for all k. Let (Di)ken be non-negative sequence satisfying for all k
D S (1 pmm)) D + (B + 20²) + 2TtBB.Da
(9)
Consider the quantity
V Vnn + 8pm 3 B + 2 + 2B V VB + 2pm [Bg + 20²) + BB
2pm
/
Then, (Ōk)KEN is positive, non-increasing, and for any 8 liim 6F
limsupk-ae D S
Proof. Set for each & N, Fs: R4 + Rt. with (t) = (1- pm) ) +B22 We have that F5 is increasing, concave, and FL(OR) = 62. By assumption, for all sufficiently large, we have dy < 6 so that Fa (8²)= S 8 as l + (x( 1² is negative for 2 oz.
+202).
Plugging this into (9), we obtain
Di_ 8² < (1 pm)) D 2m B₁ Dr: (BB + 20 Fx(
(1 umn) (D) 5²) + 2mH BB (Dx 5).
Using the fact that μid S L, we deduce that Dj < ô, then Dk+t S 8 for all i N and the result follows. We continue assuming that Dj > 8 for all k E N.
Using the concavity of the square root, we have Dj - DDz V82 S 2// (D) - -8)) We deduce that
D2+1 5 -02 ( + mh Bk
(D} - -82).
We notice that for all k 2Bs S 5x so that for large enough, 2B < 6, and obtain
Th Bg
MMg. and we <
2
D
82
Wtl 2
D
82).
So there is an index An such that for all k 2 Ko, we have D2 - 82 < (1 and the right hand side decreases proof.
No. - 82)
- oo because Tii is non-summable. This concludes the
2u Lemma C.2. Let me p24882 for all k E N and (De)keN be non-negative sequence satisfying, for all k.
D2+1 S (1 wmlk) D3: + 4n
Then have for all ls E N,
202
16a2
( 1 h
8x:2) ))
D2+t S k+ 8K²
Sh 8h2 Dg +
2 +
log
42
Proof. From the recursion, we obtain
D241 < (1- 122k + 81,2
2,²2
16y202
D2 +
(n²k + 8L2Y2
16p²02
8L2) & (n²k - 8L2 - 224
D +
(122 + 8L2)
16H202
I (n²(k - 1) + 8L?) D
(12k+ + 812)
16

---

from which we deduce that
k
16x20²
( S (8L² - 12) D +
(f2i + 812)
i=0
1
<8L2D' + 160
(i +
8L2
1=0
H2
2²
kjd
D + 16
log
1
8
812
where the last inequality is by integral series comparison. All all, we obtain
SL2D3
160
12
D2+1 v
+ 1. + 8L2
+ log
1
1 + 8L2
81.2
8I2
8x² D3
20
16 log
1 1
ky
8L.7
8x² k
L2 8K²)
#2(k (k: + +8x22)
20²
16o²
h
8k. Do
log
1
8k²
L
8r:2
Lemma C.3. Let TJs satisfying, for all k.
24 p2k48L2. for all ls E E.N,
1. x
and (Dą)Ren be non-negative sequence
DR $ - pmm) DI + 27 [ + 20²) + 27 BR
where there are constants A, 0 such that, for all N.
A+ B log (k: + 8x2))
B <
k + 8K²
Then, we have
8K2 D3
(5(B + A) 80 log(A: + 8n.)²
D <
+
k + 8k2
112
k + 8N²
Proof. We first rework the recursion, we use the fact that
24 Dr
21/
/2BB
VB
De
S 4K
2
D
11
2nn 21
+ 116 p
DJ.
V
22
2
11
The new recursion becomes
D
S (1
HiTk
D 2 (B 20
277R B3
(10)
11
From this recursion, obtain by expanding all terms
D2+1 S (1-
12
2p2
A A+ B Blog (k: + 4x:2)
D + (12K + 812)2
202 +
12 + 81,2
k 4x2
2p
2(A B log (k 8x.)
+ (12k + 81.2)
[1k 8R?)
8
20² + (A + log (k: + 8x²2)
4 S (n²k + 81,2
112) D +
(k: + 8n2)
(k + Sx:2)
4(A + B log + 8x²))
(k + 8x22
S (n2 - 1) SL?) D + log (k: + 8k22)
(5(B + A) - 16o
h: + 8x,2
17

---

where we use the fact that & 2 0 and 2 1 so that log (A: + 8x2) 2 log (8) > 1. We deduce that
log(1 + 8k²) (i + 8x?)
( < (8L2 n²) D3 + (5 160
S 81 (5(B + A) + 160²) log 8x22²
where the last inequality is by integral series comparison, using the fact that t log(t)/t /t is de- creasing for t 2 exp(1), we have
log(i + 8m²)
log(8k²) Sn²
I
+ log(A: k + 8n² 1og((x2)2 - log(A: /: + 8x
(i + 8x?)
2=0
Lemma C.A. Let Th = 1j satisfying for all k
2n for all N, R t.2 and (Du)ken be a non-negative sequence
Di_1 S (1 pmm)) D + 2n B + 2mp BR
where, there is a constant 0, with = 1 2 such that, for all E N.
B v Apt
Then, we have
D S /
Di +
kA
2n²² + 2 11)
))
P
Proof. We proceed similarly in (10) and obtain
Di+1 S (1
D + 2n B
+
21 B
S pDD + Ap (2n2 + +22
We rewrite and use an induction to obtain
D
D
A
2n +
?! 11
s D2
kA
2nj² + 2
p++
p
p
11
which is the desired result.
NeurIPS Paper Checklist
1. Claims
Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Question:
Answer: [Yes]
Justification: We propose a theoretical analysis to iterative differentiation of stochastic gradient descent highlighted in abstract and introduction.
Guidelines:
The answer NA means that the abstract and introduction do not include the claims made the paper.
The abstract and/or introduction should elearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No
NA answer to this question will not be perceived well by the reviewers.
The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize other settings.
fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.
18

---

2. Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: While we do not have Limitations section in the paper, we highlight poten- tial future works in the conclusion related to the limitations of our work.
Guidelines:
The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are discussed in the paper.
The authors are encouraged to create separate "Limitations" section in their paper.
The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The au- thors should reflect how these assumptions might be violated in practice and what the implications would be.
The authors should reflect on the scope of the claims made, c.g., if the approach was only tested on few datasets or with few runs. general, empirical results often depend on implicit assumptions, which should be articulated.
The authors should reflect on the factors that influence the performance of the ap- proach. For example, a facial recognition algorithm may perform poorly when image resolution is low images taken in low lighting. Or a speech-to-tex system might not be used reliably to provide closed captions for online lectures hecause fails to handle technical jargon.
The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size.
If applicable, the authors should discuss possible limitations of their approach to ad- dress problems of privacy and fairness.
While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, worse outcome might be that reviewers discover limitations that aren't It acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an impor- tant role in developing norms that preserve the integrity of the community, Reviewers will be specifically instructed to not penalize honesty concerning limitations.
3. Theory Assumptions and Proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and complete (and correct) proof?
Answer: [Yes]
Justification: We provide a complete proof for each theoretical result in the paper, along with the full set of assumptions. The sketch of the proof is provided in the main paper, while the complete proof is provided the appendix.
Guidelines:
The answer NA means that the paper does not include theoretical results.
All the theorems, formulas, and proofs in the paper should be numbered and cross- referenced.
All assumptions should be clearly stated or referenced in the statement of any theo- rems.
The proofs can either appear in the main paper or the supplemental material, but if they appear in the supplemental material, the authors are encouraged provide short proof sketch to provide intuition.
Inversely, any informal proof provided in the of the paper should be comple- mented by formal proof's provided in appendix or supplemental material.
Theorems and Lemmas that the proof relies upon should be properly referenced.
4. Experimental Result Reproducibility
19

---

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclu- sions of the paper (regardless of whether the code and data are provided or not)?
Answer: [Ys]]
Justification: Our numerical experiments are simple and reproducible, and we provide all the necessary details the paper reproduce the main experimental results.
Guidelines:
The answer NA means that the paper does not include experiments.
If the paper includes experiments, a No answer this question will not be perceived well by the reviewers: Making the paper reproducible is important, regardless of whether the code and data are provided or not.
If the contribution is a dataset and/or model, the authors should describe the steps taken to make their results reproducible or verifiable.
Depending on the contribution, reproducibility can be accomplished in various ways. For example, if the contribution is a novel architecture, describing the architecture fully might suffice, or if the contribution is a specific model and empirical evaluation, it may be necessary to either make it possible for others to replicate the model with the same dataset, provide access to the model. In general. releasing code and data often one good way to accomplish this, but reproducibility can also be provided via detailed instructions for how replicate the results, access hosted model (e.g., in the case of a large language model), releasing of a model checkpoint, or other means that are appropriate the research performed.
While NeurIPS does not require releasing code, the conference does require all sub- missions to provide some reasonable avenue for reproducibility, which may depend on the nature of the contribution. For example
(a) If the contribution is primarily new algorithm, the paper should make it clear how to reproduce that algorithm.
(b) If the contribution is primarily new model architecture, the paper should describe the architecture clearly and fully.
(c) the contribution is a new model (e.g., a large language model), then there should either be way to access this model for reproducing the results or a way re- produce the model (e.g., with an open-source dataset or instructions for how to construct the dataset).
(d) We recognize that reproducibility may be tricky in some cases, in which case au- thors are welcome to describe the particular way they provide for reproducibility. In the case of closed-source models, it may be that access to the model is limited in some way (e.g., registered users), but it should be possible for other researchers to have some path to reproducing or verifying the results.
5. Open access to data and code
Question: Does the paper provide open access the data and code, with sufficient instruc- tions to faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [Yes]
The code released along with the paper. depends on jax, numpy and matplotlib.
Justification:
Guidelines:
The answer NA means that paper does not include experiments requiring code.
Please see the NeurlPS code and data submission guidelines battps://nipt cc/
htaaa//gguidess/dddSubmiisss oolouiooiiiiooooooccooooo for more details.
While we encourage the release of code and data, we understand that this might not be possible, so "No" is an acceptable answer. Papers cannot be rejected simply for not including code, unless this is central to the contribution (e.g., for new open-source benchmark).
20

---

The instructions should contain the exact command and environment needed to run to reproduce the results. See the NeurIPS code and data submission guidelines (https:
//nips.. wtwpps.cpppplllie htte/publcc//ae wwwbbicc/guidess..e gwtgg/iiis//// Coae//CooSSummmm ssi assooPoolicy for more details.
The authors should provide instructions data access and preparation, including how to access the raw data, preprocessed data, intermediate data, and generated data, etc.
The authors should provide scripts to reproduce all experimental results for the new proposed method and baselines. If only subset of experiments reproducible, they should state which ones are omitted from the script and why.
At submission time, to preserve anonymity, the authors should release anonymized versions (if applicable).
Providing as much information as possible in supplemental material (appended to the paper) is recommended, but including URLs to data and code is permitted.
6. Experimental Setting/Details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification:
We consider simple regression settings that we fully describe in the paper.
Guidelines:
The answer NA means that the paper does not include experiments.
The experimental setting should be presented in the core of the paper level of detail that is necessary to appreciate the results and make sense of them.
The full details can be provided either with the code, in appendix, as supplemental material.
7. Experiment Statistical Significance
Question: Does the paper report error bars suitably and correctly defined or other appropri- ate information about the statistical significance of the experiments?
Answer: [No]
Justification: We do not report error bars in the paper. The goal of Figure I show the variance of one trajectory of the algorithm, and repeating the procedure will not highlight this aspect.
Guidelines:
The answer NA means that the paper does not include experiments.
The authors should answer "Yes" if the results are accompanied by error bars, confi- dence intervals, or statistical significance tests, at least for the experiments that support the main claims of the paper.
The factors of variability that the error bars are capturing should be clearly stated (for example, train/test split, initialization, random drawing of some parameter, overall run with given experimental conditions).
The method for calculating the error bars should be explained (closed form formula, call to a library function, bootstrap, etc.)
The assumptions made should be given (e.g., Normally distributed errors).
should be clear whether the error bar is the standard deviation or the standard error of the mean.
is OK report 1-sigma error bars, but should state it. The authors should prefer- ably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is verified.
For asymmetric distributions, the authors should be careful not show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates).
If error bars are reported in tables or plots, The authors should explain the text how they were calculated and reference the corresponding figures tables in the text.
21

---

8. Experiments Compute Resourees
For each experiment, does the paper provide sufficient information on the com- puter resources (type of compute workers, memory, time of execution) needed reproduce the experiments?
Question:
Answer: [Yes]
Justification: This is simple low-dimensional regression problems that can be run on standard laptop (Apple Macbook M3).
Guidelines:
The answer NA means that the paper does not include experiments.
The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage.
The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute.
The paper should disclose whether the full research project required more compute than the experiments reported in the paper (c.g., preliminary or failed experiments that didn't 't make it into the paper).
9. Code Of Ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurlPS Code of Ethics https: : nwwrips......// cc
Answer: [Yes]
Justification: There is no ethical concern in the paper.
Guidelines:
The answer NA means that the authors have not reviewed the NeurlPS Code of Ethics.
If the authors answer No, they should explain the special circumstances that require deviation from the Code of Ethics.
The authors should make sure to preserve anonymity (e.g.. if there is a special consid- eration due to laws regulations in their jurisdiction).
10. Broader Impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [No]
Justification:
There is societal impact of the work performed due to its very theoretical
nature.
Guidelines:
The answer NA means that there societal impact of the work performed.
If the authors answer NA No. they should explain why their work has no societal impact or why the paper does not address societal impact.
Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact spe- cific groups), privacy considerations, and security considerations.
The conference expects that many papers will be foundational research and tied to particular applications, let alone deployments. However, if there is direct path to any negative applications, the authors should point it out. For example, it legitimate to point out that an improvement in the quality of generative models could be used to generate deepfakes for disinformation. On the other hand, is not needed to point out that a generic algorithm for optimizing neural networks could enable people to train models that generate Deepfakes faster.
The authors should consider possible harms that could arise when the technology being used as intended and functioning correctly, harms that could arise when the technology being used as intended but gives incorrect results, and harms following from (intentional or unintentional) misuse of the technology.
22

---

If there are negative societal impacts, the authors could also discuss possible mitiga- tion strategies (e.g., gated release of models, providing defenses in addition attacks, mechanisms for monitoring misuse, mechanisms to monitor how system learns from feedback over time, improving the efficiency and accessibility of MI.).
11. Safeguards
Does the paper describe safeguards that have been put in place for responsible release of data models that have high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Question:
Answer: [NA]
Justification:
No model data is released in the paper.
Guidelines:
The answer NA means that the paper
such risks.
Released models that have high risk for misuse dual-use should be released with necessary safeguards to allow for controlled use of the model, for example by re- quiring that users adhere usage guidelines or restrictions access the model or implementing safety filters.
Datasets that have been scraped from the Internet could pose safety risks. The authors should describe how they avoided releasing unsafe images.
We recognize that providing effective safeguards challenging, and many papers do require this, but encourage authors to take this into account and make best faith effort.
12. Licenses for existing assets
Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Question:
Answer: [Yes]
Justification: We cite accordingly the original papers that produced the code package used in our experiments.
Guidelines:
The answer NA means that the paper does not use existing assets.
The authors should cite the original paper that produced the code package or dataset.
The authors should state which version of the asset used and, if possible, include URL.
The name of the license (e.g., CC-BY 4.0) should be included for each asset. For scraped data from particular source (e.g., website), the copyright and terms of service of that source should be provided.
If assets are released, the license, copyright information, and terms of use in the pack- age should be provided. For popular datasets, anperswithcode com/ datasets has curated licenses for some datasets. Their licensing guide can help determine the li- cense of dataset.
For existing datasets that are re-packaged, both the original license and the license of the derived asset (if it has changed) should be provided.
If this information is available online, the authors are encouraged reach out to the asset's 's creators.
13. New Assets
Question: Are new assets introduced in the paper well documented and is the documenta- tion provided alongside the assets?
Answer: [NA]
Justification:
The paper does not introduce new assets.
Guidelines:
23

---

The answer NA means that the paper does not release new assets.
Researchers should communicate the details of the dataset/code/mooel as part of their submissions via structured templates. This includes details about training, license, limitations, etc.
The paper should discuss whether and how consent obtained from people whose asset is used.
At submission time, remember to anonymize your assets (if applicable). You can either create an anonymized URL or include an anonymized zip file.
14. Crowdsourcing and Research with Human Subjects
Question: For crowdsourcing experiments and research with human subjects, does the pa- per include the full text of instructions given participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [NA]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing research with human subjects.
Including this information in the supplemental material is fine, but if the main contri- bution of the paper involves human subjects, then much detail possible should be included the main paper.
According to the NeurIPS Code of Ethics, workers involved in data collection, cura- tion, or other labor should be paid at least the minimum wage in the country of the data collector.
15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification: The paper does not involve crowdsourcing nor research with human subjects.
Guidelines:
The answer NA means that the paper does not involve crowdsourcing nor research with human subjects.
Depending the country in which research is conducted, IRB approval (or equiva- lent) may be required for any human subjects research. If you obtained IRB approval, you should clearly state this the paper.
We recognize that the procedures this may vary significantly between institutions and locations, and expect authors to adhere to the NeurlPS Code of Ethics and the guidelines for their institution.
For initial submissions, do not include any information that would break anonymity (if applicable), such as the institution conducting the review.
24


Reviews:
[{"review_id": "A6j1hJot6C", "reviewer": "Reviewer_mZD2", "summary": "This is a theoretical paper on iterative process differentiation. The paper analyzes the behavior of the derivatives of the iterates of SGD (Stochastic Gradient Descent). Based on a set of assumptions, the paper establishes the convergence of the derivatives of SGD and conducts numerical experiments to validate its findings.", "questions": "The smoothness assumption in Assumption 1(b) requires that the gradient are jointly L-Lipschitz continuous in $x$ and $\\theta$ . Can this assumption be relaxed?", "limitations": "Not applicable.", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The highlights of the paper are: (1) revealing that the behavior of the derivatives of the iterates is driven by an inexact/perturbed SGD recursion; (2) illustrating their theory with numerical experiments on synthetic tasks.", "weaknesses": "I believe the main weaknesses of the paper are that the assumptions used to establish the theory are too strong; moreover, the practical significance of the theory is not clearly articulated, especially in relation to stochastic hyperparameter optimization.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**About the motivation in stochastic hyperparameter optimization and assumptions:** We made a common response to all reviewers regarding theses two points. We will modify the appropriate paragraphs to include explicit references to works which consider differentiating SGD sequences or propose it as a relevent research venue. We will also pay an extra attention to the reach and necessity of our assumptions.\n\n**Jointly Lipschitz Gradient:**\n> The smoothness assumption in Assumption 1(b) requires that the gradient are jointly L-Lipschitz continuous in $x$ and $\\theta$. Can this assumption be relaxed?\n\nJoint gradient Lipschicity is indeed a strong assumption, but its strength is mitigated as follows:\n- $\\Theta$ is an arbitrary open Euclidean subset, in particular, this could be a small ball around a given $\\bar{\\theta}$. In other words we do not require global Lipschicity with respect to $\\theta$, only local Lipschicity which is a consequence of the $C^2$ assumption and is expressed here in a quantitative form. Global gradient Lipschicity is only required for the $x$ variable which is typical for the analysis of gradient schemes.\n- We chose the same constant $L$ with respect to both $x$ and $\\theta$ for simplicity. We prefered simple assumptions and fewer notations. The Lipschicity with respect to $\\theta$ is only used in Lemma 2.1 which is in turn used to obtain estimates on the error in equation (4). These could be separated.\n\nAs requested by the reviewer, we will relax this assumption in the revision and separate $L_x$, the Lipschitz constant with respect to $x$ for fixed $\\theta$, and $L_\\theta$ with respect to $\\theta$. This will only incur minor modifications of the estimate of Lemma 2.1, the constant $L_x$ being the crucial one in the rest of the analysis. We will also add a precise remark regarding the fact that the constant $L_\\theta$ does not need to be a global Lipschitz constant in $\\theta$.\n\n\nWe believe that this is a nice improvement to our set of assumptions and would like to ask the reviewer to reconsider his evaluation in light of this discussion.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "PK4qWse8y4", "reviewer": "Reviewer_d938", "summary": "The paper considers stochastic optimizations where the objective depends on some parameter.  Instead of the SGD, the paper considers the derivatives of the iterates of the SGD with respect to that parameter in the context where the objective is strongly convex. \nConvergence analysis is obtained for the derivatives of the iterates of SGD, which can be viewed as an inexact SGD on a different objective, perturbed by the convergence of the original SGD.", "questions": "(1) In Theorem 2.2, I understand that constant step-size is a popular choice in the SGD literature. But can you comment on the choice $\\eta_{k}=\\frac{1}{\\mu}\\frac{2}{k+8\\kappa^{2}}$ for the sublinear rate regime, and moreover the interpolation regime, in which the assumption $\\sigma=0$ seems to be super strong to me, and can you provide some examples of interest that satisfy this particular assumption?\n\n(2) In the paragraph after equation (1), you wrote that the error term is of order... Please specify which term is the error term. \n\n(3) To improve the readability of the paper, I suggest you state somewhere in the main paper how you view the derivatives of SGD as an inexact SGD. For example, in the proof of Theorem 2.2., you defined $e_{k+1}$, and I think you can define $e_{k+1}$, as well as $\\nabla_{x}g(x_{k};\\xi_{k+1})$ when you explain how you view the derivatives of SGD as an inexact SGD before you state the main results to help the readers understand better.\n\n(4) Some of the journal names in the references should be capitalized. For example, for Robbins and Monro, \nit should be The Annals of Mathematical Statistics.", "limitations": "More discussions on limitations should be added.", "rating": 4, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "(1) Convergence guarantees are obtained for derivatives of SGD under certain assumptions.\n\n(2) Analysis seems to be rigorous and solid.", "weaknesses": "(1) Derivatives of SGD are much less studied than SGD. As a result, it would be helpful to add more discussions about Assumption 1, Assumption 2, what kind of examples of interest satisfy these two assumptions (especially the part that is unique to the setting that involves the parameter).\n\n(2) Numerical experiments are only synthetic. It would be nice if the paper can add an experiment on real data.\n\n(3) I do not see adequate discussions whether the assumptions for the theoretical part can be satisfied for the examples considered\nin the numerical section.\n\n(4) Inexact SGD has been well studied in the literature. Since the paper views derivatives of SGD as an inexact SGD, it is not clear\nwhat technical novelty and contributions arise from this context.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "### Weaknesses:\n\n\n**(1) Discussion of the assumptions:** The crucial assumption for our results is strong convexity. The rest of the assumptions are typically satisfied in applications such as hyper parameter tuning. We point out that both examples in the numerical section satisfy our assumtions and are implemented in the regime described by our main theorem. The rest of the assumptions are classical, as described for example in the two general optimization references presented in the response to all reviewers regarding our step size choice. We will add this discussion in a revised version of the paper.\n\n\n**(2) Real data:** We will add experiments using the same models as in the numerical section, with real data, in the appendix. We provide in the attached PDF on OpenReview a numerical experiment for the derivatives of SGD on a logistic regression problem on the dataset IJCNN1 (~50k samples). The iterates of SGD are differentiated with respect to the L2 regularization parameter of the logistic regression loss. The observed behavior is very to close to the one observed in the synthetic experiments (see Fig. 2 of the paper), validating our approach. Note that non-strongly convex behaviours is out-of-the-scope of this paper, since we provide the theory necessary to study the strongly convex case.\n\n**(3) Numerical section:** Both examples in the numerical section satisfy our assumtions and are implemented in the regime described by our main theorem. The numerical section will be reworked to state this explicitely.\n\n**(4) Literature on inexact SGD:** Indeed, the paper misses this element. We base our discussion on the recent publication:\n- *Demidovich, Malinovsky, Sokolov, Richtárik. A guide through the zoo of biased sgd. Neurips 2023*.\n\nWe provide a general mean squared error convergence analysis of inexact SGD which allows to handle random non stationary bias terms, whose magnitude depend on the iteration counter $k$. This is customary as our errors depend on the realization of the SGD iterate sequence, requiring a dedicated analysis not covered by existing literature on inexact SGD. We will add a paragraph about this discussion at the end of the introduction.\n\n### Questions:\n\n**(1) Step size and interpolation** Please see our common response to all reviewers regarding the choice of step size. The case $\\sigma = 0$ is often used in optimization and ML literature as an idealized model to capture overparametrization with very large networks. It is indeed a very strong condition (note though that the absence of noise is _only_ true at the optimum). Such an interpolation regime was studied in various works, including (but not limited to):\n- *Ma, Bassily, Belkin, (2018). The power of interpolation: Understanding the effectiveness of SGD in modern over-parametrized learning. ICML*. This paper studies linear convergence of SGD in the interpolation regime.\n- *Varre, A. V., Pillaud-Vivien, L., & Flammarion, N. (2021). Last iterate convergence of SGD for Least-Squares in the Interpolation regime. Neurips*. This paper studies interpolation at the population level for linear regression.\n- *Garrigos, G., & Gower, R. M. (2023). Handbook of convergence theorems for (stochastic) gradient methods. arXiv preprint*. The interpolation regime is mentioned in several places in this manuscript.\n\nAlthough this looks like an edge case, we included this interpolation regime in the paper because we believe that it is of interest to the ML/OPT community and also because the theory sometimes predicts an surprising behavior: linear convergence of iterates, but not of derivatives, which we thought was interesting.\n\n\n**(2)** Indeed, thanks for catching this, we will make it explicit in the revision.\n\n**(3)** Indeed we will describe the error and notations right after equation (1).\n\n**(4)** Thanks for catching this, we will correct this.\n\n\nWe believe that we brought relevant responses to the legitimate questions of the reviewer and we would like to ask the reviewer to reconsider his evaluation in light of the elements given above.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "avTuOTk0Kz", "reviewer": "Reviewer_bPEV", "summary": "The authors consider parametric stochastic optimization problems of the form $\\min_x F(\\theta,x)$ where $F(\\theta,x)= \\mathbb E_\\xi [ f(x, \\theta, \\xi)]$ under the condition that $f$ is strongly convex in $x$ for any fixed $\\theta, \\xi$. This ensures that for fixed $\\theta$, there exists a unique minimizer $x^*(\\theta)$. The authors construct a sequence $x_k$ by gradient descent for $F(\\theta, \\cdot)$ and demonstrate that an associated sequence, denoted by $\\partial_\\theta x_k$, converges to the parameter derivative $\\partial_\\theta x^*(\\theta)$ of the solution map $x^*(\\theta)$. They explore various regimes of stochasticity and various learning rate schedules, obtaining rates in different settings. Strong continuity assumptions are placed on $f, \\nabla f, D^2f$.", "questions": "* Is there a conflict between the statement in line 131 that \"[...] the initialization of the algorithm $x_0(\\theta)$ depend[s] on some parameter $\\theta$\" and the assumption that $\\partial_\\theta x_0(\\theta) =0$ in Theorem 2.2?\n\n* In Lemma 2.1, the restriction that $\\eta_k \\leq \\mu/L^2$ is generally much more severe than the usual bound $\\eta_k \\leq 1/L$. Perhaps by considering the quadratic case, could the authors speculate whether it is necessary to ensure the convergence of derivatives or whether it could be relaxed?\n\n* In Remark 2.3, if we use a lower estimate for $\\mu$, this also changes the estimate for $\\kappa$: The constants $c, u$ are not independent. In fact, $\\eta_0 = 1/(4\\mu \\kappa^2) = \\mu/(4L^2)$ satisfies the necessary condition above. If we increased $c$ without adjusting $u$, we may easily enter a regime where $\\eta_0> \\mu/L^2$. A more careful consideration appears to be needed.", "limitations": "Yes", "rating": 7, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The article is generally well-written and explains its results intuitively. The statements of results are precise, yet clear.", "weaknesses": "* I find the title almost misleading. The authors do not consider derivatives (modifications) of the algorithm, but they consider the derivatives of iterates with respect to an additional parameter. I would propose something along the lines of \"Derivatives in parametric optimization and their behavior along SGD iteration\".\n\n* I do not follow the numerical illustration in Section 4 at all. The independent parameter $\\theta$ becomes a random quantity in this section, and it is unclear what stochastic gradient estimates the authors use: Only the deterministic objective function $F$ is specified (line 291), and $\\xi$ is never mentioned in this section. I am not sure why the authors draw $\\theta$ from a random distribution. I believe that the experiments either do not match the setting considered above or the presentation needs to be clarified considerably.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**Title:** We propose to add ''in parametric optimization'' at the end of the title if you believe it better illustrates our results. An alternative would be to name it \"Derivatives through Stochastic Gradient Descent\".\n\n**Numerical section:** Thanks for pointing out this possible confusion, we will provide a more precise description of the generation of synthetic problem and explicit the stochastic setting as follows:\n- The randomness of $\\theta$ corresponds to the choice of a specific $\\theta$ and is secondary in the experiment. The dependency in $\\theta$ of the objective through $b(\\theta)$ is the most important one and we will put emphasis on this rather than the choice of a fixed $\\theta$. In its current state, the presentation is indeed misleading\n- The least squares objective has the structure of a finite sum and the randomness in SGD is the classical with replacement sampling, which fits our assumptions. The same comment holds for the second example. We will make this precise in the revision.\n\n**Dependency on initial parameters** This remark was also made by reviewer **cZZE**. Indeed, we assume no dependency of the initialization on parameters $\\theta$. This choice was only  made for simplicity to avoid the term $\\|\\partial_\\theta x_0(\\theta)\\|$ in the right hand side of the estimate in Lemma 2.1. This will be corrected in the revision, we will remove this assumption and explicit all the terms, including a dependency in the derivative of the initialization. This represents a very minor modification but should clarify the concern of the reviewer.\n\n**Step size condition:** We made a common response to all reviewers regarding this restriction. We do not believe that our analysis is optimal, but conjecture that the dependency on $\\mu$ is required. This is mostly related to the need to consider the specific strongly convex regime for which it is classical to require strong conditions on the step size.\n\n**Remark 2.3:** The reviewer is right, this is presented in an incorrect way. The remark will be modified as follows:\n\nThe specific stepsize used to obtain the sublinear rate actually applies to any stepsize of the form $\\eta_k = 2/(c k+8u)$ for given $c,u>0$ such that $0<c\\leq \\mu$ and $u \\geq L^2/c$. One obtains the same result with $\\mu, L$ respectively replaced in the expressions by $\\mu' :=  c \\leq \\mu$ and $L' := \\sqrt{ u c} \\geq  L$.\n\nWe would like to kindly ask the reviewer to take into account these responses and possibly reconsider his evaluation of our work.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "PmasirNARb", "reviewer": "Reviewer_cZZE", "summary": "The paper studies stochastic optimization problems where the objective depends on a parameter, and more specifically the derivatives w.r.t. that parameter of the SGD iterates. The paper makes various quite strong albeit common assumptions, and for various more specific settings concrete convergence rates are established. The proof relies on analysis via an inexact SGD sequence. Finally, the results are illustrated by some experiments.", "questions": "1. Can you elaborate on the motivation?\n2. Why do you need that the gradient for the first iterates vanish (l. 194)? That appears to be an odd and strong assumption.\n3. How restrictive are the assumptions? (I understand that they are mostly common in the literature.)", "limitations": "Assumptions are discussed.", "rating": 6, "confidence": 1, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "The paper is well-written and the technical flow of ideas is convincing. Especially the connection to inexact SGD seems quite novel.", "weaknesses": "My main concern is of a motivational nature: why is the question set out inn ll. 35-36 interesting? I do not find ll. 37 sufficiently convincing. (I may not have understood that paragraph fully.)", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "**Motivation:** We made a common response to all reviewers regarding the motivation. We will modify this section to include explicit references to works which consider differentiating SGD sequences or propose it as a relevent research venue.\n\n**Vanishing derivative at initialization:** this remark was also made by reviwer **bPEV**, we will remove this assumption. This choice was only  made for simplicity to avoid  the term $\\|\\partial_\\theta x_0(\\theta)\\|$ in the right hand side of the estimate in Lemma 2.1. This will be corrected in the revision, we will remove this assumption and explicit all the terms, including a dependency in the derivative of the initialization. This represents a very minor modification.\n\n**Discussion of the assumptions:** The crucial assumption for our results is strong convexity. The rest of the assumptions are typically satisfied in applications such as hyper parameter tuning. We point out that both examples in the numerical section satisfy our assumtions and are implemented in the regime described by our main theorem. Our assumptions are classical, as described for example in the two general optimization references presented in the response to all reviewers regarding our step size choice. We will add this discussion in a revised version of the paper.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:
Dear AC, dear reviewers,

We are sincerely grateful for your time and input. We reply to each of your questions and comments in a separate point-by-point thread below. We will of course integrate all applicable points in the next revision opportunity. We start with two general comments regarding motivations and step size constraints, which raised questions from several reviewers. We hope that the points developed below provide satisfactory answers to your concerns.

Kind regards,
The authors



## Motivation (common to several reviewers)

Several raised concerns about the motivation for our work. We would like to point four relevant bibliographic references which explicitely mention the idea of differentiation through SGD, among existing literature on the topic.
- *Maclaurin, Duvenaud, Adams (2015). Gradient-based hyperparameter optimization through reversible learning. ICML.* This paper is dedicated to an efficient implementation of reverse automatic differentiation for SGD to evaluate its derivatives. Our theory is about Jacobians, it applies to both forward and reverse mode automatic differentiation.
- *Pedregosa (2016). Hyperparameter optimization with approximate gradient. ICML.* This is an important paper in hyper parameter tuning which explicitely calls for the development of differentiation techniques for stochastic optimization algorithms and motivated many subsequent works in iterative differentiation.
- *Finn, Abbeel, Levine (2017). Model-agnostic meta-learning for fast adaptation of deep networks. ICML.* This is a landmark paper on meta learning which suggests to use differentiation through stochastic first order solvers.
- *Ji, Yang, Liang (2022). Theoretical convergence of multi-step model-agnostic meta-learning. JMLR.* Differentiation through SGD is explicitely described and studied in this reference motivated by meta learning applications.

Since the convergence of the derivatives of SGD is *not considered in the literature*, we believe that the elements above constitute sufficiently important motivation to study it more precisely. We will revise the introduction to let these elements appear more clearly. We kindly ask the reviewers to take these elements into consideration in their evaluation.


## Step size constraints and strong convexity (common to several reviewers)

Several reviewers expressed concerns regarding the fact that we do not have the usual $1/L$ step size limitation, but rather the smaller $\mu/L^2$. We emphasize that our study takes place in the strongly convex setting, and our rate is of the form $O(1/k)$ which is a fast rate for SGD and relies on *strong convexity*. Let us emphasize that obtaining such rates classically requires stronger step size conditions, see for example the following general references on stochastic optimization:
- Theorem 4.6 in *Bottou, Curtis, Nocedal (2018). Optimization methods for large-scale machine learning. SIAM review*. This features a constraint very similar to ours.
- Corollary 5.8 and Theorem 5.9 in *Garrigos, Gower (2023). Handbook of convergence theorems for (stochastic) gradient methods. arXiv preprint*. In particular Theorem 5.9 features a constraint very similar to ours.
- Moulines, Bach (2011). *Non-asymptotic analysis of stochastic approximation algorithms for machine learning. Neurips*. The discussion after Theorem 1 suggests that small step sizes are required to obtain meaningful non asymptotic bounds for SGD, as we obtain in our work.

We conjecture that the convergence of derivatives of SGD beyond the strongly convex setting is a very challenging issue. *This is not settled even for deterministic algorithms.* Our step size choice is certainly not optimal, especially in the interpolation regime, but we believe that the dependency on $\mu$ is required to obtain convergence of derivatives of SGD. This is due to the necessity to operate in the favorable strongly convex regime and the fact that this requires a possibly worse step size than the deterministic smooth case. This is aligned with the litterature on the convergence of SGD for strongly convex objectives and we will comment on these restriction and potential improvements in the revision.

## Additional experiment

One reviewer was uncomfortable with the fact that we only illustrated our findings on synthetic experiments. You will find attached on OpenRevew an additional experiment on regularised logistic regression on the ijcnn1 dataset, with the same conclusion as for the synthetic case.

Meta-review: The paper looks at the behavior of the derivative of the iterates of SGD in the strongly convex setting. It has applications to bi-level optimization (through implicit differentiation). I suggest that the authors take into consideration the concerns about adding real data experiments and adding some discussions on the literature of inexact SGD and why their techniques are novel.
Decision: Accept (poster)