Beating epilepsy with algorithms

December 23, 2016

Beating epilepsy with algorithms

Even on anticonvulsant medications, patients with epilepsy struggle with spontaneous seizures. While infrequent, patients experience persistent anxiet...

Even on anticonvulsant medications, patients with epilepsy struggle with spontaneous seizures. While infrequent, patients experience persistent anxiety since a seizure can occur at any time, and activities like driving or swimming become dangerous.

To help those living with epilepsy and the approximately 150,000 Americans who will be diagnosed this year, doctors and researchers from the University of Melbourne partnered with MathWorks, the National Institutes of Health, and the American Epilepsy Society to launch a recently-completed public competition to produce highly accurate seizure forecasting algorithms, working with real human patient data. The competition was run through Kaggle, a platform for predictive modeling and analytics competitions that houses the world’s largest community of data scientists.

The hope is to make seizures less like earthquakes, which can strike without warning, and more like hurricanes, where you have enough advance warning to seek safety. The data and algorithms generated from this contest have the potential to help patients by warning them far enough in advance of a seizure so they can avoid potentially dangerous activities like driving.

This competition builds on the momentum from a 2014 Kaggle contest for seizure detection and prediction in dogs, but focused this time on human seizure data. It incorporated a long-term database of patient brain activity captured over months—or years in some cases—in which a large number of seizures were recorded. The challenge was to distinguish between two distinct states: brain activity in the hour immediately prior to a seizure, compared to “interictal activity,” or the times between seizures.

University of Melbourne Professor of Electrical and Electronic Engineering Dr. David Grayden started working on epileptic seizure research nearly 12 years ago, and while he has had success, he admits there is a lot more work to be done.

“We have found that the challenge of predicting seizures is more difficult than initially thought. For some people, we can do fairly reliable seizure prediction, but for others we can’t,” says Grayden. “We attribute that challenge to the fact that epilepsy is a very inhomogeneous disease and there are many different manifestations or conditions that can lead to epilepsy. You have to treat each patient differently, so we hope to use the contest to develop patient-specific prediction strategies.”

The contest organizers hope that, by using patient data that was never before made available to such a large group of data scientists, one or more of the 400 or so teams developed algorithms sensitive to hidden indicators in patient brain signals that can predict seizures, advance treatment, and improve patient quality of life.

The University of Melbourne’s Dr. Levin Kuhlmann is leading the effort to apply data mining and computational algorithms to epileptic seizure predictions. Dr. Kuhlmann is using the one-of-a-kind, ultra-long-term, human intracranial EEG (iEEG) dataset, which was obtained from the NeuroVista Corp. following a clinical trial of its Seizure Advisory System. The technique involves consideration of both feature-based data mining approaches and neural mass-parameter estimation approaches to classify the EEG data set and predict seizures.

“To accommodate the various approaches and resulting data sets, it’s important to have versatile tools,” Kuhlmann explains. He’s currently working with MathWorks’ MATLAB, which also has dozens of toolboxes containing algorithms that could be applicable to seizure prediction.

“The University of Melbourne chose MATLAB because of the relative ease with which the Kaggle teams can load and convert existing data using signal processing, deep learning, and parallel computing to more quickly reach a potential result, or combinations of results,” Kuhlmann says. “There’s a broad library of algorithms and toolboxes, which provides teams with a one-stop-shop experience.”

Another factor in the decision to use MATLAB is that there’s already a strong history and community of MATLAB users in EEG analysis and in seizure prediction. Through the competition, teams had access to the MATLAB Central File Exchange community, which they used to find useful code and to share code with other teams, either during or after the competition. Contest organizers hoped that this file-sharing site would serve as an enduring record of ideas that were tested during the competition and will be useful to researchers and companies that are working on similar challenges down the road. Researchers at the University of Melbourne are currently evaluating the algorithms of the top 10 teams to see how they perform.

“It’ll take time to evaluate the algorithms and the approach, as it’ll be done in real time in a patient facility. But we’re hopeful and believe the results will provide immediate and long-term relief for epilepsy sufferers,” says Kuhlmann. “The contest itself is an early example of machine learning applied to brain signal research, and although the purpose of the contest is seizure prediction, the winning algorithm will be evaluated against long-term data and later potentially applied to patients in clinical trials.”

If the algorithm can be implemented effectively, it could potentially be used in implanted devices that administer drug delivery to epilepsy patients at precisely the right time and dose to significantly mitigate seizure effects.

Predicting seizures from brain signals is no easy task, so algorithms for clinical systems and treatments could be years away. What’s exciting today is how quantitative computing approaches like signal processing and deep learning are advancing and expanding as a field. Many of today’s brain scientists are just learning about data science, just as data scientists are learning about brain science. This competition is one step towards bringing brain science and data science closer together, to produce new breakthroughs for our understanding of the brain and its disorders affecting millions of people worldwide.

Vijay Iyer has worked as an engineer supporting Neuroscience research for over 15 years. He joined MathWorks in 2015 as the Neuroscience Community Liaison, to strengthen global support for this fast-growing research field.


Vijay Iyer, MathWorks