Decoupled weight decay

ID: decoupled-weight-decay

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]
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]
An original limiting case isolates the shrinkage. Suppose the processed direction is zero at every step and are constant. Repeated substitution gives
With , and , one update gives 0.98 and 50 updates give approximately 0.36417. For varying learning rates, the corresponding factor is
Thus 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.

New to topics? Read the docs here!