Minima and Maxima

A minimum is a point where a function is lower than nearby points.

A maximum is a point where a function is higher than nearby points.

minimumloss along one slice
Optimization searches for parameters with lower loss.

Local and Global

A local minimum is lower than nearby points.

A global minimum is lower than all points in the search space.

Machine learning often works with complicated loss surfaces where finding a good local minimum may be enough.

The word "nearby" matters. A local minimum may be the best point in its neighborhood, but there may be a lower point somewhere else.

The word "all" matters for global minima. To prove a point is global, we need to know that no other point in the entire search space is lower.

In deep learning, the goal is usually not to prove that training found the global minimum. The useful question is more practical: did optimization find parameters that work well on new data?

Why This Matters

Optimization needs a target shape.

If we minimize loss, we search for lower points. If we maximize reward or likelihood, we search for higher points.

Most training code is written as minimization. When we want to maximize something, we often minimize its negative instead. Maximizing reward is the same directional idea as minimizing negative reward.

This sign change is common because it lets one optimizer interface handle many goals. We change the objective, not the basic training loop.

MATH-C09-T03-001Exercise: Choose the direction

If the goal is to minimize loss, should training prefer a lower loss value?

Enter 1 for yes, 0 for no.

Compute it first, then check your number.

Hint
Minimize means make smaller.
Solution

Yes. Minimization prefers lower loss. Enter 1. The optimizer is being asked to move toward smaller values of the objective.

MATH-C09-T03-002Exercise: Local or global

A point is lower than nearby points, but another faraway point is lower still. Is the first point a local minimum or a global minimum?

Answer it first, then check.

Hint

Nearby points decide local behavior. The whole search space decides global behavior.

Solution

It is a local minimum because it is lower than nearby points, but it is not global because a faraway point is lower.

MATH-C09-T03-003Exercise: Maximize by minimizing

If we want to maximize a reward R, can we instead minimize -R?

Answer it first, then check.

Hint

Larger R means smaller -R.

Solution

Yes. Maximizing R is equivalent to minimizing -R. When R gets larger, -R gets smaller, so the direction of preference is flipped.

MATH-C09-T03-004Exercise: Global claim

To claim a point is a global minimum, do we need to know it beats every point in the search space?

Answer it first, then check.

Hint

Global means the whole search space, not only the neighborhood.

Solution

Yes. A global minimum must be no higher than every other point in the search space.

MATH-C09-T03-005Exercise: Good enough for learning

Enter 1 if a model can be useful even when we have not proved that training found a global minimum.

Compute it first, then check your number.

Hint

Think about validation behavior rather than a mathematical proof over all parameters.

Solution

Enter 1. For many models, we care whether the learned parameters work well, not whether we can prove they are globally optimal.

Before Moving On

Optimization needs us to know whether we are minimizing or maximizing.