Tuning a model means searching a loss landscape — one axis per
hyperparameter, height equals validation loss — for the lowest point. The surface
here is shaped by two hyperparameters, a log-scale learning_rate and a
log-scale regularization strength, and it can be smooth (one clear basin) or
rugged (several deceptive local minima), exactly like real loss surfaces.
In practice, random search often reaches a near-optimal region faster than grid search for the same budget, because most hyperparameters have far less effect on the loss than a couple of dominant ones — a grid wastes trials varying the unimportant ones. Bayesian methods like Gaussian-process or tree-based (TPE) optimizers go further, actively deciding where to look next.
A 3D loss surface shaped by two hyperparameters — a log-scale learning rate and a log-scale regularization strength — that Grid Search, Random Search and Bayesian Optimization each try to minimize with a limited trial budget.
Height and color encode validation loss across the two-hyperparameter space. Watch how each search strategy places its trials — a rigid lattice, a random scatter, or an informed sequence that homes in on the deepest valley — and compare how quickly each finds the true minimum.
Pick a search strategy, set the trial budget and how rugged (multimodal) the loss surface is, then watch trials appear live. The pulsing indigo sphere marks the best hyperparameter combination found so far; drag to rotate and scroll to zoom.
Bergstra & Bengio's 2012 paper "Random Search for Hyper-Parameter Optimization" showed random search often beats grid search for the same compute budget, because real loss surfaces are usually dominated by only one or two truly important hyperparameters.