Will They Wake Up — Deep learning on EEG signals
After cardiac arrest, electroencephalography (EEG) recordings make it possible to study the brain’s electrical activity. This project explores the use of deep learning to classify patients’ neurological outcome from these signals, separating observations labelled “Good” from other outcomes.
Our approach
We built a pipeline running from data retrieval on Google Cloud Storage to the training of a recurrent neural network.
Recordings are prepared by selecting eight EEG channels, then resampled to 100 Hz. 15-second segments are extracted every ten minutes and normalised to form the model’s input sequences.
Classification relies on two LSTM layers of 64 and 32 units, combined with dropout layers. Training uses early stopping and keeps the best model according to validation loss. Several experiments explore different time windows after cardiac arrest.
What evaluation revealed
The scores were too high to be credible. One experiment shows 96.875% validation accuracy with a recall of 0: the model detected no favourable outcome at all. Validation and test used the last batches of segments, with no split by patient, so segments from the same patient could end up in several sets. We therefore present this project as an approach, not as a result.
Lessons and next steps
This project confronted us with the difficulties of physiological data: recording volume, signal preparation and the evaluation of sequences from the same patient.
It highlights the importance of separating patients across training, validation and test sets, and of looking at recall alongside accuracy. The prototype is a basis for experimentation; the next steps are to strengthen this evaluation protocol, unify preprocessing and connect the interface to the trained model.
Technologies: Python · NumPy · SciPy · pandas · scikit-learn · TensorFlow/Keras · Google Cloud Storage · BigQuery · Streamlit · FastAPI
- Preparation of multichannel EEG signals for training.
- Development of a sequence classification model with TensorFlow/Keras.
- Data storage organised on Google Cloud Storage, with metric logging in BigQuery.
- Models and experiment results saved.
- Draft demo interface with Streamlit and FastAPI.
Do you have sensor data?
Machines, connected devices, continuous measurements: the same signal processing methods apply.