MIT Freshm. Calc

Calculus Gradient Optimizer Studio

Click canvas to set $x_0, y_0$. Hover to inspect gradients.

What an optimizer step actually changes

Read the explanation

The source bowl surface is one half times x squared plus ten times y squared. Its gradient is x and ten y. At the illustrative point one one, loss is five point five and gradient one ten. A gradient descent step with learning rate zero point zero five moves to zero point nine five and zero point five. The vertical coordinate changes ten times more than the horizontal coordinate because the curvature is ten times larger. For the same bowl point, the small step gives loss one point seven zero one two five, down from five point five. A zero point three step gives coordinates zero point seven and minus two, loss twenty point two four five. Both start with the same gradient, yet the large step overshoots the steep direction and increases loss. The source also clips trajectories to the displayed domain, which must be distinguished from an unconstrained optimizer. The source saddle is x squared minus y squared, with gradient two x and minus two y. Starting at one one with learning rate zero point zero five moves to zero point nine and one point one. Loss changes from zero to minus zero point four. That decrease moves away along the negative curvature direction. Momentum, AdaGrad and Adam use their own stored update states; exported trajectories retain every step, point, loss and gradient. A decreasing trace alone does not prove a global minimum.

Super generates helpful tools and automates fact-checking across the internet proactively. If you enjoyed this tool, build your own with Super and share it with a friend.