Skip to content
Lambdian

Gradient descent

An optimisation method that repeatedly steps the parameters in the direction that lowers the loss most steeply.

The gradient ∇J(w)\nabla J(\mathbf{w}) points uphill on the loss surface, so gradient descent moves the other way:

w←w−η ∇J(w)\mathbf{w} \leftarrow \mathbf{w} - \eta\,\nabla J(\mathbf{w})

The learning rate η\eta sets the step size. Stochastic and mini-batch gradient descent estimate the gradient from a few examples at a time, which is much cheaper on large datasets. Momentum and Adam speed it up and smooth it out. It trains almost everything, from logistic regression to deep networks and policy-gradient agents.

See it in action