Toolgeist › Developer
Gradient Descent Visualizer — Real Numerical Optimization, Live Loss Surface
Watch real gradient descent run on a live loss surface — the gradient is computed numerically via central finite differences, then the standard update rule runs from your chosen starting point, the same core loop that trains neural networks. Himmelblau's function, a genuine optimization benchmark with four known equal-value minima, shows the actual point of the technique: different starting points converge to genuinely different valleys, and a learning rate set too high visibly diverges instead of converging.
How to use Gradient Descent Visualizer
- Pick a function — a simple bowl, or Himmelblau's four-minima surface.
- Set a starting point on the loss surface.
- Adjust the learning rate and watch the descent path.
- Try a high learning rate on the bowl to see divergence.
Frequently asked questions
- Why does starting point change which minimum is found?
- Gradient descent only ever follows the local downhill slope from wherever it starts — it has no visibility into the rest of the surface, so on Himmelblau's function (four separate, equally deep valleys) the starting point alone determines which valley it falls into.
- Why does a high learning rate cause divergence instead of faster convergence?
- Each step moves proportionally to the gradient times the learning rate — too large a step overshoots the minimum entirely and lands somewhere with an even steeper gradient, compounding on the next step until the values blow up, rather than settling down.
- Is the gradient computed with real calculus or approximated?
- Numerically approximated via central finite differences — evaluating the function at nearby points and computing the slope — which works for any function you plug in without needing a hand-derived symbolic derivative, at a small, well-understood accuracy cost.
- Is this actually how neural networks train?
- Yes — the same update rule (move against the gradient, scaled by a learning rate) is the core of how neural network weights are optimized, just computed via backpropagation on a vastly higher-dimensional loss surface instead of the numerical method used here for a simple 2D visualization.
Related Developer tools
Also searched for: gradient descent visualizer interactive · himmelblau function optimization demo · learning rate divergence visualization
Browse all 738 free tools on Toolgeist →