research31 min studyLesson 723 in Mathematics

Lasso oracle inequalities and tuning

Derive finite-sample sparse error bounds from a noise event and an explicit restricted-eigenvalue convention.

On this page

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 λ>0\lambda>0. Changing this normalization changes every numerical penalty and threshold, so a tuning formula must identify its convention. Let the true support be SS of size at most ss, 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 X⊤ε/nX^\top\varepsilon/n. 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 ∥XΔ∥22/n+λ∥ΔSc∥1≤3λ∥ΔS∥1\|X\Delta\|_2^2/n+\lambda\|\Delta_{S^c}\|_1\leq3\lambda\|\Delta_S\|_1. In particular, the error lies in the previously defined cone, without assuming that the estimator selects the correct support.

β^∈arg⁡min⁡b{∥y−Xb∥222n+λ∥b∥1},Eλ={∥X⊤εn∥∞≤λ2}.\widehat\beta\in\arg\min_b\left\{\frac{\|y-Xb\|_2^2}{2n}+\lambda\|b\|_1\right\},\qquad \mathcal E_\lambda=\left\{\left\|\frac{X^\top\varepsilon}{n}\right\|_\infty\leq\frac\lambda2\right\}.
The penalty convention and the score event are part of the theorem, not interchangeable tuning details.↔ Scroll wide equations horizontally.

Curvature converts the basic inequality into rates

Assume the full-error restricted-eigenvalue inequality with constant κ\kappa 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.

∥β^−β∗∥2≤3λsκ2,∥X(β^−β∗)∥22n≤9λ2sκ2,∥β^−β∗∥1≤12λsκ2on Eλ.\|\widehat\beta-\beta^*\|_2\leq\frac{3\lambda\sqrt s}{\kappa^2},\qquad \frac{\|X(\widehat\beta-\beta^*)\|_2^2}{n}\leq\frac{9\lambda^2s}{\kappa^2},\qquad \|\widehat\beta-\beta^*\|_1\leq\frac{12\lambda s}{\kappa^2}\quad\text{on }\mathcal E_\lambda.
The truth is s-sparse and the normalized design lower bound uses kappa squared times the full Euclidean error.↔ Scroll wide equations horizontally.

A probability statement needs a noise model

For fixed design columns of Euclidean norm at most n\sqrt n and independent Gaussian observation noise with covariance σ2In\sigma^2I_n, every noise score has variance at most σ2/n\sigma^2/n. A union bound therefore makes the score event hold with probability at least 1−δ1-\delta when λ=2σ2log⁡(2p/δ)/n\lambda=2\sigma\sqrt{2\log(2p/\delta)/n}, for 0<δ<10<\delta<1. 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.

Soft thresholding under an orthogonal design

In a small normalized orthogonal design with X⊤X/n=IX^\top X/n=I, suppose a=X⊤y/n=(1.2,−0.3,0.05)a=X^\top y/n=(1.2,-0.3,0.05) and λ=0.2\lambda=0.2. Compute the exact Lasso solution and check its optimality conditions.

  1. Up to a constant independent of the coefficients, the objective is ∥b−a∥22/2+0.2∥b∥1\|b-a\|_2^2/2+0.2\|b\|_1. It separates coordinatewise, so a positive coordinate loses the threshold, a negative coordinate gains it, and coordinates within the threshold become zero.

  2. The solution is (1,−0.1,0)(1,-0.1,0). Its absolute-value norm is 1.11.1. The residual score a−β^a-\widehat\beta is (0.2,−0.2,0.05)(0.2,-0.2,0.05).

  3. 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 result

The exact solution is one, minus one tenth, and zero; solving the optimization exposes shrinkage rather than eliminating it.

Explore the model

Interactive lab

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.

Optimization accuracy is a separate errorGradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Current readings: Position x0: 2; Objective x²/2: 2; Iteration behavior: Stable step. All parameters are adjustable with the labeled controls below.−4−202402.174.356.528.7Parameter xf(x) = x²/2n = 0
ObjectiveDiscrete iterate
Position x0
2
Objective x²/2
2
Iteration behavior
Stable step
n = 0 · t = 0 s

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.

Check your understanding

Which combination is sufficient for the displayed coefficient-error bound?

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 3(0.1)4=0.63(0.1)\sqrt4=0.6. The squared normalized prediction error is at most 9(0.1)2(4)=0.369(0.1)^2(4)=0.36, and the absolute error norm is at most 12(0.1)(4)=4.812(0.1)(4)=4.8. 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.

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.