// ⬡ Deep Learning Foundations
Stochastic Gradient Descent (SGD)
Steps downhill using gradients estimated on small mini-batches.
随机梯度下降 1951 Beginner core
IN PLAIN WORDS
Full-batch gradient descent scans the whole training set each step, so the cost grows linearly with the number of examples. D2L notes that a stochastic gradient is an unbiased estimate of the full gradient and costs O(1) per step; in practice minibatches are used to balance estimate stability and vectorized efficiency, and CS231n also calls this SGD. PyTorch's torch.optim.SGD can optionally add momentum and Nesterov momentum.
Used in: Almost all neural-network training uses minibatch SGD or a variant. CS231n illustrates large-scale image classification with updates on minibatches of 256 examples. In PyTorch 2.5, torch.optim.SGD defaults to learning rate 0.001 and momentum 0, with optional weight_decay and Nesterov momentum (the docs base the Nesterov formula on Sutskever et al., 2013, on initialization and momentum).
TIMELINE · prerequisites → this → what builds on it
01Original paper
A Stochastic Approximation Method
Robbins et al. · The Annals of Mathematical Statistics · 1951
DOI ↗ ✓ Verified · Crossref API doi:10.1214/aoms/1177729586
02Where it sits
Learn the left column first; the right column builds on this one.
Learn first
Left: prerequisites · right: builds on this · dashed: related. Full map →
03Learning resources
Official docs, explainers, courses and reference code. All links checked.
04Where the course teaches it
On learning paths:Zero to Deep Learning
For AI / data
- Verification: verified, checked 2026-11-22.
- JSON: /api/learn/algorithms.json (id:
sgd)