Stochastic Gradient Descent

The Stochastic Gradient Descent algorithm (SGD) is a simplified version of classical gradient descent. Instead of computing the exact gradient of the objective function $S(\boldsymbol\beta)$, each iteration uses the gradient of a single randomly selected sample $\ell_i$:

\begin{displaymath}
\boldsymbol\beta_{t+1} = \boldsymbol\beta_{t} - \gamma_t \nabla \ell_i(\boldsymbol\beta_t)
\end{displaymath} (4.48)

Under appropriate assumptions, SGD is guaranteed to converge for convex functions defined on convex domains, but it is also commonly used in nonconvex settings, such as neural network training.

A practical variant uses a small group of samples (mini-batch) for each update, reducing noise compared with a single sample while maintaining good computational efficiency.

To simulate inertia in parameter updates, a term $\alpha$ called momentum is introduced:

\begin{displaymath}
\boldsymbol\delta_{t} = - \gamma_t \nabla S(\boldsymbol\beta_t) + \alpha \boldsymbol\delta_{t-1}
\end{displaymath} (4.49)

where $\alpha$ is usually a value between 0 and 1, chosen empirically for the problem. Momentum is one of the simplest and most effective modifications to SGD, helping to overcome oscillations and slow progress along uninformative directions.

In addition to SGD with momentum, many variants have been designed to accelerate convergence and improve optimization stability. A non-exhaustive list includes:

A comparative overview of these algorithms is available in (Rud16).

Paolo medici
2026-10-19