Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Bowls, domes and saddles
Three flat spots can feel completely different. In a bowl, every direction curves up, so it’s a minimum. On a dome, every direction curves down, so it’s a maximum. On a horse saddle (or a Pringle crisp), the surface curves up front-to-back but down side-to-side. It’s flat at the centre, yet neither the lowest nor the highest point.
The table of how a surface curves in every direction is the Hessian.
When an AI model trains, it often slows down near saddle-shaped spots: flat, but not the bottom. When engineers design a spacecraft’s orbit or a robot’s motion, they check the curvature at a solution to make sure it’s really a minimum of fuel or effort, not a saddle.
- 1. The centre of a horse saddle is a…
- 2. The bottom of a bowl is a…
- 3. At all three kinds of flat spot, the slope is…
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.Definition
By Clairaut (A3.2-2), , so is symmetric.
Example. : and , so
This is constant, because is quadratic. A general quadratic form has Hessian (A2.4-2).
- 1. H of x² + 3xy + 5y²: the (2, 2) entry?
- 2. For a smooth f, H is…
- 3. f_xx of x³ at x = 2?
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.The second-derivative test in many variables
At a critical point (), look at the eigenvalues of :
| Eigenvalues of | is | The point is |
|---|---|---|
| all | positive definite | strict local minimum |
| all | negative definite | strict local maximum |
| some , some | indefinite | saddle |
| some (rest one sign) | semidefinite | inconclusive |
In 2-D, use . If , it’s a min when and a max when . If , it’s a saddle. If , the test is inconclusive.
Example. has critical points and . At , with eigenvalues 8 and 16, so it’s a minimum. At the origin, with eigenvalues , so it’s a saddle.
Curvature in a direction
The second derivative along a unit vector is , a Rayleigh quotient (A2.4-2). The eigenvalues are the principal curvatures (the most and least curved directions) and the eigenvectors point along them. The ratio , the condition number, decides how badly gradient descent zig-zags (A2.3-8, A3.2-3).
- 1. D = f_xx f_yy − f_xy² for xy at the origin?
- 2. x³ − 3x + y² at (−1, 0) is a…
- 3. The curvature of x² + 3y² along (0, 1)?
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Why the test works
Second-order Taylor (A3.2-7) at a critical point gives
If with smallest eigenvalue , then , which dominates the term for small . So , a strict minimum. ∎ If has eigenvalues of both signs, moving along the corresponding eigenvectors goes up one way and down the other, so it’s a saddle.
When the test is silent
and have the same Hessian at the origin. The first has a minimum there and the second a saddle. A zero eigenvalue means higher-order terms decide. The monkey saddle has , with three valleys.
Convexity
A function is convex iff everywhere, and strictly convex if everywhere (A2.3-3, A3.1-5). For a convex function, any critical point is a global minimum. That’s the foundation of convex optimization (A6).
Exercise 3.1: Show the Hessian of a quadratic ½xᵀAx + bᵀx is A (for symmetric A)
The gradient is . Differentiating again gives . Since it is constant, the quadratic is exactly its own second-order Taylor model, which is why Newton’s method solves it in one step.
- 1. x² − y⁴ at the origin is…
- 2. A C² function is convex iff…
- 3. The smallest eigenvalue of [[12, −4], [−4, 12]]?
Level 4: Expert
★★★★★ Expert⏱ 45 minResearchers: original papers and open problems.Saddles dominate in high dimensions
At a “random” critical point of a high-dimensional function, each Hessian eigenvalue is about equally likely to be positive or negative. A minimum needs all to be positive, which becomes exponentially rare. Dauphin et al. (2014) showed neural-network losses are riddled with saddle points, with the fraction of negative eigenvalues falling as the loss decreases. Gradient descent with noise escapes strict saddles efficiently (Ge et al., 2015; Jin et al., 2017). This explains why bad local minima are less of a problem in practice than feared.
Curvature at scale
- Hessian-vector products (Pearlmutter, 1994) compute for about the cost of two gradients, without forming the matrix. Combined with power iteration or Lanczos (A2.4-7), they give the sharpness and the eigenvalue density of networks with millions of parameters (Ghorbani et al., 2019; Practice Code 5).
- Edge of stability. Training with step drives up to about and keeps it there (Cohen et al., 2021). Sharpness-aware minimization deliberately seeks flatter minima (Foret et al., 2021).
- Second-order optimization in robotics. iLQR and DDP use (Gauss–Newton approximations of) Hessians of the trajectory cost, plus constraint curvature, for fast motion planning and model-predictive control (Tassa, Erez and Todorov, 2012). Checking the Hessian at a solution certifies a true local minimum of the planner’s cost.
- Uncertainty. The Laplace approximation (A3.1-8) uses at the optimum as a posterior covariance. In SLAM, the information matrix is the Hessian of the negative log-likelihood.
References
- B. Pearlmutter (1994). “Fast exact multiplication by the Hessian.” Neural Computation, 6(1).
- Y. Dauphin, R. Pascanu, C. Gulcehre, K. Cho, S. Ganguli, Y. Bengio (2014). “Identifying and attacking the saddle point problem in high-dimensional non-convex optimization.” NeurIPS.
- R. Ge, F. Huang, C. Jin, Y. Yuan (2015). “Escaping from saddle points: online stochastic gradient for tensor decomposition.” COLT.
- C. Jin, R. Ge, P. Netrapalli, S. Kakade, M. Jordan (2017). “How to escape saddle points efficiently.” ICML.
- Y. Tassa, T. Erez, E. Todorov (2012). “Synthesis and stabilization of complex behaviors through online trajectory optimization.” IROS.
- B. Ghorbani, S. Krishnan, Y. Xiao (2019). “An investigation into neural net optimization via Hessian eigenvalue density.” ICML.
- J. Cohen, S. Kaur, Y. Li, J. Z. Kolter, A. Talwalkar (2021). “Gradient descent on neural networks typically occurs at the edge of stability.” ICLR.
- P. Foret, A. Kleiner, H. Mobahi, B. Neyshabur (2021). “Sharpness-aware minimization for efficiently improving generalization.” ICLR.