
Motor Imagery Decoding for Brain-Computer Interfaces
Explore the use of machine learning for motor imagery decoding in brain-computer interfaces to assist individuals with spinal cord injuries and neurodegenerative diseases. The project involves EEG recordings, MRCP waveforms, and classification models to decode motor imagery movements for controlling prosthetic limbs.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
Machine Learning for Motor Imagery Decoding ECE-228 Project Zhimin Liang, Daniel Valencia, Nicholas Wong
Problem Description The brain, which is responsible for nearly all functional behavior of the human body, can be impeded by spinal-cord injury and other neuro- degenerative diseases. Brain-computer interfaces (BCI) are devices that can record and stimulate different parts of the brain and may provide alternative pathways for neural signals. Recording/Sensing may be invasive/non-invasive. Electroencephalograms (EEG) is an example of a non-invasive recording method. A brain-computer interface setup for controlling a prosthetic limb
Motor Imagery Decoding Prior to the onset of movement, there is a steady decrease in the EEG amplitude measured over the motor cortex, known as MRCP. The MRCP is observed in both real and imagined movement. Motor imagery (MI) decoding involves classifying the MRCP waveforms for different movements. The MRCP of a healthy subject for real and imagined movement. Shakeel et al, CMMM, 2015
Literature Survey Shakeel et al, CMMM, 2015
Dataset Description Dataset consists of 60 hours of EEG recordings across 13 participants 8 male, 5 female Four MI paradigms: Five finger movement (5F), Classic (CLA), Freeform (FREEFORM), Hands Legs Tongue (HaLT) Recordings contain 22 channels of EEG data, and markers are given that denote the movement type for each time step. X3 https://commons.wikimedia.org/wiki/File:21_electrodes_of_In ternational_10-20_system_for_EEG.svg
Data Performance in paper differed between subjects Kaya et al, Sci Data 5, 2018
Pre-Processing Techniques: Common Spatial Patterns Common spatial patterns (CSP) is widely used in EEG analysis. Involves constructing spatial features that will optimize the variance between time-series data of different classes. For MI decoding, this increases the difference between EEG waveforms of different classes. Using sum of squared difference: SSD without CSP: 16.9e+3 SSD with CSP: 31.7e+6 Raw Data Data w/ CSP Wang et Al, Clinical Neurophysiology, 1999
Classification Models Input data domain: time- series data. Approach: Use NN models that store temporal information within the model. Recurrent Neural Networks (RNNs) compute their hidden and output states based on the current input and previous hidden states. Dense layer has as many units as there are MI classes (one-hot encoding). LSTM 100 LSTM 50 Dense N MI Prediction EEG Data t=1 t=2 t=? The LSTM RNN for decoding MI tasks
Classification Results of LSTM Network Topology Pre-processing MI Paradigm Training Accuracy (%) 97.470 100.000 93.476 94.896 97.813 95.776 Testing Accuracy (%) 57.276 84.554 54.292 74.959 57.653 75.388 None CSP None CSP None CSP LSTM100- LSTM50-Dense2 CLA 5F LSTM100- LSTM50-Dense5 HaLT
Classification Results of LSTM - Dropout Network Topology Pre-processing MI Paradigm Training Accuracy (%) 96.641 99.301 91.408 90.499 97.152 92.177 Testing Accuracy (%) 58.103 87.503 52.064 74.947 57.188 75.035 None CSP None CSP None CSP LSTM100- LSTM50-Dense2 CLA 5F LSTM100- LSTM50-Dense5 HaLT
Pre-Processing Techniques: Wavelet-BSS Raw Data Wavelet-BSS is a layered preprocessing technique combining wavelet transformation, ICA and standard linear denoising techniques. 1. Perform Wavelet Transformation (meyer or morlet wavelet) 2. Perform Blind Source Separation via ICA or PCA and project data into component observational space. 3. Clean data in the observational space via linear techniques or unsupervised machine learning (Kalman filters, SVM, Auto Regression, Outlier Detection, ) 4. Inverse BSS 5. Inverse wavelet potential glitch or artifact Cleaned Data
Wavelet Transformation Common wavelets used in EEG preprocessing are Discrete Wavelet Transforms using Morlet or Meyer waves mother waves. Preference for non orthogonal wavelets to compliment ICA. Approximate blocks of EEG data with non-sinusoidal, non-fourier transforms since EEG noise is often not time dependent. EEG data may be discretized, or kept continuous. Discretization sometimes improves classification of EEG data. Jiang et al. 2019
BSS via Independent Component Analysis Blind Source Separation can be done with either PCA or ICA to identify prominent features and reduce dimensionality. Clean in Independent Component Space ICA is preferred because it separates components based on least amount of gaussianity rather than orthogonality giving features of most signal information. Transform cleaned data back to source space
Clean data in Wavelet-ICA space Within the observational space of data projected onto Independent Component Space, we can apply conventional cleaning techniques Auto Regression Kalman Filter Outlier Detection Detrending Data over all Channels SVM to identify noise and remove Transform back into source space after cleaned with Inverse ICA/PCA and Inverse Wavelet Transformation
Training LSTM on Wavelet-BSS Reduced Overfitting but did not improve performance.
SVM Classification Model SVM. Commonly used, simple, and effective 2 cases (left hand, right hand) Training: 99% Test: 90% 3 cases (left hand, no signal, right hand) Everything classified as a left hand signal https://commons.wikimedia.org/wiki/File:Kernel_Machine.svg
Further Items to be Completed Attempting to reduce LSTM overfitting by incorporating cleaning data using Wavelet-BSS and Dropout together Additional non-linear cleaning techniques within ICA space Testing the LSTM on the FREEFORM paradigm Training the LSTM on data spanning multiple subjects Data augmentation Online processing
References Kaya, M., Binli, M., Ozbay, E. et al. A large electroencephalographic motor imagery dataset for electroencephalographic brain computer interfaces. Sci Data 5, 180211 (2018). https://doi.org/10.1038/sdata.2018.211 Shakeel, Aqsa, et al. A Review of Techniques for Detection of Movement Intention Using Movement-Related Cortical Potentials. Computational and Mathematical Methods in Medicine, vol. 2015, 2015, pp. 1 13., doi:10.1155/2015/346217. Wang, Yunhua, Patrick Berg, and Michael Scherg. "Common spatial subspace decomposition applied to analysis of brain responses under multiple task conditions: a simulation study." Clinical Neurophysiology 110.4 (1999): 604-614. Jiang, X., Bian, G., Tian, Z. Removal of Artifacts from EEG signal: A Review. MDPI (2019)