Every hyperparameter search is, mathematically, a search for the minimum of an
objective function L(θ) over a space of hyperparameter
vectors θ — learning rate, regularization strength, layer width, and so on.
Because this function is expensive to evaluate (it usually means training a whole model)
and rarely convex, optimizers must balance exploration of the space
against exploitation of promising regions. The purple surface below is a
synthetic stand-in for a validation-loss surface over two hyperparameters; watch how each
strategy searches it differently.
−∇L(θ) downhill from a random start. Fast on smooth bowls, but can get trapped in a local minimum on rugged surfaces.θ* = argmin L(θ).θ ← θ − η∇L(θ).Bergstra & Bengio (2012) showed that for most real hyperparameter spaces, random search finds comparably good configurations to grid search using far fewer trials — because only a handful of hyperparameters actually matter for a given problem, so a grid wastes most of its evaluations along unimportant axes.
A synthetic validation-loss surface rendered in 3D, searched live by grid search, random search and gradient descent so you can see how each optimization strategy explores hyperparameter space.
Hyperparameter tuning is minimizing an objective function L(θ) over a search space. The purple-to-pink surface height encodes loss; gradient descent follows −∇L(θ) downhill, while random and grid search sample the space directly.
Pick an optimizer, then tune the step size, landscape ruggedness and batch size. Watch the current-best marker chase the true minimum and compare how quickly — and how reliably — each strategy finds it.
Bergstra & Bengio's 2012 study found random search often beats grid search at equal budget, because most objective functions are dominated by only a few truly important hyperparameters.