Why Does L1 Regularization Lead to Sparse Solutions Unlike L2?

  • Thread starter Thread starter newphysist
  • Start date Start date
  • Tags Tags
    Regularization
newphysist
Messages
12
Reaction score
0
I am trying to understand the difference between L1 vs. L2 regularization in OLS. I understand the concept of center of ellipsoid being the optimal solution and ellipse itself being contours of constant squared errors. And when we use L2 regularization we introduce a spherical constraint on coefficient and when we use L1 the constraints are rectangle in R2 representation.

In all corresponding pictorial representation of the above in literature,etc, the representation in R2 always shows ellipsoid intersecting the circle in first quadrant but the square on one of the axis i.e at corners. How come in L1 regularization the ellipsoid intersects the square only on corners but in case of L2 any point on the sphere. Wouldn't we get a sparse solution for L2 as well if ellipse intersects the circle (R2 representation) at axis.

Thanks
 
Mathematics news on Phys.org
The best intuition I've found comes from considering a special case, the 1D minimization problem
argmin_x |x| + a/2(x-1)^2.

The absolute value term tries to put the minimum at x=0, and the quadratic term tries to put the minimum at x=1. The constant 'a' determines the relative influence of the quadratic term compared to the absolute value term, and so as you change 'a', the minimum will move between 0 and 1.

However a really interesting "thresholding" phenomenon occurs. The minimum stays at exact zero for 'a' < 1, and only when 'a'=1 does the minimum start increasing. Draw some pictures to convince yourself this is true. This is because the absolute value function has many "subderivatives" (tangent lines lying beneath the function) at zero, and so it can absorb changes to other terms derivatives, but only up to a certain limit. It is convenient, since it says that 'x' should be exactly zero unless there is a really good reason for it to not be, and the threshold for letting it be nonzero is determined by the parameter 'a'.

On the other hand, if the first term was differentiable instead of absolute value, even for a very small 'a', the minimum would be slightly positive (recall that the minimum is where the derivative of quantity to be minimized is zero). Thus there is no thresholding effect if both terms are differentiable.

l1 regularization is basically a multidimensional generalization of this principle.
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top