Coupled penalty versus separate decay
Why can adding an L2 penalty to a loss produce a different update from a separate weight-decay step under Adam, although they can coincide for ordinary SGD?
Worked answer
An L2 penalty contributes times the weight to the gradient, so Adam’s adaptive coordinate scaling also acts on the penalty gradient. A separate decay step scales the weight directly outside the adaptive gradient calculation. Ordinary scalar-step SGD gives the same algebra after matching the coefficients.