DOI: 10.5281/zenodo.10800794
title: Spiking Seizure Classification Dataset
title: A spiking neural network for encoding seizures using partial synchronization on a mixed-signal neuromorphic processor

description: Dataset for event encoded analog EEG signals for detection of Epileptic seizures 

This dataset contains events that are encoded from the analog signals recorded during pre-surgical evaluations of patients at the Sleep-Wake-Epilepsy-Center (SWEC) of the University Department of Neurology at the Inselspital Bern. The analog signals are sourced from the SWEC-ETHZ iEEG Database

This database contains event streams for 10 seizures recorded from 5 patients and generated by the DYnamic Neuromorphic Asynchronous Processor (DYNAP-SE2) to demonstrate a proof-of-concept of encoding seizures with network synchronization. The pipeline consists of two parts (I) an Analog Front End (AFE) and (II) an SNN termed as"Non-Local Non-Global" (NLNG) network. 

In the first part of the pipeline, the digitally recorded signals from SWEC-ETHZ iEEG Database are converted to analog signals via an 18-bit Digital-to-Analog converter (DAC) and then amplified and encoded into events by an Asynchronous Delta Modulator (ADM). Then in the second part, the encoded event streams are fed into the SNN that extracts the features of the epileptic seizure by extracting the partial synchronous patterns intrinsic to the seizure dynamics. 

Details about the neuromorphic processing pipeline and the encoding process are included in a manuscript under review. 



The main files in the database are described in the hierarchy below.

 

EventSezDataset/

├─ data/

│ ├─ P x S x

│ │ ├─ Pat x _Sz_ x _CH x .csv

├─ fig_gen.py

├─ support.py

├─ sync_mat_gen.py

├─ requirements.txt

 

where, x represents the Patient ID and the Seizure ID respectively.



requirements.txt: This file lists the requirements for execution of the Python code.

fig_gen.py: This file plots the analog signals and the associated AFE and NLNG event streams. The execution of the code happens with python3 fig_gen.py 2 1 13, where patient 2, seizure 1 and channel 13 of the recording are plotted.

sync_mat_gen.py: This file describes the function for plotting the synchronization matrices emerging from the NLNG spikes. The execution of the code happens with python3 sync_mat_gen.py. This execution generated three figures for pre-ictal , ictal, and post-ictal time-periods. The directory can be changed with SEIZ_DIR ="data/P1S1/" to specific seizures of specific patients and the time windows of the sync matrix calculation can be changed with pre_seizure_times, seizure_times, post_seizure_times for their respective time-periods. The time is the signal-time as mentioned in the table below.

 support.py: This file contains the necessary functions.

data/P1S1/: This folder, for example, contains the event streams for all channels for seizure 1 of patient 1.</p>



Pat1_Sz_1_CH1.csv: This file contains the spikes of the AFE and the NLNG layers with the following tabular format (which can be extracted by the fig_gen.py)






## Comments

# SStart: 180        //Start of the Seizure in signal time# SEnd: 276.0       //Start of the Seizure in signal time# Pid: 2                  // The patient ID as per the SWEC-ETHZ iEEG Database             # Sid: 1                  // The Seizure ID as per the SWEC-ETHZ iEEG Database             # Channel_No: 1  // The channel number






SYS_time
signal_time
dac_value
ADMspikes
NLNGspikes


The time from the interface FPGA
The time of the signal as per the SWEC ETHZ Database
The value of the analog signals as recorded in the SWEC ETHZ Database
The event-steam is the output of the AFE in boolean format. True represents a spike
The spike-steam is the output of the SNN in boolean format. True represents a spike
description: Patient Description




ID
SWEC Database ID
Age (y)
Engel outcome
 No. of electrodes


Seizure durations

(Sez-1/Sez-2) (s)



Epilepsy

lobe/MRI 



1
ID2
19
1
42
96/260
TLE/pos. 


2
ID9
27
1
56
104/118
TLE/neg.    


3
ID1
24
2
47
125/70
TLE/neg.    


4
ID16
31
2
59
81/67
TLE/pos.  


5
ID4
32
4
62
160/127
PLE/pos.