A Generative Restricted Boltzmann Machine Based Method for High-Dimensional Motion Data Modeling

Siqi Nie, Ziheng Wang, Qiang Ji

Introduction

Spatio-temporal patterns in high-dimensional motion data are crucial in many recognition applications. For example, human action is the combination of the body joint movements over a time interval. Facial expression is the result of the facial landmark movements (Figure 1). Understanding the movement trajectories and modeling the underlying spatio-temporal patterns play an important role in recognizing these actions, especially with the recent emergences of reliable algorithms to estimate the positions of body joints and facial landmarks.

In this work, we are interested in developing a probabilistic model to capture the spatio-temporal pattenrs in high-dimensional time series for classification purpose. Many recent works develop novel models to capture the spatio-temporal dynamics . However, most models, such as hidden Markov model (HMM) , dynamic Bayesian network (DBN) and conditional random field (CRF) are time-slice local models, which assume Markov property and stationary transitions and hence can only capture local dynamics. The local models suffer from two limitations. First, local dynamics may not represent a sequence well because it fails to mpdel the overall dynamics. Second, the stationary transition assumption may not hold for many real-world applications.

Compared with time-sliced dynamic models, restricted Boltzmann machines (RBMs) has shown strong capability of modeling joint distributions and therefore can capture the global patterns. In literature, RBMs have been successfully applied to separately capture the spatial or temporal patterns in different types of data. In this work, we propose a variant of RBM that can capture spatial and global temporal patterns simultaneously to comprehensively model the high-dimensional motion data.

In a typical RBM, since there are no lateral connections among nodes in each layer, input data are independent of each other given the states of hidden layer. This assumption limits RBM’s representation power, since there exist direct dependencies among input data. There are generally two types of data interactions: interactions through latent variable and direct interactions independent of latent variable. For example, as stated in , soldiers on a parade follow the commander’s order to march in some direction, but they “form a neat rectangle by interacting with their neighbors”. This example illustrates that soldiers’ behavior are determined by both the commander’s order (latent) and the interactions with their neighbors. In this case, RBM is not effective in modeling the local interaction that is independent of the latent variable. The use of RBM for data representation and classification is further hindered by the difficulty in comparing different RBMs due to the intractable computation of the partition functions.

Allowing interaction among visible units can overcome this shortcoming. We introduce restricted Boltzmann machine with local interactions (LRBM) to capture both the global temporal patterns and local spatial interactions in the input data. Specifically, we add a new pairwise potential term in the learning objective function of RBM to capture the local spatial interactions among components of an input vector. To perform efficient learning for the model, we replace the reconstruction procedure in the conventional Contrastive Divergence algorithm with a mean field approach.

For classification task, RBM is typically used for learning features, as the input to a second stage classifier (e.g., SVM ). Typically one model is trained for all classes. To obtain good features, deep structure is built and back propagation is employed to carefully tune the parameters. In this work, we use RBM as a generative model to capture the spatio-temporal patterns in the data. RBM is used for data representation instead of feature learning. Given an observation, the only output we get from an RBM model is the likelihood of the model. For the recognition purpose, one model is trained for one class of input data. To compare among different models, we employ a method to estimate the relative partition function of a pair of RBMs for binary classification, and a label ranking method is used to extend the binary classification to multi-class classification.

To evaluate the performance of LRBM, we apply it to two areas related to complex spatial and temporal patterns: facial expression recognition and human action recognition. Experimental results on benchmark databases demonstrate the effectiveness of the proposed model.

The rest of the paper is structured as follows. Section 2 presents an overview of the related work. Section 3 introduces the LRBM to model the global temporal dynamics and spatial patterns of motion data, as well as the classification method. We will then give the experimental results in 4. The paper is concluded in section 5.

Related Work

Capturing and representing spatio-temporal structure in data is important for many recognition and classification tasks. Research for capturing such patterns can be categorized into feature-based and model-based methods. The most widely used spatio-temporal features include spatio-temporal interest point (STIP) based features and optical flow based features . These features capture local appearance or motion patterns near the interest points or optical flows. Although having been successfully applied to many applications, these features generally focus more on local patterns.

Model-based methods include probabilistic graphical models such as Hidden Markov Models , Dynamic Bayesian Networks , Conditional Random Fields , and their variants. While capable of simultaneously capturing both spatial and temporal interactions, they can only capture the local spatial and temporal interactions due to the underlying Markov assumption.

