Skip to content

SGD (Stochastic Gradient Descent)

Stochastic gradient descent: instead of the gradient over the whole dataset, the gradient is computed on one object and a step is taken immediately.

Idea

whole dataset + gradient → step        (batch, expensive)
one object    + gradient → step        (SGD, cheap)

The number of updates grows by as many times as there are objects in the dataset.

Why 'Stochastic'

The gradient on a single object is a random estimate of the true gradient. The direction of movement fluctuates but stays correct on average.

The Trade-off

Pure SGD is noisy, a full batch is expensive. In between lies mini-batch, which is what is used in practice.

See Also

← All Terms