Show that L2-regularised linear regression is MAP estimation under a particular prior. Which prior gives L1? What does the regularisation strength correspond to?
Theme reported publicly: Google DeepMind
Answer
Model answer, written in a candidate's voice
In short
- Posterior ∝ likelihood × prior.
- Gaussian noise + zero-mean Gaussian prior → squared error + λ‖w‖², λ = σ²_noise / σ²_prior.
- Laplace prior → L1; λ scales with noise variance over prior scale.
- MAP is the posterior mode, not a full posterior.
- L2/weight decay matches plain SGD but not Adam; AdamW decouples decay.
In full
Posterior is p(w|y) ∝ p(y|w)p(w). With y = Xw + ε and ε ~ N(0, σ²_noise I), the likelihood contributes exp(-||y-Xw||²/(2σ²_noise)); a zero-mean Gaussian prior w ~ N(0, σ²_prior I) contributes exp(-||w||²/(2σ²_prior)). Maximising the posterior is minimising ||y-Xw||² + (σ²_noise/σ²_prior)||w||², so L2-regularised regression is MAP with λ = σ²_noise/σ²_prior. A Laplace prior p(w) ∝ exp(-||w||_1/b) gives the L1 objective, with λ proportional to σ²_noise/b (exactly σ²_noise/b for the ½||r||² + λ||w||₁ convention). MAP is only the mode of the posterior, not a full posterior or uncertainty estimate. Plain SGD on the L2 objective is equivalent to weight decay, but Adam rescales the regularisation gradient per coordinate, so the same λ is not the same as decoupled weight decay—the mismatch that motivated AdamW.
What a strong answer covers
- Posterior ∝ likelihood × prior.
- Gaussian noise plus a Gaussian prior gives squared error + λ‖w‖², with λ = σ²_noise / σ²_prior.
- A Laplace prior gives L1.
- MAP is a point estimate, not a full posterior.
- Weight decay matches L2 under plain SGD but not under Adam, which motivated AdamW.
Common mistakes
- Mixing up which prior gives sparsity.
- Claiming MAP provides uncertainty estimates.