NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Derivatives of Stochastic Gradient Descent in parametric optimization

Franck Iutzeler, Edouard Pauwels, Samuel Vaiter

In fields like hyperparameter optimization (HPO) and meta-learning, practitioners often need to understand how the optimal solution of a model, $x^*( heta)$, changes when a parameter $ heta$ (such as a regularization weight) is adjusted. This is known as the solution derivative. Because closed-form expressions for $x^*( heta)$ are rarely available, iterative algorithms like Stochastic Gradient Descent (SGD) are used to approximate it.

A common technique is "piggyback differentiation," where the steps of the optimization algorithm itself are differentiated to estimate the solution derivative. While the mechanics of this approach are well-understood for deterministic algorithms, the stochastic case has remained a theoretical black box. Does the noise from sampling data batches prevent the derivative from converging? If it does converge, how fast? This paper provides a rigorous theoretical foundation for differentiating through the path of SGD, proving that the derivatives of SGD iterates converge to the true derivative of the optimal solution.

Methodology: The Derivative as Inexact SGD

The authors analyze the dynamics of the Jacobian (the matrix of derivatives) of the SGD iterates. Their core methodological breakthrough is demonstrating that the derivative of an SGD sequence is itself a stochastic gradient sequence.

Specifically, the recursion for the derivative $\partial_\theta x_k$ acts as an SGD step on a quadratic objective function. However, this recursion is "inexact" because it is perturbed by an error term—namely, the distance of the current SGD iterate from the true optimum. By analyzing the original SGD iterates and the derivative sequence simultaneously, the authors prove that as the iterates approach the optimum, the error in the derivative recursion shrinks. This allows them to leverage existing stochastic approximation theory to solve a complex problem in automatic differentiation.

Convergence Regimes and Key Results

A major takeaway from the paper is that the derivatives of SGD are qualitatively similar to the iterates themselves. If the SGD iterates are converging stably, the derivatives generally follow suit. The authors provide specific proofs for three common optimization scenarios:

Summary of convergence rates for SGD derivatives
  • Constant Step-Size (Noise Ball Bounds): With a constant step-size $\eta$, the derivative eventually stabilizes and bounces around within a "noise ball" near the true solution derivative. The distance is proportional to $\sqrt{\eta}$.
  • Vanishing Step-Size (The Log-Factor Penalty): For step-sizes that decay over time (e.g., $1/k$), the derivative converges at a sublinear rate of $O(\log(k)^2/k)$. This is slightly slower than the standard $O(1/k)$ rate of SGD, representing the "price" paid for the accumulated errors in the derivative path.
  • Interpolation Regime (Exponential Convergence): In the "double interpolation" regime—common in overparameterized deep learning where the model can perfectly fit the data and noise $\sigma^2 = 0$—the derivatives converge exponentially fast, matching the behavior of deterministic gradient descent.

Empirical Validation

The theoretical findings are validated primarily through synthetic tasks, including Ordinary Least Squares (OLS), Ridge regression, Logistic regression, Huber regression, and Support Vector Machines (SVM) using the Hinge loss. Additionally, the authors tested regularized logistic regression on a real-world benchmark, the ijcnn1 dataset (approx. 50,000 observations, 22 features). Notably, experiments showed that even for non-smooth functions like the Hinge loss, the derivatives behaved according to the theory, despite the formal proofs requiring $C^2$ smoothness.

Limitations and Future Work

While this paper establishes the first comprehensive convergence rates for the derivatives of SGD iterates in parametric optimization, several open challenges remain:

  • Strong Convexity: The current proofs rely heavily on the objective function being strongly convex. Extending these results to non-convex or weakly convex settings—typical in deep neural network training—is a crucial next step.
  • Smoothness Requirements: The formal theory assumes the function has a Lipschitz Hessian ($C^2$ smoothness). Expanding the theory to cover non-smooth functions remains an open problem.
  • Advanced Optimizers: This study focuses on standard SGD. Future research could explore how these derivatives behave under momentum-based optimizers like Adam or RMSProp, which are ubiquitous in modern machine learning.

Summary updated

BibTeX
@inproceedings{iutzeler2024derivatives,
  author = {Franck Iutzeler and Edouard Pauwels and Samuel Vaiter},
  title = {{Derivatives of Stochastic Gradient Descent in parametric optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=7WoOphIZ8u},
}
Figure