Drug-Resistant Epilepsy Prediction

About the Client

Multinational biopharmaceutical company.
Their primary focus is research and development, specifically those involving medications for epilepsy, Parkinson’s, and Crohn’s diseases.

Business Challenge

Around 65 million people worldwide have epilepsy.

It is the most common serious neurological condition, characterized by recurrent seizures.

About a third of people with epilepsy live with uncontrolled seizures because no available treatment works for them.

Since epilepsy is a severe disease, sometimes doctors need a second opinion to decide on the treatment type that would be the most fitting and safe for a  particular type of seizures.

Solution Overview

The solution made by our R&D team allows predicting drug or non-drug resistant epilepsy with high accuracy (82% at the moment) for a patient.

In situations where a patient has nonDRE, they could try experimental treatment methods.

The solution works as a service that can make a prediction for any patient at a doctor’s request.

Project Description

In this project, we used CRISP-DM. We had daily calls with the US-based part of the team.

Data preparation 

As an input, we used the data of about 450 thousand patients. It included general information, ICD codes, information about treatment and doses. In an experimental way, we cleared the data. At the next steps, we used raw data for our model.

ML model

First, we tried different methods and models. We started with the most difficult ones and continued with more common ones. Also, we applied NLP techniques.


This model was integrated with Symfony Health to work as a service with access to patient data. It gives a prediction to the doctor before the patient’s visit.

Let's discuss your idea!

Technological Details

At the start of the project, the client showed us the previous results they’ve achieved and the technical paper explaining why some of the approaches were taken and how they’ve influenced their results.

We reproduced the previous results, so we had a baseline to start with. The baseline was created using the XGBoost classifier.

Then, we iterated through a series of deep learning models.

Those include the Hierarchical Attention LSTM network, ULMfit, plain LSTM, and the SWEM concatenation model.

All deep learning solutions were created using PyTorch or Tensorflow.


Connect with our experts