# SGD with momentum (2013)

> Plain stochastic gradient descent, given a good random start and strong momentum, trains deep networks as well as second-order methods.

Page: https://mralbu.github.io/ai-datasets/p/sgd-momentum

## Key facts

- Title: On the importance of initialization and momentum in deep learning
- Authors: Ilya Sutskever, James Martens, George Dahl, Geoffrey Hinton
- Venue: ICML 2013
- Category: Foundations
- Paper: https://proceedings.mlr.press/v28/sutskever13.html

## Why it matters

Deep and recurrent networks were thought to need layer-by-layer pretraining or expensive second-order methods. This paper showed that the failures came from bad starting points and badly tuned momentum, not from gradient descent itself. SGD with momentum (often Nesterov's) became the standard optimizer for ConvNets, and momentum survives inside Adam, AdamW and Muon.

## The idea

Momentum keeps a running velocity: each step adds the new gradient to a decayed copy of the last step, so the weights keep moving along directions where the gradient points the same way step after step. Nesterov's variant looks ahead, taking the gradient where the velocity is about to carry the weights. Start from a careful random initialization, raise the momentum slowly towards 0.99 or 0.999, and lower it again only at the very end.

## The result

On the deep autoencoder benchmarks of Hinton and Salakhutdinov, Nesterov momentum cut the MNIST autoencoder's training error from 2.1 with plain SGD to 0.73, better than the 1.40 published for Hessian-free optimization, and did similarly on the other two tasks. With the same recipe, recurrent networks learned synthetic tasks with dependencies 80 to 200 steps long.

## The data

- [MNIST (1998)](https://mralbu.github.io/ai-datasets/d/mnist.md): 70,000 handwritten digits, 28×28 grayscale, 10 classes.
- Also tested on: Deep autoencoders on a synthetic curves dataset and a face-image dataset, and recurrent networks on synthetic long-range memory, addition and multiplication tasks.

## Part of

- [Optimizers](https://mralbu.github.io/ai-datasets/t/optimizers.md) (step 2 of 7)
