Momentum is an optimization technique for minimizing neural-network loss. It combines the current gradient with the previous update so training follows persistent downhill movement instead of reacting fully to each noisy estimate. section 9.2.4 section 9.0
With positive constants γ and η below 1, the update uses a weighted combination of the current gradient and the preceding update. Unrolling the recurrence shows that momentum accumulates gradients from earlier iterations, while older gradients receive progressively smaller weights through powers of γ. section 9.2.4
Momentum changes gradient-based optimization in several useful ways:
- Reinforces components that consistently point downhill. section 9.2.4
- Cancels or weakens non-downhill components that vary across noisy stochastic estimates. section 9.2.4
- Carries nonzero updates through a small flat region where the current gradient is zero. section 9.2.4
- Produces a weighted sum rather than a normalized weighted average; Adam later addresses this weight-sum issue. section 9.2.4
A ball rolling downhill
Imagine a ball moving over a rough hill. Its path zigzags because individual directions are noisy, but repeated downhill components accumulate, increasing its downward velocity and helping it cross a small flat region. section 9.2.4
Figure 9.8 Momentum. Noisy stochastic gradient estimates at different points on the loss surface (thick solid arrows) are not aligned in direction, but they all have a significant downhill component (thin solid arrows). The non-downhill components thin dashed arrows) point in random directions. Hence, averaging tends to strengthen the downhill component and cancel out the non-downhill components.
Use the vector diagram to see why averaging noisy gradient estimates strengthens shared downhill components and cancels random lateral components. section 9.2.4
