Please verify you are human to use the visualiser.
Plain gradient descent moves against the gradient by a fixed learning rate. The direction is locally the steepest, which is not the same as pointing at the minimum.
A velocity term lets consistent directions build up and alternating ones cancel. That damps the zig-zag across a ravine and speeds up travel along it.
RMSProp and Adam divide by a running size of the gradient, so the step is roughly the learning rate whatever the slope. That helps at saddles and costs speed on steep ground.
Ravines, saddles and barriers each defeat a different method. Switching surfaces changes which optimiser wins, which is why no single one is the default answer.
The five surfaces are chosen so that the ranking changes between them. On the bowl every method arrives and only the route differs. On the ravine momentum and the adaptive methods finish while SGD is still zig-zagging. On Rosenbrock momentum wins and Adam comes last at the same learning rate, because Adam discards the gradient magnitude that momentum is exploiting. On the double well momentum and RMSProp carry enough speed to cross the barrier into the global minimum while SGD and Adam settle into the local one.
The last of those is worth sitting with. None of these methods is searching for a global minimum. They follow the slope under their feet, and whether they land in the better basin comes down to momentum, the learning rate and where they started. A real training run also carries mini-batch noise, which acts a little like extra momentum and shakes the path out of the shallowest minima.
For the implementations, our tutorial on SGD, momentum and Adam from first principles builds all four in NumPy and checks them against PyTorch. The learning rate usually matters more than which of the four you pick, and it is covered in learning rate scheduling and hyperparameter optimisation. Every path here follows one objective; when two share a trunk their gradients can point in opposite directions, which is measured in multi-task learning and conflicting gradients. For where the gradients come from in the first place, see backpropagation from first principles and why first-order methods win, which explains what the curvature these paths are navigating would cost to compute exactly.
Optimiser choice rarely decides whether a project works. What decides it is whether the objective being minimised is the one the business actually cares about, and whether there is enough labelled data to fit it. Setting those up before the training budget is spent is our AI pilot design work.
Interactive walkthrough of polynomial overfitting from Bishop PRML Ch. 1. Explore degree selection, train/test error, data size effects, and ridge regularisation.
Try itInteractive linear and polynomial regression calculator. Enter data points, fit models, and visualise residuals with live R² and coefficient estimates.
Try itStack convolution and pooling layers to see output shape, receptive field and parameter counts update live, then step through max and average pooling window by window.
Try itInteractive Gaussian process regression with RBF kernel. Add data points, adjust hyperparameters, and see posterior mean with uncertainty bands.
Try itGet notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.
Common questions about SGD, momentum, RMSProp, Adam and learning rates