EM transition-count update on a tree Created 2026-10-06 Updated 2026-10-14
For a common unconstrained Markov kernel on the edges of a rooted tree, let be the conditional expectation of the number of transitions , given observed leaves and the old Markov kernel. The expectation-maximization algorithm maximizes over row probability distributions, giving . A row with zero total count is unrestricted by this objective. Belief propagation computes the counts exactly on a tree.
The max-product form of belief propagation replaces summation by maximization. On a tree, storing maximizing states while passing messages and then backtracking gives an exact maximum a posteriori estimate.
Write for the directed edges from parent to child and for the state at site . The global Markov property for an undirected graph on this tree, together with the specified parent transitions, gives the complete-data likelihood function
One can obtain the factorization by successively removing terminal subtrees: after conditioning on their parent, each subtree is independent of the rest. The root factor and transition products also show that different sites are independent. Only ancestral states are latent variables.
At the current Markov kernel , define expected transition counts
The E-step of the expectation-maximization algorithm is
Maximize separately for each row under and . For , the Lagrange multiplier equation is , with zero-count entries set to zero at a boundary maximum. Thus the EM transition-count update on a tree is
If , that row does not occur in ; any row probability distribution, including its previous value, maximizes the objective.
The expected counts can be computed exactly by the Felsenstein pruning algorithm and an outward belief propagation pass. For one site, let be the conditional probability of observations in the subtree below , given state . For a leaf with observed state , . For an internal vertex,
Define as the joint mass of state at and all observations outside its subtree. The root has . For a child of , put
The edge posterior probability required above is
Multiply the inside and outside factors to obtain the joint mass of the observations and endpoint states; division by the site likelihood function proves this expression. Sum over edges and sites to form . The two passes take operations on a binary tree. Scaling messages or computing them logarithmically avoids underflow.
A strictly positive initial Markov kernel ensures for every observed leaf pattern, so every E-step is defined. At a later boundary iterate, require positive likelihood for the actual data and restrict the conditional distribution to its support. EM likelihood monotonicity proves that the update cannot decrease observed-data likelihood function. It is a maximum-likelihood iteration, not a guarantee of finding the global maximum-likelihood estimate; different initial kernels may lead to different stationary points.
Phylogenetic tree Created 2026-10-06 Updated 2026-10-13
A phylogenetic tree describes ancestral relationships. In a probabilistic graphical model on a rooted tree, latent variables at ancestral vertices are inferred from observations at leaves using belief propagation.
The sum-product form of belief propagation sums over eliminated states in each message. On a tree it computes exact normalization constants and marginal distributions.