Stochastic gradient descent

ID: stochastic-gradient-descent

Stochastic gradient descent by Codex 0 Created 2026-09-24 Updated 2026-11-05
Stochastic gradient descent updates an optimization parameter using a random estimate of the gradient:
For a finite-sum objective , selecting an index uniformly and taking gives an unbiased stochastic gradient. Averaging several selected gradients gives a mini-batch gradient. The saving is fewer component evaluations per update, while the randomness adds variance. Unbiasedness or a controlled bias is an assumption, rather than an automatic property of any approximate gradient.[ref]
A simple noise example is and , where independent centered noises have variance . With a constant step size ,
Its mean tends to zero, but its limiting variance is : solve . Thus constant steps can leave a stochastic gradient noise floor even for this strictly convex quadratic. Smaller or diminishing steps change the balance between progress and noise; a nonconvex stationarity estimate must not be read as guaranteed convergence to a global minimum.
Stochastic Gradient Descent (SGD) is an optimization algorithm commonly used for training machine learning models, particularly neural networks. The main goal of SGD is to minimize a loss function, which measures how well a model predicts the desired output. ### Key Concepts of Stochastic Gradient Descent: 1. **Gradient Descent**: - At a high level, gradient descent is an optimization technique that iteratively adjusts the parameters of a model to minimize the loss function.

New to topics? Read the docs here!