Restricted Boltzmann machines (RBMs) have been separately used for modeling spatial correlation or temporal correlation in the data in the last decade. RBM was firstly introduced to learn deep features from handwritings to recognize digits . In , Eslami et al. propose a Deep Belief Network to model the shapes of horses and motorbikes. The samples from the model look realistic and have a good generalization. A more complicated model, proposed by Nair and Hinton , considers the spatial correlation among visible layer using a factored 3-way RBM, in which triple potentials are used to model the correlations among pixels in natural images. The intuition is that in natural images, the intensity of each pixel is approximately the average of its neighbors. Wu et al. apply the 3-way RBM to facial landmark tracking, and model the relationship between posed faces and frontal faces, under varying facial expressions.

For dynamic data modeling, Taylor et al. use a Conditional RBM (CRBM) to model the temporal transitions in human body movements, and reconstruct body movements. Nevertheless, like HMM, CRBM still models local dynamics by assuming nn’th order Markov property.

The idea of using RBM to model global pattern is not new. In , RBM and CRF are combined for face labeling problem in a simgle image or video sequences. Compared with these works, our work is different for several reasons. First, our goal is to use RBM for data representation for multi-class classification, while the goal of is MAP inference, which is to recover the label for each superpixel. Second, we extend the conventional RBM to capture the local shape and global temporal patterns in a unified model, while in RBM is built on top of the hidden layer of the CRF, as the prior for the labels. Third, our method learns all the parameters simultaneously, while their method performs learning separately.

RBM and its variants have also been used for modeling motion data. For example, Sutskever and Hinton introduce a temporal RBM to model high-dimensional sequences. Wang et al. use RBM to capture the global dynamics of finger trace. However, it is limited to model the global dynamics for 1-D data only.

To improve the representation power of RBM, semi-restricted Boltzmann machine (SRBM) is introduced to model the lateral interactions between visible variables. The main property of SRBM is that given the hidden variables, the visible layer forms a Markov random field. However, for high-dimensional motion data, there will be too many parameters if every pair of visible units has an interaction. In this work, we model the dynamic nature of data with fewer parameters than a SRBM, which makes the learning process more efficient.

Besides feature extraction and shape modeling, RBMs have also been used for classification. Larochelle and Bengio introduce a discriminative RBM as a classifier by including the labels in visible layer, and make predictions by comparing the likelihood of each label vector. In discriminate RBM is introduced to model vector inputs by duplicating the discriminative RBM and adding constraints on the hidden layer. In all RBM related models discussed above, one RBM is trained for all classes. For this work, in contrast, we build one RBM for each class, and perform a multi-class classification task.

In this research, we propose to extend the standard RBM to simultaneously capture the spatial and global temporal patterns in high-dimensional sequential data and employ such RBM model to different classification tasks in computer vision.

Data Spatio-Temporal Pattern Modeling

In this section, we will firstly give a brief introduction of restricted Boltzmann machine, and then introduce the proposed RBM with Local Interaction (LRBM) to model multi-dimensional motion data and its learning method. Finally we present the method to use LRBMs as a set of pairwise classifier to perform multi-class recognition.

A standard RBM is a generative model with two densely connected layers, one visible layer to represent data and one latent layer to extract stochastic binary features from data (Figure 2). Hidden units are connected to visible nodes using symmetrically weighted connections to model their joint distribution. In our work, we use Gaussian-Binary RBM, where the hidden units are binary and the visible variables are assumed to follow normal distribution.

The energy function E(v,h)E(\mathbf{v},\mathbf{h}) for each pair (v,h)(\mathbf{v},\mathbf{h}) is parameterized in Equation 1.

where aia_{i} is the bias for visible unit viv_{i}, σi\sigma_{i} is the standard deviation of the Gaussian distribution, which is typically 1 if we normalize the data, bjb_{j} is the bias for the hidden unit hjh_{j}, wijw_{ij} is the weight of the link connecting viv_{i} and hjh_{j}.

For every possible pair of visible and hidden vector, the network assigns a probability:

where ZZ is the partition function. With continuous inputs, the ZZ is calculated by integrating over all visible nodes and summing over all hidden unit configurations.

2 Proposed Model

Using standard RBM to model high-dimensional motion data has its limitations. First, the interaction among the data is represented through latent variables, which can be easily represented in direct connections. Second, if a single RBM models the whole sequence, the spatial information in a time slice is treated the same as the temporal information of one dimension. If one RBM models only one time slice (as in ), the temporal information remains local.

