EEG Cortical Source Feature based Hand Kinematics Decoding using
  Residual CNN-LSTM Neural Network
Motor kinematics decoding (MKD) using brain signal is essential to develop
Brain-computer interface (BCI) system for rehabilitation or prosthesis devices.
Surface electroencephalogram (EEG) signal has been widely utilized for MKD.
However, kinematic decoding from cortical sources is sparsely explored. In this
work, the feasibility of hand kinematics decoding using EEG cortical source
signals has been explored for grasp and lift task. In particular, pre-movement
EEG segment is utilized. A residual convolutional neural network (CNN) - long
short-term memory (LSTM) based kinematics decoding model is proposed that
utilizes motor neural information present in pre-movement brain activity.
Various EEG windows at 50 ms prior to movement onset, are utilized for hand
kinematics decoding. Correlation value (CV) between actual and predicted hand
kinematics is utilized as performance metric for source and sensor domain. The
performance of the proposed deep learning model is compared in sensor and
source domain. The results demonstrate the viability of hand kinematics
decoding using pre-movement EEG cortical source data.
Anant Jain, Lalan Kumar
# EEG Cortical Source Feature based Hand Kinematics Decoding using Residual CNN-LSTM Neural Network

###### Abstract

Motor kinematics decoding (MKD) using brain signal is essential to develop Brain-computer interface (BCI) system for rehabilitation or prosthesis devices. Surface electroencephalogram (EEG) signal has been widely utilized for MKD. However, kinematic decoding from cortical sources is sparsely explored. In this work, the feasibility of hand kinematics decoding using EEG cortical source signals has been explored for grasp and lift task. In particular, pre-movement EEG segment is utilized. A residual convolutional neural network (CNN) - long short-term memory (LSTM) based kinematics decoding model is proposed that utilizes motor neural information present in pre-movement brain activity. Various EEG windows at 50 ms prior to movement onset, are utilized for hand kinematics decoding. Correlation value (CV) between actual and predicted hand kinematics is utilized as performance metric for source and sensor domain. The performance of the proposed deep learning model is compared in sensor and source domain. The results demonstrate the viability of hand kinematics decoding using pre-movement EEG cortical source data.

## I Introduction

Brain-computer interface (BCI) system utilizes brain activation signals to control external devices. In particular, electroencephalogram (EEG) signals are utilized for non-invasive BCI systems due to mobility and low-cost. EEG-based motor intention decoding is addressed in [1] for motor classification. Classification based BCI system can also be utilized to command robotic devices [2] and control rehabilitation prosthesis [3]. However, continuous kinematics decoding based motor intention detection can provide efficient control of BCI systems. EEG-based motor kinematics decoding (MKD) has been employed for upper limb motor tasks [4, 5]. The multiple linear regression (mLR) is commonly used for kinematics decoding [5]. Deep learning based decoding models for MKD are explored in [6, 7].

EEG signals suffer with the volume conduction effect [8], which distorts the neuroelectric signals while transmission from cortical surface to the scalp. EEG source imaging (ESI) is utilized for projecting the scalp EEG potentials onto a cortical source space that represent brain geometry. For BCI, the EEG source localization transforms the input features from "sensor-domain" to "source-domain". In comparison to EEG-based motor intention detection, ESI based motor imagery (MI) classification have achieved better performance [9, 10, 11]. However, reliable decoding of motion trajectory from cortical source domain needs to be investigated. ESI based hand motion decoding is addressed for reach-to-target task in [12] and for snake trajectory tracking in [13]. mLR decoder was utilized for hand, elbow and shoulder trajectories estimation during target-reaching experiment in [12] with ESI signals. For actual movement execution, an average correlation of \(0.36\pm 0.13\) was reported across all trajectories. In [13], hand trajectory estimation was performed using a combination of partial least square (PLS) regression model and square-root unscented Kalman filter (SR-UKF) during random snake trajectory tracking. The highest average correlation of \(0.31\pm 0.09\) and \(0.35\pm 0.09\) was reported for hand position and velocity, respectively.

In this work, a residual convolutional neural network - long short-term memory (CNN-LSTM) based kinematics decoding model is proposed for MKD. The source-space based input features are taken for hand kinematics estimation for grasp and lift task. The neural information regarding the motor activity reflects on the motor-cortex region approximately 300ms prior to the movement execution [14]. Hence, various time lag windows are utilized to incorporate the pre-movement motor activation for efficient MKD. The EEG windows are considered at 50 ms prior to the movement onset. Further, the source-domain and sensor-domain MKD results are compared. A comparable performance is observed when deep learning model combined with pre-movement EEG data is utilized.

## II Methodology

