We want the mean θ of a Gaussian, N(x | θ, 1), but half of the points are clutter from a broad N(x | 0, 10); the prior is θ ~ N(0, 100). The exact posterior is a mixture of 2N Gaussians (gold, computed here by quadrature). EP approximates every likelihood factor fn(θ) by a Gaussian-shaped site f̃n(θ) and refines one site at a time: remove it from q (the cavity, green), multiply in the exact factor (the tilted distribution, gold) and match its mean and variance (white dashed); the new site is what qnew divided by the cavity leaves (red). The bottom panel shows the latest update; the small panels track the error against the computing cost.
Click a cross to choose the site that the next update refines. Cost is counted in floating-point operations: one EP site update costs 59, one variational Bayes iteration 12N + 2 and one Newton step of the Laplace approximation 19N + 8 (see the Python code).
ep_clutter, vb_clutter, laplace_clutter, exact_clutter; Figures 10.15 to 10.17) and the checks in code/checks_ch10b.py.