Technical GUIDE

Second-Order Optimization and Newton Methods

Second-order optimization uses curvature information (the Hessian matrix of second derivatives) to take smarter steps toward a minimum, not just the slope.

2 min readLast updated

Overview

It can converge in dramatically fewer iterations than plain gradient descent, but the cost of computing curvature makes it tricky to scale.

Deep Dive

Gradient descent only knows the slope at your current point, so it picks a fixed or hand-tuned step size and hopes for the best. Newton's method goes further: it also looks at how the slope is changing (the curvature), captured by the Hessian, a matrix of all second partial derivatives. The update multiplies the inverse Hessian by the gradient, which automatically rescales each direction and lands near the minimum of a local quadratic approximation. For a perfectly quadratic bowl, Newton's method reaches the bottom in a single step. The catch is brutal: a model with N parameters has an N-by-N Hessian, so storing and inverting it costs roughly N-squared memory and N-cubed compute. For billion-parameter networks that is impossible, which is why practitioners use cheaper approximations.

Technical Insight

The core Newton update is x_new = x - H_inverse times the gradient, where H is the Hessian. Quasi-Newton methods like BFGS and L-BFGS avoid computing H directly by building a running approximation of its inverse from successive gradient differences. L-BFGS stores only the last few gradient and step vectors instead of the full matrix, cutting memory from N-squared to a small multiple of N while keeping most of the convergence speedup.

Strategic Impact

Cost and budget

Architecture decisions drive performance and operating cost for years.

Clearer decisions

Technical education helps teams choose the right stack, not just the newest one.

Quality control

Better engineering choices reduce reliability incidents in production.

The Future of Second-Order Optimization and Newton Methods

For giant neural networks, full second-order methods stay impractical, but approximations are gaining ground. Optimizers like K-FAC and Shampoo approximate curvature using block-diagonal or Kronecker-factored structure, and newer methods such as Sophia and Muon use cheap curvature estimates to speed up large language model pretraining. Expect continued effort to capture useful curvature signal at near-first-order cost, narrowing the gap between Adam and true Newton steps.

Real-World Implementation

L-BFGS fitting logistic regression and other convex models in scikit-learn, where it often beats plain gradient descent on small to medium datasets

Bundle adjustment in 3D reconstruction and SLAM, where Gauss-Newton and Levenberg-Marquardt refine camera poses and point positions

Training tiny physics-informed neural networks where L-BFGS achieves precision that Adam struggles to reach

Shampoo and K-FAC accelerating large-scale deep learning training by approximating the Hessian's structure

Risks & Guardrails

Optimizing one benchmark can hide broader system weaknesses.

Infrastructure and maintenance costs are often underestimated.

Security and observability gaps can grow as systems become more complex.

Implementation Roadmap

1

Define latency, quality, and cost targets before implementation.

2

Benchmark under realistic load and data conditions.

3

Instrument monitoring for errors, drift, and user impact.

4

Prepare rollback and incident response paths before scaling.

Keep Exploring

Free newsletter

Keep up with AI in 3 minutes a day

One short email each weekday with the three AI stories that actually matter. Free forever, no ads.

One email each weekday. Unsubscribe in one click. We never sell or share your address.

Test yourself

Take the Second-Order Optimization and Newton Methods quiz

Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.

Start quiz

Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation

Next guide

Group Relative Policy Optimization

Frequently asked questions

What is Second-Order Optimization and Newton Methods?

Second-order optimization uses curvature information (the Hessian matrix of second derivatives) to take smarter steps toward a minimum, not just the slope. It can converge in dramatically fewer iterations than plain gradient descent, but the cost of computing curvature makes it tricky to scale.

What information does Newton's method use that plain gradient descent does not?

Newton's method augments the gradient with curvature from the Hessian, letting it rescale directions and approximate the local quadratic minimum.

For a perfectly quadratic objective, how many steps does Newton's method need to reach the minimum?

On an exact quadratic, the local quadratic model equals the true function, so one Newton step jumps straight to the minimum.

Why is full Newton's method impractical for billion-parameter neural networks?

With N parameters the Hessian has N-squared entries and inverting it scales like N-cubed, which is infeasible at billions of parameters.

What do quasi-Newton methods like BFGS do to avoid the Hessian's cost?

BFGS iteratively updates an estimate of the inverse Hessian using changes in the gradient between steps, avoiding direct computation.

How does L-BFGS reduce memory compared to BFGS?

The 'L' stands for limited-memory: L-BFGS keeps just a handful of recent vectors, reducing storage from N-squared to roughly a small multiple of N.