In this Section, the description of grasp and lift database, data processing steps, EEG cortical source estimation, and deep learning based kinematics estimation framework are included. Fig. 1 shows the flowchart of the proposed kinematics estimation framework.

### _Experimental Setup_

In this work, a publicly available WAY-EEG-GAL [15] database is utilized for hand kinematics estimation. Simultaneous EEG and kinematics data was collected for twelve participants during grasp and lift task. A 32-channel EEG system (Brainproducts ActiCap) is used for EEG signal recording, and 3D hand position is recorded using position sensor. The EEG signals and 3D hand position are recorded with a sampling frequency of 500 Hz. The experiment is performed to grasp and lift the object with different weights and surfaces.
Each trial initiates with turning the LED ON, placed in front of the participant. The participant moves the hand to reach for the object, grasp it, and then lift it for a couple of seconds. With the LED turned OFF, the participant lowers the hand, puts the object on the initial position, and takes the hand back to the resting position.

### _Data Preprocessing_

EEG data is band-pass filtered in the frequency range of 0.1-40 Hz with zero-phase FIR filter to remove baseline drifts. Average re-referencing is employed on the filtered EEG data. Independent component analysis is utilized for removing eye movement artifacts. Data down-sampling form 500 Hz to 100 Hz is performed for the reduction of computational cost. EEGLAB [16] toolbox is utilized for EEG data preprocessing.

A zero-phase low-pass FIR filter (cutoff frequency 2 Hz) is utilized for smoothing of hand kinematic data. Further, the smoothed data is normalized in the range of \([0,1]\) using min-max normalization. Normalized data is down-sampled to 100 Hz to match EEG data sampling rate.

### _EEG cortical source Estimation_

Transformation of EEG data from sensor space to source space requires the solution of EEG forward and inverse modeling. Solution of EEG forward modeling gives lead field matrix, that maps the activation at source space with sensor space. The relationship for EEG potential \(\mathbf{E}\) for I (=32) sensors, K source dipoles and \(N_{s}\) samples, can be expressed as

\[\left[\mathbf{E}\right]_{I\times N_{s}}=\left[\mathbf{A}\right]_{I\times K} \left.\left[\mathbf{S}\right]_{K\times N_{s}}+\left[\eta\right]_{I\times N_{s}} \tag{1}\]

where, \(\mathbf{E}\) represents scalp EEG data, \(\mathbf{A}\) is lead-field matrix, \(\mathbf{S}\) denotes source activity, and \(\eta\) is the measured noise.

In present study, the numerical Boundary Element Method (BEM) is employed, with ICBM152 MRI template [17] as default subject anatomy, to compute head model using OpenMEEG [18]. EEG inverse modeling solution provides the cortex source distribution based on scalp EEG potential and head model. With the given lead-field matrix, the inverse modeling solution computes \(\mathbf{S}\). EEG inverse modeling is a highly under-determined problem, since the number of dipole sources is far more than the scalp EEG sensors. EEG inverse modeling is performed using standardized low-resolution electromagnetic tomography (sLORETA) method [19]. EEG cortical source estimation for the analysis is performed in Brainstorm toolbox [20].

### _Mindboggle Atlas_

The brain cortical area is sub-grouped into different regions by incorporating Mindboggle atlas [21]. Using Mindboggle atlas, anatomical labels are assigned to cortical structures in MRI data. It labels the cortical brain area into 62 regions. The mean activation of each region is computed to utilize it as input signal for hand kinematics estimation. A total of 62 time-series source signals are obtained for hand kinematics decoding. The selection of regions with Mindboggle atlas is performed using the Brainstorm toolbox [20]. Further, the mean EEG source signals are normalized using z-score normalization.

### _Data Preparation_

For hand kinematics data, the data is segmented from movement onset until the end of the trial. Time lag EEG windows are utilized to consolidate the neural information prior to the actual movement. Various window sizes (150 ms - 300 ms) are utilized for the analysis. EEG cortical source data segment with 150 ms window size will consider EEG data between -200 ms to -50 ms on the time scale, where 0 ms is movement onset. It is to note that pre-movement source data considers 50 ms prior to the actual movement. EEG cortical source matrix with dimension \(T\times(M\times N)\) is utilized as input to movement decoder, where \(T\) is the data segment, \(M\) is total number of scouts, and \(N\) is time lag window. For sensor domain analysis, total number of scouts,

Fig. 1: Flowchart of proposed kinematics decoding framework for Grasp-and-Lift task.
\(M\), is replaced with total EEG sensors (\(I\) = 32) in the input matrix.

### _Proposed Residual CNN-LSTM architecture_

