Every modern neural network — the language model answering your questions, the image recognizer on your phone — was trained by minimizing a loss function. Loss measures how wrong the model is; training means finding the model weights that make loss as small as possible.
The textbook answer is gradient descent: compute the slope of the loss at your current weights, step downhill, repeat. The slope is the gradient, a vector pointing in the direction of steepest increase, so stepping in the opposite direction decreases the loss.
The catch: computing the exact gradient means summing over the entire training dataset — millions of examples — every single step. For even a modest deep network that is ruinously expensive.
Stochastic Gradient Descent (SGD) makes one radical substitution: instead of the full dataset, use a random mini-batch of, say, 32 or 256 examples. The mini-batch gradient is a noisy estimate of the true gradient, but it is cheap, and with enough steps the noise averages out. The algorithm arrived — in statistical form — with Herbert Robbins and Sutton Monro in 1951, and its modern deep-learning incarnation was systematized by Léon Bottou through the 1990s and 2000s.
The surprising truth: the noise is not merely tolerated — it actively helps. Noisy updates escape shallow local minima that would trap the exact gradient, and they implicitly regularize the model by preventing it from memorizing every quirk of the training set.
Comments
Loading comments...