Unit4 SumProductAlgorithm
Unit4 SumProductAlgorithm
algorithm
Sum-Product Algorithm for
Hidden Markov Models
• Sum-Product Algorithm : Applied to Hidden Markov Models (HMMs) for computing marginal
distributions of hidden states.
• Efficient Calculation : This algorithm allows for efficient computation by breaking down the
problem into manageable pieces.
• General Framework : Derived from the more general concept of factor graphs and message
passing.
• Graph Transformation: Start by converting the directed graph into a factor graph.
• Representation: The factor graph shows all variables explicitly, both latent and observed.
• Inference Simplification: For solving the inference problem, we condition on the observed
variables x1,x2,…,xN.
• Factor Graph Simplification: Absorb the emission probabilities into the transition probability
factors.
• Resulting Factors: The transition probability factors, now simplified, include both the
original transition and emission probabilities.
(equation
1)
Simplified Factor
Factor Graph Graph
• Alpha-Beta Algorithm Derivation: Start by denoting the final hidden variable zNz_NzNas
the root node.
• Message Passing: First, pass messages from the leaf node hhh to the root node.
• Message Propagation: Use the general results (equations 8.66 and 8.69) for message
propagation.
(equation
2)
(equation
3)
• Form of Messages: In the Hidden Markov Model, the propagated messages follow the
structure derived from these general results
we can eliminate using equation 2 using equation 3 to
give a recursion for the messages of the form: