Lecture 15: Basic graph concepts, Belief Network and HMM Dr. - - PowerPoint PPT Presentation

lecture 15 basic graph concepts belief network and hmm
SMART_READER_LITE
LIVE PREVIEW

Lecture 15: Basic graph concepts, Belief Network and HMM Dr. - - PowerPoint PPT Presentation

Lecture 15: Basic graph concepts, Belief Network and HMM Dr. Chengjiang Long Computer Vision Researcher at Kitware Inc. Adjunct Professor at RPI. Email: longc3@rpi.edu About Final Projects No. Project name Authors 1 Neural Style Transfer


slide-1
SLIDE 1

Lecture 15: Basic graph concepts, Belief Network and HMM

  • Dr. Chengjiang Long

Computer Vision Researcher at Kitware Inc. Adjunct Professor at RPI. Email: longc3@rpi.edu

slide-2
SLIDE 2
  • C. Long

Lecture 15 March 27, 2018 2

About Final Projects

No. Project name Authors

1 Neural Style Transfer for Video Sarthak Chatterjee and Ashraful Islam 2 Kickstarter: succeed or fail? Jeffrey Chen and Steven Sperazza 3 Head Pose Estimation Lisa Chen 4 Feature selection Zijun Cui 5 Human Face Recognition Chao-Ting Hsueh, Huaiyuan Chu, Yilin Zhu 6 Tragedy of Titanic: a person on board can survive

  • r not.

Ziyi Wang, Dewei Hu 7 Character Recognition Xiangyang Mou, Tong Jian 8 Classifying groceries by image using CNN Rui Li, Yan Wang 9 Facial expressions expression Cameron Mine 10 Handwritten digits recognition Kimberly Oakes

slide-3
SLIDE 3
  • C. Long

Lecture 15 March 27, 2018 3

About Final Projects: Binary Classification

Kickstarter: succeed or fail? Jeffrey Chen and Steven Sperazza Tragedy of Titanic: a person

  • n board can survive or not.

Ziyi Wang, Dewei Hu

slide-4
SLIDE 4
  • C. Long

Lecture 15 March 27, 2018 4

About Final Projects: Multi-class Classification

Handwritten digits recognition Kimberly Oakes Character Recognition Xiangyang Mou, Tong Jian

slide-5
SLIDE 5
  • C. Long

Lecture 15 March 27, 2018 5

About Final Projects: Multi-class Classification

Facial expressions expression Cameron Mine Human Face Recognition Chao-Ting Hsueh, Huaiyuan Chu, Yilin Zhu Head Pose Estimation Lisa Chen

slide-6
SLIDE 6
  • C. Long

Lecture 15 March 27, 2018 6

About Final Projects: CNN and GAN

Classifying groceries by image using CNN Rui Li, Yan Wang Neural Style Transfer for Video Sarthak Chatterjee and Ashraful Islam

slide-7
SLIDE 7
  • C. Long

Lecture 15 March 27, 2018 7

About Final Projects: Feature Selection

Feature selection Zijun Cui

slide-8
SLIDE 8
  • C. Long

Lecture 15 March 27, 2018 8

Guideline for the proposal presentation

  • Briefly introduce the importance of project - 1 slide
  • Define the problem and the project objectives -1 or 2 slides
  • Investigate the related work - 1 slide
  • Propose your feasible solutions and the necessary possible

baselines - 1 to 3 slides

  • Describle the data sets you plan to use - 1 or 2 slides
  • List your detailed progress plan to complete the final project - 1

slide.

  • List the references. - 1 slide

5-8 min presentation, including Q&A. I would like to recommend you to use informative figures as possible as you can to share what you are going to do with the other classmates.

slide-9
SLIDE 9
  • C. Long

Lecture 15 March 27, 2018 9

Recap Previous Lecture

slide-10
SLIDE 10
  • C. Long

Lecture 15 March 27, 2018 10

Outline

  • Introduction to Graphical Model
  • Introduction to Belief Networks
  • Hidden Markov Models
slide-11
SLIDE 11
  • C. Long

Lecture 15 March 27, 2018 11

Outline

  • Introduction to Graphical Model
  • Introduction to Belief Networks
  • Hidden Markov Models
slide-12
SLIDE 12
  • C. Long

Lecture 15 March 27, 2018 12

Graphical Models

  • GMs are graph based representations of various

factorization assumptions of distributions

– These factorizations are typically equivalent to independence statements amongst (sets of) variables in the distribution

  • Directed graphs model conditional distributions (e.g.

Belief Networks)

  • Undirected graphs represented relationships between

variables (e.g. neighboring pixels in an image)

slide-13
SLIDE 13
  • C. Long

Lecture 15 March 27, 2018 13

Definition

  • A graph G consists of nodes (also called vertices) and

