Trends In Wearables For Seizure Detection And Prediction

This post is part of the Epilepsy Blog Relay™ which will run from June 1 through June 30. Follow along and add comments to posts that inspire you!

Today kicks off week 3 of the Epilepsy Blog Relay when the theme changes to Tech and Innovation in Epilepsy. As a technologist and father of a child with epilepsy, this week represents the intersection of my two worlds. I am excited to be writing this week because of the promise of technology in managing epilepsy.

The Story So Far…

More than a year ago, I found a crowdfunding campaign for a wearable device that could detect seizures. At the time, we were struggling with detecting and recording my son’s seizures. It was difficult because he had many types of seizures and we knew from EEGs that we weren’t catching every one. The seizure devices already on the market didn’t work for him. Most used accelerometers and gyroscopes to capture exaggerated arm movements or falls. But his seizures often only created subtle body movements that were not detected. This new device included other seizure markers, such as galvanic skin response. I hoped the new sensors would make the difference. Since the device showed promise, I backed it and then anxiously awaited its release.

After a long delay, the device finally shipped. When we received it, I strapped it to my son’s wrist and hoped. The next night, my son had his usual handful of seizures but the device didn’t detect any of them. Initially, I thought I had configured the device wrong or that it lost connectivity to my phone. But after a few weeks of seizures with no detection, we stopped wearing the device and put it on the shelf.

Our story is one of many similar stories of unrealized expectations. But this post is not one of failure and despair but one of hope. While the device didn’t work for us, it does work for some people. Moreover, better methods of seizure detection continue to be developed. These techniques are being included in the growing number of wearable devices on the market. Soon, we’ll have clothing and accessories capturing biometric markers that will be able to detect seizures more reliably. We’ll have data captured that we’ll be able to use to predict when a seizure will occur. And this will happen in the very near future.

Devices, Data, and Machine Learning

There are three components necessary to create a device capable of detecting and predicting seizures: devices, data, and machine learning.

Devices

The devices represent the things that are collecting data. Today, we have wearables like watches and clothing that have sensors in them. These sensors measure some attribute such as heart rate, steps, or stress level. The trend towards smaller, cheaper, and more energy-efficient sensors will continue. New sensors to measure new markers will be created. Manufacturers will be putting sensors in nearly everything they create. The result will be a wealth of information streaming from us at all times.

Data

With the proliferation of sensors, the result will be a tsunami of data. Every measurement and data point we can collect will be available in near-real time. We’ll have access to data that required equipment at a hospital to measure. We’ll also be able to correlate that data with information from the world around us. The outside temperature, what our thermostat is set to, what we ate, how much television we watched. The more things we connect and make available, the larger the pool of data we will have with which to swim in and find answers.

Machine Learning

The component that I am most excited about is machine learning. Now that we have all of this data, what do we do with it? It’s too much data coming in too fast for a human to make sense out of. So we use machine learning to try to make sense out of it for us. We can train a system using real data so that, over time, it can use what it learned to predict better than a human can. It can find patterns in data that are invisible to us and make connections that we can’t. It can figure out when the data is aligning in a way that previously resulted in a seizure and notify us. It can help adjust out behavior in a way that reduces our risk of a seizure. And it will never stop learning and will continue to make more accurate predictions.

epilepsy dad seizure data machine learning sensors devices

As depicted in the image about, machine learning isn’t the final stop. Instead, we will use the algorithms we develop to feed back into the devices. We’ll create new sensors to fill in our gaps in data. We’ll push the intelligence further down to the device to allow it to make smarter decisions closer to the person wearing it. The updates to the devices will result in more data, or better, more refined and reliable data. That, in turn, will make our predictions better. The cycle will continue to a point where many devices will be able to detect and predict seizures. It won’t be the job of one specialized device but, instead, a collaboration of things we wear everyday.

Challenges

