Lasso oracle inequalities and tuning
Derive finite-sample sparse error bounds from a noise event and an explicit restricted-eigenvalue convention.
On this page
The question for today
What you’ll understand
- Derive the Lasso basic inequality and error cone.
- Choose a Gaussian-noise penalty with its failure probability and normalization.
- Distinguish prediction bounds, coefficient bounds, and optimization accuracy.
The Lasso balances a quadratic data-fit term against the sum of absolute coefficient values. Its usefulness is not explained merely by saying that the penalty encourages zeros. A statistical guarantee combines three ingredients: the true coefficient is sparse, the penalty dominates the largest noise score, and the design has enough curvature on the resulting error cone. Each ingredient appears explicitly in a finite-sample derivation.
Normalize the objective before choosing the penalty
Use the objective in the display, with squared loss divided by twice the sample size and penalty parameter . Changing this normalization changes every numerical penalty and threshold, so a tuning formula must identify its convention. Let the true support be of size at most , and let the coefficient error be the fitted vector minus the truth. Comparing the objective at the minimizer and at the truth gives a basic inequality with a noise inner product and a difference of absolute-value penalties.
Define the noise score as . On the event that its maximum absolute coordinate is at most half the penalty, Hölder’s inequality controls the noise inner product by half the penalty times the absolute error norm. The support decomposition bounds the possible penalty decrease by the inside mass minus the outside mass. Combining the two gives . In particular, the error lies in the previously defined cone, without assuming that the estimator selects the correct support.
Curvature converts the basic inequality into rates
Assume the full-error restricted-eigenvalue inequality with constant on the cone for the true support. Cauchy–Schwarz bounds inside absolute mass by the square root of support size times the full Euclidean error. Combining this with the basic inequality yields the displayed coefficient and prediction bounds. For the absolute error norm, the cone gives at most four times the inside mass, producing the third bound. These constants follow the specified convention and are not universal across differently normalized definitions.
The word oracle reflects comparison with the lower-dimensional problem that would remain if the true support were supplied in advance. The unknown support introduces a logarithmic price in common tuning regimes. The displayed theorem assumes exact sparsity and gives error bounds, not exact variable selection or confidence intervals. If the truth is only approximately sparse, an additional tail or approximation term enters the argument. A small training prediction error also does not imply coefficient accuracy unless the stated restricted curvature holds.
A probability statement needs a noise model
For fixed design columns of Euclidean norm at most and independent Gaussian observation noise with covariance , every noise score has variance at most . A union bound therefore makes the score event hold with probability at least when , for . Dependence between different column scores is allowed. The noise scale must be known or estimated with an additional justified procedure; the theorem does not make it observable automatically.
Cross-validation targets predictive performance and need not select a penalty satisfying this particular simultaneous-noise guarantee. Conversely, a conservative theoretical penalty can give a numerically loose bound while remaining valid. Optimization error is another distinct quantity: solving the convex objective very accurately does not remove shrinkage bias or poor design geometry. An approximate numerical solution needs its own optimization residual accounted for in the basic inequality. Statistical error, tuning uncertainty, and algorithmic convergence should not be conflated simply because all affect a final fitted vector.
Work it through
Soft thresholding under an orthogonal design
In a small normalized orthogonal design with , suppose and . Compute the exact Lasso solution and check its optimality conditions.
Up to a constant independent of the coefficients, the objective is . It separates coordinatewise, so a positive coordinate loses the threshold, a negative coordinate gains it, and coordinates within the threshold become zero.
The solution is . Its absolute-value norm is . The residual score is .
At the two nonzero coordinates the score equals the penalty times their signs. At the zero coordinate its absolute value is strictly below the penalty. These are the subgradient optimality conditions for the stated convex objective, verifying the calculation without knowing the true coefficient vector.
The exact solution is one, minus one tenth, and zero; solving the optimization exposes shrinkage rather than eliminating it.
The living notebook
Explore the model
Interactive lab · optimization
Optimization accuracy is a separate error
Pause/Reset, set step size 1 and initial position 1, and predict that one Step sends the quadratic iterate to zero. For a fresh comparison Pause/Reset, set both step size 0.5 and initial position 1; one Step gives position 0.5 and loss 0.125. Reset restores both defaults and zero time.
- Position x0
- 2
- Objective x²/2
- 2
- Iteration behavior
- Stable step
Gradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forAn optimizer can reach its target quickly or slowly. This quadratic gradient-descent instrument has no Lasso penalty or random data and measures algorithmic error only.
Pause & reason
Check your understanding
Your turn
Try it yourself
On the required noise event, take support size four, penalty 0.1, and restricted-eigenvalue constant one. Compute the three displayed bounds and explain whether they prove exact support recovery.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The Euclidean bound uses the square root of support size; the prediction bound is for a squared normalized norm.
Compare with the solution
The Euclidean error is at most . The squared normalized prediction error is at most , and the absolute error norm is at most . These are upper bounds conditional on the specified event and geometry, not exact realized errors. They do not prove support recovery: a small true coefficient can be thresholded away, and small nonzero fitted coefficients outside the true support can still satisfy all three inequalities.
Keep the idea
Take it with you
- State the loss normalization before reporting a penalty value.
- Sparsity and noise control produce an error cone; restricted curvature supplies coefficient bounds.
- Prediction guarantees, variable selection, confidence intervals, and solver convergence are different conclusions.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.