A deep neural structure with residual convolution neural network (CNN) is proposed for hand kinematics estimation. Since, the EEG cortical source signal is time-series signal, 1D-CNN based residual neural network is utilized. The proposed MKD model consists of ConvBlock, LSTM layer and ResBlock. The structures of ConvBlock and ResBlock are shown in Fig. 2(a) and 2(b), respectively. ConvBlock includes a 1D-CNN layer (\(C_{1}\) filters and kernel size \(=3\)), followed by batch normalization layer, ReLU activation layer, drop-out layer (drop rate \(=0.5\)) and 1D-Average pooling layer (pool size \(=3\)). ResBlock comprises of three 1D-CNN layers with \([F_{1},F_{2},F_{3}]\) filters, batch normalization layers, drop-out layers and ReLU activation layers, along with a skip connection as shown in Fig. 2(b). The proposed residual CNN-LSTM based neural decoder has been shown in Fig. 2(c). It comprises three ConvBlock, two ResBlock, a LSTM layer, a flatten layer and a dense layer. The dense layer outputs the hand kinematics values in x, y, z-directions.

### _Training and Evaluation_

For training and performance evaluation of the proposed neural decoders, the database is divided into distinct sets of training, validation and test data. The training and validation data are used to train the model efficiently. The performance evaluation of trained model is performed on test data. The mean square error is used as loss function with adaptive movement estimation (Adam) optimizer for training the decoding model. The early stopping technique (patience\(=5\)) is utilized to avoid model overfitting. For each participant, a total of 294 trials of grasp-and-lift task are utilized in the analysis from WAY-EEG-GAL dataset. 234, 30 and 30 trials data samples are utilized as training data, validation data, and test data, respectively.

## III Results

Correlation value (CV) is taken as performance metric to measure efficiency of the proposed decoding model. The CVs are presented in Table I for different EEG windows. EEG input to the model is taken as detailed in Section II-E. Sensor-domain analysis makes use of 32-channel EEG as input. The mean CV is computed for each time lag window. For source-domain analysis, the proposed residual CNN-LSTM decoding model has overall best performance with the window size of 300 ms. The mean CV of the proposed decoding model with 300 ms time lag window are \(0.59\pm 0.07\), \(0.61\pm 0.07\), and \(0.56\pm 0.06\) in x, y, and z-directions, respectively. It is to note that maximum correlation reported for movement execution in source domain is \(0.36\) for a target-reaching task [12]. Application of deep learning model