In this work, we propose the restricted Boltzmann machine with local interaction (LRBM, Figure 3) to overcome such limitations. For d×ntd\times n_{t} sequential data V=[v1,v2,…,vnt]\mathbf{V}=[\mathbf{v}_{1},\mathbf{v}_{2},\dots,\mathbf{v}_{n_{t}}], by allowing local interaction, we have the following energy function,

where vi\mathbf{v}_{i} is a dd-dimension vector representing input vector at time slice ii, w\mathbf{w} has the dimension of nt×nh×dn_{t}\times n_{h}\times d, wij⋅\mathbf{w}_{ij\cdot} is the weight vector connecting vi\mathbf{v}_{i} to a hidden node hjh_{j}. ai\mathbf{a}_{i} and bjb_{j} have the same meaning as in Equation 1. U\mathbf{U} is a d×dd\times d symmetric matrix with zeros on diagonal, modeling the correlation of each vector vi\mathbf{v}_{i}.

The proposed energy function models two kinds of data interactions: interaction through latent variables and interaction directly among data. In high-dimensional motion data, components in a single time slice (spatial information) is better to be considered differently from components along the timeline (temporal information). Interactions between input data and hidden variables are through weight w\mathbf{w}, which models global pattenrs, because every visible unit is connected to every latent unit. Matrix U\mathbf{U} models direct interactions among input data, as in Figure 3, representing local spatial patterns. This kind of interaction directly affects visible layer without going through latent layer, so it is more effective to model some local spatial patterns. The elements in U\mathbf{U} are pairwise potentials of features in one time slice. Different shapes (spatial pattern) of input will have different contributions to the energy function. Thus, U\mathbf{U} captures spatial patterns among elements of input vector. With temporal information captured via the hidden nodes, our work can capture global spatio-temporal dynamics.

We assume the spatial relationship are constant throughout the whole sequence, so the parameters in U\mathbf{U} are shared in different frames, which means U\mathbf{U} is invariant of ii. Under this invariance assumption of U\mathbf{U}, the number of parameters is significantly reduced.

From the energy function (Equation 3) and likelihood function (Equation 2), we can derive the probability of an hidden unit to be activated, given an visible layer:

As one hidden unit is connected to all visible units, whether it is activated or not depends stochastically on the visible layer. A hidden unit hjh_{j} is activated through Equation 4 when it detects some specific pattern in the visible layer. The pattern is captured by the weights connecting each element in V\mathbf{V} to hjh_{j}. Therefore the hidden layer h\mathbf{h} is able to capture important global patterns of V\mathbf{V}. Hence, the proposed model can simultaneously capture the global temporal patterns (through w\mathbf{w}) and local shape patterns (through U\mathbf{U}).

LRBM is similar to the factored 3-way RBM and SRBM with respect to modeling the interactions in the visible layer. However, there exist some significant differences. First, in factored 3-way RBM, every pair of visible units has a potential to represent the interaction, while in LRBM, units only interact with neighbors in the time slice. Second, if the number of factors in 3-way RBM or the data dimension in SRBM is high, the overall parameters are much more than LRBM. In LRBM, the additional parameters are from matrix U\mathbf{U}, with the d(d−1)/2d(d-1)/2 parameters, where dd is the dimension of the vector vi\mathbf{v}_{i}. This would greatly reduce the computational load. Finally, both 3-way RBM and semi-RBM are proposed to model the spatial patterns of a single natural image, while LRBM models spatio-temporal patterns of sequential data.

The joint probability of V\mathbf{V} and h\mathbf{h} are the same as in Equation 2. The likelihood of input data is computed by summing over all configurations of hidden units:

3 Model Learning

In our work, one LRBM is trained for one class. The parameters include bias for visible and hidden units ai\mathbf{a}_{i} and bjb_{j}, weight between two layers w\mathbf{w}, and local interaction matrix U\mathbf{U}. To learn the parameters, we seek to maximize the joint probability of all training data DD of a class, P(D)=∏V∈Dp(V)P(D)=\prod_{\mathbf{V}\in D}p(\mathbf{V}). Assume the data has been normalized, so ai\mathbf{a}_{i} can be removed from the energy function. The derivative of the log-likelihood of a training instance with respect to a parameter is given below:

