What is soft thresholding, and how does it produce the lasso solution?

Quick Overview

Asks what the soft-thresholding operator is and how it yields the lasso estimate. Tests the subgradient derivation of the one-dimensional L1 problem, the orthonormal-design case, and how coordinate descent and proximal gradient methods apply the operator to a general design matrix.

What is soft thresholding, and how does it produce the lasso solution?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What is soft thresholding, and how does it produce the lasso solution? Use the lasso objective $\tfrac{1}{2}\lVert y - X\beta\rVert_2^2 + \lambda\lVert\beta\rVert_1$. ```hint Start in one dimension Solve $\min_b \tfrac{1}{2}(b - z)^2 + \lambda|b|$ by cases on the sign of $b$, and use a subgradient to handle $b = 0$. ``` ```hint Then go back to many coefficients Look at the lasso objective as a function of a single coefficient while every other coefficient is held fixed. ``` ### What a Strong Answer Covers - The definition of the soft-thresholding operator and what it does to a value (shrinks it by $\lambda$, sets small values to exactly zero). - A derivation of the operator as the solution of the one-dimensional L1-penalized problem, through the subgradient condition. - The orthonormal-design case, where the lasso decouples into one thresholding step per coefficient. - How coordinate descent or proximal gradient methods use the operator for a general design matrix. - A contrast with ridge shrinkage and with hard thresholding. ### Follow-up Questions - Why does cyclic coordinate descent converge for the lasso even though the L1 penalty is not differentiable? - How do warm starts along a decreasing sequence of $\lambda$ values speed up fitting the whole lasso path? - What does the coordinate update look like for the elastic net? - Why does the lasso tend to keep one feature from a group of highly correlated features and zero out the rest?

Overview: Asks what the soft-thresholding operator is and how it yields the lasso estimate. Tests the subgradient derivation of the one-dimensional L1 problem, the orthonormal-design case, and how coordinate descent and proximal gradient methods apply the operator to a general design matrix.

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

What is soft thresholding, and how does it produce the lasso solution?

Use the lasso objective 12∥y−Xβ∥22+λ∥β∥1\tfrac{1}{2}\lVert y - X\beta\rVert_2^2 + \lambda\lVert\beta\rVert_1.

What a Strong Answer Covers Guidance

  • The definition of the soft-thresholding operator and what it does to a value (shrinks it by λ\lambda , sets small values to exactly zero).
  • A derivation of the operator as the solution of the one-dimensional L1-penalized problem, through the subgradient condition.
  • The orthonormal-design case, where the lasso decouples into one thresholding step per coefficient.
  • How coordinate descent or proximal gradient methods use the operator for a general design matrix.
  • A contrast with ridge shrinkage and with hard thresholding.

Follow-up Questions Guidance

  • Why does cyclic coordinate descent converge for the lasso even though the L1 penalty is not differentiable?
  • How do warm starts along a decreasing sequence of λ\lambda values speed up fitting the whole lasso path?
  • What does the coordinate update look like for the elastic net?
  • Why does the lasso tend to keep one feature from a group of highly correlated features and zero out the rest?