Seizure Detection And Prediction

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

As the parent of a child with epilepsy, I rarely sleep through the night. Instead, I periodically wake to check in on my son. We use a wireless camera that has an app that we run on an iPad that I prop up beside our bed. I can see in to his room, even at night, and hear any activity or seizures. For the most part, it’s a good setup. But occasionally a wireless issue will cause the connection to drop. I’ll wake up facing a dark screen, wondering if I missed a seizure as I fumble in the dark to restart the app.

That scenario repeats a few times a month, which is why the news that the FDA approved the Empatica Embrace as a medical device was so exciting. The Embrace is a wearable device that detects generalized tonic-clonic seizures and sends an alert to caregivers. Devices like the Embrace will provide a piece of mind to many people with seizures and those that care for them.

Unfortunately for us, we haven’t yet found a device that can reliably detect my son’s seizures. His seizures are short and without much movement, making them harder to detect. Generally, the longer a seizure is and the more activity it generates, the more likely it will be detected. But with new sensors and smarter algorithms, these devices will continue to improve. They’ll have a higher sensitivity to detect shorter and more subtle seizures. Instead of relying on my own eyes and ears to catch every seizure, I’m hopeful that these devices will work for my son someday, too.

Since the theme this week is technology and epilepsy, I thought I would spend some time talking about the magic behind these devices.

Detection versus Prediction

Detection

First, I wanted to differentiate between detection and prediction. Devices like the Embrace focus on seizure detection. Detection figures out when a seizure is happening. The device monitors activity from embedded sensors and runs it through an algorithm. The algorithm has been trained to look for patterns that look like seizure activity. Once it is confident enough that a seizure is occurring, it will send out an alert.

Prediction

Seizure prediction tries to figure out when a seizure is likely to happen. Some people have auras or other cues that let them know that a seizure is coming. Imagine a device that could provide that same warning to everyone. This is a hard but achievable goal. The clues may be more subtle and harder to see. We may need more data or new sensors, but we’re well on our way to developing them. When we figure it out, the warning it provides cold allow a person about to have a seizure to go sit down or get to a safe area. It could alert caregivers ahead of time so that they provide help before or during the seizure.

Training an Algorithm

Both seizure detection and seizure prediction use much of the same data but for different goals. The techniques used to learn the algorithm are similar, too. Data is collected from a group of people wearing different sensors. The data includes both seizure and non-seizure activity and it’s fed in to a computer with a label such as “seizure” or ”no seizure.” The computer learns the difference between the two and creates a model that can be used to look at new data to classify it as a “seizure” or ”not a seizure.” The more examples the algorithm sees, the better it gets at identifying the common traits in the data that are associated with a seizure.

The process is similar to teaching an algorithm to identify a cat. You feed the system a bunch of examples of cats and it identifies that a cat has two eyes, to ears, a nose, and whiskers. It generalizes traits using a technique called induction. Once it generalizes the traits, it can use them to identify a cat that it has never seen before using those traits. This is called deduction.

The same approach happens with seizures. People and seizures are different. If we trained a model to look for a specific heart rate, it wouldn’t be useful because that would differ for everyone. Instead, we train a model to associate common changes that happen during a seizure. Then, when it sees the data coming in from sensors in a device, it looks for those similar markers to decide how to classify the data.

No Algorithm Is Perfect

As in the cat example, there are an infinite number of combinations of data points necessary to always get it right. We can’t practically train a model by showing it every angle of every cat that might exist. And we can’t give it data reflecting every possible seizure for every person. But we don’t have to. The magic of these algorithms is that they can do a pretty good job using subsets of the data. But that does mean they can make mistakes.

There are two types of mistakes that are the most common: false positive and false negative. In the case of seizure detection, a false positive is when the algorithm said there was a seizure but there wasn’t. A false negative would be when the algorithm didn’t think there was a seizure but there was.

These two error types present different challenges. In seizure detection, a false positive means that a caregiver might have been alerted. This can be annoying, especially if it happens too much, like The Boy Who Cried Wolf. Too many false positives means people may turn off the notification feature or stop wearing the device altogether.

In seizure detection, the false negative is a much more severe problem because it means a seizure occured but the algorithm missed it. That means no notification was sent to alert a caregiver. If that is the primary purpose for the device then it can’t be relied on and won’t be used.

Making Things Better

The good news is that algorithms can learn from their mistakes and get better. We can use the times it was right and wrong to retrain the algorithm so that it can get better. That’s what Google, Facebook, and every other company that uses data does to make their products better. A popular concept in the world of machine learning and AI products is the Virtuous Circle of AI.

We create products and give them to customers. The customers use the product and generate more data. The data is used to make the product better by making the algorithms better or adding new features. This is how Alexa gets better at understanding what you’re asking for, how Google gives you better search results, and how music and movie recommendations today are many times more accurate than even a few years ago. In the same way, as more devices like the Embrace find their way on to the market and more people use them, these products will use the data to get better, too.

