Gradium × TensorTonic Voice Challenge is open for registration.Register now
Modules
08/09
Calculus

Contents

Local Minimum vs Saddle Point

How the Hessian test tells a local minimum from a saddle point, why saddles dominate neural network training and how optimizers escape them, with interactive visuals and code.

By Pratham Grover

Last updated 13 November 2026

What is the difference between a local minimum and a saddle point?

Both are points where the gradient is zero. At a local minimum the loss rises in every direction, so the Hessian's eigenvalues are all positive. At a saddle point the loss rises in some directions and falls in others, so the eigenvalues have mixed signs. Gradient descent can escape a saddle but not a minimum. On TensorTonic you implement the Hessian test that classifies a critical point and the momentum update that carries gradient descent across flat saddle regions, with tests that check your output.

Local minimumSaddle point
GradientZeroZero
Hessian eigenvaluesAll positive (a positive definite Hessian)Mixed signs
Loss nearbyRises in every directionRises in some directions, falls in others
Gradient descentSettles thereSlows down, then escapes along a falling direction
In large neural networksRare, and usually at low lossFar more common

When training neural networks, the classic fear is getting stuck in a local minimum, a small valley that isn't the lowest point. However, research by Dauphin et al. (2014) revealed a surprising truth:

The Key Insight

In deep learning, local minima are rare. The vast majority of "stuck" points are saddle points.

Understanding this distinction explains why algorithms like momentum and Adam are necessary. It also explains why convex problems are easier, since a convex loss has no saddle points at all, and what the loss landscape of a real network looks like between these points.

Definitions

Local Minimum

A point where the function value is lower than all neighboring points.

Imagine standing at the bottom of a bowl. Every direction you step goes UP.

Saddle Point

A point where gradient = 0, but it's a minimum in some directions and maximum in others.

Imagine a horse saddle. Front-to-back goes UP. Side-to-side goes DOWN.

Critical Points

Both local minima and saddle points are "critical points" where the gradient equals zero. The difference lies in the curvature (second derivatives).

The Hessian Test

At a critical point (where ∇f=0\nabla f = 0), we examine the Hessian matrix eigenvalues to classify the point:

EigenvaluesCurvatureClassification
All λi>0\lambda_i > 0Curves UP everywhereLocal Minimum
All λi<0\lambda_i < 0Curves DOWN everywhereLocal Maximum
Mixed signsUP in some, DOWN in othersSaddle Point

Interactive: Saddle Point

Visualize a saddle surface. The function curves up in one direction (positive eigenvalue) and down in another (negative eigenvalue).

Interactive Saddle Point

Rotate View

Cross Sections

z = x²

Along X: Convex (Minimum). Positive curvature. Stable.

z = -y²

Along Y: Concave (Maximum). Negative curvature. Unstable.

Hessian Analysis

λ1>0,  λ2<0\lambda_1 > 0, \; \lambda_2 < 0

Because the eigenvalues have mixed signs, the Hessian is indefinite. This mathematically defines a saddle point.

Why saddle points dominate in high dimensions

Why are saddle points more common than local minima in deep learning? Pure probability.

The Probability Argument

To be a local minimum in n-dimensional space, the curvature must be positive in all n directions.

If each eigenvalue has roughly 50% chance of being positive or negative:

P(local minimum)=0.5nP(\text{local minimum}) = 0.5^n

For n=100n = 100: P=0.5100=8×10−31P = 0.5^{100} = 8 \times 10^{-31}

The Reality

Modern neural networks have millions or billions of parameters. The probability of ALL eigenvalues being positive (true minimum) is essentially zero. Almost every critical point is a saddle point with some positive and some negative eigenvalues.

Checking the argument with random Hessians

The 0.5n0.5^n estimate treats each eigenvalue as an independent coin flip. Real eigenvalues are not independent, so the code below tests the idea directly: it draws random symmetric matrices, which stand in for Hessians at random critical points, and counts how many have all eigenvalues positive. The second part runs gradient descent on the saddle f(x,y)=x2−y2f(x, y) = x^2 - y^2, starting exactly on the axis that leads into the saddle.

Python
import numpy as np

rng = np.random.default_rng(0)

# 1. How often is a random symmetric "Hessian" positive definite (a true minimum)?
for n in [1, 2, 4, 8, 16]:
    trials, minima = 20_000, 0
    for _ in range(trials):
        a = rng.standard_normal((n, n))
        h = (a + a.T) / 2                      # random symmetric matrix
        minima += np.all(np.linalg.eigvalsh(h) > 0)
    print(f"n={n:<3} fraction that are minima: {minima / trials:.4f}   (0.5^n = {0.5**n:.4f})")

# 2. Gradient descent on the saddle f(x, y) = x^2 - y^2
grad = lambda p: np.array([2 * p[0], -2 * p[1]])
for noise in [0.0, 1e-3]:
    p = np.array([1.0, 0.0])                   # starts exactly on the saddle's "uphill" axis
    for step in range(60):
        p = p - 0.1 * grad(p) + noise * rng.standard_normal(2)
    x, y = np.round(p, 3) + 0.0                # + 0.0 turns -0.0 into 0.0
    print(f"noise={noise:<6} after 60 steps: x={x:+.3f}, y={y:+.3f}")