\begin{table}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|} \hline \multicolumn{2}{|c|}{**Participants**} & \multicolumn{2}{|c|}{**Detection**} & \multicolumn{2}{|c|}{**Sources**} & \multicolumn{2}{|c|}{**Sources**} \\ \cline{3-10} \multicolumn{2}{|c|}{} & **100 ms** & **200 ms** & **250 ms** & **300 ms** & **150 ms** & **200 ms** & **200 ms** & **300 ms** \\ \hline \hline \multirow{3}{*}{**P1**} & **s** & 0.35 & 0.38 & 0.59 & 0.60 & 0.68 & 0.68 & 0.72 & 0.71 \\ \cline{2-10}  & **s** & 0.35 & 0.38 & 0.59 & 0.61 & 0.68 & 0.70 & 0.77 & 0.70 \\ \cline{2-10}  & **s** & 0.59 & 0.59 & 0.59 & 0.53 & 0.65 & 0.66 & 0.72 & 0.66 \\ \cline{2-10}  & **s** & 0.46 & 0.54 & 0.58 & 0.51 & 0.61 & 0.69 & 0.43 & 0.51 \\ \cline{2-10}  & **s** & 0.47 & 0.57 & 0.52 & 0.54 & 0.54 & 0.53 & 0.47 & 0.57 \\ \cline{2-10}  & **s** & 0.38 & 0.54 & 0.51 & 0.52 & 0.52 & 0.53 & 0.54 & 0.59 \\ \cline{2-10}  & **s** & 0.46 & 0.48 & 0.53 & 0.53 & 0.45 & 0.56 & 0.54 & 0.51 \\ \cline{2-10}  & **s** & 0.46 & 0.51 & 0.56 & 0.57 & 0.57 & 0.47 & 0.56 & 0.51 \\ \cline{2-10}  & **s** & 0.53 & 0.56 & 0.57 & 0.51 & 0.51 & 0.59 & 0.50 & 0.56 \\ \cline{2-10}  & **s** & 0.70 & 0.59 & 0.59 & 0.59 & 0.57 & 0.53 & 0.57 & 0.54 \\ \cline{2-10}  & **s** & 0.72 & 0.77 & 0.57 & 0.57 & 0.72 & 0.75 & 0.56 & 0.76 \\ \cline{2-10}  & **s** & 0.64 & 0.63 & 0.64 & 0.61 & 0.67 & 0.65 & 0.66 & 0.66 \\ \cline{2-10}  & **s** & 0.47 & 0.49 & 0.31 & 0.48 & 0.53 & 0.54 & 0.54 & 0.57 \\ \cline{2-10}  & **s** & 0.48 & 0.53 & 0.53 & 0.51 & 0.59 & 0.60 & 0.65 & 0.65 \\ \cline{2-10}  & **s** & 0.53 & 0.61 & 0.56 & 0.56 & 0.51 & 0.60 & 0.56 & 0.57 \\ \cline{2-10}  & **s** & 0.37 & 0.44 & 0.47 & 0.51 & 0.40 & 0.52 & 0.59 & 0.61 \\ \cline{2-10}  & **s** & 0.38 & 0.46 & 0.54 & 0.40 & 0.51 & 0.57 & 0.57 & 0.59 \\ \cline{2-10}  & **s** & 0.46 & 0.46 & 0.46 & 0.49 & 0.58 & 0.47 & 0.51 & 0.57 \\ \cline{2-10}  & **s** & 0.41 & 0.52 & 0.53 & 0.55 & 0.57 & 0.59 & 0.59 \\ \cline{2-10}  & **s** & 0.42 & 0.50 & 0.52 & 0.54 & 0.58 & 0.58 & 0.51 & 0.59 \\ \cline{2-10}  & **s** & 0.53 & 0.53 & 0.54 & 0.52 & 0.51 & 0.58 & 0.54 & 0.58 \\ \cline{2-10}  & **s** & 0.58 & 0.57 & 0.72 & 0.72 & 0.68 & 0.72 & 0.75 & 0.74 \\ \cline{2-10}  & **s** & 0.59 & 0.59 & 0.59 & 0.73 & 0.71 & 0.73 & 0.76 & 0.76 \\ \cline{2-10}  & **s** & 0.64 & 0.68 & 0.63 & 0.68 & 0.69 & 0.69 & 0.60 & 0.70 & 0.70 \\ \cline{2-10}  & **s** & 0.56 & 0.62 & 0.69 & 0.69 & 0.64 & 0.66 & 0.71 & 0.71 \\ \cline{2-10}  & **s** & 0.58 & 0.66 & 0.69 & 0.72 & 0.58 & 0.71 & 0.74 & 0.75 \\ \cline{2-10}  & **s** & 0.53 & 0.53 & 0.53 & 0.54 & 0.58 & 0.54 & 0.56 & 0.59 \\ \cline{2-10}  & **s** & 0.67 & 0.47 & 0.51 & 0.57 & 0.53 & 0.54 & 0.54 & 0.59 \\ \cline{2-10}  & **s** & 0.70 & 0.50 & 0.54 & 0.51 & 0.53 & 0.59 & 0.54 & 0.59 \\ \cline{2-10}  & **s** & 0.51 & 0.46 & 0.47 & 0.56 & 0.57 & 0.53 & 0.58 & 0.54 & 0.59 \\ \cline{2-10}  & **s** & 0.54 & 0.54 & 0.57 & 0.55 & 0.59 & 0.58 & 0.51 & 0.56 \\ \cline{2-10}  & **s** & 0.57 & 0.59 & 0.54 & 0.57 & 0.55 & 0.58 & 0.51 & 0.60 \\ \cline{2-10}  & **s** & 0.51 & 0.56 & 0.61 & 0.61 & 0.51 & 0.66 & 0.65 & 0.65 \\ \cline{2-10}  & **s** & 0.52 & 0.57 & **0.59** & **0.59** & 0.59 & 0.52 & **0.62** & **0.62** \\ \hline \end{tabular}
\end{table} TABLE I: Hand kinematics decoding analysis of neural decoder with time lag windows of 150 ms, 200 ms, 250 ms, and 300 ms.

Fig. 2: (
combined with pre-movement EEG data contribute to the performance enhancement in the present work. For sensor-domain analysis, the best decoding performance is found with 300 ms window size with mean CV of \(0.62\pm 0.08\), \(0.65\pm 0.08\), and \(0.59\pm 0.07\) in x, y, and z-directions, respectively. The mean correlation is plotted in Fig. 3. It may be noted that MKD performance in source domain is comparable with sensor domain counterparts at larger window size.

## IV Discussion and Conclusions

In this study, a residual CNN-LSTM based neural decoder is proposed for kinematics decoding using pre-movement neural information in source domain. WAY-EEG-GAL dataset is utilized for this purpose. The performance evaluation of the proposed model is presented using correlation values (CVs) between actual and predicted trajectories in source and sensor domain. The mean activation of the labeled cortical regions is taken as source-domain features for kinematics decoding. A significant correlation is observed in both the domain with the proposed decoding model. Further improvement needs to be explored for better kinematics decoding.