There are challenges ahead. Securing the data and privacy are two top concerns. Battery life and powering the devices and sensors follow closely behind. These are huge problems and concerns. But just as there are trends impacting the components above, these challenges are not unique to wearables. Advancements in encryption and identify management will make their way into wearables. New battery and wireless charging technologies will keep our devices powered longer and without us thinking about it. A rising tide lifts all boats, and wearables will benefit from much of the same innovations as other technologies.

Conclusion

Even though our current experience with wearable devices to predict seizures has been disappointing, I am still optimistic. The trends in devices, data, and machine learning will continue to result in more reliable detection and prediction of seizures. In the near future, we’ll have these capabilities in everyday wearables, not just in specialized devices. The result will be a dramatic increase in peace of mind and in overall quality of life.

NEXT UP: Be sure to check out the next post tomorrow by Leila Zorzie at livingwellwithepilepsy.com for more on epilepsy awareness. For the full schedule of bloggers visit livingwellwithepilepsy.com.

Don’t miss your chance to connect with bloggers on the #LivingWellChat on June 30 at 7PM ET.

How People On Reddit Talk About Epilepsy

As a technologist, I’m fascinated about how people use social media. It’s such a vast space but people find places where they can make connections around any number of topics. Social media has fostered revolutions, saved lives, but also taken them. It enables freedom of expression but also allows an unprecedented level of hatred. Like a hammer, social media is a tool, and it’s up to humanity to use it to build or to destroy.

I read an article that described a language analysis done on comments from Reddit. Reddit is a community website that aggregates content. It also allows members to share, rate, and discuss the content. I thought it would be interesting to see how people on Reddit talked about epilepsy.

Why does it matter?

If you’re reading this post, you may have been lead to it by Twitter, Facebook, or Medium. Maybe you subscribed to the blog. In any case, you are using technology and the Internet to consume information. And there is a lot of information out there…some good, some bad, some supportive, some not. These types of analyses aren’t perfect, but they can provide some interesting insights.

I’m old enough to be able to navigate these platforms and decide what to take and what to leave. While my son is not of Internet age yet, he will be soon. And he’ll be more likely to look to social media for support. The more I know about the different systems, the abler I’ll be to guide him as he explores them.

More generally, though, these types of analyses can be helpful to see what aspects of epilepsy people are talking about. Or, not talking enough about.

What data did I look at?

For this project, I grabbed comments from March 2017 that contained the word “epilepsy“. That gave me 3,046 comments out of about 79 million (0.0038%). Literally, a drop in the bucket, but enough for a simple analysis.

Number of comments by day in March 2017

Here is how the epilepsy-related comments were distributed throughout March.

epilepsy reddit nlp google sentiment

The big spike on March 22 was partly due to a question in AskReddit. AskReddit is where posters ask and answer “questions that elicit thought-provoking discussions”. The spike was the result of responses to the question “What are you sick and tired of having to explain to people?.” I can imagine people living with epilepsy having an opinion on that question.

Which subreddits are the most active?

Next, I wanted to break down the comments by the group they were posted in. On Reddit, the groups are called “subreddits”. Those discussions helped the AskReddit subreddit lead the comment count for epilepsy-related posts. The subreddit dedicated to discussions about epilepsy came in second.

epilepsy reddit nlp google sentiment

What adjectives do people use when they talk about epilepsy?

Besides looking at simple numbers, I wanted to analyze the comments themselves. I ran them through Google’s Natural Language (NLP) API to see what I could learn. NLP takes a sample of text and breaks it down into parts of speech and sentiment.

First, I looked at the parts of speech. Here are the top adjectives most used in conjunction with the word “epilepsy.”

epilepsy reddit nlp google sentiment

What is the sentiment of the comments about epilepsy?

Next, I wanted to add the sentiment piece. The NLP looked at each comment and to try to infer if it represented a positive or negative sentiment. “I won’t let epilepsy get me down” is an example of a positive sentiment. “I have epilepsy and am depressed” expresses a negative sentiment. I wondered if the adjectives used changed depending on the sentiment of the comment, and they did.

