~/tedtes/writing/math-foundations-for-reasoning-models

~/writing/math-foundations-for-reasoning-models $ ls

Optimization Foundations

Loss Landscape

A loss landscape shows how loss changes across different parameter settings.

~/writing/math-foundations-for-reasoning-models $ cat topic.md

Loss Landscape

Definition

A loss landscape describes how loss changes across parameter space.

Each parameter setting has a loss value.

parameter setting -> loss

Example:

w = 0 -> loss 8
w = 1 -> loss 3
w = 2 -> loss 1
w = 3 -> loss 4

A loss landscape is the shape made by loss values over parameter settings.


Why It Is Called a Landscape

The word "landscape" is a metaphor.

Low loss acts like a valley.

High loss acts like a hill.

high loss -> worse region
low loss -> better region

Optimization tries to move toward lower regions.

The landscape gives optimization something to move through.


One Parameter Example

With one parameter, the loss landscape can be imagined as a curve.

w value -> loss value

Example:

w = -1 -> loss 9
w = 0  -> loss 4
w = 1  -> loss 1
w = 2  -> loss 4

The lowest point here is around w = 1.

With one parameter, the landscape is loss along a line of possible values.


Many Parameters

With many parameters, the landscape is harder to picture.

But the idea is the same.

parameter setting A -> loss 10
parameter setting B -> loss 3
parameter setting C -> loss 7

Each full parameter setting has a loss.

Optimization searches for settings with lower loss.

More parameters make the landscape larger, not conceptually different.


Local Shape Matters

Optimization often cannot inspect the whole landscape at once.

It uses local information.

The local question is:

if I change the parameters slightly, does loss go up or down?

This connects back to gradients.

A gradient describes local change in the loss landscape.

Gradients help navigate the nearby shape of the loss landscape.


Final Summary

  • A loss landscape maps parameter settings to loss values.
  • Low-loss regions are better for the objective.
  • Optimization searches through the landscape.
  • With one parameter, the landscape can be seen as a curve.
  • With many parameters, the idea is the same but harder to visualize.
  • Gradients describe local change in the landscape.

~/writing/math-foundations-for-reasoning-models $ open

Continue the series.

Gradient Descent