Skip to content
Infinitesimal Dynamics home
Notebook: 0 XP

Optimization / Algorithms and structure

Stochastic Gradient Descent

Estimate the gradient from a handful of examples and take many cheap, noisy steps: how models with billions of parameters are trained.

3 min read · 1 sections · 1 checks

Contents 2 sections
  1. §1Noisy but cheap
  2. ?Check yourself

By the end you can

  • Explain mini-batch gradient estimates
  • Describe learning-rate schedules
  • Outline how Adam adapts step sizes

Helps to know: Gradient Descent

§1Noisy but cheap

When f(x)=1N∑ifi(x)f(x) = \frac{1}{N}\sum_i f_i(x) over NN data points, the gradient of a random mini-batch is an unbiased estimate of the full gradient at a fraction of the cost. The noise even helps escape shallow local minima.

  • Decay the learning rate over time so the noise averages out.
  • Momentum smooths successive noisy gradients.
  • Adam keeps running averages of the gradient and its square, giving each coordinate its own step size.

Check yourself

  1. Q1
    A mini-batch gradient is useful because it is…