Five years ago, to self-teach machine learning, I participated in my first Kaggle contest: the American Epilepsy Society Seizure Prediction Challenge.

seizure prediction

Contestants are presented with raw EEG readings from several subjects: 16/24 channel for dog/human seizure patients respectively. Samples are grouped into two categories: 'interitcal', which are widely separated in time from a seizure event while the 'preictal' samples closely precede the seizure. The challenge is to develop a model which can differentiate these two states to form the basis of a seizure prediction wearable so that patients can feel safe doing more with their time.

Two of the top 3 teams reference using neural nets at a time before convnets were en vogue for signal processing and speech recognition. The contest finished about a year before deep learning frameworks like Tensorflow had became available to the public. Most challengers focused on manual feature engineering around the spectral analysis and time correlation of EEG sensor readings before building an ensemble of models.

Looking at the contest submissions, you can see why the medical device hasn't hit the market. Those models were computationally intensive and highly tuned to individuals. Convolutional Neural Networks have been a major catalyst for computer vision applications. They are fast and can be made small enough to run on embedded hardware. CNNs have been effective in speech processing through simply applying computer vision ideas to the spectrogram of an audio signal.

The current state-of-the-art lies in seizure monitors that measure muscle contraction through EMG, simply logging events. While pharmeceutical advances offer a promising avenue for seizure treatment, roughly 30% of people do not respond to medicines.

Besides providing a warning to patients, or even avoiding the event by triggering a neurostimulation device, we see the benefit in applying embedded AI to the general Brain Computer Interface problem to tackle challenges with communication and accessibility.

To build the wearable EEG device will use a NeuroSky ASIC or an OpenBCI EEG headset and we will run inference on a small battery powered microcontroller like a raspberry pi zero or even a $2 Blue Pill.