where ϵ\epsilon is the learning rate. ⟨vihj⟩data\langle\mathbf{v}_{i}h_{j}\rangle_{data} is easy to get from the data. ⟨vihj⟩model\langle\mathbf{v}_{i}h_{j}\rangle_{model} is much more difficult to compute due to the large dimension of hidden and visible layers. Hinton proposes the CD algorithm to approximate ⟨vihj⟩model\langle\mathbf{v}_{i}h_{j}\rangle_{model} by using a reconstructed sample, which gives the following weight change:

Given the visible layer, the hidden units are independent with each other, so sampling the states of hidden units can be performed in parallel using Equation 4.

Given the states of the hidden units, the visible units form a Markov Random Field in which the pairwise interaction weight between vi(r)\mathbf{v}_{i}^{(r)} and vi(s)\mathbf{v}_{i}^{(s)} is ursu_{rs}. They are no longer independent, so sampling cannot be done in parallel. However, we can obtain the conditional probability of each node by fixing its neighbors. The mean field algorithm is used to sample data from the model, and to reconstruct visible layer when learning the parameters of LRBM. Specifically, for each vector vi\mathbf{v}_{i}, each component vi(s)\mathbf{v}_{i}^{(s)} is sampled by fixing all its neighbors. Once a component is sampled, the vector is updated with the newly sampled component. This procedure is repeated until all components have been updated, and thus we get a reconstructed vector. The conditional probability of one visible node is given in Equation 11:

Compared with distribution of visible units in standard RBM:

the mean of the distribution of a visible node is similar in the first two terms, except that in LRBM, it is modified by the pairwise potentials relating one node to all its neighbors.

With the reconstructed data, we are able to calculate the approximate gradient of each parameter, and perform the CD learning procedure. As mentioned in , the RBMs learn better if more steps of reconstruction are used before collecting the statistics. In practice, we sample 10 times using the mean field method before collecting the reconstructed data in each epoch.

Due to the non-convex property of the objective function, different parameter initializations in RBM learning can end up with different models. For each class, several candidate models are learned from different initializations, and we select the one that can best discriminate current class from the others.

For example, after learning model M1\mathcal{M}_{1} for class C1\mathcal{C}_{1}, given instances from all classes {I1,I2,⋯ ,IN}\{I_{1},I_{2},\cdots,I_{N}\}, we expect instance I1I_{1} to have greater likelihood on model M1\mathcal{M}_{1} than all other instances ({I2,⋯ ,IN}\{I_{2},\cdots,I_{N}\}). In practice, we can sort the likelihoods of instances from all classes, and choose the candidate model that minimizes the rank of the instances from class C1\mathcal{C}_{1}.

Notice that the likelihood is calculated according to Equation 5, given a single LRBM model, so for the comparison of the likelihoods, we don’t need to estimate the intractable partition function, since it is merely a constant.

4 Multi-class Classification

For this work, RBM is used as a generative model for classification. A common strategy for training generative model for classification is to train multiple models for different classes and then evaluate the likelihood of each model during testing. In particular, given a set of properly learned LRBM’s {Mi}i=1N\{\mathcal{M}_{i}\}_{i=1}^{N} for NN classes, the basic idea for classification is to find the model that generates the largest likelihood given an instance of data V\mathbf{V}.

where i∗i^{*} is the prediction of our classifier. The likelihood of a data instance is

For brevity, we denote p(V)p(\mathbf{V}) as

g(V)g(\mathbf{V}) can be computed directly. However the partition functions ZZ are intractable for RBMs with large numbers of hidden and visible units. One possible solution is the Annealed Importance Sampling to estimate the partition functions, and directly compare the likelihood. However, such estimation needs too many samples to obtain a good estimation of the partition function. Instead, for binary classification, Schmah et al. propose a method to discriminatively estimate the difference of log-partition functions of two RBMs:

We extend this method to multi-class classification. Ideally, cij=cik+ckjc_{ij}=c_{ik}+c_{kj}. But since the partition function is not directly computed, there is a slight error in the estimation. To address this issue, we perform a label ranking process to make the final decision using a set of pairwise classifiers.

In the simplest case, with all the pairwise classifiers fijf_{ij}, each prediction is interpreted as a vote for a class, and the class with the highest votes is proposed as a prediction. Alternatively, in confidence estimation, instead of a binary result {0, 1}, a “soft” classifier is employed to map the difference in likelihood into the unit interval :

Parameter α\alpha is searched in a range of [0.01,100][0.01,100] to maximize the training accuracy.