edges (also called links) between the nodes

  • Edges may be directed (they have an arrow in a

single direction) or undirected

– Edges can also have associated weights

  • A graph with all edges directed is called a directed

graph, and one with all edges undirected is called an undirected graph

slide-14
SLIDE 14
  • C. Long

Lecture 15 March 27, 2018 14

More Definitions

  • A path A->B from node A to node B is a sequence of

nodes that connects A to B

  • A cycle is a directed path that starts and returns to

the same node

  • Directed Acyclic Graph (DAG): A DAG is a graph G

with directed edges (arrows on each link) between the nodes such that by following a path of nodes from one node to another along the direction of each edge no path will revisit a node

slide-15
SLIDE 15
  • C. Long

Lecture 15 March 27, 2018 15

More Definitions

  • The parents of x4 are pa(x4) = {x1, x2, x3}
  • The children of x4 are ch(x4) = {x5, x6}
  • Graphs can be encoded using the edge list

L={(1,8),(1,4),(2,4) …} or the adjacency matrix

slide-16
SLIDE 16
  • C. Long

Lecture 15 March 27, 2018 16

Outline

  • Introduction to Graphical Model
  • Introduction to Belief Networks
  • Hidden Markov Models
slide-17
SLIDE 17
  • C. Long

Lecture 15 March 27, 2018 17

Belief Networks (Bayesian Networks)

  • A belief network is a directed acyclic graph in which

each node has associated the conditional probability

  • f the node given its parents
  • The joint distribution is obtained by taking the product
  • f the conditional probabilities:
slide-18
SLIDE 18
  • C. Long

Lecture 15 March 27, 2018 18

Alarm Example

slide-19
SLIDE 19
  • C. Long

Lecture 15 March 27, 2018 19

Alarm Example: Inference

  • Initial evidence: the alarm is sounding
slide-20
SLIDE 20
  • C. Long

Lecture 15 March 27, 2018 20

Alarm Example: Inference

  • Additional evidence: the radio broadcasts an

earthquake warning

– A similar calculation gives p(B = 1 | A = 1, R = 1) ≈ 0.01 – Initially, because the alarm sounds, Sally thinks that she's been burgled. However, this probability drops dramatically when she hears that there has been an earthquake. – The earthquake `explains away' to an extent the fact that the alarm is ringing

slide-21
SLIDE 21
  • C. Long

Lecture 15 March 27, 2018 21

Independence in Belief Networks

  • In (a), (b) and (c), A, B are conditionally independent given C
  • In (d) the variables A,B are conditionally dependent given C
slide-22
SLIDE 22
  • C. Long

Lecture 15 March 27, 2018 22

Independence in Belief Networks

  • In (a), (b) and (c), A, B are marginally dependent
  • In (d) the variables A, B are marginally independent
slide-23
SLIDE 23
  • C. Long

Lecture 15 March 27, 2018 23

Outline

  • Introduction to Graphical Model
  • Introduction to Belief Networks
  • Hidden Markov Models
slide-24
SLIDE 24
  • C. Long

Lecture 15 March 27, 2018 24

Hidden Markov Models

  • So far we assumed independent, identically

distributed data.

  • Sequential data

– Time-series data E.g. Speech

slide-25
SLIDE 25
  • C. Long

Lecture 15 March 27, 2018 25

i.i.d to sequential data

  • So far we assumed independent, identically

distributed data.

  • Sequential data

– Time-series data E.g. Speech

slide-26
SLIDE 26
  • C. Long

Lecture 15 March 27, 2018 26

Markov Models

  • Joint Distribution
  • Markov Assumption (m-th order)
slide-27
SLIDE 27
  • C. Long

Lecture 15 March 27, 2018 27

Markov Models

  • Markov Assumption
slide-28
SLIDE 28
  • C. Long

Lecture 15 March 27, 2018 28

Markov Models

  • Markov Assumption

Homogeneous/stationary Markov model (probabilities don’t depend on n)

slide-29
SLIDE 29
  • C. Long

Lecture 15 March 27, 2018 29

Hidden Markov Models

  • Distributions that characterize sequential data with few

parameters but are not limited by strong Markov assumptions.

slide-30
SLIDE 30
  • C. Long

Lecture 15 March 27, 2018 30

Hidden Markov Models

  • 1-st order Markov assumption on hidden states {St}

t = 1, …, T (can be extended to higher order).

  • Note: Ot depends on all previous observations

{Ot-1,…O1}

slide-31
SLIDE 31
  • C. Long

Lecture 15 March 27, 2018 31

Hidden Markov Models

  • Parameters – stationary/homogeneous markov model

(independent of time t)

slide-32
SLIDE 32
  • C. Long

Lecture 15 March 27, 2018 32

