segmental hidden markov models with random effects for waveform modeling author: seyoung kim &...

22
Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhra ic Smyth Presentor: Lu Ren

Upload: helen-mcgee

Post on 12-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Segmental Hidden Markov Models with Random Effects for Waveform Modeling

Author: Seyoung Kim & Padhraic Smyth

Presentor: Lu Ren

Page 2: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Outline

• Introduction

•Segmental HMMs

•Segmental HMMs with Random Effects

• Model Inference and Parameter Estimation

• Experiment Results

•Conclusion

Page 3: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Introduction

Problem: Automatically parsing and recognizing waveforms based on their shapes.

Example: analysis of waveforms from turbulent flow, discrimination an earthquakes in seismograph, waveform match and fault diagnosis in complex systems.

Challenge: To address the problem of significant variability in wave shape is difficult for automated methods. Source of variability: shifts of the locations of prominent features, scaling along axes and measurement noise.

The paper proposed a new statistical model that directly addresses within-class shape variability.

Page 4: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren
Page 5: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Standard discrete-time HMMs: generates noisy versions of piecewise constant shapes over time, since the observations within a sequence of states of the same value have constant mean.

Segment HMMs: allows arbitrary distribution on run lengths and allow the mean to be a function of time within each segment but uses the same fixed parameters for all waveforms.

Page 6: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Segmental HMM with random effects: allow each group of observations have their own parameters that are still coupled together by an overall population prior.

Specifically to say: allow the slopes and intercepts to vary according to a prior distribution

Page 7: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Segmental HMMs

In a segmental HMM, }},,1|)(,{},,,1|{,{ 2 MkMkA kfk

Transition matrix MlkklMM aA ,1,|}{:

In waveform modeling, MMA is constrained to allow only left-to-right

transitions and do not allow self-transitions.

Duration distribution: (1))!1(

)|1(1

d

edP

dk

k

k

,...2,1d

State k produces a segment of observations of length d from the segment distribution model.

Segment model: (2)

12: kβ vector of regression coefficients for the intercept and slope

2: drX design matrix and is the Gaussian noise.re

Page 8: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

The F-B algorithm for segmental HMMs takes into account the duration distribution, recursively computes

in the forward pass and

in the backward pass.

The F-B algorithm scores a previously unseen waveform y by calculating the likelihood:

(3)

(4)

(5)

Page 9: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Segmental HMMs with Random Effects

Consider the th segment of length from the th individual waveform generated by state .

r iry d i

iy kNi 1

represents the mean regression parameters and represents the variation in regression parameters.

kβ iru

and is independent of . ire

Notice the model is equivalent to with .

It can be shown the joint distribution of and are :iry i

ru

And the posterior distribution of iru can be written as:

(6)

(7)

(8)

Page 10: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

where

and

(9)

(10)

Page 11: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Inference and parameters estimation

The likelihood of a waveform ygiven fixed parameters, is:

The viterbi algorithm can compute the most likely state sequence.

However, in F-B algorithm, needs to be calculated for all possible durations in each of the and at each recursion.

Using direct inversion of the covariance matrix, , leads to an overall time complexity of .

),,|( 2kkirp ψβy

d )(kt )(kt

)( 52TMO

Based on Bayes’s rule, the likelihood of generated by state asiry k

(11)

(12)

Inference

Page 12: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

By setting to as in equation (9), the likelihood can be reduced

to: (13)

Where

In this way, the time complexities of the F-B and Viterbi algorithm are reduced to .

Then EM algorithm is used to get the maximum-likelihood estimates of the parameters from a training set :

Where the sate sequence implies segments in waveform .

iru i

ru

)( 32TMO

is iR iy

Page 13: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Given the complete data, the log-likelihood decouples into four parts. Because only parts of the data are observed, EM is used to find the local maximum solution.

(14)

Parameters estimation

Page 14: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

In E Step, the expected log likelihood of the complete data is

with respect to(15)

(16)

In M step, the optimization problem decouples into four parts and closed form solutions exist for all of the parameters but in practice the algorithm often converges relatively slowly.

Segmental HMM Random effect segmental HMM

Page 15: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Faster learning with ECME

Expectation conditional maximization(ECM):

Replace the M step of the EM with a sequence of Constrained 1w

or conditional maximizations (CM): The set of parameters is divided into subvectors and in the

ECME: some of the CM steps of the ECM are replaced by a maximization of the actual log likelihood instead of the expected complete data log likelihood.

θw W ,,1 wth CM step of the tth iteration,

),( )( tQ is maximized over under the constrain of . w wθ

For random effects segmental HMMs, we partition the parameters

Into and consider ECME with two CM steps as follows:

θ

},,1|,,,{ 21 Mk kAθ },...,1|{2 Mkk θ

Page 16: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

and get the update equations for Mktk ,,1,1

Random effects segmental HMM for fluid-flow waveform data

Page 17: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren
Page 18: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Experimental ResultsTwo data sets were used:

1. Bubble-Probe Interaction Data (turbulent flow measurements):

9-fold cross-validation with 5 waveforms in the training set and 43 waveforms in the test set. Another 72 waveforms were used as negative examples in the test.

2. ECG Data (heartbeat cycles)

4-fold cross-validation with 6 waveforms as a training set and 18 waveforms as the testing set. Another 22 abnormal hearbeats were used as negative examples in the test.

Evaluation method: Average LogP score, Recognition Accuracy and Segmentation Quality (the mean squared difference between the observed data and regression model)

Page 19: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren
Page 20: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Segmentation result by segmental HMM Random effect segmental HMM

ROC plot for ECG data ROC plot for bubble-probe data

Page 21: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Conclusions

1. Segmental HMMs including random effects allows an individual waveform to vary its shape in a constrained manner.

2. The ECME algorithm greatly improved the speed of convergence of parameter estimation compared to a standard EM approach.

Page 22: Segmental Hidden Markov Models with Random Effects for Waveform Modeling Author: Seyoung Kim & Padhraic Smyth Presentor: Lu Ren

Thanks!