Why does L1 regularization produce sparse solutions with exact zeros while L2 does not?
Last updated
L1's kink at zero gives a subgradient interval
[−λ, λ]. If the loss gradient at zero is weaker than λ, the optimum sits exactly at 0.L2's gradient
2λβvanishes at zero, so it shrinks values proportionally (z/(1+λ)) but almost never reaches 0.Geometrically, the L1 constraint ball is a diamond with corners on the axes, and loss contours usually touch it at a corner. The round L2 ball has no corners.
- https://medium.com/@sangoleshubham20/the-minimalist-approach-understanding-why-l1-regularization-creates-sparse-models-8b911f5466af
- https://satishkumarmoparthi.medium.com/why-l1-norm-creates-sparsity-compared-with-l2-norm-3c6fa9c607f4
- https://www.reddit.com/r/learnmachinelearning/comments/1xktorq/why_does_l1_regularization_push_weights_to/