REST: Efficient and Accelerated EEG Seizure Analysis through Residual State Updates

1Integerated Neurotechnologies Laboratory (INL) EPFL Lausanne, Switzerland 2Laboratory for Information and Inference Systems (LIONS) EPFL Lausanne, Switzerland 3Department of Electrical and Computer Engineering, University of Wisconsin-Madison, USA.

s

REST Real time seizure analysys using graph-based residual state update.

Abstract

EEG-based seizure detection models face challenges in terms of inference speed and memory efficiency, limiting their real-time implementation in clinical devices.

This paper introduces a novel graph-based residual state update mechanism (REST) for real-time EEG signal analysis in applications such as epileptic seizure detection. By leveraging a combination of graph neural networks and recurrent structures, REST efficiently captures both non-Euclidean geometry and temporal dependencies within EEG data.

Our model demonstrates high accuracy in both seizure detection and classification tasks. Notably, REST achieves a remarkable 9-fold acceleration in inference speed compared to state-of-the-art models, while simultaneously demanding substantially less memory than the smallest model employed for this task. These attributes position REST as a promising candidate for real-time implementation in clinical devices, such as Responsive Neurostimulation or seizure alert systems.

How it Works?



Givan an EEG clip REST creates its latent spcae \(H_t\) via affine mapping of the input \(X_t\) and the previous state of the model \(S_t\). Subsequently, it updates the state residually \(\delta S_t\) using two lightweight graph convolution layers. Our model offers various versions of update cell for increasing the accuracy while maintaing low memory requirements and fast inference : \(REST_{DS}\) for single deterministic updates, \(REST_{RS}\) when using a binary random mask introduced in the following section, and \(REST_{RM}\) for multiple updates.




Binary Random Masking


To prevent overfitting, we multiply the incremental update \(\delta S_t\) by a random binary mask with a success probability of \(p\), effectively updating the cell as \(S_t = \delta S_t*B\). This helps the model combat overfitting while also adapting to the stochastic nature of updates. By employing this method along with multiple updating techniques, REST achieves higher accuracy with lower memory demands, resulting in variations like \(REST_{RM}\).


An illustration of REST's update cell binary random mask \(B\) for a 16x16 checkered image, with different success probabilities \(p\)

Results

Here are some of the interesting properties and results of REST.

Visualization demonstrating that nodes cease passing messages upon reaching a decision regarding the presence of a seizure in EEG signals. In the visualization, the color Pink denotes a probability of 1 for seizure presence, while Cyan indicates a probability of 0 for seizure presence or that the data represents background or non-seizure activity.

Model Seizure Detection AUROC (%) Model Efficiency
4-s 6-s 8-s 10-s 12-s 14-s Size (MB) #Param Inference (ms)
LSTM 75.5±0.3 76.1±0.07 80.1±0.3 70.4±0.02 77.9±0.06 74.2±0.2 2.147 536K 3.254
GRU 76.1±0.02 78.8±0.03 73.2±0.04 73.5±0.02 80.1±0.1 77.9±0.04 1.61 402K 2.12
RestNet-LSTM 79.1±0.05 80.1±0.2 75.6±0.07 74.3±0.04 78.8±0.1 80.0±0.08 27.6 6.9M 6.78
RestNet-Dilation-LSTM 80.2±0.08 76.5±0.12 75.9±0.06 73.6±0.03 77.4±0.15 78.2±0.07 27.6 6.9M 6.78
CNN-LSTM 81.3±0.1 78.5±0.05 76.4±0.01 75.4±0.05 75.0±0.1 74.0±0.03 22.8 6M 5.624
DCRNN 79.7±0.01 82.1±0.04 80.1±0.04 80.0±0.06 82.5±0.1 80.1±0.04 0.884 126K 9.670
DCRNN w/SS 83.0±0.08 81.8±0.05 82.7±0.1 82.1±0.03 85.6±0.2 84.0±0.01 1.319 330K 23.25
Transformer 83.0±0.02 82.1±0.03 82.2±0.04 85.5±0.07 86.0±0.03 87.1±0.02 0.193 48.3K 2.5
REST (DS) 75.3±0.2 67.0±0.03 72.2±0.07 74.1±0.1 70.6±0.04 70.0±0.04 0.037 8.4K 0.615
REST (RS) 79.4±0.03 81.1±0.01 81.0±0.08 81.8±0.02 80.1±0.1 78.1±0.4 0.037 8.4K 0.710
REST (RM) 82.4±0.04 82.2±0.05 82.7±0.1 83.6±0.2 83.4±0.09 82.0±0.1 0.037 8.4K 1.292

Summary of models for seizure detection. AUROC of different models is represented along with their memory demands and inference times.

BibTeX


	     @inproceedings{
afzal2024rest,
title={{REST}: Efficient and Accelerated {EEG} Seizure Analysis through Residual State Updates},
author={Arshia Afzal and Grigorios Chrysos and Volkan Cevher and Mahsa Shoaran},
booktitle={Forty-first International Conference on Machine Learning},
year={2024},
url={https://openreview.net/forum?id=9GbAea74O6}
}