Karush-Kuhn-Tucker conditions for the Lasso 2026-10-06
For the Lasso criterion , the displayed subgradient optimality condition is necessary and sufficient. A nonzero coefficient has residual score , and a zero coefficient has residual score in . The subdifferential of the L1 norm supplies both cases.
Past exam of the mathematics course of the University of Cambridge 2015 iii Paper 32 1 Solution Created 2026-10-03 Updated 2026-10-06
With the centred data, no intercept is needed. Use the Lasso normalizationWrite and . The KKT conditions areIndeed, the subdifferential of the L1 norm consists of vectors with at nonzero coordinates and at zero coordinates. The subgradient optimality condition is . convexity makes these conditions sufficient as well as necessary. These are the Karush-Kuhn-Tucker conditions for the Lasso.
Here is a correlation-parameter version of least angle regression. Put , a Gram matrix, and initialize , , .
- Compute . For , keep . If , stop: all regression residual correlations already vanish. Otherwise add the uniquely maximizing variable to obtain .
- At step , put , , , and . These active signs have entries in . Solve , set , and follow the segment
- For each inactive variable set . Along the segment its correlation is , where . Its candidate hitting distances areDiscard undefined or nonpositive candidates. Choose the smallest remaining distance below , if one exists, and otherwise choose . Set . If , add the unique variable achieving the hit to form and repeat; if , stop.
The two hitting formulas come from . This is LAR hitting time. Active variables are not dropped if a coefficient crosses zero: that is the distinction between this algorithm and the modified Lasso path algorithm.
The active Gram matrix is an invertible matrix under the assumed unique positive hits. Inductively, a candidate column in the span of the current active columns would have equal to a fixed linear combination of their correlations, hence proportional to on the whole segment. Its ratio could not first reach one at a positive interior knot. Thus every uniquely entering column adds a new independent direction. This also allows more predictors than observations; the algorithm stops before a dependent direction needs to be added at zero correlation.
We now prove the requested invariant. At the first positive knot the newly active correlation has magnitude . At a later knot the old active correlations have that knot's magnitude by induction, and the entering correlation has the same magnitude by the hitting rule. Throughout the next segment,The first-hitting rule also ensures for every inactive . If no positive hit remains, this inequality continues to zero, where all correlations vanish. Consequently, on every printed closed segment,This is the LAR active correlation invariant.
If active nonzero coefficients have the same signs as their residual correlations, the active equalities are precisely the nonzero-coordinate Lasso KKT conditions. An active coefficient which is zero also satisfies the zero-coordinate KKT conditions, because its correlation is within . Inactive coefficients are zero and satisfy those same inequalities by construction. Thus every point of the least angle regression path is a Lasso minimizer for . Under the stated uniqueness assumption,This proves the desired implication, in fact under the weaker sign compatibility of LAR and Lasso condition requiring agreement only at nonzero coefficients.
There is an endpoint convention in the printed sufficient condition. With the standard , a newly entering coefficient is zero at a positive knot although its correlation is ; the displayed sign equality therefore cannot literally hold there. At the final zero knot the correlation signs are zero as well. Interpret sign compatibility on positive open segments, or in the nonzero-coefficient/subgradient sense just proved. The KKT conditions already handle zero coefficients at knots, and no equality of solution paths at is needed for the requested conclusion.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 205 2 Solution Created 2026-10-03 Updated 2026-10-05
Use the normalizationfor the Lasso. A centered sub-Gaussian random variable with parameter satisfies for all ; for a noncentered variable apply this definition to . With fixed , independence of the errors givesThe exponential Markov bound, optimized over separately for the two signs, gives . Take and apply the union bound over columns:The specified positive tuning parameter requires ; at its formula is zero. For small the probability lower bound can be negative and hence uninformative. Although centering makes the centered errors dependent, means , so the preceding proof uses the original independent errors, not independence after centering.
The Karush-Kuhn-Tucker conditions, using the subdifferential of the L1 norm, areConsequently, for nonempty , on ,This establishes the required active-set inequality without any rank condition on .
For , a sufficient Compatibility condition for the Lasso isIndeed, for , comparison of the two Lasso objective values and the score bound on give the Basic inequality for the LassoIt follows that satisfies the Lasso cone condition and . Thus , including the trivial case. This proves the slightly stronger , and in particular the requested . If , the same basic inequality forces on ; no nonempty-support compatibility constant is needed.
For the support-size argument, use the stated prediction bound with constant . Set . By the Cauchy-Schwarz inequality and the definition of the sparse maximum eigenvalue,Combining with the lower bound and squaring gives for every nonempty . If and , choose of size ; this contradicts the strict inequality defining . If , proves the assertion directly. Hence in both cases.
When , minimality and monotonicity of the sparse maximum eigenvalues giveWhen , the first result gives , so the same final bound holds. Thus the finite-index conclusion is .
There is a genuine domain omission in the printed last assertion: the definition of only makes sense for , so is undefined when . This case can occur: take centered orthogonal columns with , , , and . Then for every available and none exceeds , so . A universally defined replacement, from and monotonicity, isAlternatively, explicitly extend the definition by for , including infinity. Under that added convention the printed final expression is meaningful and follows from this replacement bound. Neither convention nor finiteness should be silently assumed.
Past exam of the mathematics course of the University of Cambridge 2018 iii Paper 205 4 Solution Created 2026-10-03 Updated 2026-10-05
For a convex function , its subdifferential at is the set of supporting slopesThe subgradient optimality condition isIndeed, the defining inequality with is exactly the global minimum inequality. For the subdifferential of the L1 norm, the coordinates vary independently:
Let . The Karush-Kuhn-Tucker conditions for Lasso give a vector such that . If , the unsquared residual norm is differentiable at this fit, with gradientUsing the subdifferential sum rule, choose to obtainConvexity now proves the tuning relation between Lasso and square-root Lasso:The positive residual assumption is needed both for this gradient and for the quotient defining the tuning parameter.
For the final score calculation, use the usual fixed-design interpretation of the normal linear model: regard and the tuning parameter in the regression of as fixed, and choose that regression's minimizer using only those inputs. Its nonzero residual then has the Square-root Lasso optimality conditionExpanding the response residual givesSince is a fixed unit vector and , a linear image of a multivariate normal vector gives . Finally, Holder inequality and the residual score bound yieldThis is the residual-score decomposition from square-root Lasso. The normality statement also holds conditionally on a design independent of the noise. If were chosen from the response noise, for example through the preceding formula, the direction would require a separate independence argument; the final calculation treats as fixed.