Title: Application of Graphical Models
1Application of Graphical Models
- Modeling Physiological Data with Conditional
Random Fields
Chieu Hai Leong 23 March 2005
2Outline
- The Problem
- Physiological Data for Activity Recognition
- Physiological Data Modeling Contest
- The Approach
- Conditional Random Fields (CRF)
3Physiological Data
- Examples of Physiological signals
- Temperatures
- Galvanic skin response (electrical skin
conductance)
- Electrocardiogram
- Wearable devices for signal collection
- Health/fitness tracking
- Weight management
4Physiological Data Physiological Data Modeling
Contest
Gender
3004 Watching TV
5102 Sleeping
- Age
- Handedness (left or right)
5Physiological Data
- Bodymedia armband
- measures
- Heat flux
- Galvanic skin response
- Skin temperature
- Near body temperature
- Accelerometers
- Pedometer
6Physiological Data
- Data
- Minute-by-minute sensor readings
- Organized into sessions
- Each minute annotated with activity code
- Some statistics
- Training data 10,000 hours from 18 subjects
- Test data 12,000 hours from 30 subjects
7Physiological Data Physiological Data Modeling
Contest
Gender
Sensor 1 Sensor 2 Sensor 3 Sensor 4 Sensor 5
Sensor 6
Sensor 7 Sensor 8 Sensor 9
Activity 3004
Activity 5102
Characteristics 1 Characteristics 2
8Physiological Data Physiological Data Modeling
Contest
Gender
- GSR
- Heat flux
- Near body temperature
- Pedometer
- Skin temperature
- Longitudinal acceleration (2 values)
- Traverse acceleration (2 values)
3004 Watching TV
5102 Sleeping
- Age
- Handedness (left or right)
9Physiological Data Physiological Data Modeling
Contest
- Activity 1
- Positive examples 3004
- Ambiguous activities 0, 3003, 5199, 5101
- Negative examples All other annotations
- Activity 2
- Positive examples 5102
- Ambiguous activities 0, 5103, 2901, 2902
- Negative examples All other annotations
10The Approach
- Conditional Random Fields
11Conditional Random Fields
CRFs are discriminative, undirected graphical mo
dels
12Conditional Random Fields
- Discriminative
- Directly estimates P(YX)
- Does not model P(X)
- Undirected vs. directed
undirected
directed
13Conditional Random Fields
Definition Let G (V,E) be a graph such that
Y(Yv)v?V, so that Y is indexed by the vertices
of G. Then (X,Y) is a conditional random field in
case, when conditioned on X, the random variables
Yv obey the Markov property with respect to the
graph p(YvX,Yw, w?v) p(YvX,Yw, wv), where
wv means that w and v are neighbors in G.
For example, P(IntelligenceG,X) P(Intelligence
Grade,SAT,X)
14Conditional Random Fields
- CRF in activity recognition
- Linear chain structure
Yi Activity at minute i
One Physiological Session
Xi Sensor/Characteristics at minute i
15Conditional Random Fields
- Why not Hidden Markov Models?
- HMM is generative
- need to model continuous sensor values
- are Gaussians (or mixtures) good models of sensor
values and characteristics?
16ApproachConditional Random Fields
- Advantage over HMM
- HMM
- Label Bias Problem of HMM
- States with a single outgoing transition ignores
their observations
P0.99
1
99x
Locally Normalized
0
2
1x
P0.01
17Conditional Random Fields
- Exponential family
- where C is the set of cliques in the graph.
Globally Normalized
18Conditional Random Fields
Cliques
19Conditional Random Fields
20Conditional Random Fields
- Linear Chain CRF
- Likelihood
- Log Likelihood
- Objective maximize log likelihood of training
data
- Gradient descent for a convex objective function
- Guaranteed convergence to global minimum
21Conditional Random Fields
- Gradient
- In the form of
- empirical feature counts expected feature
counts
- Gradient requires calculation of marginal
probabilities
- P(yix) and P(yi,yi1x)
- Forward backward algorithm
22Conditional Random Fields
- Forward Backward Algorithm
- Transition Matrix
23Conditional Random Fields
- Forward Backward Algorithm
- Forward, backward vectors
24Conditional Random Fields
- Forward Backward Algorithm
- Probabilities
25Conditional Random Fields
- Inference
- Prediction of labels given observations
26Conditional Random Fields
start
Y1
Yp-1
Yp
Yq
Yn
stop
Yq1
Yp1
CRF
X1
Xp-1
Xp
Xq
Xn
Xq1
Xp1
Labeled
Unlabeled or ambiguous
27Conditional Random Fields
- Partially Labeled Chain
- Expectation Maximization (E.M.) within the
unlabeled chain
- E-step expected feature counts in unlabeled
nodes
- M-step maximize log likelihood as before
start
Y1
Yp-1
Yp
Yq
Yq1
Yp1
X1
Xp-1
Xp
Xq
Xq1
Xp1
28Physiological Data Physiological Data Modeling
Contest
?
Gender
- GSR
- Heat flux
- Near body temperature
- Pedometer
- Skin temperature
- Longitudinal acceleration (2 values)
- Traverse acceleration (2 values)
3004 Watching TV
5102 Sleeping
- Age
- Handedness (left or right)
29Conditional Random Fields
Mixture CRF
30Conditional Random Fields
31Conditional Random Fields
32Conditional Random Fields
33Conditional Random Fields
Y1
Yi-1
Yi
Yi1
Yn
Y1
Yi-1
Yi
Yi1
Yn
stop
start
stop
start
G0
G1
X1
Xi-1
Xi
Xi1
Xn
X1
Xi-1
Xi
Xi1
Xn
34Conditional Random Fields
35Conditional Random Fields
- Inference
- Prediction of labels given observations
36Conditional Random Fields
- Inference
- Prediction of labels given observations
37Experimental Results
38Results
Black CRF-Mixture, Gray CRFLinear, Grady
dotted CRFLinear-EM
39Results
40Comparison of Mixture CRF with Linear Chain CRF
Sleep
TV
41Usefulness of unlabeled instances
X-axis number of sequences in training data
Y-axis score