HMM Example

  • The Dishonest Casino

A casino has two die: Fair dice P(1) = P(2) = P(3) = P(5) = P(6) = 1/6 Loaded dice P(1) = P(2) = P(3) = P(4) = P(5) = 1/10 P(6) = ½ Casino player switches back and forth between fair and loaded die once every 20 turns

slide-33
SLIDE 33
  • C. Long

Lecture 15 March 27, 2018 33

HMM Problems

  • GIVEN: A sequence of rolls by the casino player
  • QUESTION
  • How likely is this sequence, given our model of how the casino

works?

  • This is the EVALUATION problem in HMMs
  • What portion of the sequence was generated with the fair die, and

what portion with the loaded die?

  • This is the DECODING question in HMMs
  • How "loaded" is the loaded die? How "fair" is the fair die? How
  • ften does the casino player change from fair to loaded, and back?
  • This is the LEARNING question in HMMs
slide-34
SLIDE 34
  • C. Long

Lecture 15 March 27, 2018 34

HMM Example

slide-35
SLIDE 35
  • C. Long

Lecture 15 March 27, 2018 35

State Space Representation

  • Switch between F and L once every 20 turns (1/20 =

0.05)

  • HMM Parameters
slide-36
SLIDE 36
  • C. Long

Lecture 15 March 27, 2018 36

Three main problems in HMMs

slide-37
SLIDE 37
  • C. Long

Lecture 15 March 27, 2018 37

HMM Algorithms

  • Evaluation

– What is the probability of the observed sequence? Forward Algorithm

  • Decoding

– What is the probability that the third roll was loaded given the observed sequence? Forward-Backward Algorithm – What is the most likely die sequence given the observed sequence? Viterbi Algorithm

  • Learning

– Under what parameterization is the observed sequence most probable? Baum-Welch Algorithm (EM)

slide-38
SLIDE 38
  • C. Long

Lecture 15 March 27, 2018 38

Evaluation Problem

  • Given HMM parameters and
  • bservation sequence , find probability of observed

sequence requires summing over all possible hidden state values at all times – K^T exponential number terms! Instead:

slide-39
SLIDE 39
  • C. Long

Lecture 15 March 27, 2018 39

Forward Probability

slide-40
SLIDE 40
  • C. Long

Lecture 15 March 27, 2018 40

Forward Algorithm

slide-41
SLIDE 41
  • C. Long

Lecture 15 March 27, 2018 41

Decoding Problem 1

  • Given HMM parameters and
  • bservation sequence , find probability that

hidden state at time t was k

slide-42
SLIDE 42
  • C. Long

Lecture 15 March 27, 2018 42

Backward Probability

slide-43
SLIDE 43
  • C. Long

Lecture 15 March 27, 2018 43

Backward Algorithm

slide-44
SLIDE 44
  • C. Long

Lecture 15 March 27, 2018 44

Most likely state vs. Most likely sequence

  • Most likely state assignment at time t
  • Most likely assignment of state sequence
slide-45
SLIDE 45
  • C. Long

Lecture 15 March 27, 2018 45

Decoding Problem 2

  • Given HMM parameters and
  • bservation sequence , find most likely

assignment of state sequence

slide-46
SLIDE 46
  • C. Long

Lecture 15 March 27, 2018 46

Viterbi Decoding

slide-47
SLIDE 47
  • C. Long

Lecture 15 March 27, 2018 47

Viterbi Algorithm

slide-48
SLIDE 48
  • C. Long

Lecture 15 March 27, 2018 48

Computational complexity

  • What is the running time for Forward, Forward-Backward,

Viterbi?

slide-49
SLIDE 49
  • C. Long

Lecture 15 March 27, 2018 49

Learning Problem

slide-50
SLIDE 50
  • C. Long

Lecture 15 March 27, 2018 50

Baum-Welch (EM) Algorithm

slide-51
SLIDE 51
  • C. Long

Lecture 15 March 27, 2018 51

Baum-Welch (EM) Algorithm

slide-52
SLIDE 52
  • C. Long

Lecture 15 March 27, 2018 52

Some connections

  • HMM & Dynamic Mixture Models
slide-53
SLIDE 53
  • C. Long

Lecture 15 March 27, 2018 53

HMMs.. What you should know

  • Useful for modeling sequential data with few

parameters using discrete hidden states that satisfy Markov assumption

  • Representation-initial prob, transition prob, emission

prob, State space representation

  • Algorithms for inference and learning in HMMs

– Computing marginal likelihood of the observed sequence: forward algorithm – Predicting a single hidden state: forward-backward – Predicting an entire sequence of hidden states: viterbi – Learning HMM parameters: an EM algorithm known as Baum-Welch

slide-54
SLIDE 54
  • C. Long

Lecture 15 March 27, 2018 54