---
title: Show that L2-regularised linear regression is MAP estimation under a particular prior. Which prior gives L1? What does…
url: https://gurkanozkan.ai/learn/questions/research-regularisation-as-a-prior-012/
markdown: https://gurkanozkan.ai/learn/questions/research-regularisation-as-a-prior-012.md
kind: question
role: Research
stage: Technical
difficulty: Medium
json: https://gurkanozkan.ai/api/learn/questions/research-regularisation-as-a-prior-012.json
robots: noindex
---

# Show that L2-regularised linear regression is MAP estimation under a particular prior. Which prior gives L1? What does the regularisation strength correspond to?

Research · Technical · Medium

Theme reported publicly: [Google DeepMind](https://www.sundeepteki.org/advice/the-ultimate-ai-research-scientist-interview-guide-cracking-anthropic-openai-google-deepmind-top-ai-labs-in-2026)

## 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.

*Corrected by an independent AI reviewer.*

## 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.
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
