Why does the posterior mode under a Laplace prior give exact sparsity while the posterior mean does not?

Quick Overview

Asks why the MAP estimate under a Laplace prior can set regression weights exactly to zero while the posterior mean under the same prior cannot. Tests subgradient optimality at the L1 kink, expectations over continuous posteriors and the priors used for sparse Bayesian inference.

Why does the posterior mode under a Laplace prior give exact sparsity while the posterior mean does not?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

In Bayesian linear regression with Gaussian noise, a Laplace (double-exponential) prior on the weights makes the MAP estimate equal to the lasso. Why does the posterior mode under a Laplace prior give exact sparsity while the posterior mean does not? ```hint Optimization view Write the MAP estimate as a minimization problem and look at the subgradient of the penalty at zero. ``` ```hint Integration view Ask how much posterior probability the single point zero carries, and what that implies for an average over the posterior. ``` ### What a Strong Answer Covers - The link between the MAP estimate under a Laplace prior and the lasso objective. - Why the non-differentiable point at zero makes zero optimal for a whole range of data. - Why an expectation over a continuous posterior is almost never exactly zero. - The difference between sparsity of a point estimate and sparsity of the prior or the posterior. - Priors or procedures that give sparse Bayesian answers. ### Follow-up Questions - Would the posterior median be sparse under a Laplace prior? What about under a spike-and-slab prior? - What does a spike-and-slab prior cost computationally compared with the Bayesian lasso? - Under a horseshoe prior, how would you decide which coefficients to set to zero?

Overview: Asks why the MAP estimate under a Laplace prior can set regression weights exactly to zero while the posterior mean under the same prior cannot. Tests subgradient optimality at the L1 kink, expectations over continuous posteriors and the priors used for sparse Bayesian inference.

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

In Bayesian linear regression with Gaussian noise, a Laplace (double-exponential) prior on the weights makes the MAP estimate equal to the lasso. Why does the posterior mode under a Laplace prior give exact sparsity while the posterior mean does not?

What a Strong Answer Covers Guidance

  • The link between the MAP estimate under a Laplace prior and the lasso objective.
  • Why the non-differentiable point at zero makes zero optimal for a whole range of data.
  • Why an expectation over a continuous posterior is almost never exactly zero.
  • The difference between sparsity of a point estimate and sparsity of the prior or the posterior.
  • Priors or procedures that give sparse Bayesian answers.

Follow-up Questions Guidance

  • Would the posterior median be sparse under a Laplace prior? What about under a spike-and-slab prior?
  • What does a spike-and-slab prior cost computationally compared with the Bayesian lasso?
  • Under a horseshoe prior, how would you decide which coefficients to set to zero?