The output of such “soft” binary classifier can be interpreted as a confidence value in the classification: the closer the output Fij\mathcal{F}_{ij} to 1, the stronger the decision of choosing class Ci\mathcal{C}_{i} is supported. Notice that Fij\mathcal{F}_{ij} is not symmetrical. It only gives the preference toward ii between ii and jj. The preference toward jj is 1−Fij1-\mathcal{F}_{ij}. A valued preference relation matrix RV\mathcal{R}_{\mathbf{V}} is defined for any query instance V\mathbf{V}:

In our approach, we evaluate the confidence score by summing up all the confidence value

where the index ii goes through 11 to NN, meaning the confidence score for one instance on different classes. The label of the model that associates with the highest score is proposed as the final decision.

In general, if we have a NN-class classification problem, (n2)=n(n−1)/2{n\choose 2}=n(n-1)/2 pairwise classifiers are used to compute the confidence score.

Experiments

We evaluate our algorithm on two different areas that involve high-dimensional motion data: facial expression recognition and human action recognition. Two benchmark data sets are used in our experiment: the extended Cohn-Kanade data set (CK+) and G3D data set . We will also compare the proposed LRBM model with other related methods.

The Extended Cohn-Kanade data set (CK+) is a complete data set for action units and emotion-specified expressions. In this work, based on a sequence of landmarks on the human face, our goal is to classify it into one of seven expressions: angry, disgust, fear, happy, sadness, surprise and contempt. CK+ data set includes 593 sequences from 123 subjects. From all the sequences, 327 are associated with expression labels. In our experiment, these 327 sequences are used. Landmarks are the positions of 68 facial points from a detection and tracking procedure, which are provided by the database.

As the pose of each subject varies slightly over time, we apply a pose rectification procedure to make each face a frontal one. Then, using the detected eyes and the interocular distance, we perform a geometric normalization by making the size of facial area the same throughout all subjects, and moving the centers of eyes to the same position. A smoothing filter is also used to reduce the noise in the trajectory. To reduce the feature dimension while keeping the useful information, as shown in Figure 4, we omit the outline landmarks and some other points, and select the more informative points, resulting in a 15-point feature for each frame, which is a 30d vector. The features selected are reasonable due to the property of facial symmetry.

Intuitively, the spatial patterns are crucial in recognizing an expression. From a single face, human can identify the expression without any difficulty. But in order to explore the underlying facial dynamics as additional features for our system, we choose 10 frames from each sequence, representing the neutral look, intermediate expressions and the peak expression. Since our method captures global temporal patterns, a good alignment of different sequences is important to ensure recognition performance. Linear interpolation is used to get sequences with fixed length. The size of hidden layer is set as 400. To compare with baseline method, we use a leave-one-subject-out cross-validation configuration. Each time we generate the testing data from sequences of one subject. 25 other subjects form the validation set, and all the other subject form the training set.

The performance of the algorithm is given in Table 1. As we only use the shape features (i.e. facial landmark positions), the comparison is only between methods using the same features. Our method’s hit rates for each expression are: Angry - 97.8%, Disgust - 89.8%, Fear - 84.0%, Happy - 100.0%, Sadness 78.6%, Surprise - 97.6%, Contempt - 72.2%. The average accuracy of all the expressions is 88.6%, which is more than 2% better than state-of-the-art method, as reported in . In Table 2, we list the comparison of our model with some recent approaches. Our approach reaches the best accuracy on five expressions (angry, fear, happy, sadness and surprise) among all the methods listed. Although our model does not achieve the best accuracy for every expression, it does not fall behind very much on Disgust, but it fails sometimes on Contempt, because this is a subtle expression that our method needs more features to represent it accurately. In CK+ data set, contempt expression has only 18 samples. However, the average performance of the proposed method has been improved a lot. Another thing to mention is that the method in uses both shape features and appearance features, while we only use the shape features.

If we do not consider the spatial interaction within each frame, the data is simply aligned as a long vector to feed in the conventional RBM. Then the performance is 86.3%, which is less than the LRBM. This also proves the improvement of LRBM over RBM.

