Skip to content
Middle+0 views

Have you heard of the probabilistic interpretation of L1 and L2 regularization?

Practice

Asked at

AI answer

Yes. Regularization can be interpreted as MAP estimation: we maximize the posterior probability of the parameters, which is equivalent to minimizing the negative log-likelihood plus a penalty.

  • L2 regularization corresponds to a Gaussian prior on the coefficients: (w_i \sim \mathcal{N}(0, \sigma^2)). The penalty is proportional to (\sum_i w_i^2), so large coefficients become less likely, but are usually not driven to zero.
  • L1 regularization corresponds to a Laplace prior: (p(w_i) \propto e^{-\lambda |w_i|}). The penalty is proportional to (\sum_i |w_i|), and the optimum is often sparse—some coefficients are zero.

This is an interpretation based on prior assumptions, not a claim that those assumptions are necessarily true. Feature scales and the regularization parameter affect the result.