Contents
Gradient Descent/Chapter 10 of 10
10Summary
- Gradient descent \theta_{t+1}=\theta_t-\eta\nabla J(\theta_t): the steepest local step (Cauchy, 1847).
- Learning rate: each eigen-direction is multiplied by 1-\eta\lambda; converge iff \eta<2/\lambda_{\max}; best constant rate (\kappa-1)/(\kappa+1). Normalize inputs to shrink \kappa.
- Batch: exact, O(nd) per step, one update per epoch. Stochastic: one example, unbiased, noisy; a constant \eta ends in a noise ball, Robbins–Monro schedules converge.
- Mini-batch: variance \sigma^2/b, noise \propto1/\sqrt b, parallel on a GPU; the default. Shuffle every epoch, warm up then decay, scale \eta with b.
- The race: per update batch wins (0.848 vs 1.311 after 60); per epoch the noisy methods win (0.134 vs 2.923).
- Momentum: a heavy ball, v\leftarrow\beta v+\nabla J; up to 10\times longer steps along the floor, damped zigzags, \kappa\to\sqrt\kappa. Nesterov looks ahead.
- Adam = momentum + RMSProp + bias correction (defaults 0.001, 0.9, 0.999); AdamW decouples weight decay. In the valley after 80 steps: gradient descent 1.881, momentum 0.016, Adam 0.005.