Announcements Homework 3 out, due Wed Nov 24 Ques)ons - - PowerPoint PPT Presentation

announcements
SMART_READER_LITE
LIVE PREVIEW

Announcements Homework 3 out, due Wed Nov 24 Ques)ons - - PowerPoint PPT Presentation

Introduc)on to Ar)ficial Intelligence Lecture 15 Temporal models CS/CNS/EE 154 Andreas Krause TexPoint fonts used in EMF. Announcements Homework


slide-1
SLIDE 1

Introduc)on ¡to ¡ ¡

Ar)ficial ¡Intelligence ¡

Lecture ¡15 ¡– ¡Temporal ¡models ¡

CS/CNS/EE ¡154 ¡ Andreas ¡Krause ¡

TexPoint ¡fonts ¡used ¡in ¡EMF. ¡ ¡

slide-2
SLIDE 2

Announcements ¡

Homework ¡3 ¡out, ¡due ¡Wed ¡Nov ¡24 ¡

Ques)ons ¡1 ¡& ¡3 ¡already ¡covered ¡ MDPs ¡(ques)on ¡2) ¡coming ¡up ¡Wednesday ¡

Code ¡for ¡project ¡final ¡released ¡later ¡today ¡

slide-3
SLIDE 3

Temporal ¡models ¡

So ¡far: ¡“Sta)c” ¡models ¡(no ¡no)on ¡of ¡)me) ¡

Variables ¡don’t ¡change ¡values ¡

In ¡prac)ce: ¡

World ¡changes ¡over ¡)me ¡ Want ¡to ¡“keep ¡track” ¡of ¡change ¡by ¡using ¡probabilis)c ¡inference ¡

Basic ¡idea: ¡Create ¡“copies” ¡of ¡variables, ¡one ¡per ¡)me ¡step ¡

3 ¡

slide-4
SLIDE 4

Dynamical ¡models ¡

Sta)c ¡model ¡ Dynamic ¡model ¡ Assumes ¡discrete, ¡unit-­‑length ¡)me ¡steps! ¡

4 ¡

Rain ¡ Rain1 ¡ Rain2 ¡ Rain3 ¡ … ¡

slide-5
SLIDE 5

Markov ¡chains ¡

Markov ¡assump)on: ¡ Sta)onarity ¡assump)on: ¡

5 ¡

slide-6
SLIDE 6

Predic)on ¡in ¡Markov ¡Chains ¡

E.g.: ¡Given ¡that ¡it ¡rains ¡now, ¡how ¡likely ¡is ¡it ¡to ¡rain ¡a ¡

week ¡from ¡now? ¡

6 ¡

slide-7
SLIDE 7

Predic)on ¡in ¡Markov ¡Chains ¡

7 ¡

slide-8
SLIDE 8

8 ¡

HMMs ¡/ ¡Kalman ¡Filters ¡

Most ¡famous ¡Bayesian ¡networks: ¡

Naïve ¡Bayes ¡model ¡ Hidden ¡Markov ¡model ¡ Kalman ¡Filter ¡

Hidden ¡Markov ¡models ¡

Speech ¡recogni)on ¡ Sequence ¡analysis ¡in ¡comp. ¡bio ¡

Kalman ¡Filters ¡control ¡

Cruise ¡control ¡in ¡cars ¡ GPS ¡naviga)on ¡devices ¡ Tracking ¡missiles.. ¡

Very ¡simple ¡models ¡but ¡very ¡powerful!! ¡

slide-9
SLIDE 9

9 ¡

HMMs ¡/ ¡Kalman ¡Filters ¡

X1,…,XT: ¡Unobserved ¡(hidden) ¡variables ¡ Y1,…,YT: ¡Observa)ons ¡ HMMs: ¡Xi ¡Mul)nomial, ¡Yi ¡mul)nomial ¡(or ¡arbitrary) ¡ Kalman ¡Filters: ¡Xi, ¡Yi ¡Gaussian ¡distribu)ons ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-10
SLIDE 10

10 ¡

HMMs ¡for ¡speech ¡recogni)on ¡

10 ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ Phoneme ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡ Words ¡ “He ¡ate ¡the ¡cookies ¡on ¡the ¡couch” ¡

slide-11
SLIDE 11

Example: ¡Umbrella ¡world ¡

