concept VE in category probabilistic programming

This is an excerpt from Manning's book Practical Probabilistic Programming.
Figaro provides implementations of EM by using inference algorithms. In this application, you’ll use belief propagation (BP). BP is a similar algorithm to VE but works faster on large models. BP works by propagating messages between the elements and goes through some number of iterations of propagating messages. When running EM with BP, you need to choose the number of iterations of both EM and BP. For this application, you’ll use the default values of 10 for both, which work well here.
Figure 10.4 shows the induced graphs resulting from two alternative orders. The one on the left has a maximum clique size of 4, because all of the variables are connected. This means that VE will be more expensive using that order. The order used on the right didn’t result in adding any new edges. Although the maximum clique size is 3, just like our original order, there’s only one clique of size 3, so VE using this order will be cheaper.
The first and most obvious point is to avoid loops that don’t have cross-cutting edges in your models, as far as possible. If you have a loop with no cross-cutting edge, you’ll eventually need to add an edge, which will add to the cost of inference. You’ve seen that if you have a triangulated network, in which every loop of length 4 or more has cross-cutting edges, it will be possible to perform VE without adding any edges.
If you can’t avoid loops completely, it’s better to have isolated loops than a lot of loops close together. Figure 10.5 shows an example of a network that’s hard for VE. This is the image-recovery Markov network you saw in chapter 5. The figure shows a 4×4 network, but you could have hundreds or thousands of pixels along a side.
Figure 10.5. Image-recovery network, reproduced from chapter 5. VE on a grid like this is exponential in the number of pixels on a side.
![]()
Unfortunately, no matter what elimination order you choose, there’s no way to avoid adding edges that create a clique whose size is the number of pixels along the shorter dimension of the image. The cost of VE is exponential in the size of the grid. As a result, although VE works in principle for this kind of network, in practice it takes an extremely long time.
Because VE is an exact algorithm that perfectly computes the probabilities you’re interested in, you might think that it’s not suitable for real-world applications with complex models. This isn’t the case. VE is widely used; the key question isn’t the size of the model but whether it has the right structure—in particular, whether you can eliminate variables without adding too many edges to the VE graph, leaving the size of the largest clique in the VE graph small and the complexity low. This section describes two application domains where VE is widely used.