Abstract
Computing the Jacobian of the solution of an optimization problem is a central problem in machine learning, with applications in hyperparameter optimization, meta-learning, optimization as a layer, and dataset distillation, to name a few. Unrolled differentiation is a popular heuristic that approximates the solution using an iterative solver and differentiates it through the computational path. This work provides a non-asymptotic convergence-rate analysis of this approach on quadratic objectives for gradient descent and the Chebyshev method. We show that to ensure convergence of the Jacobian, we can either 1) choose a large learning rate leading to a fast asymptotic convergence but accept that the algorithm may have an arbitrarily long burn-in phase or 2) choose a smaller learning rate leading to an immediate but slower convergence. We refer to this phenomenon as the curse of unrolling. Finally, we discuss open problems relative to this approach, such as deriving a practical update rule for the optimal unrolling strategy and making novel connections with the field of Sobolev orthogonal polynomials.
Introduction
In modern machine learning, differentiating through an optimization process is a critical task. Applications ranging from hyperparameter optimization to "optimization as a layer" require knowing how a final solution $\mathbf{x}^*$ changes with respect to input parameters $\theta$. The most common technique for this is unrolled differentiation: an iterative solver is run for $T$ steps, and the Jacobian is computed by backpropagating through the entire computational path.
While unrolling is widely used due to its ease of implementation in auto-diff frameworks, its convergence properties have remained poorly understood. A key question persists: does an optimizer that converges faster to the minimum also provide a faster-converging Jacobian? Research from Samsung, Mila, and Google Research reveals a surprising "curse" where aggressive optimization settings can severely degrade initial derivative accuracy.
The Curse of Unrolling
The core finding of this work is a fundamental trade-off in unrolled differentiation. For quadratic objectives, the error in the Jacobian depends not just on the optimization residual polynomial, but also on its derivative.
When using Gradient Descent (GD), choosing a large step size (close to $2/(L+\ell)$) yields the fastest asymptotic convergence for the iterates. However, this same setting triggers a "burn-in" phase for the Jacobian, where the error initially increases—sometimes by orders of magnitude—before eventually decaying. Conversely, a smaller step size (e.g., $1/L$) avoids this spike but results in a slower overall convergence rate.
This phenomenon, termed the Curse of Unrolling, implies that the "best" optimizer for finding a minimum is often not the best for finding a derivative, especially when the number of iterations is limited.
Burn-in Dynamics and Methodological Comparison
The researchers identified two distinct phases in Jacobian convergence:
- Burn-in Phase: A period where the Jacobian error can grow linearly, $O(t)$, before the exponential decay begins. For GD with optimal step sizes, this phase lasts approximately $1/\kappa$ iterations, where $\kappa$ is the condition number.
- Linear Convergence Phase: The eventual asymptotic regime where the error decays exponentially.
This behavior is even more pronounced in accelerated methods. The Chebyshev method, which is optimal for quadratic minimization, exhibits a much more "violent" burn-in phase compared to standard Gradient Descent.
Sobolev Accelerated Unrolling
To address this curse, the authors propose a novel algorithm based on Sobolev orthogonal polynomials. Standard optimization polynomials are designed to be small over the spectrum of the Hessian. Sobolev polynomials, however, are designed to be small and have small derivatives simultaneously.
By using these polynomials to define the optimization steps, the resulting "Sobolev Accelerated Unrolling" method matches the fast asymptotic rates of accelerated methods while effectively damping the initial error spike. Empirical tests on real-world datasets and non-quadratic objectives like Logistic Regression confirm that this approach provides more stable and faster Jacobian convergence than traditional GD or Chebyshev methods.
Conclusion and Future Directions
The "Curse of Unrolling" highlights a critical gap between optimization for value and optimization for derivatives. While the current theoretical framework is focused on quadratic objectives, empirical evidence suggests these dynamics are universal across many machine learning tasks. Future work aims to develop adaptive update rules that can navigate this trade-off without requiring prior knowledge of the Hessian's spectrum, potentially leading to a new class of "differentiation-aware" optimizers.
Summary updated