Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Don’t believe wild answers from little data
Fit a model to only a few noisy measurements and it may give extreme answers, like a motor friction ten times larger than any real motor has. If you already know roughly what values are reasonable, you should prefer answers near them unless the data strongly disagree. That’s a prior. Picking the single most probable answer given data and prior is MAP estimation.
Engineers often do this without calling it Bayesian: “regularization” or “weight decay” in machine learning is exactly a prior that says “smaller weights are more plausible”.
Identifying robot dynamics from short experiments, training neural networks that generalize, and picking out the few sensors that matter from hundreds all rely on regularization, which is MAP with a prior. Knowing the link tells you how to set the regularization strength sensibly.
- 1. MAP picks the parameter value that is…
- 2. Weight decay in ML corresponds to…
- 3. With very little data, a prior helps by…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Definition
Because doesn’t depend on , it doesn’t affect the maximizer. With a flat prior, MAP equals MLE.
Priors are penalties
For linear regression with :
| Prior on | MAP problem | Name |
|---|---|---|
| ridge, weight decay | ||
| Laplace(0, b) | lasso | |
| shrink toward a reference |
For ridge, : noisy data or a confident prior mean strong regularization. The closed form is , which also fixes ill-conditioned or rank-deficient (A2.3-7).
- 1. A Gaussian prior on regression weights gives…
- 2. For ridge, λ =
- 3. With a flat prior, the MAP equals…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.Why L1 gives exact zeros
The lasso’s optimality condition for coordinate is , where the subgradient . If the correlation with the residual is below in absolute value, is optimal. The coordinate update is the soft-threshold , with . Geometrically, the L1 ball’s corners touch the likelihood contours on the axes (see the demo). L2’s round ball almost never does.
Choosing λ
- From the model: from noise calibration and from prior knowledge.
- From data: cross-validation, or empirical Bayes (maximize the marginal likelihood over , A5.2-5).
What MAP gives up
- Uncertainty: a point estimate says nothing about how wide the posterior is. The Laplace approximation adds a Gaussian around the MAP, with covariance .
- Invariance: reparameterizing ( vs ) changes the density by a Jacobian factor, so it moves the mode. The posterior mean and median don’t have this problem.
- Representativeness: in high dimensions the mode can be atypical (most of the mass is far from it), and for multimodal posteriors it picks one bump.
- 1. Soft-thresholding z = 0.4 with t = 0.5 gives…
- 2. The Laplace approximation's covariance is…
- 3. Is the MAP invariant to reparameterization?
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Derivation: ridge = Gaussian MAP
Multiply by to get . Setting the gradient to zero gives . ∎ The Gaussian posterior is . Its mean, median and mode coincide, so here MAP loses nothing but the covariance.
Ridge through the SVD
With , . Each direction is shrunk by : well-determined directions (large ) barely change, and poorly determined ones are damped. This is Tikhonov regularization of an ill-posed inverse problem (A2.3-5).
Why the mode moves under reparameterization
If , then (A4.3-2). The Jacobian factor changes where the density peaks. For a flat prior on with of , the mode is on the scale, but when computed on the logit scale.
Exercise 3.1: Derive the lasso as Laplace-prior MAP
With , . Multiply by : , so .
- 1. Ridge shrinks the SVD direction with singular value s by the factor…
- 2. For a Gaussian likelihood and Gaussian prior, the MAP equals…
- 3. The lasso λ corresponds to…
Level 4: Expert
★★★★★ Expert⏱ 40 minResearchers: original papers and open problems.Identifying joint friction from a few samples
A robot joint’s torque is : inertia, viscous and Coulomb friction. It’s linear in the parameters. With only 8 short excitation samples, least squares is noisy. A Gaussian prior centred on datasheet/CAD values (MAP shrinking toward ) cuts the parameter error by about 70%. With 2000 samples the prior’s influence vanishes, as it should. Physically informed priors and penalties are standard in robot dynamics identification, also to keep identified inertias physically consistent (Swevers et al., 1997; Wensing, Kim and Slotine, 2018).
MAP and regularization in AI, robotics and aerospace
- Deep learning. Weight decay (Gaussian prior), dropout (approximate Bayesian averaging) and early stopping (implicit L2) are all regularizers (Krogh and Hertz, 1992; Gal and Ghahramani, 2016).
- Sparse identification of dynamics (SINDy) uses an L1 / sequential-threshold penalty over a library of candidate terms to discover governing equations from data (Brunton, Proctor and Kutz, 2016).
- Factor-graph SLAM and bundle adjustment compute MAP estimates of poses and landmarks. Priors anchor the gauge freedom and encode odometry (Dellaert and Kaess, 2017).
- Inverse problems in imaging and remote sensing. Tikhonov and total-variation regularization are MAP under smoothness or edge-preserving priors.
- Compressed sensing. L1 recovery of sparse signals from few measurements (Candès, Romberg and Tao, 2006).
References
- A. Tikhonov (1963). “Solution of incorrectly formulated problems and the regularization method.” Soviet Mathematics Doklady, 4.
- A. Hoerl, R. Kennard (1970). “Ridge regression: biased estimation for nonorthogonal problems.” Technometrics, 12(1).
- R. Tibshirani (1996). “Regression shrinkage and selection via the lasso.” JRSS B, 58(1).
- T. Park, G. Casella (2008). “The Bayesian lasso.” JASA, 103(482).
- T. Hastie, R. Tibshirani, M. Wainwright (2015). Statistical Learning with Sparsity. CRC Press.
- A. Krogh, J. Hertz (1992). “A simple weight decay can improve generalization.” NeurIPS.
- S. Brunton, J. Proctor, J. N. Kutz (2016). “Discovering governing equations from data by sparse identification of nonlinear dynamical systems.” PNAS, 113(15).
- P. Wensing, S. Kim, J.-J. Slotine (2018). “Linear matrix inequalities for physically consistent inertial parameter identification.” IEEE RA-L, 3(1).
- F. Dellaert, M. Kaess (2017). “Factor graphs for robot perception.” Foundations and Trends in Robotics, 6(1–2).
- E. Candès, J. Romberg, T. Tao (2006). “Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information.” IEEE Transactions on Information Theory, 52(2).