← Meta Interview Insights

Meta·Data Scientist·Technical Phone Screen·Senior

SeniorPrefer not to say
May 2026Remote

Summary

Interviewed for a Data Scientist role at Meta and got hit with a deep-dive on LASSO that went way beyond 'L1 adds sparsity.' Seven sub-parts, all in one question. It felt more like a grad school oral exam than a job interview.

Questions Asked (1)

Q1

Walk me through why LASSO performs feature selection. Cover the intuition behind L1 vs L2 penalties, the geometry of the constraint region, the optimality conditions for a coefficient going to zero, how correlated predictors affect which features get selected, why you need to standardize inputs, how you pick lambda and what it does to bias and variance, and when you'd use Elastic Net instead.

Technical Trade-offsAlgorithms & Data Structures
Author's notes

This was one question.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start with the core intuition that L1 penalization creates a diamond-shaped constraint region, leading to sparse solutions, then systematically cover the geometry, optimality conditions, correlation effects, standardization, lambda selection, and when to use Elastic Net. Use a structured narrative that connects each concept to the practical implications for feature selection.

Pro tip: Emphasize that LASSO's feature selection is a byproduct of the geometry and that correlated predictors cause arbitrary selection, which is why Elastic Net is often preferred in practice. Mention that at Meta, where high-dimensional sparse data is common, understanding these trade-offs is crucial for model interpretability and performance.

1. Intuition behind L1 vs L2

Explain that L1 penalty (sum of absolute values) encourages sparsity by driving some coefficients exactly to zero, while L2 penalty (sum of squares) shrinks coefficients but rarely to zero. Use the analogy of a diamond vs circle constraint region.

2. Geometry and optimality conditions

Describe how the diamond shape of the L1 constraint region has corners at the axes, making it likely for the loss contour to intersect at a corner where some coefficients are zero. Discuss the subgradient optimality condition: for a coefficient to be zero, the absolute value of the gradient of the loss must be less than or equal to lambda.

3. Correlated predictors and standardization

Explain that with highly correlated features, LASSO tends to select one arbitrarily and zero out others, which can be unstable. Stress the importance of standardizing inputs so the penalty is applied fairly across features, as LASSO is not scale-invariant.

4. Lambda selection and bias-variance trade-off

Discuss how lambda controls the strength of regularization: larger lambda increases bias but reduces variance, leading to sparser models. Mention using cross-validation to select lambda, and note that the optimal lambda balances bias and variance for predictive performance.

5. When to use Elastic Net

Explain that Elastic Net combines L1 and L2 penalties, addressing LASSO's limitations with correlated predictors by encouraging grouping effect while still performing feature selection. Use it when there are many correlated features or when you want to select more than the number of samples.

Key Points to Mention

  • L1 penalty induces sparsity by driving coefficients exactly to zero, unlike L2.
  • The diamond-shaped constraint region of L1 has corners on axes, promoting sparse solutions.
  • Optimality condition: coefficient is zero if the absolute gradient of loss is <= lambda.
  • Correlated predictors cause LASSO to arbitrarily select one and ignore others, leading to instability.
  • Standardization is crucial because LASSO penalizes coefficients on their original scale.
  • Lambda controls regularization strength; cross-validation is used to select it, trading off bias and variance.
  • Elastic Net is preferred when predictors are highly correlated or when you want to select groups of features.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.