Adam 2026-11-05
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]
Adam: A Method for Stochastic Optimization by Diederik P. Kingma and Jimmy Lei Ba. Version9, printed pp1–2, Introduction and Algorithm1
Starting from , the basic minimization rule isHere 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]
Adam: A Method for Stochastic Optimization by Diederik P. Kingma and Jimmy Lei Ba. Algorithm1, printed p2, epsilon outside the square root
For an original scalar calculation, choose , , and , and supply , . The first step hasThe second hasEqual 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.
AdamW 2026-11-05
AdamW combines the adaptive update of Adam with decoupled weight decay. It maintains exponentially weighted histories of the supplied data gradient and its componentwise square, while applying parameter shrinkage separately. Ilya Loshchilov and Frank Hutter presented the method in their work on decoupling decay from gradient-based regularization.[ref]
Decoupled Weight Decay Regularization by Ilya Loshchilov and Frank Hutter. Version3, Algorithm2, AdamW
For minimization without optional algorithm variants, initialize . In the convention documented by PyTorch, step usesThe product is a Hadamard product; square roots and division are also coordinatewise. Assume , and the stated learning rate . The decay coefficient is . This explicitly fixes epsilon placement and the decay convention.[ref]
AdamW in the PyTorch documentation. PyTorch2.15, algorithm with amsgrad and maximize disabled
The denominators and perform Adam bias correction for zero-initialized histories. For a constant supplied scalar gradient , the corresponding geometric sums give and . Their corrected values are therefore and . The squared-gradient quantity concerns a raw second moment, rather than a centered variance: a constant gradient of 2 has square 4 even though its variance is zero.
For an original first-step example, choose , , , , , and . ThenandThe constants are chosen for transparent arithmetic. Feeding into the same adaptive formulas instead, with no separate shrinkage, would give approximately . That coupled L2 regularization also changes the stored histories. Resuming AdamW therefore requires the relevant optimizer state and step count as well as the parameter values and settings.
Jimmy Lei Ba 2026-11-05
Jimmy Lei Ba, also known as Jimmy Ba, is a computer scientist whose published work includes Adam and layer normalization. His personal research biography identifies Geoffrey Hinton as his doctoral supervisor and describes a focus on efficient algorithms for deep learning.[ref] The 2016 layer-normalization manuscript prints his University of Toronto affiliation and the name Jimmy Lei Ba.[ref]
Layer Normalization by Jimmy Lei Ba and others. First-page full byline and affiliations
Ba coauthored Adam: A Method for Stochastic Optimization by Diederik P. Kingma and Jimmy Lei Ba with Diederik P. Kingma. The algorithm maintains optimizer state based on gradients, so its update depends on the history of the optimization. Adam bias correction accounts for the early effect of initializing its exponential accumulators at zero.[ref]
Adam: A Method for Stochastic Optimization by Diederik P. Kingma and Jimmy Lei Ba. Algorithm1 and §3, initialization bias
The layer normalization paper, coauthored with Jamie Ryan Kiros and Geoffrey E. Hinton, addresses a different part of a neural network: it computes a mean and variance across feature coordinates of an individual example, then applies learned gain and bias. It avoids making those statistics depend on the other examples in the mini-batch.[ref]
Layer Normalization by Jimmy Lei Ba and others. §3, equation3; Table1
An original numerical example illustrates one precise symmetry. In the stabilized formula of layer normalization, set all gains to 1, all biases to 0, and layer-normalization epsilon to . For , the coordinate arithmetic mean is 2 and the coordinate variance is , so the normalized output is . Adding 10 to every coordinate gives , whose output is again : layer normalization is invariant under a common input shift because the coordinate mean shifts by the same amount and the deviations remain unchanged.
The fixed layer-normalization epsilon affects scaling differently. With , the coordinate variance is and the output is , which differs from the original output. This calculation distinguishes the exact common-shift symmetry from idealized scale invariance when the stabilizer is omitted. It does not assign either numerical example to the paper's experiments.
