Matrix-Free Second-Order Optimization for Large-Scale Models

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

Version 1 of 1102 papers109 conceptsfrozen 2026-10-04

In the landscape of deep learning, Stochastic Gradient Descent (SGD) is the ubiquitous workhorse. However, first-order methods like SGD are "blind" to the local curvature of the loss landscape, often struggling with ill-conditioned surfaces or getting slowed down near saddle points. Second-order methods, such as Newton’s method, use the Hessian matrix ($H$) to account for this curvature, allowing for much faster convergence in terms of iterations.

The fundamental problem is scale. For a model with $N$ parameters, the Hessian contains $N^2$ entries. Storing it for a modern LLM is physically impossible, and inverting it—a $O(N^3)$ operation—is computationally unthinkable. Matrix-free optimization (often called Hessian-Free optimization) sidesteps this by realizing we never actually need the matrix itself; we only need to know how the matrix acts on a vector.

The Core Intuition: Directional Derivatives

The goal of Newton-type methods is to solve the linear system $Hd = -g$ for the update direction $d$, where $g$ is the gradient. Instead of constructing $H$, we can use iterative linear solvers like Conjugate Gradient (CG). These solvers only require a function that computes the product of the Hessian and a test vector $v$ (the Hessian-vector product, or $Hv$).

As Naman Agarwal, Brian Bullins, and Tengyu Ma demonstrate in Finding Approximate Local Minima Faster than Gradient Descent, this product can be computed efficiently using the R-operator or automatic differentiation. By applying the chain rule to the directional derivative of the gradient, we can compute $Hv$ in roughly the same time as a standard gradient evaluation—$O(N)$ complexity. This allows us to incorporate second-order information while maintaining a memory footprint that scales linearly with the number of parameters.

Bridging Natural Gradient and Hessian-Free

The "Hessian-Free" (HF) framework is not just a standalone trick; it is deeply connected to other sophisticated optimization theories. Razvan Pascanu and Yoshua Bengio showed in Revisiting Natural Gradient for Deep Networks that HF optimization and Krylov Subspace Descent are essentially specific implementations of the Natural Gradient.

By using the Fisher Information Matrix (or the Gauss-Newton approximation) as the curvature proxy, researchers like Guillaume Desjardins have enabled the training of complex models like Boltzmann Machines without the "memory-crushing overhead" typically associated with second-order methods (Metric-Free Natural Gradient for Joint-Training of Boltzmann Machines).

Scaling to Modern Frontiers

The utility of matrix-free second-order methods spans from classical signal processing to the cutting edge of generative AI:

  • Large Language Models: Natalie Abreu and Sham M. Kakade recently explored the "upper bound" of LLM training speed, showing that matrix-free Gauss-Newton methods can reduce training iterations by over 5x compared to state-of-the-art first-order optimizers (The Potential of Second-Order Optimization for LLMs).
  • Reinforcement Learning: Algorithms like Hessian Aided Policy Gradient (HAPG) use $Hv$ products to reduce variance in policy updates, improving sample complexity from $O(1/\epsilon^4)$ to $O(1/\epsilon^3)$ (Zebang Shen et al.).
  • 3D Reconstruction: In Gaussian Splatting, Lukas Höllein and Matthias Nießner utilize matrix-free Levenberg-Marquardt solvers to accelerate scene optimization by 20% while maintaining high rendering quality (3DGS-LM).

The "Finisher" Effect and Generalization

While second-order methods converge faster in terms of iterations, they are often more expensive per step. Jinyu Li and Simon Wiesler observed that HF optimization acts as a powerful "finisher," pushing training accuracy higher than SGD can reach alone (Investigations on hessian-free optimization).

However, "perfect" optimization does not always mean perfect generalization. Alberto Bernacchia and Davide Buffelli found that while exact Gauss-Newton updates converge lightning-fast, they can sometimes fail to generalize as well as the "noisy" paths taken by SGD (Exact, Tractable Gauss-Newton Optimization in Deep Reversible Architectures Reveal Poor Generalization). This suggests that the future of optimization may lie in hybrid approaches that combine the stability of first-order methods with the precision of matrix-free second-order curvature.

Papers in this version

Showing 60 of 102 papers.

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_matrix_free_second_order_optimization_fo_23c78cf3,
  title = {Matrix-Free Second-Order Optimization for Large-Scale Models},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/matrix-free-second-order-optimization-for-large-scale-models/rdr_23c78cf3919c4e5c8c2ea3a325465b09},
  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_matrix_free_second_order_optimization_fo_23c78cf3_v1,
  title = {Matrix-Free Second-Order Optimization for Large-Scale Models},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/matrix-free-second-order-optimization-for-large-scale-models/rdr_23c78cf3919c4e5c8c2ea3a325465b09/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-05},
}