# argmax p2 q2 pq3 q2 argmax p1 q1 pq2 q1 x x qt q2 q1

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: previous sum-product semi-ring. Prof. Jeﬀ Bilmes EE596A/Winter 2013/DGMs – Lecture 4 - Jan 23rd, 2013 page 4-94 (of 239) HMMs HMMs as GMs Other HMM queries What HMMs can do MPE Summ MPE But this computes only the value, how to get the actual states? Will need to do a forward-backward pass, like α, β . argmax also distributes in a fashion. The true max at time t will depend on what the true max at time t + 1 is. We can pre-compute the max for all q at time t when going forward, and then when going backwards, once we know the true max at time t + 1, we backtrack and then used the previously computed max at time t. Repeating this from T back to 1 we’ve got the MPE. Prof. Jeﬀ Bilmes EE596A/Winter 2013/DGMs – Lecture 4 - Jan 23rd, 2013 page 4-95 (of 239) HMMs HMMs as GMs Other HMM queries What HMMs can do MPE Summ MPE argmax p(¯1:T , q1:T ) = argmax x q1:T ∈DQ1:T q1:T ∈DQ1:T p(¯t |qt )p(qt |qt−1 ) x t = argmax p(xT |qT ) . . . argmax p(¯2 |q2 )p(q3 |q2 ) argmax p(¯1 |q1 )p(q2 |q1 ) x x qT q2 q1 = argmax p(xT |qT ) . . . p(x3 |q3 ) argmax p(q3 |q2 ) p(¯2 |q2 ) argmax p(q2 |q1 ) (p x qT q2 q1 So inner most argmax depends on true max for q2 . Next inner-most argmax depends on q3 , and so on. We deﬁne a recursion that stores these integer state indices based on max marginal. m αq (t) ∈ argmax p(Qt = q |Qt−1 = r)αr (t − 1) ˆm (4.109) r Note that this is integer index, not a score. Prof. Jeﬀ Bilmes EE596A/Winter 2013/DGMs – Lecture 4 - Jan 23rd, 2013 page 4-96 (of 239) HMMs HMMs as GMs Other HMM queries What HMMs can do MPE Summ MPE We can then compute Viterbi path by backtracing, which is entirely a determinisic process using index lookup (except for the initial case where we ﬁnd the maximum state). 1 2 3 m ∗ Compute qT ∈ argmaxq αq (T ) for t = T . . . 2 do ∗ Set qt−1 ← αq∗ (t) ˆm t Prof. Jeﬀ Bilmes EE596A/Winter 2013/DGMs – Lecture 4 - Jan 23rd, 2013 page 4-97 (of 239) HMMs HMMs as GMs Other HMM queries What HMMs can do MPE Summ MPE - summary Forward Equations m αq (1) = p(¯1 |Q1 = q ) x (4.110) m m αq (t) = p(¯t |Qt = q ) max p(Qt = q |Qt−1 = r)αr (t − 1) x (4.111) m αq (t) ∈ argmax p(Qt = q |Qt−1 = r)αr (t − 1) ˆm (4.112) r r Backward algorithm 1 2 3 ∗ m Compute qT ∈ argmaxq αq (T ) for t = T − 1 . . . 1 do ∗ ∗ ˆm Compute qt ∈ argmaxqt+1 αq (t + 1) Prof. Jeﬀ Bilmes EE596A/Winter 2013/DGMs – Lecture 4 - Jan 23rd, 2013 page 4-98 (of 239) HMMs HMMs as GMs Other HMM queries What HMMs can do MPE Summ HMM MC grid q4 ... q3 q 2 q 1 1 Prof. Jeﬀ Bilmes 2 3 4 EE596A/Winter 2013/DGMs – Lecture 4 - Jan 23rd, 2013 T page 4-99 (of 239) HMMs HMMs as GMs Other HMM queries What HMMs can do MPE Summ White board from today’s discussion Prof. Jeﬀ Bilmes EE596A/Winter 2013/DGMs – Lecture 4 - Jan 23rd, 2013 page 4-100 (of 239) HMMs HMMs as GMs Other HMM queries What HMMs can do MPE Summ Atypical explanations E.g., the 1st best might not be a good reﬂection of the typical states that explain the...
View Full Document

## This document was uploaded on 04/05/2014.

Ask a homework question - tutors are online