Weight Decay and Quadratic Regularization
Derive when an L2 penalty equals multiplicative shrinkage and see what changes when the optimizer rescales gradients.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Plain gradient descent makes the two updates align
For objective \(L(w)+\tfrac{\lambda}{2}\|w\|^2\), a step with rate \(\eta\) gives \(w'=(1-\eta\lambda)w-\eta\nabla L(w)\). Applying the same factor to the old parameter and then subtracting the unpenalized gradient gives the same update. This is an algebraic equivalence for the stated rule, with a convention about which parameters are penalized.
Adaptive scaling acts on the penalty too
If an optimizer scales the gradient differently across coordinates, passing \(\lambda w\) through that transformation can give unequal shrinkage. Decoupled decay applies a chosen shrinkage rule directly, apart from the optimizer’s moments. Coefficients still need evaluation under the training schedule. Adaptive gradient moments describe the rescaling, and ridge regression provides a simpler model where the quadratic objective can be solved exactly.[1][2]