Method and system for EEG motor imagery classification
Patent Information
- Application Number
- IN202221053592
- Authority / Receiving Office
- IN · IN
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-09-19
AI Technical Summary
Existing EEG-based motor imagery classification methods fail to accurately capture underlying brain functional networks due to the use of static or heuristic-based graph representations, which reduce spatial resolution and do not learn the importance of edge weights in connectivity patterns.
A method involving the use of Graph Neural Networks (GNNs) to iteratively train a weighted adjacency matrix and classifiers, generating node and edge embeddings that provide accurate motor imagery classification by learning dynamic connectivity patterns between EEG channels.
This approach enables more accurate EEG signal representation and classification, improving motor imagery detection by learning the importance of each edge and updating the model based on total loss, thereby enhancing the quality of EEG signal analysis.
Abstract
Description
TECHNICAL FIELD
[001] The disclosure herein generally relates to the field ofElectroencephalogram (EEG) classification, and, more particularly, to method andsystem for EEG motor imagery classification.BACKGROUND
[002] Brain-computer interface (BCI) research has vast medicalapplications such as stroke rehabilitation and neural prosthesis. The BCI systemsdecode the patterns in brain activity to control electro-mechanical devices. Onesuch BCI system is Electroencephalogram (EEG) based Motor Imagery. EEG is apopular method to record the brain's electrical activity due to its high temporalresolution and portability. Motor imagery (MI) can be defined as a subject's mentalprocess of motor activity without actual movement. During the process of motormovement or imagery, the underlying functional connectivity within the sensorymotor cortex changes resulting in an amplitude suppression or Event RelatedDesynchronization (ERD) or an amplitude increase or Event RelatedSynchronization (ERS) of central mu (8-12Hz) and beta (18-25Hz) rhythms. It iswidely accepted that the process of MI involves similar cortical regions involved inthe preparation or planning of movements. Hence, the motor imagery andmovement preparation can be theorized as similar functional activities. Accurateclassification of the neural activity is of great importance to enable these EEG basedMI systems.
[003] Spatio-temporal analysis of networks between lobes of the brainhelps in learning about patterns of neuronal activity associated with motorfunctions. The most intuitive way to represent and analyze these networks is usinggraph which is a topographical representation consisting of a set of nodes and edges.In graph-based studies, typically, the nodes are defined in two ways: the firstapproach is to use source-space (EEG signal source i.e., the brain) to determine thenodes, usually captured from brain source imaging techniques or sourcereconstruction using EEG. Here, anatomical regions of the brain are used togenerate the cortical networks or connectomes. The second method uses the sensorspace(EEG electrode position e.g., 10-20 electrode system) of the EEG acquisitionsystems to define the nodes. The EEG signals acquired at sensor level are describedas a linear combination of the active brain and non-brain electrical sources whoseactivities are volume conducted on the scalp. Due to the volume conduction, manycorrelations exist between electrodes thereby reducing the spatial resolution whichaffect the detection of various functional interactions between brain regions.Existing deep learning works employ the sensor-space for EEG graphrepresentations wherein the channels of the EEG are considered as nodes andconnection between the nodes are either predefined or are based on certainheuristics. However, these representations are ineffective and fail to accuratelycapture the underlying brain's functional networks.
[004] One recent work EEG-GAT: Graph Attention Networks forClassification of Electroencephalogram (EEG) Signals by Andac Demir et.al.discloses a method of generating EEG representations using a graph shift operatorto learn the optimal connectivity pattern between EEG channels. But this methoddoes not learn the importance of each edge (i.e., the edge weight). Also, the graphembedding or representation is obtained using the readout functions such as sum ormean which are static functions and may not accurately represent the graph.Another recent work EEG-GNN: Graph Neural Networks for Classification ofElectroencephalogram (EEG) Signals by Andac Demir et.al. represents EEG signalas a graph, where nodes represent the EEG channels and the node connectivity(edges) is based on the policy formulated by neuro-scientist (for example, based ondistance between electrodes). So, the accuracy of graph representation largelydepends on expertise of the neuro-scientist.SUMMARY
[005] Embodiments of the present disclosure present technologicalimprovements as solutions to one or more of the above-mentioned technicalproblems recognized by the inventors in conventional systems. For example, in oneembodiment, a method for EEG motor imagery classification is provided. Themethod includes receiving one or more Electroencephalogram (EEG) signals andcorresponding ground truth labels comprising a ground truth graph label, a groundtruth edge label, and a ground truth node label. Each of the one or more EEG signalscomprise a plurality of channels. The method further includes extracting a pluralityof temporal embeddings corresponding to each of the plurality of channels of eachof the one or more EEG signals using a temporal feature extractor. Further, themethod includes constructing one or more graphs corresponding to each of the oneor more EEG signals. Each of the one or more graphs comprise a plurality of nodescorresponding to the plurality of channels and a weighted adjacency matrix definingconnectivity between each pair of nodes among the plurality of nodes. Each of theplurality of nodes is associated with the plurality of temporal embeddings of thecorresponding channel. Furthermore, the method includes iteratively training aGraph Neural Network (GNN), the weighted adjacency matrix, a graph classifier,a node classifier, and an edge classifier for a plurality of pre-defined number ofiterations by generating a plurality of node embeddings corresponding to each ofthe one or more EEG signals by the Graph Neural Network (GNN) using the oneor more graphs; classifying each of the one or more EEG signals based on thecorresponding plurality of node embeddings using the graph classifier, the nodeclassifier, and the edge classifier to obtain a graph label, a node label and an edgelabel, wherein the graph label provides motor imagery classification, the node labelprovides quality of the EEG signal, and the edge label determines affinity betweena pair of nodes among the plurality of nodes; and updating the GNN, the weightedadjacency matrix, the graph classifier, the node classifier, and the edge classifierbased on a total loss obtained as a sum of a graph classification loss, a nodeclassification loss, and an edge classification loss.
[006] In another aspect, a system for EEG motor imagery classification isprovided. The system includes a memory storing instructions; one or morecommunication interfaces; and one or more hardware processors coupled to thememory via the one or more communication interfaces, wherein the one or morehardware processors are configured by the instructions to: receive one or moreElectroencephalogram (EEG) signals and corresponding ground truth labelscomprising a ground truth graph label, a ground truth edge label, and a ground truthnode label. Each of the one or more EEG signals comprise a plurality of channels.The one or more hardware processors are further configured to extract a pluralityof temporal embeddings corresponding to each of the plurality of channels of eachof the one or more EEG signals using a temporal feature extractor. Further, the oneor more hardware processors are configured to construct one or more graphscorresponding to each of the one or more EEG signals. Each of the one or moregraphs comprise a plurality of nodes corresponding to the plurality of channels anda weighted adjacency matrix defining connectivity between each pair of nodesamong the plurality of nodes. Each of the plurality of nodes is associated with theplurality of temporal embeddings of the corresponding channel. Furthermore, theone or more hardware processors are configured to iteratively train a Graph NeuralNetwork (GNN), the weighted adjacency matrix, a graph classifier, a nodeclassifier, and an edge classifier for a plurality of pre-defined number of iterationsby generating a plurality of node embeddings corresponding to each of the one ormore EEG signals by the Graph Neural Network (GNN) using the one or moregraphs; classifying each of the one or more EEG signals based on the correspondingplurality of node embeddings using the graph classifier, the node classifier, and theedge classifier to obtain a graph label, a node label and an edge label, wherein thegraph label provides motor imagery classification, the node label provides qualityof the EEG signal, and the edge label determines affinity between a pair of nodesamong the plurality of nodes; and updating the GNN, the weighted adjacencymatrix, the graph classifier, the node classifier, and the edge classifier based on atotal loss obtained as a sum of a graph classification loss, a node classification loss,and an edge classification loss.
[007] In yet another aspect, there are provided one or more non-transitorymachine-readable information storage mediums comprising one or moreinstructions which when executed by one or more hardware processors cause amethod for EEG motor imagery classification. The method includes receiving oneor more Electroencephalogram (EEG) signals and corresponding ground truthlabels comprising a ground truth graph label, a ground truth edge label, and aground truth node label. Each of the one or more EEG signals comprise a pluralityof channels. The method further includes extracting a plurality of temporalembeddings corresponding to each of the plurality of channels of each of the oneor more EEG signals using a temporal feature extractor. Further, the methodincludes constructing one or more graphs corresponding to each of the one or moreEEG signals. Each of the one or more graphs comprise a plurality of nodescorresponding to the plurality of channels and a weighted adjacency matrix definingconnectivity between each pair of nodes among the plurality of nodes. Each of theplurality of nodes is associated with the plurality of temporal embeddings of thecorresponding channel. Furthermore, the method includes iteratively training aGraph Neural Network (GNN), the weighted adjacency matrix, a graph classifier,a node classifier, and an edge classifier for a plurality of pre-defined number ofiterations by generating a plurality of node embeddings corresponding to each ofthe one or more EEG signals by the Graph Neural Network (GNN) using the oneor more graphs; classifying each of the one or more EEG signals based on thecorresponding plurality of node embeddings using the graph classifier, the nodeclassifier, and the edge classifier to obtain a graph label, a node label and an edgelabel, wherein the graph label provides motor imagery classification, the node labelprovides quality of the EEG signal, and the edge label determines affinity betweena pair of nodes among the plurality of nodes; and updating the GNN, the weightedadjacency matrix, the graph classifier, the node classifier, and the edge classifierbased on a total loss obtained as a sum of a graph classification loss, a nodeclassification loss, and an edge classification loss.
[008] It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory only and are notrestrictive of the invention, as claimed.BRIEF DESCRIPTION OF THE DRAWINGS
[009] The accompanying drawings, which are incorporated in andconstitute a part of this disclosure, illustrate exemplary embodiments and, togetherwith the description, serve to explain the disclosed principles:
[010] FIG. 1 illustrates an exemplary block diagram of a system for EEGmotor imagery classification, according to some embodiments of the presentdisclosure.
[011] FIGS. 2A and 2B collectively referred as FIG. 2 is a flow diagramillustrating method for training a model comprising a Graph Neural Network andclassifiers for EEG signal classification, according to some embodiments of thepresent disclosure.
[012] FIG. 3 is a functional block diagram illustrating method of EEGmotor imagery classification, according to some embodiments of the presentdisclosure.DETAILED DESCRIPTION OF EMBODIMENTS
[013] Exemplary embodiments are described with reference to theaccompanying drawings. In the figures, the left-most digit(s) of a reference numberidentifies the figure in which the reference number first appears. Whereverconvenient, the same reference numbers are used throughout the drawings to referto the same or like parts. While examples and features of disclosed principles aredescribed herein, modifications, adaptations, and other implementations arepossible without departing from the scope of the disclosed embodiments.
[014] Existing EEG based MI classification methods construct graphsusing static adjacency matrix that are either pre-defined or based on certainheuristics. Hence, the constructed graph does not accurately represent the EEGsignal. Embodiments of present disclosure generates a representation (embedding)of the EEG signal by feeding a graph as input to a trained Graph Neural Network(GNN). The graph comprises nodes corresponding to EEG channels andconnectivity between the nodes is defined by a weighted adjacency matrix. TheGNN and weighted adjacency matrix are trained together using training samplesunlike state of the art methods. Thus, the embedding generated by the trained GNNaccurately represents the EEG signal and therefore can be used for accurate motorimagery classification (i.e. graph classification). In addition, the embedding canalso be used for node and edge classification by using appropriate classifiers.
[015] Referring now to the drawings, and more particularly to FIG. 1through 3, where similar reference characters denote corresponding featuresconsistently throughout the figures, there are shown preferred embodiments andthese embodiments are described in the context of the following exemplary systemand / or method.
[016] FIG. 1 illustrates an exemplary block diagram of a system for EEGmotor imagery classification. In an embodiment, the system 100 includes one ormore processors 104, communication interface device(s) 106 or Input / Output (I / O)interface(s) 106 or user interface 106, and one or more data storage devices ormemory 102 operatively coupled to the one or more processors 104. The memory102 comprises a database 108. The one or more processors 104 that are hardwareprocessors can be implemented as one or more microprocessors, microcomputers,microcontrollers, digital signal processors, central processing units, state machines,logic circuitries, and / or any devices that manipulate signals based on operationalinstructions. Among other capabilities, the processor(s) is configured to fetch andexecute computer-readable instructions stored in the memory. In an embodiment,the system 100 can be implemented in a variety of computing systems, such aslaptop computers, notebooks, hand-held devices, workstations, mainframecomputers, servers, a network cloud, and the like.
[017] The I / O interface device(s) 106 can include a variety of software andhardware interfaces, for example, a web interface, a graphical user interface, andthe like and can facilitate multiple communications within a wide variety ofnetworks N / W and protocol types, including wired networks, for example, LAN,cable, etc., and wireless networks, such as WLAN, cellular, or satellite. In anembodiment, the I / O interface device(s) 106 receives an EEG signal as input andgives classification of the EEG signal as output. The memory 102 may include anycomputer-readable medium known in the art including, for example, volatilememory, such as static random access memory (SRAM) and dynamic randomaccess memory (DRAM), and / or non-volatile memory, such as read only memory(ROM), erasable programmable ROM, flash memories, hard disks, optical disks,and magnetic tapes. Functions of the components of system 100 are explained inconjunction with flow diagrams depicted in FIGS. 2 and 3 for EEG motor imageryclassification.
[018] In an embodiment, the system 100 comprises one or more datastorage devices or the memory 102 operatively coupled to the processor(s) 104 andis configured to store instructions for execution of steps of the method (200)depicted in FIG. 2 by the processor(s) or one or more hardware processors 104. Thesteps of the method of the present disclosure will now be explained with referenceto the components or blocks of the system 100 as depicted in FIG. 1, the steps offlow diagram as depicted in FIGS. 2 and 3. Although process steps, method steps,techniques or the like may be described in a sequential order, such processes,methods, and techniques may be configured to work in alternate orders. In otherwords, any sequence or order of steps that may be described does not necessarilyindicate a requirement that the steps to be performed in that order. The steps ofprocesses described herein may be performed in any order practical. Further, somesteps may be performed simultaneously.
[019] FIG. 2 is a flow diagram illustrating method for training a modelcomprising a Graph Neural Network and classifiers for EEG signal classification,according to some embodiments of the present disclosure. The steps of method 200are explained in conjunction with functional block diagram illustrated in FIG. 3. Atstep 202 of the method 200, the one or more hardware processors 104 areconfigured to receive one or more EEG signals and their corresponding ground truthlabels comprising ground truth graph label, ground truth node label and ground truthedge label. Each of the one or more EEG signals comprise a plurality of channelswhich are electrodes capturing brainwave activity. For example, an EEG signalrecorded by a 16-electrode EEG device has 16 channels.
[020] Once the one or more EEG signals are received, at step 204 of themethod 200 the one or more hardware processors are configured to extract aplurality of temporal embeddings (alternatively referred as temporal features) fromeach of the plurality of channels of each of the one or more EEG signals via atemporal feature extractor illustrated in FIG. 3. The temporal feature extractor is aneural network such as Recurrent Neural Network (RNN), temporal convolutionalneural network, transformer etc. An example architecture of the temporal featureextractor is given in table 1 where N represents number of channels in the one ormore EEG signals and T represents the duration of the one or more EEG signalswhich is expressed in terms of number of samples. For example, an EEG signal of3 seconds sampled at the rate of 100 samples / sec will yield 300 samples, thereforeT=300. The 1D convolution layers (Conv1D) and the average pooling layers (Avg.pool) extract the plurality of temporal features ho of each channel of each of theone or more EEG signals. The output of the temporal feature extractor is given byequation 1, wherein x represents the one or more EEG signals with N channels, frepresents the temporal feature extractor with parameters θf, and ho represents theplurality of temporal embeddings corresponding to the one or more EEG signals.The temporal embeddings indicate activity and nature of the EEG signals, forexample, entropy, coherence etc.[Equation](1)Table 1
[021] Once the temporal features are extracted, one or more graphs (G) areconstructed corresponding to each of the one or more EEG signals at step 206 ofthe method 200. Each graph comprises a plurality of nodes corresponding to eachof the plurality of channels of corresponding EEG signal among the one or moreEEG signals and a weighted adjacency matrix (AW) defining connectivity(alternatively referred as edges) between each pair of nodes among the plurality ofnodes. Each of the plurality of nodes is associated with the plurality of temporalembeddings (ho) of the corresponding channel.
[022] Once the one or more graphs are constructed, at step 208 of themethod 200, the one or more hardware processors are configured to iteratively traina Graph Neural Network (GNN), the weighted adjacency matrix, a graph classifier,a node classifier, and an edge classifier for a plurality of pre-defined number ofiterations by steps 208A to 208C. At step 208A, a plurality of node embeddings(hn) corresponding to each of the one or more EEG signals are generated by theGNN using the one or more graphs according to equation 2. As understood by aperson skilled in the art, each node embedding is a feature vector that representseach node in each of the one or more graphs. Thus, the plurality of node embeddingstogether represent the entire graph and the corresponding EEG signal. In the firstiteration of training, the temporal embeddings associated with the nodes of the oneor more graphs are considered as hold in equation 2. In the subsequent iterations,the node embeddings generated at the previous iteration are considered as hold.hnew represents updated node embedding generated by the GNN at a currentiteration. In general, ith node embedding is given by equation 3, wherein Nirepresents set of nodes that are in neighborhood of node i in the one or more graphs,W represents a transformation matrix which is used to transform the hold to hnewand can be updated during training of the GNN, b represents bias, and σ representsnon-linearity (for example, ReLu). The node embedding generated at the end of theplurality of iterations is given by equation 4, wherein ho is the temporal embedding,AW is the weighted adjacency matrix and θGNN is weights of the GNN.[Equation](2)[Equation](3)[Equation](4)
[023] Once the node embeddings are generated, each of the one or moreEEG signals are classified, at the step 208B, based on the corresponding pluralityof node embeddings using the graph classifier, the node classifier, and the edgeclassifier to obtain a graph label, a node label, and an edge label. The graph labelprovides motor imagery classification, the node label provides quality of the EEGsignal (for example, good or poor), and the edge label determines affinity betweena pair of nodes among the plurality of nodes (for example, strong or weak). In anembodiment, the node embeddings are vectorized or flattened before feeding intothe graph classifier. Similarly, the node embeddings are concatenated beforefeeding into the edge classifier while they are fed as it is into the node classifier toclassify the one or more EEG signals. Example architectures of the graph classifier,the node classifier and the edge classifier are given in tables 2, 3 and 4, respectively.Here, N represents number of channels in the one or more EEG signals, T representslength of the one or more EEG signals expressed in terms of samples, hin and houtrepresent the number of input and output neurons of the fully connected (FC) layer,Cnodes is number of node categories and Cedge is number of edge categories.Table 2Table 3Table 4
[024] The graph label [cap]ygraph is predicted according to equation 5, whereinh is vectorized node embedding, θgraph represents parameters of the graphclassifier and Clsgraph represents the graph classifier. Once the graph label ispredicted, a graph classification loss is calculated based on the predicted graph labeland the ground truth graph label. An example calculation is given by equation 6,wherein CE is cross entropy loss which calculates additional values required topredict ground truth ygraph instead of the predicted classification [cap]ygraph. Asunderstood by a person skilled in the art, other loss functions such as variants ofcross entropy loss, hinge loss, supervised contrastive loss etc. can be used insteadin alternate embodiments. The node label [cap]ynode for ith node in a graph among theone or more graphs is predicted accordi ng to equation 7, wherein hi is the nodeembedding of the ith node, Clsnode represents the node classifier, and θnoderepresents parameters of the node classifier. Once the node label is predicted, a nodeclassification loss is calculated based on the predicted node label and ground truthnode label. An example calculation is given by equation 8, wherein N is totalnumber of nodes in a graph among the one or more graphs, CE is cross entropy losswhich calculates additional values required to predict ground truth [cap]ynode instead ofthe predicted classification [cap]ynode. The edge label [cap]yedge for an edge connecting anode i and a node j in a graph among the one or more graphs is predicted accordingto equation 9, wherein hi and hi are the node embeddings of the node i and node jrespectively, Clsedge represents the edge classifier, and θedge represents theparameter of the edge classifier. All the edges in the graph can be classified in asimilar way to obtain the edge labels. Once the edges are classified, an edgeclassification loss is calculated based on predicted edge label and ground truth edgelabel. An example calculation is given in equation 10, wherein |E| is total numberof edges in a graph among the one or more graphs, CE is cross entropy loss whichcalculates additional values required to predict ground truth yi,jedge instead of thepredicted classification [cap]yi,jedge for the edge ei,j connecting node i and node j.[Equation](5)[Equation](6)[Equation](7)[Equation](9)[Equation](10)
[025] Once the one or more EEG signals are classified and classificationlosses are calculated, a total loss is determined as sum of graph classification loss,node classification loss and the edge classification loss according to equation 11.Further, the GNN, the weighted adjacency matrix, the graph classifier, the nodeclassifier, and the edge classifier are updated based on the total loss at the step 208C.Unlike state of the art methods where the weighted adjacency matrix is pre-definedor based on certain heuristics, in the method of present disclosure, it is learnt alongwith the GNN to accurately represent the EEG signals.[Equation](11)
[026] For updating the GNN, the weighted adjacency matrix, the graphclassifier, the node classifier, and the edge classifier a first, a second, a third, afourth and a fifth gradient of the total loss with respect to parameters of the GNN,the weighted adjacency matrix, the graph classifier, the node classifier, and the edgeclassifier, respectively are calculated. Then, the GNN, the weighted adjacencymatrix, the graph classifier, the node classifier, and the edge classifier are updatedusing an optimizer (for example, Adam optimizer) based on the computed first,second, third, fourth and fifth gradient.
[027] Once the GNN, the weighted adjacency matrix and the classifiersare trained by the step 208, they can be used for classifying any input EEG signalas illustrated in FIG. 3. Initially, an input EEG signal comprising a plurality ofchannels is received and temporal embedding of each of the plurality of channels isextracted using the temporal feature extractor. Further, a graph is constructed withthe plurality of channels as nodes and the trained weighted adjacency matrix definesthe edges between the nodes. Each node is associated with the temporal embeddingof the corresponding channel. Further, node embeddings are generated by thetrained GNN for each node of the graph which are fed into the trained graphclassifier, the node classifier, and the edge classifier to classify the EEG signal.Since the EEG signal is accurately represented by the weighted adjacency matrix,the classifications are also accurate. Also, the method of present disclosure is ableto determine graph label, node label, and edge label using same node embeddingsgenerated by the GNN unlike state of the art methods which provide only graphclassification. Thus, the method of present disclosure is more accurate and has awider range of applications than the state of the art methods.EXPERIMENTAL RESULTS
[028] The experimental results are provided to highlight effectiveness ofthe method of present disclosure on the EEG MI classification task (i.e. graphclassification). Pytorch with Deep Graph Library (DGL) is used for theexperiments. The term 'model' is used to together refer to the GNN, temporalfeature extractor, and the graph classifier.
[029] Dataset: The dataset used is physionet EEG motor movement andimagery dataset (EEG-MMIDB) (G. Schalk et.al., "Bci2000: a general-purposebrain-computer interface (bci) system," IEEE Transactions on biomedicalengineering, vol. 51, no. 6, pp. 1034-1043, 2004; A. L. Goldberger et.al.,"Physiobank, physiotoolkit, and physionet: components of a new research resourcefor complex physiologic signals," circulation, vol.101, no. 23, pp. e215-e220,2000). The dataset contains EEG signals recorded from 109 subjects. The EEGsignals were obtained via BCI2000 system using 64-channels at a sampling rate of160Hz. Each subject participated in 3 trials of left, right, both fists and both feetmotor imagery and movement. The EEG signals are pre-processed by performingaverage re-referencing and z-scoring before performing the method of presentdisclosure and no other artifact removal techniques were used.
[030] Following are the details of the dataset used for experiments: (i) Twoclass subset: For the two-class classification task, EEG signals of subjectsperforming the following activities are considered- (a) imagine open and close ofleft fist, and (b) imagine open and close of right fist; (ii) Four class subset: For thefour-class classification task, EEG signals of subjects performing the followingactivities are considered- (a) imagine open and close of left fist, (b) imagine openand close of right fist, (c) imagine open and close of both feet; and (d) resting. Twoversions of the EEG trial data are taken for training and testing of the models. Theyare: (i) 6 seconds duration: The duration of each EEG trial is 6 seconds. The trialdata consists of 4 seconds of imagery activity, and 1 second of resting-state beforeand after the start of imagery activity; (ii) 3 seconds duration: The duration of eachEEG trial is 3 seconds. The trial data consists of first 3 seconds of imagery activity.
[031] Evaluation: the performance of the proposed method is evaluatedin a cross-subject setting wherein the model is evaluated on the EEG signals fromthe subjects that are not part of the training set, i.e., disjoint sets of subjects are usedfor training and testing. The mean accuracy of the model for 5-fold cross-validationis reported and compared with the following methods: (i) Park et al. ("Augmentedcomplex common spatial patterns for classification of noncircular eeg from motorimagery tasks," IEEE Transactions on neural systems and rehabilitationengineering, vol. 22, no. 1, pp. 1-10, 2013.): The method uses a complex-valued,common spatial pattern (CSP) algorithm with the Strong Uncorrelating Transform(SUT) for feature extraction. A Support Vector Machine (SVM) is trained on theextracted features for the motor imagery classification task; (ii) Dose et al. ("A deeplearning mi-eeg classification model for bcis." in EUSIPCO, 2018, pp.1676-1679.):This method represents EEG signals as a 2D grid, where each row represents thesignal of a particular EEG lead. 2D convolution layers are used to extract the Spatiotemporalfeatures. These features are fed to a fully connected layer to obtain thefinal prediction. This method considers raw EEG signals for feature extraction. Theexperimental setup and evaluation protocol used to evaluate method of presentdisclosure are similar to the Dose et al.
[032] Results: Table 5 shows the performance of the models on the twoclassdataset. The accuracy of the model in the subject independent setting is shown.The method of present disclosure achieves a mean accuracy of 82.92%. Further, itcan be observed that the performance of the method of present disclosure is betterthan the existing approaches. Table 6 shows the performance of the models on thefour-class dataset. The models are trained and tested on EEG signals with differentdurations. The method of present disclosure achieves a mean accuracy of 64.38%and 68.60% on the cross-validation set containing EEG signals with a duration of3 and 6 seconds, respectively.Table 5Table 6
[033] Ablation study: Following ablation experiments are performed tohighlight the effectiveness of the method of present disclosure. (i) Ablation-1:Temporal convolution and GNN with a fixed adjacency matrix. In this experiment,the temporal feature for each channel is obtained by the temporal convolution block.Then the GNN with a fixed adjacency matrix is used to aggregate channel features.This experiment is performed to highlight the need for GNN with a trainableadjacency matrix. Table 7 shows the result for this experiment. It can be observedthat there is a drop in the performance of the model from 68.60% to 59.22%. (ii)Ablation-2: Temporal convolution with pooling-based channel feature aggregation.In this experiment, the temporal features of each channel are obtained by thetemporal convolution block. Instead of GNN, a pooling layer (such as mean, sum,and max) is used to aggregate the channel features. This experiment is performedto highlight the importance of the GNN with a trainable weighted adjacency matrix.Table 7 shows the result for this experiment. It can be observed that there is a dropin the performance of the model from 68.60% to 56.97%, 57.86%, and 57.71% formean, max, and sum pooling layers, respectively.Table 7
[034] The written description describes the subject matter herein to enableany person skilled in the art to make and use the embodiments. The scope of thesubject matter embodiments is defined by the claims and may include othermodifications that occur to those skilled in the art. Such other modifications areintended to be within the scope of the claims if they have similar elements that donot differ from the literal language of the claims or if they include equivalentelements with insubstantial differences from the literal language of the claims.
[035] It is to be understood that the scope of the protection is extended tosuch a program and in addition to a computer-readable means having a messagetherein; such computer-readable storage means contain program-code means forimplementation of one or more steps of the method, when the program runs on aserver or mobile device or any suitable programmable device. The hardware devicecan be any kind of device which can be programmed including e.g., any kind ofcomputer like a server or a personal computer, or the like, or any combinationthereof. The device may also include means which could be e.g., hardware meanslike e.g., an application-specific integrated circuit (ASIC), a field-programmablegate array (FPGA), or a combination of hardware and software means, e.g., anASIC and an FPGA, or at least one microprocessor and at least one memory withsoftware processing components located therein. Thus, the means can include bothhardware means and software means. The method embodiments described hereincould be implemented in hardware and software. The device may also includesoftware means. Alternatively, the embodiments may be implemented on differenthardware devices, e.g., using a plurality of CPUs.
[036] The embodiments herein can comprise hardware and softwareelements. The embodiments that are implemented in software include but are notlimited to, firmware, resident software, microcode, etc. The functions performed byvarious components described herein may be implemented in other components orcombinations of other components. For the purposes of this description, acomputer-usable or computer readable medium can be any apparatus that cancomprise, store, communicate, propagate, or transport the program for use by or inconnection with the instruction execution system, apparatus, or device.
[037] The illustrated steps are set out to explain the exemplaryembodiments shown, and it should be anticipated that ongoing technologicaldevelopment will change the manner in which particular functions are performed.These examples are presented herein for purposes of illustration, and not limitation.Further, the boundaries of the functional building blocks have been arbitrarilydefined herein for the convenience of the description. Alternative boundaries canbe defined so long as the specified functions and relationships thereof areappropriately performed. Alternatives (including equivalents, extensions,variations, deviations, etc., of those described herein) will be apparent to personsskilled in the relevant art(s) based on the teachings contained herein. Suchalternatives fall within the scope of the disclosed embodiments. Also, the words"comprising," "having," "containing," and "including," and other similar forms areintended to be equivalent in meaning and be open ended in that an item or itemsfollowing any one of these words is not meant to be an exhaustive listing of suchitem or items or meant to be limited to only the listed item or items. It must also benoted that as used herein and in the appended claims, the singular forms "a," "an,"and "the" include plural references unless the context clearly dictates otherwise.
[038] Furthermore, one or more computer-readable storage media may beutilized in implementing embodiments consistent with the present disclosure. Acomputer-readable storage medium refers to any type of physical memory on whichinformation or data readable by a processor may be stored. Thus, a computerreadablestorage medium may store instructions for execution by one or moreprocessors, including instructions for causing the processor(s) to perform steps orstages consistent with the embodiments described herein. The term "computerreadablemedium" should be understood to include tangible items and excludecarrier waves and transient signals, i.e., be non-transitory. Examples includerandom access memory (RAM), read-only memory (ROM), volatile memory,nonvolatile memory, hard drives, CD ROMs, DVDs, flash drives, disks, and anyother known physical storage media.
[039] It is intended that the disclosure and examples be considered asexemplary only, with a true scope of disclosed embodiments being indicated by thefollowing claims.
Claims
1. A processor implemented method comprising: receiving (202), via one or more hardware processors, one or more Electroencephalogram (EEG) signals and corresponding ground truth labels comprising a ground truth graph label, a ground truth edge label, and a ground truth node label, wherein each of the one or more EEG signals comprise a plurality of channels; extracting (204), via the one or more hardware processors, a plurality of temporal embeddings corresponding to each of the plurality of channels of each of the one or more EEG signals using a temporal feature extractor; constructing (206), via the one or more hardware processors, one or more graphs corresponding to each of the one or more EEG signals, wherein each of the one or more graphs comprise a plurality of nodes corresponding to the plurality of channels and a weighted adjacency matrix defining connectivity between each pair of nodes among the plurality of nodes, and wherein each of the plurality of nodes is associated with the plurality of temporal embeddings of the corresponding channel; and iteratively training (208), via the one or more hardware processors, a Graph Neural Network (GNN), the weighted adjacency matrix, a graph classifier, a node classifier, and an edge classifier for a plurality of predefined number of iterations for classifying the one or more EEG signals by: generating (208A) a plurality of node embeddings corresponding to each of the one or more EEG signals by the GNN using the one or more graphs; classifying (208B) each of the one or more EEG signals based on the corresponding plurality of node embeddings using the graph classifier, the node classifier, and the edge classifier to obtain a graph label, a node label, and an edge label, wherein the graph label provides motor imagery classification, the node label provides quality of the EEG signal, and the edge label determines affinity between a pair of nodes among the plurality of nodes; and updating (208C) the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier based on a total loss obtained as a sum of a graph classification loss, a node classification loss, and an edge classification loss.
2. The method as claimed in claim 1, wherein the GNN, the graph classifier, the node classifier, and the edge classifier are used to classify a test EEG signal during inference based on a graph constructed using the weighted adjacency matrix and a plurality of temporal embeddings corresponding to each of a plurality of channels of the test EEG signal.
3. The method as claimed in claim 1, wherein the plurality of node embeddings are vectorized before feeding into the graph classifier.
4. The method as claimed in claim 1, wherein the plurality of node embeddings are concatenated before feeding into the edge classifier.
5. The method as claimed in claim 1, wherein the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier are updated by: calculating a first, a second, a third, a fourth and a fifth gradient of the total loss with respect to parameters of the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier; and updating the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier using an optimizer based on the computed first, second, third, fourth and fifth gradient.
6. A system (100), comprising: a memory (102) storing instructions; one or more communication interfaces (106); and one or more hardware processors (104) coupled to the memory (102) via the one or more communication interfaces (106), wherein the one or more hardware processors (104) are configured by the instructions to: receive one or more Electroencephalogram (EEG) signals and corresponding ground truth labels comprising a ground truth graph label, a ground truth edge label, and a ground truth node label, wherein each of the one or more EEG signals comprise a plurality of channels; extract a plurality of temporal embeddings corresponding to each of the plurality of channels of each of the one or more EEG signals using a temporal feature extractor; construct one or more graphs corresponding to each of the one or more EEG signals, wherein each of the one or more graphs comprise a plurality of nodes corresponding to the plurality of channels and a weighted adjacency matrix defining connectivity between each pair of nodes among the plurality of nodes, and wherein each of the plurality of nodes is associated with the plurality of temporal embeddings of the corresponding channel; and iteratively train a Graph Neural Network (GNN), the weighted adjacency matrix, a graph classifier, a node classifier, and an edge classifier for a plurality of pre-defined number of iterations for classifying the one or more EEG signals by: generating a plurality of node embeddings corresponding to each of the one or more EEG signals by the GNN using the one or more graphs; classifying each of the one or more EEG signals based on the corresponding plurality of node embeddings using the graph classifier, the node classifier, and the edge classifier to obtain a graph label, a node label, and an edge label, wherein the graph label provides motor imagery classification, the node label provides quality of the EEG signal, and the edge label determines affinity between a pair of nodes among the plurality of nodes; and updating the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier based on a total loss obtained as a sum of a graph classification loss, a node classification loss, and an edge classification loss.
7. The system as claimed in claim 6, wherein the GNN, the graph classifier, the node classifier, and the edge classifier are used to classify a test EEG signal during inference based on a graph constructed using the weighted adjacency matrix and a plurality of temporal embeddings corresponding to each of a plurality of channels of the test EEG signal.
8. The system as claimed in claim 6, wherein the one or more hardware processors are configured to vectorize the plurality of node embeddings before feeding into the graph classifier.
9. The system as claimed in claim 6, wherein the one or more hardware processors are configured to concatenate the plurality of node embeddings before feeding into the edge classifier.
10. The system as claimed in claim 6, wherein one or more hardware processors are configured to update the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier by: calculating a first, a second, a third, a fourth and a fifth gradient of the total loss with respect to parameters of the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier; and updating the GNN, the weighted adjacency matrix, the graph classifier, the node classifier, and the edge classifier using an optimizer based on the computed first, second, third, fourth and fifth gradient.
