CSEP 573: Artificial Intelligence Spring 2014 Hidden Markov Models - - PowerPoint PPT Presentation

csep 573 artificial intelligence
SMART_READER_LITE
LIVE PREVIEW

CSEP 573: Artificial Intelligence Spring 2014 Hidden Markov Models - - PowerPoint PPT Presentation

CSEP 573: Artificial Intelligence Spring 2014 Hidden Markov Models & Exact Inference Ali Farhadi Many slides adapted from Dan Weld, Pieter Abbeel, Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer 1 Outline


slide-1
SLIDE 1

CSEP 573: Artificial Intelligence

Spring 2014

Hidden Markov Models & Exact Inference

Ali Farhadi

Many slides adapted from Dan Weld, Pieter Abbeel, Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer

1

slide-2
SLIDE 2

Outline

§ Probabilistic sequence models (and inference) § Probability and Uncertainty – Preview § Markov Chains § Hidden Markov Models § Exact Inference § Particle Filters

slide-3
SLIDE 3

Recap: Reasoning Over Time

§ Stationary Markov models

X2 X1 X3 X4

rain sun 0.5 0.7 0.3 0.5

X5 X2 E1 X1 X3 X4 E2 E3 E4 E5

X E P rain umbrella 0.9 rain no umbrella 0.1 sun umbrella 0.2 sun no umbrella 0.8 § Hidden Markov models

slide-4
SLIDE 4

Hidden Markov Models

§ Defines a joint probability distribution: X5 X2 E1 X1 X3 X4 E2 E3 E4 E5 XN EN

slide-5
SLIDE 5

HMM Computations: Inference

§ Given

§ joint P(X1:n,E1:n) § evidence E1:n =e1:n

X2 E1 X1 X3 X4 E1 E3 E4

§ Inference problems include: § Filtering, find P(Xt|e1:t) for current t § Smoothing, find P(Xt|e1:n) for past t § Most probable explanation, find x*1:n = argmaxx1:n P(x1:n|e1:n)

slide-6
SLIDE 6

Inference Recap: Simple Cases

E1 X1

That’s my rule!

slide-7
SLIDE 7

Inference Recap: Simple Cases

E1 X1 X2 X1

slide-8
SLIDE 8

Passage of Time

§ We want to know: § We can derive the following updates § To get , compute each entry and normalize

  • =

X

xt

P(Xt+1, xt|e1:t)

= X

xt

P(Xt+1|xt, e1:t)P(xt|e1:t) = X

xt

P(Xt+1|xt)P(xt|e1:t)

P(Xt+1|e1:t)

slide-9
SLIDE 9

Passage of Time

§ Assume we have current belief P(X | evidence to date) § Then, after one time step passes: § Or, compactly: § Basic idea: beliefs get “pushed” through the transitions

§ With the “B” notation, we have to be careful about what time step t the belief is about, and what evidence it includes

X2 X1

slide-10
SLIDE 10

Example: Passage of Time

Without observations, uncertainty “accumulates”

T = 1 T = 2 T = 5

Transition model: ghosts usually go clockwise

slide-11
SLIDE 11

Observations

11

P(Xt+1|e1:t+1) = P(Xt+1, et+1|e1:t)/P(et+1|e1:t)

∝Xt+1 P(Xt+1, et+1|e1:t)

= P(et+1|Xt+1)P(Xt+1|e1:t) = P(et+1|e1:t, Xt+1)P(Xt+1|e1:t)

! Bas

§ Assume we have current belief P(X | previous evidence):

E1 X1

slide-12
SLIDE 12

Observations

§ Assume we have current belief P(X | previous evidence): § Then: § Or: § Basic idea: beliefs reweighted by likelihood of evidence § Unlike passage of time, we have to renormalize

E1 X1

slide-13
SLIDE 13

Example: Observation

§ As we get observations, beliefs get reweighted, uncertainty “decreases”

Before observation After observation

slide-14
SLIDE 14

Online Belief Updates

§ Every time step, we start with current P(X | evidence) § We update for time: § We update for evidence:

X2

X1

X2 E2

slide-15
SLIDE 15

The Forward Algorithm

§ We want to know: § We can derive the following updates § To get , compute each entry and normalize

  • ! Problem:#space#is#|X|#and#)me#is#|X|2#per#)me#step#
slide-16
SLIDE 16

Example

§ An HMM is defined by:

§ Initial distribution: § Transitions: § Emissions:

slide-17
SLIDE 17

Forward Algorithm

slide-18
SLIDE 18

Example Pac-man

slide-19
SLIDE 19

Summary: Filtering

§ Filtering is the inference process of finding a distribution

  • ver XT given e1 through eT : P( XT | e1:t )

§ We first compute P( X1 | e1 ): § For each t from 2 to T, we have P( Xt-1 | e1:t-1 ) § Elapse time: compute P( Xt | e1:t-1 ) § Observe: compute P(Xt | e1:t-1 , et) = P( Xt | e1:t )