Accelerating Optimization via Differentiable Stopping Time

Zhonglin Xie, Yiman Fong, Haoran Yuan, Zaiwen Wen

Introduction

In the field of "Learning to Optimize" (L2O) and hyperparameter tuning, the standard objective is typically to minimize a loss function within a fixed computational budget—for example, finding the best parameters to achieve the lowest loss in exactly 100 iterations. This formulation is popular because loss functions are generally smooth and differentiable, allowing for straightforward gradient-based optimization.

However, practitioners often face the dual problem: "How many iterations are required to reach a specific target accuracy?" This "stopping time" is a critical metric for real-world efficiency, yet it is notoriously difficult to optimize directly. Because the number of steps is an integer, it behaves as a step function; small changes in hyperparameters like the learning rate might not change the step count at all, or they might cause it to jump abruptly. This non-smooth behavior prevents the use of traditional gradient-based methods, forcing researchers to rely on fixed-budget proxies or slower, derivative-free optimization techniques. This paper introduces a framework to make stopping time differentiable, enabling direct gradient-based acceleration of convergence.

Methodology

The authors propose a framework to calculate the sensitivity of discrete stopping time with respect to algorithm parameters. Their approach is built upon three theoretical pillars:

1. The ODE Bridge

The framework views iterative algorithms, such as Gradient Descent, as discrete "snapshots" of a continuous-time Ordinary Differential Equation (ODE). By treating the optimization path as a continuous flow, the researchers can apply tools from calculus that are unavailable in a purely discrete setting.

2. Differentiable Approximation via Sensitivity Analysis

To handle the non-differentiability of discrete steps, the authors apply the Implicit Function Theorem (IFT) to the continuous-time version of the stopping criterion. This allows them to derive a symbolic formula for the gradient of the stopping time. They demonstrate that a specific symbolic sensitivity formula for discrete steps serves as a highly accurate approximation of this continuous gradient, effectively smoothing the "jumpy" nature of the stopping time.

3. The Discrete Adjoint Method

To ensure the method is practical for high-dimensional deep learning tasks, the authors developed a memory-efficient Discrete Adjoint Method. Traditional backpropagation through thousands of iterations would lead to a "memory explosion" as the entire computation graph must be stored. By using an adjoint (co-state) vector approach, the authors reduce the memory overhead to $O(d)$, where $d$ is the number of parameters, making it feasible for large-scale models.

Experimental Evaluation

The authors validated their approach across several optimization benchmarks, ranging from synthetic tests to real-world datasets:

  • High-Dimensional Quadratics: Used synthetic problems (up to 10,000 dimensions) to confirm that their discrete gradient approximations matched the theoretical "ground truth" continuous gradients.
  • Logistic Regression: Employed synthetic data to train L2O models, focusing on minimizing the time to convergence.
  • Smooth Support Vector Machines (SVM): Utilized real-world datasets from the LIBSVM library (including a1a, a2a, a3a, and w3a) to test the performance of online learning rate adaptation.

Key Insights and Results

Duality and Acceleration

The paper provides a mathematical justification for why minimizing a "weighted sum of losses" (the standard L2O approach) is essentially a greedy approximation of minimizing stopping time. By incorporating an explicit stopping-time penalty into the objective function, the authors provide a much stronger signal for the optimizer to accelerate, rather than just lowering the final loss.

Generalization and Efficiency

A significant finding was that optimizers trained to minimize stopping time on small-scale problems generalized significantly better to larger-scale problems than those trained on fixed-step losses. Furthermore, the discrete approximation method proved to be faster and more stable for high-dimensional machine learning parameters than using exact black-box ODE solvers.

Performance Gains

In logistic regression tasks, L2O models trained with differentiable stopping time reached target accuracies hundreds of steps faster than standard L2O baselines. Additionally, the authors introduced Adam-OLA (Adam with Online Learning Rate Adaptation). In SVM experiments, Adam-OLA consistently outperformed sophisticated baselines like Adam-HD and Adagrad, particularly in the final stages of convergence where high precision is most difficult to achieve.

Limitations and Future Directions

While the framework represents a significant step forward, it currently relies on Forward Euler discretization. If the time step ($h$) is too large, the approximation can become coarse, potentially reducing its effectiveness. The authors suggest that future research could explore higher-order discretization schemes, such as symplectic integrators, which are better suited for preserving the long-term mathematical properties of optimization systems. Additionally, while the method automates learning rate adaptation, certain "meta-parameters"—such as the weight balancing the loss and the stopping time—still require manual tuning, presenting an opportunity for further automation.

Summary updated

BibTeX
@inproceedings{xie2025accelerating,
  author = {Zhonglin Xie and Yiman Fong and Haoran Yuan and Zaiwen Wen},
  title = {{Accelerating Optimization via Differentiable Stopping Time}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=L51U5RSFBo},
}
Figure