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.
Decoupled weight decay 2026-11-05
Decoupled weight decay applies a parameter-shrinkage contribution separately from the optimizer's processing of the data gradient. Write for the processed data-gradient direction, including any algorithm-specific optimizer state. Using the coefficient convention documented for PyTorch AdamW,The shrinkage term uses the pre-update parameter and is not inserted into the gradient moments.[ref]
AdamW in the PyTorch documentation. PyTorch2.15, algorithm: separate parameter-decay line before the adaptive update
This differs from coupled L2 regularization, which processes as a single gradient input. Decoupled weight decay was introduced for adaptive optimization in the AdamW work; the original paper also writes decay coefficients with the learning-rate factor absorbed differently, so its coefficient must be translated before comparing equations.[ref]
Decoupled Weight Decay Regularization by Ilya Loshchilov and Frank Hutter. Version3, section2 and Algorithm2
An original limiting case isolates the shrinkage. Suppose the processed direction is zero at every step and are constant. Repeated substitution givesWith , and , one update gives 0.98 and 50 updates give approximately 0.36417. For varying learning rates, the corresponding factor isThus the same numerical decay coefficient can have a different accumulated effect under a different learning rate schedule. In this zero-direction model, gives sign-preserving shrinkage; other factors have different behaviour.
The update order is also part of the definition. For , , and , the stated formula gives . Applying shrinkage after first taking the gradient step would instead give . Both operations may be described informally as decay plus a step, but they are different recurrences. An optimization checkpoint must retain the relevant state and settings to reproduce the chosen one.
Frank Hutter 2026-11-05
Frank Hutter researches automated design and configuration of algorithms and machine learning systems. His work asks how experimental measurements of an algorithm's performance can guide the search for better settings, replacing some manual trial and error with an explicit computational procedure.[ref]
Hutter and colleagues developed ParamILS, an algorithm configuration framework described in 2009. It searches settings of a target algorithm and limits unpromising evaluation runs to use the experimental budget more effectively.[ref]
ParamILS: An Automatic Algorithm Configuration Framework by Frank Hutter and others. Abstract, local-search configuration and adaptive evaluation-time limits
A useful example is a solver with several search settings: choosing a setting changes the procedure used on the next problem instance, rather than changing that instance's answer. Performance measured on the tuning instances should therefore be checked on separate instances before claiming a general improvement.With Ilya Loshchilov, Hutter also introduced the decoupled weight decay mechanism underlying AdamW. Their analysis showed why using coupled L2 regularization and directly shrinking parameters cease to be equivalent under general adaptive gradient scaling.[ref]
Decoupled Weight Decay Regularization by Ilya Loshchilov and Frank Hutter. Section 2, propositions 1–2 and Algorithm 2
This contribution connects algorithm design to a precise update equation: an option called weight decay can describe different mathematical operations in different optimizers.Frank Hutter, portrait linked from his Freiburg Machine Learning Lab profile
. Weight decay 2026-11-05
Weight decay supplies a parameter-shrinkage contribution to an optimizer update, with a coefficient commonly denoted . Two implementations must be distinguished. Coupled L2 regularization adds the penalty to the objective function, replacing its data gradient by . Decoupled weight decay applies parameter shrinkage separately from the optimizer's processing of the data gradient. These operations are equivalent for plain gradient descent with matched coefficients, but not in general for an adaptive gradient method.[ref]
Decoupled Weight Decay Regularization by Ilya Loshchilov and Frank Hutter. Version3, section2, propositions1–2 and AppendixA
Use the PyTorch convention here: a decoupled update shrinks parameters by , where is the learning rate. A source writing instead has absorbed the step-size factor into its decay coefficient. For an unmodified gradient step,In AdamW, the decay contribution does not enter the stored first- or second-moment estimates of the gradient.[ref]
AdamW in the PyTorch documentation. PyTorch2.15, algorithm, separate parameter-decay line and moment updates
An original fixed-scaling example exposes the difference. Let , , , and diagonal matrix . Applying the same scaling to the entire coupled gradient givesSeparating uniform parameter shrinkage givesThe second coordinate receives different shrinkage. This is an illustrative fixed matrix, not a full AdamW simulation. With history-dependent scaling, coupling the penalty into the gradient can also alter the optimizer state. State the update equation and coefficient convention when reporting a decay setting; the label alone does not specify either.
