An AI for Detecting Epilepsy, Sleep Apnea
Stevens collaborates with Yale, others to develop systems that can spot potentially deadly seizures and apnea episodes earlier
More than 50 million people worldwide are diagnosed with some form of epilepsy, a syndrome in which the brain’s electrical signaling suddenly becomes disturbed and surges likes an electrical storm.
An epileptic episode (also known as a seizure) can produce mild to violent muscle movements, sudden behavioral or perception changes — even precipitate a deadly stroke.
Technologies exist to detect seizures soon after they begin, but most are time-consuming and power-hungry.
“We need quicker detection, within the first one to two seconds of an event,” says Stevens researcher Md Abu Sayeed, who has collaborated with Yale University and the University of North Texas on projects including AI-powered systems that spot seizures quickly and accurately by parsing electroencephalogram (EEG) brain-electricity data.
“Now we have demonstrated a way to do that.”
Keeping only the best data
Sayeed was inspired to take on the challenge by several family members who experience epilepsy — a disorder for which there is no cure.
There are several key challenges in quick detection and care, including the fact that any devices need to be portable (and power-conservative) enough to be worn for long, useful periods of time.
“The problem is, the more data you need to analyze, the more computationally expensive a system becomes, and the more circuit and physical power you need for a device carrying it,” he says. “Our goal was to get only the most useful data into our detection system.”
To do it, Sayeed and his collaborators use algorithmic processes to massively shrink the amount of brain-wave data needed for a strong, yet rapid, analysis.
In experiments, his groups tested a common algorithmic method known as NCA and then also created a new one, specially tailored to the challenge of sorting through brain-wave pulses.
They call this algorithm PEM (for “pulse-exclusion model”), and it weeds out extraneous signals in recorded EEG data — preserving only the most useful, relevant information for further analysis.
“During a seizure there are certain high-amplitude discharges. PEM is based on recognizing these characteristic patterns that occur during seizure activity,” he explains.
The team also used additional processes based on a modified common filtering algorithm known as ReliefF to further reduce the data used by the system.
“These two steps, when combined, removed 85.5% of the EEG data that was not useful for detection,” Sayeed explains. “The data we worked with was originally collected in 23 channels; collecting millions of data points.”
“But we found that only one or two of those electrodes gave you data that was actually really useful in detecting a seizure.”
Since so-called ‘focal’ (highly localized) epileptic seizures are more common than broader disturbances of the brain’s electrical system, that makes sense.
“A few very specific areas of the brain seem to be much more epilepsy-prone,” he continues, “so you probably want to focus on collecting data from just those specific regions for faster and better detection. And that’s basically what our algorithms did.”
The group took additional steps to make the system it tested more portable and field-friendly, as well.
All detection algorithms were trained offline to conserve time and energy. And the hardware was made as lean as possible: in demonstration studies, Sayeed’s team built and employed a low-power, Arduino Uno microcontroller-based circuit board with a simple liquid-crystal display attached to show data and seizure events.
“If we can make the system portable, we can create a device with it that can be worn on the head — or even perhaps implanted, for example on a chip,” he points out.
After running the system on existing brain-wave data collected by MIT researchers from 22 epileptic patients in Boston Children’s Hospital, Sayeed found his system’s detection of a spot episode of epilepsy was as accurate as the best existing AI-based systems — but much quicker.
Correct flagging of seizures happened within an average of just one second using the new PEM algorithm. The commonly used NCA algorithm is equally accurate, but currently takes an average of about 6 seconds to spot a seizure in progress.
“We definitely succeeded in reducing the latency, the delay, in seizure detection and this is significant. It’s among the quickest detections in the published scientific record.”
The University of North Texas collaborated on the investigations, which were reported in Springer Nature Computer Science in September 2023.
Next: predicting, treating epilepsy, spotting sleep apnea
Sayeed is working on several related projects, as well.
As one extension of the epilepsy AI, he has proposed a new system that could deliver epilepsy medicines to patients, using a tiny pump, instantly whenever the algorithmic system detects a seizure beginning.
“Since the process is very sensitive, more than 99% in our experiments, there could be device, a commercial application, to control seizure events as they happen,” he notes.
In another effort, working with researchers at Eastern New Mexico University, Sayeed has begun creating prototype systems that can analyze the heart’s electrical activity in order to detect sleep apnea — a potentially deadly disorder that causes one’s breathing to stop completely while asleep, depriving the body of oxygen and accelerating the risk of heart attack and stroke.
Sayeed and his collaborators first trained a deep neural network using electrocardiographic (ECG) data recorded during known sleep apnea episodes, then developed new algorithms to identify episodes as they happened.
Again using the proprietary PEM algorithm to shrink the data set and reduce the computational load, Sayeed tested the detection system on confirmed ECG data collected by electrodes on patients’ chests during real apnea events.
And, once again, the AI-powered system proved highly sensitive at detecting the dangerous condition quickly. The research was presented at IEEE’s annual International Conference on Artificial Intelligence, Blockchain, and Internet of Things in September 2023.
“We will definitely continue working in all these areas," says Sayeed. “These are important and dangerous health challenges for society, and we want to contribute.”
What’s next? He plans to begin working soon on the much more complex, but potentially more rewarding, challenge of predicting seizures in advance from foreshadowing brain-wave data — enabling life-saving care to be given sooner.
“Prediction is promising, but difficult,” he cautions. “We may be able to design a system to predict seizure shortly before it occurs, but that will be hard because the data is very unpredictable. There are certain electrical activities in the brain before an event, certain high-amplitude discharges, but there are also somewhat random discharges as well.”
Still, Sayeed says he will make his best effort to tackle the challenge.
“We will really work hard on epilepsy prediction, even though it’s so complex,” he concludes. “It is actually the larger goal of all this work we have already done.”