Output
n=1   fraction that are minima: 0.4980   (0.5^n = 0.5000)
n=2   fraction that are minima: 0.1450   (0.5^n = 0.2500)
n=4   fraction that are minima: 0.0028   (0.5^n = 0.0625)
n=8   fraction that are minima: 0.0000   (0.5^n = 0.0039)
n=16  fraction that are minima: 0.0000   (0.5^n = 0.0000)
noise=0.0    after 60 steps: x=+0.000, y=+0.000
noise=0.001  after 60 steps: x=+0.000, y=-78.010

Minima become rare even faster than 0.5n0.5^n predicts: at n=4n = 4 only about 0.3% of the random Hessians are positive definite, and at n=8n = 8 none of the 20,000 are. Eigenvalues of a symmetric matrix repel each other, so getting all of them on one side of zero is much harder than flipping nn independent coins.

The gradient descent run shows both sides of the saddle story. Started exactly on the line y=0y = 0, plain gradient descent slides straight into the saddle at the origin and stops, because the gradient along yy is exactly zero there. Adding noise of size 0.001 is enough to push it off that line, after which the negative-curvature direction grows the error exponentially and the iterate leaves. The run uses a loss with no floor below, so yy keeps growing; on a real loss it would fall into the next basin instead.

Random matrices are a model, not a measurement of real networks. Dauphin et al. (2014) located critical points in the loss of small neural networks and found the same pattern with an important twist: the share of negative eigenvalues falls as the loss falls. High-loss critical points are mostly saddles, while the rare true minima tend to sit at low loss, which is why getting stuck at a bad local minimum is uncommon in practice.

Why Saddle Points Cause Problems

At a saddle point, the gradient is zero (or very small). Standard gradient descent relies on the gradient to update weights:

θnew=θold−α⋅0=θold\theta_{new} = \theta_{old} - \alpha \cdot 0 = \theta_{old}

If gradient is zero, parameters don't move. The model thinks it has converged.

Plateaus

Near saddle points, gradients are very small (not exactly zero), creating "plateaus" where learning stagnates. The loss appears flat even though there are directions that would decrease it.

Saddle Point Stagnation

xy

Live Telemetry

Gradient Magnitude7.600
Optimizer Velocity0.000

Analysis

Gradient
Velocity

Near the saddle, the gradient (Green) shrinks to zero.

With Momentum (Blue), velocity stays high because it "remembers" the previous speed, allowing it to coast through the flat region.

How do optimizers escape saddle points?

Since vanilla gradient descent gets stuck, we use techniques that add "momentum" or "noise":

Stochastic Gradient Descent (SGD)

The noise from random mini-batches "kicks" the parameters. Even if the average gradient is zero, individual batch gradients are likely non-zero in the escape direction.

Momentum

Like a ball rolling downhill. If it enters a flat saddle region, its existing velocity carries it across the plateau.

vt=βvt−1+∇Jv_t = \beta v_{t-1} + \nabla J

Adam Optimizer

Combines momentum with adaptive learning rates. Uses both first moment (velocity) and second moment (variance) of gradients. The default choice for most deep learning.

Learning Rate Warmup

Start with a small learning rate, gradually increase. Helps navigate the initial chaotic landscape before settling into meaningful optimization.

Implications for Deep Learning

Good News: Local Minima Are Often Good

Research shows that in over-parameterized networks, most local minima have loss values very close to the global minimum. Getting "stuck" in a local minimum isn't as catastrophic as feared.

Flat Minima Generalize Better

Minima with small Hessian eigenvalues ("flat" regions) tend to generalize better than "sharp" minima. This is related to PAC-Bayesian theory and explains why SGD noise helps.

Over-Parameterization Helps

Having more parameters than needed creates many equivalent good solutions, making optimization easier. This is one reason why bigger models are often easier to train.

Skip Connections

ResNets with skip connections create a smoother loss landscape with fewer saddle points. This is why very deep networks became trainable with residual connections.

Frequently asked questions about local minima and saddle points

How do you tell a local minimum from a saddle point with the Hessian?

At a critical point, where the gradient is zero, compute the eigenvalues of the Hessian matrix. If all eigenvalues are positive the point is a local minimum, if all are negative it is a local maximum, and if the signs are mixed it is a saddle point.

Why are saddle points more common than local minima in neural networks?

A local minimum needs positive curvature in all n directions. If each eigenvalue were equally likely to be positive or negative, the chance of a minimum would be 0.5^n, which is about 8 × 10^-31 for n = 100. Random symmetric matrices make minima rarer still, since none of 20,000 random 8 by 8 matrices had all eigenvalues positive.

Practice this

On TensorTonic you implement this from scratch and test it in the browser.