System and method for deep learning for tracking cortical spreading depression using EEG
Disclosed herein is a system and method implementing an automated, generalizable model for tracking cortical spreading depressions using EEG. The model comprises convolutional neural networks and graph neural networks to leverage both the spatial and the temporal properties of CSDs in the detection. The trained model is generalizable to different head models such that it can be applied to new patients without re-training. Further, the model is scalable to different densities of EEG electrodes, even when trained on a specific electrode density.
1 . A method of detecting cortical spreading depression (CSD) waves from EEG signals comprising:
receiving, by a computer coupled to an EEG machine, a time series of readings taken from a series of time windows from a plurality of EEG electrodes;
using a plurality of trained deep learning models executing on the computer to extract temporal features for each EEG electrode from the time series of readings from that electrode;
using a graph neural network executing on the computer, the graph neural network having trained attention layers and to aggregate the extracted temporal features to a node in the graph neural network to extract spatial information, wherein each node in the graph neural network represents a physical location of brain activity as determined from one or more of the plurality of EEG electrodes; and
using a plurality of classifiers executing on the computer, the classifiers providing a binary value for each electrode for each time window based on a probability threshold representing the presence or absence of a CSD wavefront at each respective electrode;
wherein the binary values are stitched together using a sliding time window which is assigned a temporal binary value based on a number of binary values representing the presence of CSD wavefronts present within the sliding time window; and
wherein a CSD episode is determined to have occurred by temporal binary values indicating the presence of the CSD wavefronts in consecutive sliding time windows.
2 . The method of claim 1 wherein each of the deep learning models is a trained convolutional neural network comprising a multi-scale 1D ResNet.
3 . The method of claim 1 wherein the temporal features are extracted from a series of readings taken at midpoints from a series of time windows.
4 . The method of claim 3 wherein the series of time windows comprises a series of nonoverlapping time windows.
5 . The method of claim 4 wherein the series of nonoverlapping time windows comprises nonoverlapping windows of 5 minute duration.
6 . The method of claim 1 wherein the graph neural network is a graph attention network.
7 . The method of claim 6 wherein the graph attention network is a k-nearest neighbor graph.
8 . The method of claim 7 wherein the k-nearest neighbor graph is a geometric graph that thresholds a Euclidean distance between each pair of EEG electrodes on the scalp.
9 . The method of claim 1 wherein the generating step comprises inputting each node to which the temporal features have been aggregated to a respective classifier.
10 . The method of claim 9 wherein each respective classifier comprises a multilayer perceptron followed by a Softmax layer.
11 . The method of claim 10 wherein the Softmax layer has an output representing a spatio-temporal probability map indicating the probability distribution of a CSD wavefront for each respective EEG electrode.
12 . The method of claim 1 wherein the convolutional neural network is trained using a data set having varying CSD widths, varying CSD speeds of propagation, varying numbers and placements of EEG electrodes and varying head models.
13 . A system comprising:
a processor configured to execute software implementing the method of claim 1 .