Getting Started in the Seizure Prediction Competition: Impact, History, & Useful Resources

The currently ongoing Seizure Prediction competition—hosted by Melbourne University AES, MathWorks, and NIH—invites Kagglers to accurately forecast the occurrence of seizures using intracranial EEG recordings. This competition uniquely focuses on seizure prediction using long-term electrical brain activity from human patients obtained from the world first clinical trial of the implantable NeuroVista Seizure Advisory Sytem.

In this blog post, you’ll learn about the contest’s potential to positively impact the lives of those who suffer from epilepsy, outcomes of previous seizure prediction contests on Kaggle, as well as resources which will help you get started in the competition including a free temporary MATLAB license and starter code.

This competition is sponsored by MathWorks, the National Institutes of Health (NINDS), the American Epilepsy Society and the University of Melbourne, and organised in partnership with the Alliance for Epilepsy Research, the University of Pennsylvania and the Mayo Clinic.

Seizure Prediction Kaggle Competition

For many people with epilepsy, seizures reoccur at random times and greatly disrupt their cognitive and emotional state, their ability to work and drive, and their social and economic situation. Being able to predict epileptic seizures will greatly improve the quality of life of people with epilepsy by either giving them a warning of an impending seizure so they can move to safety or activating an implanted seizure control device that can avert seizures through drug delivery or electrical stimulation of the brain.

How can we predict epileptic seizures using electrical recordings of brain activity? Or more specifically, how can we distinguish between brain activity a short time before a seizure from brain activity that is temporally distant from seizures?




Epilepsy is characterised by the recurrence of seizures, abnormal brain activity events that have many types of cognitive and behavioural manifestations. Seizures are often referred to as fits or convulsions. The most well-known type of seizure being tonic-clonic seizures where a person loses consciousness, muscles stiffen, and jerking movements are seen. These seizures usually last 1-3 minutes and take can take a long time to recover from.

Around 1% of the world’s population has epilepsy and there are tens of millions of people who have drug-resistant epilepsy, where seizures are not satisfactorily controlled by anti-epileptic drugs and often drug doses that might control seizures lead to unwanted side effects. The most common treatment for people with drug-resistant epilepsy is resective brain surgery to remove the seizure generating region of the brain. Such surgery poses the risk of removing normal functioning brain tissue and sometimes seizures can return post-surgery due to potentially complex brain networks involved in an individual’s type of epilepsy. A newer option is the use of brain implants that electrically stimulate the brain to avert or control seizures (e.g. the Neuropace RNS system or the Medtronic Activa PC system), however, these devices do not incorporate seizure prediction algorithms and only offer improvement in roughly half of patients. Therefore, more improvements are needed. Reliable seizure prediction algorithms offer a chance to yield such improvements by activating interventions in a more timely manner when a seizure warning is generated.

Seizure Prediction

Given the ability of some epilepsy patients to predict their own seizures through cognitive or behavioural signs called ‘prodromes’, it is believed that although seizures typically seem to emerge through a random process there is an underlying deterministic or dynamical component to the process of seizure generation that could be reliably detected for the purposes of seizure prediction. At present no universal ‘pre-seizure biomarker’ has been discovered. This is likely due to the large degree of heterogeneity in the types of epilepsy. Therefore, a patient-specific strategy is likely to be the most successful option, however, seizure prediction approaches that can be applied to as broad a class of patients as possible will have the greatest utility.

The standard approach to monitor electrical brain activity is to record electroencephalography (EEG) using electrodes placed on the scalp (scalp EEG) or intracranially on the surface of the brain or within the brain (intracranial EEG). Electrocorticography (ECoG) refers electrodes placed on the surface of the brain and Stereo EEG refers to electrodes placed deep within the brain. Scalp EEG is non-invasive but more prone to artifacts and less aesthetically pleasing for people to wear for long-periods of time. Intracranial EEG is invasive and high risk, but has better signal-to-noise qualities and can be more localised to the seizure generating brain tissue. Because of the risks, intracranial EEG is only performed on hard-to-treat epilepsy patients with limited options as a precursor used in the planning of resective brain surgery. Usually recordings of intracranial EEG only last up to two weeks as the electrode implants are temporary and there are risks of infection due to the skull opening required for cables to pass through the skull to the outside data acquisition system. Scalp EEG recordings are also limited in duration because of degrading electrode fidelity and discomfort over long periods of time. On the other hand, seizures occur over a large range of frequencies from say 1 a month to 100 a day depending on the patient. Therefore, in a two week recording it is often the case that one only records a handful of seizures, which is inadequate for reliable training and testing of patient-specific seizure prediction algorithms. Much of the seizure prediction literature is based on such recordings and hence there is a great degree of uncertainty surrounding the clinical utility of much of the published literature.

Seizure Prediction Kaggle Competition

In 2013, a world first clinical trial of an implantable seizure advisory system was completed by NeuroVista Corporation and the University of Melbourne and its partner hospitals. Intracranial EEG electrodes were implanted on the surface of the skull and electrical brain activity was recorded for periods of up to three years in 15 patients. The device was fully implantable and communicated wirelessly with an external warning unit that emitted a red, white and blue light to indicate high, moderate and low risk of having a seizure. Because the device was fully implantable various risks common to standard intracranial EEG recordings, such as infection, were minimised, thus allowing for much longer recordings. Of the 15 patients, nine patients provided adequate data for reliable evaluation of seizure prediction algorithms. Three of these patients achieved very high sensitivity and very low percentages of ‘red-light’ high-seizure-risk warning time. For other patients it was difficult to predict even 50% of their seizures and novel improvements are needed. The current Kaggle seizure prediction contest provides data from three patients from this clinical trial whose seizures were difficult to predict.

