Stochastic Gradient Descent
Also known as: SGD
Stochastic gradient descent estimates the gradient on a subset of data (a mini-batch) rather than the full dataset each step. That noise scales training to huge corpora and can help escape sharp, poorly generalizing minima.
Classic SGD updates $\theta \leftarrow \theta - \eta \nabla_\theta L(\theta; B)$ for batch $B$ and learning rate $\eta$. Momentum and learning-rate schedules make plain SGD competitive; Adam-family methods (Adam, AdamW) are more common for LLMs because they adapt per-parameter step sizes.
Practical notes
- Batch size trades gradient noise for throughput and memory
- Too-large batches can change the loss landscape and need LR retuning
- SGD with momentum still appears in vision and some large-scale LM recipes
SGD is the conceptual parent of almost every modern optimizer; “stochastic” here means sampling data, not sampling weights.