We also compare our method with 4 best available results to date, including Time-series Kernels (Lorincz et al. ), spatio-temporal independent component analysis (Long et al. ), boosted dynamic features (Yang et al. ), and non-negative matrix factorization techniques (Jeni et al. ). These methods are different from the baseline method in , because contempt emotion is removed from the data set, and binary classification is performed for each expression, so for the classification of one expression, the other five expressions are negative samples. Following the same experiment settings, the result of classification is shown in Figure 5, and detailed comparison is in Table 3. The classification performance of our algorithm is close to, or even better than state-of-the-art method, with a better average accuracy. This demonstrate the effectiveness of the proposed LRBM model as both a binary classifier and a multi-class classifier.

1.2 Comparison with Feature Learning Method

To comprehensively evaluate our method, we compare with a feature learning method, since RBMs are typically used for feature learning. A single RBM is trained on all classes of sequences using contrastive divergence. The size of hidden layer is the same as in the generative model. In the test process, given each observation sequence V, we compute the posterior probability P(hj∣V)P(h_{j}|\textbf{V}) for each hidden variable hjh_{j} according to Equation. 4, as the feature representation. This is reasonable because P(hj=1∣V)P(h_{j}=1|\textbf{V}) is the probability of a pattern being activated. A linear multi-class SVM is trained on such features for classification.

The confusion matrix of this method is given in Table 4. For most expressions, the feature-based method is not as good as the generative model. The average recognition accuracy is 83.8%, which is approximately 5% below the performance of the generative model. This is reasonable, because the features learned from the model cannot capture the spatial relationship in each frame, which is specifically modeled in our model using the matrix UU. If we add another latent layer, the classification performance only increases marginally by about 1%.

2 Human Action Recognition

G3D data set is an action data set containing a range of gaming actions captured by Microsoft Kinect. The data set contains 10 subjects performing 20 gaming actions: punch right, punch left, kick right, kick left, defend, golf swing, tennis swing forehand, tennis swing backhand, tennis serve, throw bowling ball, aim and fire gun, walk, run, jump, climb, crouch, steer a car, wave, flap and clap. Synchronized video, depth and skeleton data are available in this data set. We only pick the skeleton data. To reduce the data dimension but keep the useful information, we use the 3D location information of four dominant joints (i.e. two hands and two feet). However the proposed approach can be applied to modeling more joints if we have enough training data.

Before abstracting the features, we perform a normalization procedure to minimize the effect brought by difference in subjects’ body shapes. Specifically, we obtain the average bone lengths from all subjects in the training data, and then change the skeleton tracking results in every frame for each subject with the average shape. Therefore, every subject has the same body shape, and the cross subject distinction is alleviated.

As the size of the visible layer of an RBM is fixed, linear interpolation is performed to convert all sequences into the same length (20 frames for each sequence). The 3D positions of the body joints along all three dimensions (x, y and z) form the 240-dimension input for the LRBM model. In the training phase, we set the size of hidden layer as 80.

We use the action segmentation that is provided by the data and the same experiment configuration as in . The data set is split by subjects where the first 4 subjects were used for training, 1 for validation and the remaining 5 subjects for testing.

The confusion matrix is given in Figure 6. The overall accuracy of LRBM is 90.5%. Our model encounters some failures for the actions of ThrowBowlingBall in Bowling category and Jump. In these actions, occasionally the body parts are occluded from the Kinect sensor, which will lead to estimated positions of joints. Then the positions of the two feet are significantly corrupted. As our method depends fully on the trajectories of joints, corrupted tracking results have a huge influence on the performance of LRBM. If we remove the pairwise potential in the visible layer and make the model a standard RBM, the accuracy drops to 84%, which proves the better performance of LRBM than RBM, as expected, due to modeling the spatial interactions. Comparison with the baseline model is given in Table 5. Other than Bowling, performance on golf action is quite close to the baseline method, and on all the other actions, our approach outperforms the baseline method. The overall accuracy is increased by 15.5% in terms of F1 score.

One reason of the improvement is that the method in is based on 3 frames, hence can only capture local dynamics, while the proposed method is sequence based that can handle global dynamics.

To further demonstrate the effectiveness of global dynamic model over local dynamic model, we implement a conditional RBM and a hidden Markov model for action recognition. For the conditional RBM model, each frame depends on 3 previous frames. 20 models are trained for 20 actions. Classification is based on the likelihood of a target sequence on different models. Basically the local dynamic model (CRBM or HMM) models one frame at a time and the global model (RBM or LRBM) models all frames at the same time.