Seizure Prediction Kaggle Competition

In 2014, a Kaggle seizure prediction contest was run using long-term data from dogs (obtained using the implantable seizure advisory system mentioned above in the human clinical trial description) and short-term data from humans. The current contest aims to see if any of the winning seizure prediction algorithms from the previous contest generalise to long-term human data or whether other novel approaches can be found. The findings and winning algorithms of the previous contest were recently published in the journal Brain and the forum webpage for the previous contest contains summaries of winning algorithms. Resources to other EEG-derived seizure prediction features published in the literature that might be useful for the current contest also appear below.



Below is a list of resources for those interested in learning more about seizure prediction and entering the Melbourne University AES-MathWorks-NIH Seizure Prediction Contest. Note that two of the links below connect to research articles that require subscription. Check the links to see if you can access the document pdfs, otherwise try the options provided at the bottom of this link.

Seizure Prediction Review Articles and published EEG-derived seizure prediction features

Mormann F, Andrzejak RG, Elger CE, Lehnertz K (2007). Seizure prediction: the long and winding road. Brain 130: 314–333.

Most cited review in the field. Introduces the problem and has a great appendix that summarises the equations of many of the EEG-derived features considered in seizure prediction.

Gadhoumi, K., Lina, J. M., Mormann, F., & Gotman, J. (2016). Seizure prediction for therapeutic devices: A review. Journal of neuroscience methods, 260, 270-282.

A review of the most reliable studies on seizure prediction between 2007 and 2015.

Kuhlmann, L., Grayden, D. B., Wendling, F., & Schiff, S. J. (2015). Role of multiple-scale modeling of epilepsy in seizure forecasting. Journal of clinical neurophysiology, 32(3), 220-226.

Explores the new area of seizure prediction based on computational models of the brain.

The paper on the world first clinical trial that created the contest data

Cook MJ, O’Brien TJ, Berkovic SF, Murphy M, Morokoff A, Fabinyi G, D’Souza W, Yerra R, Archer J, Litewka L, Hosking S, Lightfoot P, Ruedebusch V, Sheffield WD, Snyder D, Leyde K, Himes D (2013) Prediction of seizure likelihood with a long-term, implanted seizure advisory system in patients with drug-resistant epilepsy: a first-in-man study. LANCET NEUROL 12:563-571.

The Previous Kaggle Seizure Prediction competition

Brinkmann, B. H., Wagenaar, J., Abbot, D., Adkins, P., Bosshard, S. C., Chen, M., … & Pardo, J. (2016). Crowdsourcing reproducible seizure forecasting in human and canine epilepsy. Brain, 139(6), 1713-1722.

You might also find the Kaggle blog on a review of the previous seizure prediction contest full of ideas for algorithm approaches.

Standard EEG analysis approaches

Thakor, N. V., & Tong, S. (2004). Advances in quantitative electroencephalogram analysis methods. Annu. Rev. Biomed. Eng., 6, 453-495.

Summarizes many linear and nonlinear time series analysis techniques from FFTs and wavelets through to mutual information. A good potential resource for basic EEG analysis and EEG-derived features.

Stam, Cornelis J. “Nonlinear dynamical analysis of EEG and MEG: review of an emerging field.” Clinical Neurophysiology 116, no. 10 (2005): 2266-2301.

Reviews EEG-derived nonlinear features.

See videos of talks from the 7th International Workshop on Seizure Prediction ( Including a video on the outcome of the previous Kaggle seizure prediction contest that describes some of the winning algorithms that were applied to long-term dog and short-term human data, and a video introducing the problem of seizure prediction and standard approaches.

Free temporary MATLAB license and MATLAB starter code

MathWorks the creator of MATLAB is offering a free temporary license to use MATLAB and many of its signal processing and machine learning related toolboxes for the purposes of the current seizure prediction contest. It is also offering starter solutions that you can use and adapt for the contest. Find out more about free MATLAB and the starter code.

EPILAB: A non-proprietary MATLAB-based toolbox for seizure prediction

EPILAB is free. You should be able to extract MATLAB .m file scripts/functions for various EEG-derived seizure prediction features from the download.

How to read the contest data

Although MATLAB is not needed to analyse the contest data, the data are stored in MATLAB’s .mat file format as described on the contest data page. If you have MATLAB then reading in the contest data is easy. The contest forum also has some tips on reading in the data if you use R or if you use Python (option 1, option 2, option 3).

Other resources


Seizure Prediction Kaggle Competition Forums

Ignore all of the above and jump right in!

Melbourne University AES-MathWorks-NIH Seizure Prediction Contest



Levin Kuhlmann is a senior research engineer in the Department of Electrical and Electronic Engineering at the University of Melbourne and the Brain and Psychological Sciences Research Centre at Swinburne University of Technology. His research focuses on signal processing, control theory and computational neuroscience applications to neural engineering, neuroimaging, anaesthesia, epilepsy and vision. He is interested in how the brain processes information at multiple-scales, from neuron to whole brain, and utilizing such an understanding to engineer improved diagnostics, interventions and therapies for brain-related medicine.

InnoValeur | Data Science | Smart Data | Machine Learning | AI

Publier un commentaire

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.