Second Order Optimization via Hessian Vector Products

This direction is merged into another direction: diagonal Hessian approximation. Its last version stays readable and citable here.

Version 1 of 130 papers30 conceptsfrozen 2026-10-04

In the landscape of modern machine learning, first-order methods like Stochastic Gradient Descent (SGD) and Adam are the workhorses of optimization. They are computationally cheap, requiring only the gradient of the loss function. However, they are "blind" to the curvature of the loss landscape, often leading to slow convergence in narrow valleys or instability in highly non-convex regions.

Second-order methods, which utilize the Hessian matrix (the matrix of second derivatives), offer a solution by accounting for this curvature. Traditionally, these methods were considered impractical for deep learning because the Hessian for a model with $d$ parameters contains $d^2$ elements, making it impossible to store or invert for modern architectures.

A growing body of research has bypassed this bottleneck by focusing not on the Hessian itself, but on the Hessian-Vector Product (HVP). This approach allows models to capture second-order intelligence with the computational footprint of first-order methods.

The Core Intuition: Curvature without the Matrix

The fundamental insight shared across these papers is that we rarely need the full Hessian matrix $H$. In optimization updates, we typically only need to know how the Hessian transforms a specific vector $v$ (often the gradient).

As Nicol N. Schraudolph demonstrated in early work on Stochastic Meta-Descent (SMD), the product $Hv$ can be computed in linear time $O(d)$ using algorithmic differentiation. This allows for "Hessian-free" optimization, where curvature information is integrated into the update rule without ever explicitly constructing the $d \times d$ matrix.

Approximating Curvature via Gradient Differences

While algorithmic differentiation is one path, a more recent and widely adopted mechanism is the finite difference approximation. If we evaluate the gradient at two points very close to each other, the difference between those gradients tells us how the slope is changing—which is exactly what the Hessian represents.

Mathematically, the HVP can be approximated as: $$Hv \approx \frac{\nabla f(x + \epsilon v) - \nabla f(x)}{\epsilon}$$

This "trick" appears repeatedly as a stabilizer in diverse domains:

  • Finding Local Minima: Yuanzhi Li and Zeyuan Allen-Zhu use this in Neon2 to help first-order oracles escape saddle points and find actual local minima.
  • Neural Architecture Search: In DARTS, Kaifeng Bi and colleagues use finite differences to estimate second-order derivatives, preventing the search process from collapsing into trivial solutions like skip-connections.
  • Privacy and Noise Reduction: The DiSK optimizer by Xinwei Zhang uses proximal point gradient evaluations to incorporate curvature into differentially private training, reducing the impact of added noise.

Efficiency in High-Dimensional Spaces

The primary reason this direction works is its linear scaling. By treating the Hessian as an operator rather than a data structure, researchers can apply second-order logic to massive models.

In Hessian-Free Online Certified Unlearning, Xinbao Qiao shows that tracking the impact of individual data points via HVPs allows for near-instantaneous data removal. Instead of retraining, the model uses curvature information to "undo" the influence of a specific point, a task that would be computationally impossible if a full Hessian inversion were required.

Similarly, the Neumann Optimizer by Shankar Krishnan uses a power series expansion to implicitly compute the inverse Hessian. This allows the optimizer to handle massive batch sizes (up to 32,000) while maintaining the per-step cost of a standard first-order method like Adam.

Beyond Optimization: Robustness and Sampling

The utility of HVPs extends beyond just reaching the bottom of a loss curve faster. It is also used to understand the "flatness" or "sharpness" of the landscape:

  • Adversarial Attacks: Zhijin Ge introduces Penalizing Gradient Norm (PGN), which uses finite-difference HVPs to guide adversarial examples toward "flat" maxima, making the attacks more transferable across different model architectures.
  • Generative Models: In diffusion models, Shayan Mohajer Hamidi uses finite differences between time steps to approximate the Hessian of the log-density, enabling more accurate posterior sampling for inverse problems like image deblurring.

Summary of the Mechanism

The shift toward HVP-based methods represents a middle ground in optimization theory. By using the difference between gradients at slightly perturbed locations, researchers like Zebang Shen in Hessian Aided Policy Gradient have proven that we can reduce the sample complexity of reinforcement learning significantly. The core takeaway is clear: we do not need the Hessian matrix to benefit from the Hessian's information. We only need to observe how the gradient changes as we move.

Papers in this version

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_second_order_optimization_via_hessian_ve_605d18a5,
  title = {Second Order Optimization via Hessian Vector Products},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/second-order-optimization-via-hessian-vector-products/rdr_605d18a578844b5898cdc9299493bdee},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-05},
}

This exact version (version 1, frozen text):

@misc{lacuna_second_order_optimization_via_hessian_ve_605d18a5_v1,
  title = {Second Order Optimization via Hessian Vector Products},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/second-order-optimization-via-hessian-vector-products/rdr_605d18a578844b5898cdc9299493bdee/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-05},
}