Similar to the expression recognition case, the posterior probability of the hidden variables P(hj∣V)P(h_{j}|\textbf{V}) can be used as the features for classification. We implement the feature-based method using linear SVM as the classifier. Again, it does not perform well compare with other dynamic methods, mainly due to the reason that it cannot capture the local spatial patterns in each frame. Details are given in Table 6.

2.2 Handling Noisy and Missing Data

One advantage of generative model is that they can handle noisy or missing data in the input. To demonstrate this point, we design two scenarios with randomly selected noisy or missing data:

(a) Noisy data. For a randomly selected portion of data, we multiply the ground truth data by a Gaussian noise 1+N(0,1)1+\mathcal{N}(0,1), where N(0,1)\mathcal{N}(0,1) is the normal distribution;

(b) Missing data. For a randomly selected portion of data, we assume they are missing, and use the average of their neighbors as the approximation when computing the likelihood.

The data under these scenarios are then fed into our generative model for classification purpose. We vary the portion of noisy or missing data from 0 to 50%, and observe the change of the classification accuracy. The details are given in Figure 7.

In scenario (a), with the portion of noisy data increase, the performance almost decays linearly. In scenario (b), if the percentage of missing data is small (less than 30%), the average of its neighborhood is a decent estimation of the missing value, but with more data missing, the performance decays quite significantly. This is because several consecutive frames are missing at the same time, and the temporal information cannot be recovered effectively. One thing to notice is that with as much as 30% noisy or missing data, our algorithm can achieve 86% accuracy, only 4% below the noiseless situation, which demonstrates the effectiveness of our algorithm to handle noisy or missing data.

3 Complexity

In the learning procedure of LRBM, we compute the data-dependent expectation and model-dependent expectation using matrix multiplication, so the computational complexity is linear with the size of the weight matrix (dnt×nhdn_{t}\times n_{h}) and iteration times (nitern_{iter}). Thus, the computation complexity is O(dntnhniter)O(dn_{t}n_{h}n_{iter}). For facial expression recognition task, we set the epoch to 250, and the average running time for training one RBM is 1.77s, compared with 1.30s for standard RBM without local interaction. With 10 candidate models, it takes less than 5 min to train all the models. Experiments are performed on a desktop computer with an Intel i7 3.4GHz CPU and 8GB RAM. For testing, given a target sequence, we need to compute the unnormalized likelihood on each LRBM model using Equation 14, with computational cost O(ntd2+nhntd)O(n_{t}d^{2}+n_{h}n_{t}d). Given the unnormalized likelihood and the relative partition functions, the classification needs n2n^{2} comparisons, therefore the overall classification complexity is O(n(ntd2+nhntd)+n2)O(n(n_{t}d^{2}+n_{h}n_{t}d)+n^{2}), which is linear in the dimension of the input sequence. If we linearly increase the length of the sequence by increasing the frame rate, the complexity is also increased linearly.

For multi-class classification with nn classes, the confidence value matrix SVS_{\textbf{V}} is built with complexity O(n2)O(n^{2}). In typical computer vision applications, the number of classes cannot exceed the dimension of the data, which means n2n^{2} does not contribute much in the complexity, compared to the first term. To reduce the quadratic term O(n2)O(n^{2}) to a linear term O(n)O(n), Annealed Importance Sampling can be used to estimate the partition function, thus the likelihood can be directly compared. However, the sampling method requires many samples to get a good estimation of the partition function, and the overall classification complexity is not reduced significantly.

Theoretically, the proposed method can be scaled up to data with thousands of dimensions, but much more training data will be needed since the number of parameters increases linearly with the size of input.

Conclusion

In this paper, we study classification problem with multi-dimensional sequence data. To capture both the global dynamics and the local spatial interactions, we extend the conventional restricted Boltzmann machine by adding pairwise potentials in the energy function. An efficient mean field learning method is proposed to replace the reconstruction procedure in typical Contrastive Divergence learning, to estimate the additional parameters. Also, a novel label ranking approach of estimating the partition function of different LRBMs is presented to perform multi-class classification task. Experiments on two areas that involve multi-dimensional sequence data are performed to evaluate our approach. Results on two benchmark data sets prove the effectiveness of our algorithm.

Using the generative model for data representation, we do not need to deal with a deep and complicated structure, as in feature learning, and do not need to carefully tune the parameters. This is a major advantage of our method compared with feature learning methods. However, one shortcoming is that is that the data sequences have to be aligned for our global model to function properly, and the classification complexity is quadratic in the number of classes. We will address these issues in future work.

References

References