Raint Umbrellat Raint–1 Umbrellat–1 Umbrella

0.3 f

t

R

t

P(U ) 0.9 t 0.2 f

slide-12
SLIDE 12

Inference ¡tasks ¡

Filtering ¡ Predic)on ¡ Smoothing ¡ Most ¡probable ¡explana)on ¡

12 ¡

slide-13
SLIDE 13

13 ¡

Inference ¡in ¡Hidden ¡Markov ¡Models ¡

Inference: ¡

In ¡principle, ¡can ¡use ¡variable ¡

elimina)on ¡/ ¡belief ¡propaga)on ¡

New ¡variables ¡Xt, ¡Yt ¡at ¡

each ¡)me ¡step ¡ ¡need ¡to ¡rerun ¡

Complexity ¡grows ¡with ¡)me!! ¡

Bayesian ¡Filtering: ¡

Suppose ¡we ¡already ¡have ¡computed ¡P(Xt ¡| ¡y1,…,t) ¡ Want ¡to ¡efficiently ¡(recursively) ¡compute ¡P(Xt+1 ¡| ¡y1,…,t+1) ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-14
SLIDE 14

14 ¡

Bayesian ¡filtering ¡

Start ¡with ¡P(X1) ¡ At ¡)me ¡t ¡

Assume ¡we ¡have ¡P(Xt ¡| ¡y1…t-­‑1) ¡ Condi)oning: ¡P(Xt ¡| ¡y1…t) ¡ Predic)on: ¡P(Xt+1 ¡| ¡y1…t) ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-15
SLIDE 15

Understanding ¡Bayesian ¡filtering ¡

15 ¡

slide-16
SLIDE 16

HMM ¡for ¡robot ¡localiza)on ¡

a ¡

16 ¡

slide-17
SLIDE 17

Predic)on ¡in ¡HMMs ¡

Have: ¡P(Xt ¡| ¡y1:t) ¡ Want: ¡P(Xt+k ¡| ¡y1:t) ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-18
SLIDE 18

Smoothing ¡/ ¡MPE ¡

Smoothing: ¡ Most ¡probable ¡explana)on: ¡ HMM ¡is ¡polytree ¡Bayesian ¡network! ¡ Can ¡use ¡sum ¡product ¡(aka ¡forward-­‑backward) ¡for ¡

smoothing ¡and ¡max ¡product ¡(aka ¡Viterbi ¡algo) ¡for ¡MPE ¡

Specialized ¡implementa)ons ¡using ¡matrix ¡algebra ¡

18 ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-19
SLIDE 19

Kalman ¡filters ¡

Track ¡objects ¡in ¡con4nuous ¡domain ¡using ¡noisy ¡

measurements ¡

E.g., ¡birds ¡flying, ¡robots ¡moving, ¡chemical ¡plants, ¡… ¡

System ¡described ¡using ¡Gaussian ¡variables ¡

E.g., ¡loca)on ¡in ¡X,Y,Z; ¡velocity ¡in ¡X,Y,Z; ¡accelera)on ¡in ¡X,Y,Z,… ¡

19 ¡

slide-20
SLIDE 20

20 ¡

Bivariate ¡Gaussian ¡distribu)on ¡

slide-21
SLIDE 21

21 ¡

Mul)variate ¡Gaussian ¡distribu)on ¡

slide-22
SLIDE 22

22 ¡

Kalman ¡Filters ¡(Gaussian ¡HMMs) ¡

X1,…,XT: ¡Loca)on ¡of ¡object ¡being ¡tracked ¡ Y1,…,YT: ¡Observa)ons ¡ P(X1): ¡Prior ¡belief ¡about ¡loca)on ¡at ¡)me ¡1 ¡ P(Xt+1|Xt): ¡“Mo)on ¡model” ¡

How ¡do ¡I ¡expect ¡my ¡target ¡to ¡move ¡in ¡the ¡environment? ¡

P(Yt ¡| ¡Xt): ¡“Sensor ¡model” ¡

What ¡do ¡I ¡observe ¡if ¡target ¡is ¡at ¡loca)on ¡Xt? ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-23
SLIDE 23

23 ¡

Bayesian ¡filtering ¡in ¡KFs ¡(1D) ¡

Start ¡with ¡P(X1) ¡ At ¡)me ¡t ¡