NEXT UP: Be sure to check out the next post tomorrow by Joe Stevenson at epilepticman.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 March 31 at 7PM ET.

Our Community

My wife and I were honored as the King and Queen of the Epilepsy Foundation of Eastern Pennsylvania’s Mardi Gras Galas. The Gala is the signature fundraising event of the foundation and brings together Philadelphia’s top neurologists, hospitals, pharmaceutical companies, and members from its business and legal communities to celebrate the Foundation and its accomplishments to improve the quality of life of individuals living with epilepsy and their caregivers.

We were joined at the Gala by an extended table full of our family and friends. There were people at our table that made my son better and that made our lives better. There were people at our table that gave us hope and made us feel like we were not alone. There were people at our table that gave my son a chance made him feel special and normal at the same time. Instead of seeing a sick kid, they saw a baseball player, a jokester, and a dancer. But mostly, they saw a child. And they let him be himself and accepted him for who he was. That is a gift that I can never repay, and having our table full of those people…our people…made that night even more special.

Good evening. We are honored to be here with you all tonight. My name is David Monnerat. This is my wife Kerri, and this is our son.

[Our son: Hi, Is everybody having a great time??]

Our journey with epilepsy started 3 years ago when we moved from Colorado to Philadelphia. Two miles away from where we are tonight, Mitchell had his first seizure. For many of you in this room, you know how scary that can be. We were alone in a new city with no support and found ourselves locked in the hospital watching our son slip away, fighting a battle against an enemy that seemed determined to take him from us.

We have never been so scared, we have never felt so alone. But little did we know, our journey couldn’t have started in a better place. I always say, “We don’t believe there is a malevolent force working against us, a trick of fate where we drew the short straw and our son got sick! We believe this is our path and everyone has “something”. That being said, I am more certain now than ever that there is a force, an energy, a God that ensured we were given every possible gift to help keep us going through this journey. We were given this wonderful city, Children’s Hospital of Philadelphia, the Epilepsy Foundation of Eastern Pennsylvania, and the system of support that has come to form our village who are sturdy and enduring, loving and true.

There are people in this room that saved our son’s life.
There are people in this room that put our son back together.
There are people in this room that made him a part of a team.
There are people in this room that have become family.

If you ever wonder if these things you do ever make a difference to anyone, I’m here to tell you that the answer to that question is “yes”.

Thank you for the honor. Thank you for your support for the foundation and for this community. Our community.

Thank you.

Neverland

Early in the morning, my son had a seizure. As his body tensed and contorted, his lungs expelled air through his vocal chords. The sound it made traveled between the open door of our rooms and woke me up.

I pulled off my covers and made my way into his room. He had sat up, but he was already making his way back on to his pillow. Standing at the head of his bed, I reached my hand through the slats and stroked the top of his head. I whispered to him that he was going to be okay and that he should go back to sleep. He eventually did, so I returned to bed.

I checked the clock. There might have been enough time for me to fall back to sleep, but it was also close to the time that I needed to wake up. While I pondered what to do, I stared at the screen of our monitor. My son was asleep, with a blanket draped over him and his two fingers that he still sucks in his mouth.

My restless, exhausted brain started to drift. Someday, I thought, he’s going to grow up. Instead of the sound of a child, I will hear the deeper sound of a young man echoing through the hall. I shuddered at the eventuality and gave up on the idea of going back to sleep.

I started to think about what else was going to change but stopped myself. I see the boy on the monitor and can’t think of him being anything else. If I knew where Neverland was, I would take him there so that he would never have to grow up.

In Neverland, he could stay the boy who sleeps in our bed when he is sad or afraid. The boy who sits on my lap when he needs to be held. The boy who looks at the world with wonder and compassion. The boy who doesn’t feel the pressure of the adult world. The boy we can shield from how ugly that world can be.

I want to keep him at this age because it’s only going to get harder for him. He’s going to start questioning his value and his worth. His gentle soul and open, hopeful, dreaming nature will be tested, as will his belief in magic and possibility. I don’t want him to ever doubt that he can fly because the moment he does, he will cease to be able to do it.

I know that instead of wishing for him to not grow up, my responsibility is in preparing him for the world. Instead of trying to keep him young forever, my job is to help him grow in a way that encourages the magic inside him. Instead of losing it, it will be what helps him believe that he will always be able to fly. But I thought we would have more time before the real world penetrated our existence. Maybe I thought it would never happen.

When Peter invites Wendy to forget everything and join him to live in Neverland and to never grow up, Wendy answers “Never is an awfully long time.”

I stared at the monitor and thought that “never” was not nearly long enough.