Abstract
This paper establishes a rigorous theoretical foundation for "piggyback differentiation"—the process of differentiating through the iterations of Stochastic Gradient Descent (SGD). Under the assumption of strong convexity, the authors prove that the derivatives of SGD iterates converge to the true derivative of the solution. The study provides specific convergence rates across various regimes, including constant, vanishing, and interpolation step-sizes, bridging the gap between practical automatic differentiation and theoretical guarantees in stochastic optimization.
Introduction
In modern machine learning, understanding how an optimization solution changes with respect to its parameters is crucial for tasks like hyperparameter optimization and meta-learning. While practitioners frequently use automatic differentiation (AD) to "differentiate through" iterative algorithms like SGD, theoretical guarantees for this approach were previously limited to deterministic settings.
The stochastic nature of SGD presents a unique challenge: gradient noise affects not only the path of the iterates but also the path of their derivatives. This paper addresses a fundamental question: Do these noisy derivatives converge to the correct sensitivity of the optimal solution, and if so, how fast?
Methodology: The SGD' Framework
The authors interpret the recursion of derivatives, termed SGD', as a form of inexact SGD. By applying the chain rule to the standard SGD update, the Jacobian of the iterates follows its own stochastic process.
The core insight is that this derivative process can be decomposed into a "clean" SGD update on a quadratic objective (related to the second-order derivatives of the original problem) and an error term driven by the suboptimality of the original SGD iterates. Because the accuracy of the derivative is intrinsically linked to the accuracy of the iterate, the authors perform a joint convergence analysis. They provide a general template for analyzing inexact SGD where the error term is non-zero-mean and non-stationary.
Theoretical Convergence Results
The paper provides a comprehensive analysis of convergence rates across different optimization regimes. The results are summarized in the following table:
Key Regimes and Insights
- The "Piggyback" Dynamics: The derivatives are driven by a perturbed version of the original optimization, where noise in the derivative is coupled with noise in the iterate.
- Constant Step-size ($\eta$): Derivatives do not converge to a single point but eventually fluctuate within a "noise ball" around the true derivative, with a radius proportional to $\sqrt{\eta}$.
- Vanishing Step-sizes: For schedules like $1/k$, derivatives converge at a rate of $O(\log(k)^2/k)$. This is slightly slower than the standard $O(1/k)$ iterate rate, reflecting the "cost" of error propagation from the iterate sequence into the derivative sequence.
- Interpolation Regime: In overparameterized models that can perfectly fit the data, both iterates and derivatives converge exponentially fast ($O(k \rho^k)$), even with a constant step-size.
Empirical Validation
The theoretical findings were validated using both synthetic and real-world datasets. Synthetic tasks included Linear, Ridge, Logistic, Huber regression, and SVMs. Real-world validation was performed on the ijcnn1 dataset (50,000 observations, 22 features) for regularized logistic regression. Numerical results confirm that derivative errors closely track the theoretical predictions across various loss functions, demonstrating the practical relevance of the derived rates.
Conclusion and Future Work
This work provides the first rigorous analysis of differentiating through SGD iterates in the strongly convex setting. However, several avenues for future research remain:
- Relaxing Convexity: Extending these proofs to general convex or non-convex landscapes.
- Nonsmoothness: Handling nonsmooth objectives like Hinge loss through "conservative Jacobians."
- Advanced Optimizers: Analyzing the impact of momentum, adaptive step-sizes (e.g., Adam), and minibatches.
- Comparative Efficiency: Comparing iterative differentiation (ITD) against approximate implicit differentiation (AID) in stochastic environments.
Summary updated