For comments characterized as positive, words like “good”, “great”, and “best” were included.

epilepsy reddit nlp google sentiment

For negative comments, “bad”, different”, and “severe” made the list.

epilepsy reddit nlp google sentiment

I also wanted to look at the sentiment across the different groups. The chart below shows the average sentiment of the epilepsy-related comments by subreddit.

epilepsy reddit nlp google sentiment

Again, a positive score reflects an overall positive sentiment of the comments. Interestingly, the big negative score on the chart is for the subreddit “KotakuInAction.” The group relates to the “GamerGate” controversy and other gaming and Internet issues. The thread that contained the epilepsy comments related to the Eichenwald case. That was where a journalist with epilepsy was sent a seizure-inducing twitter message.

What else do people talk about when they talk about epilepsy?

Finally, Google’s algorithm also provides other topics (entities) that are discussed in text. Here are the most common entities mentioned in conjunction with epilepsy on Reddit.

epilepsy reddit nlp google sentiment

Let’s look at January through March…

Since the data was available, I ran a few of the reports for the first three months of 2017, as well, to see if anything changed.

First, here are the number of comments for January through March.

I also wanted to see how different the entities report was over the three months. There was a lot of overlap from the March chart, showing that conversations about those entities are likely normal.

Finally, I also looked at the occurrences of specific references to a handful of positive and negative terms that often come up when speaking about epilepsy.

Looking at the two charts, clearly, references to medication, side effects, and depression were often discussed in the comments on Reddit.

What’s next?

This project was a first look at using natural language processing techniques to analyze social media posts about epilepsy. There are a number of applications for such technology, and it will be interesting to explore more sites and using different algorithms and techniques. If you have any thoughts or suggestions on other ways to look at the data, please leave a comment below.

If you’re interested in doing your own analysis, you can find the source code and other information on my GitHub page. A shout-out to Sara Robinson for her article, which was a guide and huge inspiration.

The Lonely Record – A Story Of Data In Epilepsy Diagnosis

Somewhere in a cluster of servers in windowless rooms spread around the world, there is a Great Machine. On that machine, there lives a database. In that database, there is a table, and in that table, there is a record about my son. The 1s and 0s in that record contain an anonymous listing of a six-year-old boy. Those bits and bytes also contain data of expressed genes captured during an exome sequencing.

In the same database, there are records of thousands of other children that have had their exome sequenced, too. Each individual record has at least one common attribute with all the other records…the child that the record represents has epilepsy.

The goal of the exome sequencing is to identify one of the known genetic variations that is known to cause seizures. If that happens, patients can benefit from those that came before. A potential treatment plan identified by other patients with the same genetic condition might provide a more targeted approach for the newly matched patient. It might also offer some insight in to prognosis. For better or worse, it may at least give some answers.

For the new records that are placed in to the database that are not matched to a known genetic cause, they sit unattached and alone. These records lack causation and, in their unjoined state, they also lack correlation. There are no patients that came before, no best practices or lessons learned. There is no prognosis. There are no answers.

My son’s record is that way. It rests alone in a database, somewhere in the world, on a cold, metal server in a windowless room, waiting to be called. Waiting to be joined with another record. Waiting for correlation. Because with correlation, there can be association. With association, there can be coordination. With coordination, there can be answers.

Every six months, the Great Machine tries to use new discoveries, new cases, to find patterns that were previously unseen or unknowable. It calls out to each record, looking to find those that it may bestow the gift of correlation. For most, there is no correlation, no gift, and they return to their lonely state until they are once again called upon.

Maybe someday, my son’s record will find a partner. A commonality between another record in a database. A non-uniqueness in the universe. In all likelihood, the result of a match will not produce a cause for the seizures. It may, however, start to provide correlation between cases that can be studied further.

To a lonely record, it’s at least something.