Assume ¡we ¡have ¡P(Xt ¡| ¡y1…t-­‑1) ¡ Condi)oning: ¡P(Xt ¡| ¡y1…t) ¡ Predic)on: ¡P(Xt+1 ¡| ¡y1…t) ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-24
SLIDE 24

Example: ¡Simple ¡random ¡walk ¡

Transi)on ¡/ ¡mo)on ¡model ¡ Sensor ¡model ¡ State ¡at ¡)me ¡t: ¡ ¡

24 ¡

slide-25
SLIDE 25

Example: ¡Bayesian ¡filtering ¡in ¡KFs ¡

25 ¡

Suppose: ¡

slide-26
SLIDE 26

General ¡Kalman ¡update ¡

Transi)on ¡model ¡ Sensor ¡model ¡ Kalman ¡Update: ¡ Kalman ¡gain: ¡ Can ¡compute ¡

¡ ¡ ¡ ¡and ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡offline ¡

26 ¡

slide-27
SLIDE 27

2D ¡tracking ¡example ¡

27 ¡

slide-28
SLIDE 28

Kalman ¡smoothing ¡

28 ¡

slide-29
SLIDE 29

When ¡KFs ¡fail ¡

KFs ¡assume ¡transi)on ¡model ¡is ¡linear ¡

Implies ¡that ¡predic)ve ¡distribu)on ¡is ¡Gaussian ¡(unimodal) ¡

Need ¡approximate ¡inference ¡to ¡capture ¡nonlineari)es! ¡

29 ¡

slide-30
SLIDE 30

30 ¡

Factored ¡dynamical ¡models ¡

So ¡far: ¡HMMs ¡and ¡Kalman ¡filters ¡ What ¡if ¡we ¡have ¡more ¡than ¡one ¡variable ¡at ¡each ¡)me ¡step? ¡

E.g., ¡temperature ¡at ¡different ¡loca)ons, ¡or ¡road ¡condi)ons ¡in ¡a ¡

road ¡network? ¡  ¡Dynamic ¡Bayesian ¡Networks ¡

Y1 ¡ Y2 ¡ Y3 ¡ Y4 ¡ Y5 ¡ Y6 ¡ X1 ¡ X2 ¡ X3 ¡ X4 ¡ X5 ¡ X6 ¡

slide-31
SLIDE 31

31 ¡

Dynamic ¡Bayesian ¡Networks ¡

At ¡every ¡)mestep ¡have ¡a ¡Bayesian ¡Network ¡ Variables ¡at ¡each ¡)me ¡step ¡t ¡called ¡a ¡slice ¡St ¡ “Temporal” ¡edges ¡connec)ng ¡St+1 ¡with ¡St ¡

A1 ¡ B1 ¡ C1 ¡ D1 ¡ E1 ¡ A2 ¡ B2 ¡ C2 ¡ D2 ¡ E2 ¡ A3 ¡ B3 ¡ C3 ¡ D3 ¡ E3 ¡

slide-32
SLIDE 32

32 ¡

Flow ¡of ¡influence ¡in ¡DBNs ¡

A1 ¡ B1 ¡ C1 ¡ D1 ¡ A2 ¡ B2 ¡ C2 ¡ D2 ¡ A3 ¡ B3 ¡ C3 ¡ D3 ¡ A4 ¡ B4 ¡ C4 ¡ D4 ¡

slide-33
SLIDE 33

33 ¡

Inference ¡in ¡DBNs? ¡

A1 ¡ B1 ¡ C1 ¡ A2 ¡ B2 ¡ C2 ¡ D1 ¡ D2 ¡ A2 ¡ B2 ¡ C2 ¡ D2 ¡ DBN ¡ Marginals ¡at ¡)me ¡2 ¡

slide-34
SLIDE 34

Par)cle ¡filtering ¡

Very ¡useful ¡approximate ¡inference ¡technique ¡for ¡

dynamical ¡models ¡

Nonlinear ¡Kalman ¡filters ¡ Dynamic ¡Bayesian ¡networks ¡

Basic ¡idea: ¡Approximate ¡the ¡posterior ¡at ¡each ¡)me ¡by ¡

samples ¡(par)cles), ¡which ¡are ¡propagated ¡and ¡ reweighted ¡over ¡)me ¡

34 ¡