How does L1 regularization behave when the number of features is much larger than the number of samples?

Quick Overview

Asks how lasso regression behaves when there are far more features than samples. Tests understanding of solution uniqueness, the limit on how many features can be selected, instability among correlated features, the conditions for recovering the true support, and fixes such as elastic net and stability selection.

How does L1 regularization behave when the number of features is much larger than the number of samples?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

How does L1 regularization (the lasso) behave in linear regression when the number of features $p$ is much larger than the number of samples $n$? ```hint Count what the data can pin down Think about the rank of the design matrix when there are fewer rows than columns, and what that implies for how many coefficients can be non-zero at once. ``` ```hint Try two nearly identical features Picture two columns with correlation close to 1 that both matter. Ask whether the L1 penalty prefers to split the weight between them or put it on one. ``` ```hint Separate prediction from selection Ask whether the $\lambda$ that minimizes cross-validated error is also the one that recovers the right features, and what recovery needs from the data. ``` ### What a Strong Answer Covers - Why the problem stays well-posed when OLS does not, and what is and is not unique about the solution. - The limit on how many features lasso can select, and what it means when many features matter. - Behavior on groups of correlated features and the resulting instability. - The conditions under which lasso recovers the true set of non-zero coefficients. - The shrinkage bias, how the choice of $\lambda$ trades false positives against shrinkage, and the usual fixes. ### Follow-up Questions - How would you choose $\lambda$ when the goal is feature selection and prediction accuracy is secondary? - Why does the elastic net give strongly correlated features similar coefficients? - How would you get valid confidence intervals for coefficients after lasso has selected the features? - How does stability selection limit the number of false discoveries?

Overview: Asks how lasso regression behaves when there are far more features than samples. Tests understanding of solution uniqueness, the limit on how many features can be selected, instability among correlated features, the conditions for recovering the true support, and fixes such as elastic net and stability selection.

General logo
General
Nov 25, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

How does L1 regularization (the lasso) behave in linear regression when the number of features pp is much larger than the number of samples nn?

What a Strong Answer Covers Guidance

  • Why the problem stays well-posed when OLS does not, and what is and is not unique about the solution.
  • The limit on how many features lasso can select, and what it means when many features matter.
  • Behavior on groups of correlated features and the resulting instability.
  • The conditions under which lasso recovers the true set of non-zero coefficients.
  • The shrinkage bias, how the choice of λ\lambda trades false positives against shrinkage, and the usual fixes.

Follow-up Questions Guidance

  • How would you choose λ\lambda when the goal is feature selection and prediction accuracy is secondary?
  • Why does the elastic net give strongly correlated features similar coefficients?
  • How would you get valid confidence intervals for coefficients after lasso has selected the features?
  • How does stability selection limit the number of false discoveries?