Data and code sharing

Philosophy

The Bioelectronics Neurophysiology and Engineering Lab is committed to the practice of sharing data and code to create reproducible research in accordance with the Code is Science Manifesto.

Projects

Sleep-related Projects

Sleep Staging

Automated Unsupervised Classifier to use intracranial electroencephalogram (iEEG) data and score it into AWAKE, N2, N3 sleep stages

A full description of how to use the classifier is in the help section of the Matlab m-file. Also available are features extracted from two patients' data in day-night recordings. These matrixes can be used as an input. They also provide an example of how to use the classifier.

Objective

Automated behavioral state classification in iEEG recordings may be beneficial for iEEG interpretation and quantifying sleep patterns to enable behavioral state-dependent neuromodulation therapy in next-generation implantable brain stimulation devices. Here, we introduce a fully automated unsupervised framework to differentiate between awake (AW), sleep (N2) and slow wave sleep (N3) using iEEG only and validated with expert-scored polysomnography.

Approach

Data from eight patients undergoing evaluation for epilepsy surgery — age 40 +/-11, including three female — with intracranial depth electrodes for iEEG monitoring were included. Spectral power features at 0.1 to 235 hertz (Hz), spanning several frequency bands from a single electrode were used to classify behavioral states of patients into AW, N2 and N3.

Results

Overall, classification accuracy of 94%, with 94% sensitivity and 93% specificity across eight subjects using multiple spectral power features from a single electrode was achieved. Classification performance of N3 sleep was significantly better at 95%, with sensitivity at 95% and specificity at 93%, than that of the N2 sleep phase at 87% with sensitivity 78% and specificity 96%.

Significance

Automated, unsupervised and robust classification of behavioral states based on iEEG data is possible, and it is feasible to incorporate these algorithms into future implantable devices with limited computational power, memory and number of electrodes for brain monitoring and stimulation.

Continuous behavioral state tracking in ambulatory humans

Objective

Electrical deep brain stimulation is an established treatment for patients with drug-resistant epilepsy. Sleep disorders are common in people with epilepsy, and deep brain stimulation may actually further disturb regular sleep patterns and sleep quality. Novel implantable devices capable of deep brain stimulation and streaming of continuous iEEG signals enable detailed assessments of therapy efficacy and tracking of sleep-related comorbidities. Here, we investigate the feasibility of automated sleep classification using continuous iEEG data recorded from Papez circuit in four patients with drug-resistant mesial temporal lobe epilepsy using an investigational implantable sensing and stimulation device with electrodes implanted in bilateral hippocampus and anterior nucleus of thalamus.

Approach

The iEEG recorded from the hippocampus is used to classify sleep during concurrent deep brain stimulation targeting the anterior nucleus of thalamus. Simultaneous polysomnography and sensing from the hippocampus were used to train, validate and test an automated classifier for a range of anterior nucleus of thalamus deep brain stimulation frequencies: no stimulation, 2 Hz, 7 Hz and high frequency (greater than100 Hz).

Results

We show that it is possible to build a patient-specific automated sleep staging classifier using power in band features extracted from one hippocampus iEEG sensing channel. The patient-specific classifiers performed well under all thalamic deep brain stimulation frequencies, with an average F1-score of 0.894. These classifiers provided viable classification into awake and major sleep categories, rapid eye movement (REM) and non-REM. We retrospectively analyzed classification performance with gold-standard polysomnography annotations and then prospectively deployed the classifier on chronic continuous iEEG data spanning multiple months to characterize sleep patterns in ambulatory patients living in their home environments.

Significance

The ability to continuously track behavioral state and fully characterize sleep should prove useful for optimizing deep brain stimulation for epilepsy and associated sleep, cognitive and mood comorbidities.

References

Open-source software

The open-source software produced by the Bioelectronics Neurophysiology and Engineering Lab can be found on the lab's GitHub page.

Artificial intelligence

High-frequency oscillations

High-frequency oscillations are brief discrete events seen in EEGs that are promising biomarkers of both epileptic neural tissue and cognitive processing.

References

Multiscale Electrophysiology Format

The Multiscale Electrophysiology Format version 3.0 is an open-source file format for storing electrophysiology and other time-series data. The format employs data compression and encryption.

SOURCE CODE LIBRARIES

Functions that handle Multiscale Electrophysiology Format header operations, data compression and decompression, encryption, calculation of the cyclic redundancy check (CRC) checksum, and byte order adjustments. Included in this distribution is sample code for decimating, filtering, converting European Data Format format to Multiscale Electrophysiology Format 3.0 and sample code to read Multiscale Electrophysiology Format 3.0 files.

EXAMPLE DATA

This distribution contains four EEG time-series data channels in Multiscale Electrophysiology Format 3.0 format. The files are anonymized and encrypted with technical (level 1) and subject (level 2) encryption. The level 1 password is password1, and the level 2 password is password2. The dataset is a two-hour segment of 256-Hz samples.

Seizure forecasting

Accurate seizure forecasting could transform epilepsy care, allowing patients to modify activities to avoid risk, or take additional antiepileptic drugs to stop seizures before they develop. Our laboratory is engaged in efforts to develop and validate robust algorithms for seizure forecasting.

KAGGLE SEIZURE PREDICTION COMPETITION

Seizure detection and forecasting competitions were run on Kaggle.com using open-access chronic ambulatory intracranial EEG (iEEG) from five canines with naturally occurring epilepsy and two humans undergoing prolonged wide-bandwidth iEEG monitoring. The competitions were sponsored by the National Institutes of Health, the American Epilepsy Society and the Epilepsy Foundation.

The seizure detection contest ran from May to August 2014. Ambulatory iEEG data clips one second in duration were provided from seizures and from interictal, seizure-free epochs. Data clips were extracted from chronic ambulatory recordings from four canines with naturally occurring epilepsy, and eight patients undergoing intracranial monitoring as part of their pre-surgical evaluation for epilepsy. Contestants provided two classifications for the clips: seizure versus interictal and early seizure versus interictal or late seizure. Submissions were ranked based on the area under the receiver operating characteristic curve.

The seizure forecasting contest ran from August to November 2014. Data were provided to participants as 10-minute interictal and preictal clips, with approximately half of the 60-gigabyte data bundle labeled (interictal/preictal) for algorithm training and half unlabeled for evaluation. In total, 654 participants submitted 17,856 classifications of the unlabeled test data. The contestants developed custom algorithms and uploaded their classifications (interictal/preictal) for the unknown testing data, and a randomly selected 40% of data segments were scored and results broadcasted on a public leaderboard.

After the competition ended, the top-placing contestants were invited to run their algorithms on unlabeled held-out data from four of the canines to assess the robustness and broader applicability of these algorithms.