Second-Order Optimization with Lazy Hessians

Nikita Doikov, El Mahdi Chayti, Martin Jaggi

In the landscape of mathematical optimization, practitioners often face a classic trade-off between first-order and second-order methods. First-order methods, like Gradient Descent, are computationally cheap per iteration but can struggle significantly with "ill-conditioned" problems—landscapes that are flat in some directions and steep in others. Second-order methods, such as Newton’s Method, use the Hessian (the matrix of second derivatives) to navigate these tricky landscapes efficiently. However, the Hessian is notoriously expensive to compute and invert for large-scale problems. Typically, computing a Hessian costs about $d$ times more than a gradient (where $d$ is the dimension), and inverting it costs $\mathcal{O}(d^3)$.

This paper tackles a profound question: Can we achieve the rapid convergence benefits of second-order information without paying the exorbitant cost of a fresh Hessian at every single step? The authors introduce "Lazy Hessians," a technique where the expensive Hessian matrix is computed once and reused for several iterations, yielding a provable $\sqrt{d}$ speedup in total computational complexity.

The "Lazy Hessian" Approach

The core proposal is Cubic Newton with Lazy Hessians. The algorithm modifies traditional second-order updates through a few key mechanisms:

  1. The "Lazy" Update: Instead of recomputing the Hessian $\nabla^2 f(x)$ at every step $k$, the algorithm takes a "snapshot" of the Hessian from a previous point and reuses it for $m$ iterations.
  2. Fresh Gradients: While the Hessian remains stale, the gradient $\nabla f(x)$ is updated at every single step to ensure the optimization direction remains sufficiently accurate.
Visual representation of the Lazy Hessian update schedule.
  1. Cubic Regularization: To make this approach work globally (not just near the optimal solution), the authors use a cubic term to "damp" the steps. Because the Hessian is stale, they prove that the algorithm must regularize more strongly. Specifically, the regularization parameter must be proportional to $m \cdot L$, where $L$ is the Lipschitz constant of the Hessian.
  2. Adaptive Search: To make the method practical, the authors also provide an adaptive version that automatically tunes the regularization parameter without needing prior knowledge of the Lipschitz constant $L$.

Key Insights and Theoretical Breakthroughs

The most significant theoretical finding of the paper is the $\sqrt{d}$ speedup. The authors demonstrate that the optimal frequency for updating the Hessian is once every $m = d$ iterations. By doing this, the total arithmetic complexity improves by a factor of $\sqrt{d}$ compared to standard Cubic Newton methods.

Reusing an old Hessian naturally introduces error. The theoretical "aha moment" of the paper is proving that this "stale info error" can be perfectly canceled out by increasing the cubic regularization. Essentially, the algorithm trades a slightly shorter step length for a massive reduction in computation time.

Comparison of optimization methods showing global complexity, convergence properties, and Hessian computation frequency.

Despite relying on "old" second-order information, the method still achieves local superlinear convergence. Once the algorithm gets close to the optimum, it closes the remaining gap extremely quickly—far faster than standard Gradient Descent. The authors proved a global complexity of $\mathcal{O}(\sqrt{m}\epsilon^{-3/2})$ gradient computations to reach an $\epsilon$-stationary point.

Empirical Validation

The authors evaluated their methods on standard optimization benchmarks, including the a9a binary classification dataset (for both convex and non-convex Logistic Regression) and synthetic datasets testing the "Soft Maximum" (log-sum-exp) objective and a non-convex Diagonal Neural Network model.

In wall-clock performance, the Lazy Hessian approach (specifically when $m=d$) significantly outperformed both the standard Gradient Method and the full Cubic Newton method. Furthermore, the adaptive version of the algorithm proved highly practical, requiring only about two trial steps on average to find the correct regularization parameter for each phase.

Limitations and Future Work

While the theoretical and empirical results are strong, the paper notes a few limitations and avenues for future research:

  • Cost Assumptions: The $\sqrt{d}$ speedup assumes that computing or factorizing a Hessian is exactly $d$ times more expensive than a gradient. In practice, this ratio can vary based on hardware (e.g., GPUs) and specific automatic differentiation implementations.
  • Structure-Agnostic: The current work treats the Hessian as a dense, general matrix. Future work could explore "structured" Hessians (like sparse or low-rank matrices) to discover even more efficient schedules for lazy updates.
  • Quasi-Newton Connections: There is a natural link to Quasi-Newton methods (like BFGS), which perform rank-1 updates to the Hessian. Combining "laziness" with these incremental updates could yield a powerful hybrid approach.

Summary updated

BibTeX
@inproceedings{doikov2023second,
  author = {Nikita Doikov and El Mahdi Chayti and Martin Jaggi},
  title = {{Second-Order Optimization with Lazy Hessians}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=Hk2fFm7W8c},
}
Figure