Nesterov Accelerated Gradient
Nesterov Accelerated Gradient
**Nesterov Accelerated Gradient** is a momentum-based [SGD](https://paperswithcode.com/method/sgd) optimizer that "looks ahead" to where the parameters will be to calculate the gradient **ex post** rather than **ex ante**:

$$ v\_{t} = \gamma{v}\_{t-1} - \eta\nabla\_{\theta}J\left(\theta_{t-1}+\gamma{v\_{t-1}}\right) $$
$$ \theta\_{t} = \theta\_{t-1} + v\_{t} $$
$$ \gamma, \eta \in \mathbb{R}^+ $$

Like SGD with momentum $\gamma$ is usually set to $0.9$. $\eta$ and $\gamma$ are usually less than $1$.

The intuition is that the [standard momentum](https://paperswithcode.com/method/sgd-with-momentum) method first computes the gradient at the current location and then takes a big jump in the direction of the updated accumulated gradient. In contrast Nesterov momentum first makes a big jump in the direction of the previous accumulated gradient and then measures the gradient where it ends up and makes a correction. The idea being that it is better to correct a mistake after you have made it. 

Image Source: [Geoff Hinton lecture notes](http://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf)