14
BELIEF PROPAGATION {ch:BP} Consider the ubiquitous problem of computing marginals of a graphical model with N variables x = (x1,...,xN ) taking values in a finite alphabet . The naive algorithm, summing over all configurations, takes a time of orderX N . The complexity can be reduced dramatically when the underlying factor graph|X | has some special structure. One extreme case is that of tree factor graphs. On trees, marginals can be computed in a number of operations which grows lin- early with N. This can be done through a ‘dynamic programming’ procedure that recursively sums over all variables starting from the leaves and progressing towards the ‘center’ of the tree. Remarkably, such a recursive procedure can be recast as a distributed ‘mes- sage passing’ algorithm. Message passing algorithms operate on ‘messages’ asso- ciated with edges of the factor graph, and update them recursively through local computations done at the vertices of the graph. The update rules that yield exact marginals on trees have been discovered independently in several different con- texts: statistical physics (under the name ‘Bethe Peierls approximation’), coding theory (sum-product algorithm), and artificial intelligence (belief propagation - BP). Here we will adopt the artificial intelligence terminology. It is straightforward to prove that belief propagation exactly computes marginals on tree factor graphs. However, it was found only recently that it can be ex- tremely effective on loopy graphs as well. One of the basic intuitions behind this success is that BP, being a local algorithm, should be successful whenever the underlying graph is ‘locally’ a tree. Such factor graphs appear frequently, for instance in error correcting codes, and BP turns out to be very powerful in this context. However, even in such cases, its application is limited to distributions such that far apart variables become uncorrelated. The onset of long range corre- lations, typical of the occurrence of a phase transition, generically leads to poor performances of BP. We shall see several applications of this idea in the next chapters. We introduce the basic ideas in Section 14.1 by working out a couple of simple examples. The general BP equations are stated in Section 14.2, which also shows how they provide exact results on tree factor graphs. Section 14.3 describes some alternative message passing procedures, the Max-Product (equivalently, Min- Sum) algorithms, which can be used in optimization problems. In Section 14.4 we discuss the use of BP in graphs with loops. In the study of random constraint satisfaction problems, BP messages become random variables. The study of their distribution provides a large amount of information on such instances and can be used to characterize the corresponding phase diagram. The time evolution
288 TWO EXAMPLES 289