Adam, named for adaptive moment estimation, is an adaptive gradient method that scales a running gradient estimate by a running squared-gradient estimate. Diederik P. Kingma and Jimmy Lei Ba presented it as a first-order method for stochastic optimization. Its state makes the next optimizer update depend on gradient history as well as the current parameters.[ref]
Starting from , the basic minimization rule is
Here is the supplied gradient, is the learning rate, , and . The Hadamard product, square root and division act coordinatewise. Adam bias correction supplies the two normalization factors. The accumulator concerns a raw second moment, rather than a centered variance.[ref]
For an original scalar calculation, choose , , and , and supply , . The first step has
The second has
Equal and opposite supplied gradients have not undone one another: the running histories give the second step a different magnitude. Plain gradient descent with the same constant learning rate would return to zero for this sequence.
The calculation specifies the recurrence, rather than a convergence guarantee for an unspecified objective function. An optimization checkpoint needs these histories and the step count to reproduce subsequent steps. AdamW adds decoupled weight decay; feeding a penalty gradient into Adam instead implements coupled L2 regularization and changes the histories.
Adam bias correction compensates for the initial zero values in Adam's exponentially weighted gradient histories. The basic algorithm uses
These factors normalize the coefficient sums of the two running histories.[ref]
For a scalar coordinate, suppose and
Expanding the recurrence relation gives
If every has the same expectation , linearity of expectation and the geometric series yield
Thus is an unbiased estimator of under these assumptions. Correlation between different times is allowed by this argument. Applying the same calculation to squared gradients with constant raw second moment gives and .
For a constant supplied gradient of 2, choose and . The first uncorrected histories are and , while their corrected values are 2 and 4. The normalization removes the missing coefficient mass caused by initialization.
It does not make a changing history equal to the latest gradient. For an original deterministic example, let , and . Then , so
which differs from . More generally, changing moment expectations produce a weighted average of past expectations. State the moment assumptions before interpreting “bias-corrected” as unbiased for a present distribution. The nonlinear parameter update built from the corrected histories is a separate object from either moment estimator.

Articles by others on the same topic (0)

There are currently no matching articles.