1- Introduction
Brain-computer interface (BCI) is an interaction between the human brain and computer that enables the brain to control something just by thinking, The interface enables direct communications between the brain and the object to be controlled.
BCI provides people with motor disabilities another chance to control their environment, recording the signals on the sensorimotor cortex is very efficient in developing such applications. BCI can enable a person suffering from paralysis to write a book or control a motorized wheelchair or prosthetic limb through thought alone. (reference here).
a lot of research and experiments were done to achieve this goal control something only by thinking about it. This paper explains one of the experiments to use Dynamic Bayesian Networks for EEG Motor Imagery Feature Extraction. The title seems a bit technical but through this blog post, we will go into more details to understand how the brain-controlled wheelchair works and the impact of using DBNs on enhancing the results.
Recording brain signals
There are two popular ways of recording brain activity
1- Invasive: By implanting a chip into the subject’s brain, this gives very high signal accuracy.
2- Non-Invasive: Neuroimaging technologies as interfaces to record brain signals without surgeries. although it provides poor signals quality compared to invasive but it is very good for development projects
Brain Controlled Wheelchair
1- Data Acquisition: Recording the EEG signal which represents the brain activity when the subject does motor imagery action.
Brain oscillations are categorized according to specific frequency bands (delta: < 4 Hz, theta: 4 – 7 Hz, alpha: 8 – 12 Hz, beta: 12 – 30 Hz, gamma: > 30 Hz).
2- Pre-Processing: Applying filters to the recorded data to filter the input signals into several ranges and remove any unwanted noise.
3- Feature Extraction: Which EEG electrode value is relevant to the right or left movement action and which frequency band should be used.
4- Classification: applying classifiers to classify the new trial as left or right action that is then translated to control signal to the wheelchair.
2- Using DPN to enhance left and right imagery movement discrimination
Dynamic Bayesian Networks
Before answering this question we need to understand the Bayesian Networks.
Bayesian Networks are a type of Probabilistic Graphical Model that can be used to build models from data (reference here)
This demo demonstrates the Bayesian Network showing the impact of changing evidence on other probabilities.
Dynamic Bayesian Networks extend the Bayesian network with the concept of time, which can be used to detect causal relations in multivariate systems.
In this paper, DBNs are used to model the statistical dependencies between different electrodes during right and left hands imagery movement. it examines how the inferred connectivity between different electrodes could be used as a new feature for motor imagery movement classification. it utilizes a Support Vector Machine (SVM) as a classifier that uses features extracted from both the inferred connectivity and the band power of different electrodes.
In DPNs
Nodes -> represents EEG Electrodes
Edges -> Statistical causal dependency
A- Dataset (Concatenating Trials)
BCI competition 2008 – Graz A dataset (BCIIV2a) which consists of EEG data recorded from 9 subjects. each subject was recorded using 22 electrodes for 4 different motor imagery tasks: right hand, left hand, both feet, and tongue movements.
In this experiment, we are only interested in left and right-hand movements.
B- Data Pre-processing
1- Common Average Reference (CAR) is used to cancel the noise that may have occurred from all channels
2- 6th order Butterworth band-pass filter to filter the input signals in 7 different bands: 7-13Hz, 18-25Hz,
25-35Hz, 35-45Hz, 35-50Hz, 45-55Hz, and 55-65Hz. The ranges include the Alpha, Beta, and Gamma bands that have been demonstrated to be correlated with motor imagery tasks/ actions
C- Dynamic Bayesian Networks
Dynamic Bayesian Network (DBN) is a graphical representation that models the statistical dependencies between a given set of variables
G -> The graph represents the statistical dependency between variables.
V -> The nodes which represent the input variables which are denoted by ei(t) it represents the
preprocessed signal of electrode i at time t
E -> The set of connections, where each connection represents the existence of statistical dependency between the connected pair of variables.
P -> set of conditional probabilities for the dependencies between nodes measured at different time lags.
DBN models the conditional probability of the state of electrode ei(t) given the state of other electrodes that have a direct influence on it at the selected time lag which can be represented by P(ei(t)|eπ ( i) (t -1)), where eπ(i) is the set of electrodes that have a direct statistical influence on ei.
EEG Data discretization
It is transforming continuous EEG signals into 5 discrete levels using the quantile discretization method, which quantizes the data points based on their underlying distribution. This method can eliminate the impact of outliers in the data.
The DBN output for each trial is an n × n binary matrix N, where ‘n’ is the total number of electrodes and each element N(i, j) takes the value 0 or 1 to represent the existence or absence of connectivity from electrode i to j, respectively. Networks inferred from all trials are then concatenated to form a matrix of size T × n2, where T -> represents the total number of trials.
D -> represents T × n2
In This experiment the result matrix was of size 24 x 484 for each class the two matrices of the two classes are concatenated to form a single matrix 48 x 484
D- Dimensionality Reduction
Principal Component Analysis (PCA) is a classical technique in statistical data analysis, feature extraction, and data reduction. Given a set of multivariate measurements(D), the purpose is to find a smaller set of variables with less redundancy that maximize the variance in the network data.
This was used to extract the most relevant features from the 484 features representing the connectivity between electrodes for each trial.
The result will be Dpc[14]
E- Band Power Features Extraction
Only the most 4 relevant electrodes were selected 8,14,12,18 and only the 7-13 Hz band was considered because it has been shown that it acheives the best descrimination between movements.
P-> matrix with only 4 features representing the power in the 7-13 Hz band for electrodes 8, 14, 12 and 18
F- Classifier
Support Vector Machine (SVM) with radial basis function (RBF) kernel function.
SVN main idea is to transform the data into higher dimensional space so that it is linearly separable (reference here). The accuracy of the classifier was calculated based on the mean of the 10 iterations. using cross-validation.
3- Results
A- Frequency-band for Connectivity Features
Based on the figure below the connectivity feature generated by DBN has been inferred in the alpha band in the range 7-13Hz resulting in the best classification accuracy with an average of 60±14%, followed by the beta band in the range 18-25Hz with an average of 55±7%. These results are consistent with previous reports that indicated the significance of these two bands in motor imagery tasks
B- Combining Band Power and Connectivity Features
This figure shows that using the power band features and the connectivity features generated by DBNs has improved the classification results.
To compare the results to the results reported by the BCI competition IV, the kappa value was computed for the confusion matrix obtained for each subject. kappa of 0.502 as the mean was obtained which is comparable to the winners of the competition. In addition, the kappa value obtained for each subject is consistent with the kappa values reported by the competition winners.
4- Conclusion
Although using DBN connectivity feature has improved the classification result among two movements. but more analysis is still required to assess the relationship between inferred connections and the underlying brain dynamics in addition to analyzing the performance for more than two imagery tasks