A classic generalised message-passing inference method, approximating belief propagation. Other names: assumed density filtering, which is a special case.
1 What?
The foundational paper, Thomas P. Minka (2001), is readable but lacks the right context to make sense in the 2020s.
Minka maintains an EP roadmap which discusses various facets of the field and is current to ca 2014, and a really useful cheat sheet.
Tutorial texts which include EP are… hmm… (Murphy 2012, 22.5; Wainwright and Jordan 2008, 1:4.3). A shortcoming of the texts I can find is that they say “This is how we generalize Assumed Density Filtering” which is as pedagogically useful as trying to introduce IEE754 float operations by saying “This is how we generalize an abacus”… Skip the abacus step, people.
Anyway, let us talk about the abacus.
2 Assumed Density Filtering
Approximating posteriors by moment matching of individual terms in a product approximation.
(Murphy 2012, 18.5.3) explains ADF. We assume that there is some family
Suppose we are interested in some unknown parameters
Practical example, you say? Murphy lists e.g. Zoeter (2007).
3 Generalising ADF to Expectation propagation
In EP we would like the ADF operations to be applicable on diverse belief propagation topologies, more general distances.. TBC
4 Relation to message passing on factor graphs
This has been confusing me. There is typically a factorisation given in the expectation propagation algorithm, but it is not necessarily the factor graph we would expect to see in other variational message passing, i.e. the factorisation over the factor graph. Sometimes it is; sometimes it is the somewhat-related-but-distinct product posterior approximation. When the posterior approximation factorization corresponds to the factorisation of the probability, in the sense of inducing the same graphical structure, then it is natural to think of expectation propagation as a factor graph message passing algorithm. That is to say, that we can write the true joint as
Not everyone makes this distinction. Here are some refs that do: Sutton (2005), Tom P. Minka (2005), Khashabi (n.d.),Thomas P. Minka (2018) (all pedagogic), Wainwright and Jordan (2008) , Welling, Minka, and Teh (2012) (advanced). Sutton (2005) is the simplest and most pragmatic.
Recall Tom P. Minka (2005):
The recipe to make a message-passing algorithm has four steps:
- Pick an approximating family for
to be chosen from. For example, the set of fully-factorized distributions, the set of Gaussians, the set of -component mixtures, etc. - Pick a divergence measure to minimize. For example, mean-field methods minimize the Kullback-Leibler divergence
, expectation propagation minimizes , and power EP minimizes -divergence . - Construct an optimization algorithm for the chosen divergence measure and approximating family. Usually this is a fixed-point iteration obtained by setting the gradients to zero.
- Distribute the optimization across the network, by dividing the network
into factors, and minimising local divergence at each factor.
We can apply this to construct EP in particular.
The next step is to write the original distribution
as a product of nonnegative factors: This defines the specific way in which we want to divide the network, and is not unique. Each factor can depend on several, perhaps all, of the variables of . By approximating each factor by , we get an approximation divided in the same way: Now we look at the problem from the perspective of a given approximate factor . Define to be the product of all other approximate factors: Similarly, define . Then factor seeks to minimize . To make this tractable, assume that the approximations we’ve already made, , are a good approximation to the rest of the network, i.e. , at least for the purposes of solving for . Then the problem becomes This problem is tractable, provided we’ve made a sensible choice of factors.
The resulting algorithm he summarizes as
- Initialize
for all . - Repeat until all
converge:- Pick a factor
. - Compute
- Minimise
- Pick a factor
This algorithm can be interpreted as message passing between the factors
. The approximation is the message that factor sends to the rest of the network, and is the collection of messages that factor receives (its “inbox”). The inbox summarizes the behavior of the rest of the network.
To enable the use of un-normalized distributions they introduce the un-normalized KL divergence:
and un-normalized
TBC
5 Higher order approximations
Kikuchi, Bethe etc
6 Incoming
Andrew Gelman on Vehtari et al. (2019):
We revisit expectation propagation (EP) as a prototype for scalable algorithms that partition big datasets into many parts and analyze each part in parallel to perform inference of shared parameters. The algorithm should be particularly efficient for hierarchical models, for which the EP algorithm works on the shared parameters (hyperparameters) of the model.
The central idea of EP is to work at each step with a “tilted distribution” that combines the likelihood for a part of the data with the “cavity distribution,” which is the approximate model for the prior and all other parts of the data. EP iteratively approximates the moments of the tilted distributions and incorporates those approximations into a global posterior approximation. As such, EP can be used to divide the computation for large models into manageable sizes. The computation for each partition can be made parallel with occasional exchanging of information between processes through the global posterior approximation. Moments of multivariate tilted distributions can be approximated in various ways, including, MCMC, Laplace approximations, and importance sampling.
I love love love love love this. The idea is to forget about the usual derivation of EP (the Kullback-Leibler discrepancy, etc.) and to instead start at the other end, with Bayesian data-splitting algorithms, with the idea of taking a big problem and dividing it into K little pieces, performing inference on each of the K pieces, and then putting them together to get an approximate posterior inference.
The difficulty with such algorithms, as usually constructed, is that each of the K pieces has only partial information; as a result, for any of these pieces, you’re wasting a lot of computation in places that are contradicted by the other K-1 pieces.
Christian Robert’s redjoinder is interesting too.
I would like to read the new Helsinki group work on EP in state filters (Wilkinson, Särkkä, and Solin 2021; Wilkinson et al. 2020) which looks interesting.
Guillaume Dehaene, Expectation Propagation is exact in the large data limit sounds interesting:
Expectation Propagation (EP) (Thomas P. Minka 2001) is a popular algorithm for approximating posterior distributions. While it is known empirically to give good approximations at a low computational cost (Nickisch and Rasmussen 2008) it’s also very poorly understood. In this talk, I will present some new results on EP in the large-data limit. I will show that Gaussian-EP iterations asymptotically behave like the Newton algorithm, from which it follows that Gaussian-EP is asymptotically exact. I will then give an upper bound on the errors of the EP approximation and show that their decay speed compares favourably to the errors of the Laplace approximation of the posterior.
These theoretical results can be used to inform practical use of EP, and I will give some advice for implementation of the method.