A multimodal AI system for out-of-distribution generalization of seizure detection

Yikai Yang, Nhan Duy Truong, Jason K. Eshraghian, Christina Maher, Armin Nikpour, Omid KaveheibioRxiv 2021

Abstract

Epilepsy is one of the most common severe neurological disorders worldwide. The International League Against Epilepsy (ILAE) define epilepsy as a brain disorder that generates (1) two unprovoked seizures more than 24 hrs apart, or (2) one unprovoked seizure with at least 60% risk of recurrence over the next ten years. Complete remission has been defined as ten years seizure free with the last five years medication free. This requires a cost-effective ambulatory ultra-long term out-patient monitoring solution. The common practice of self-reporting is inaccurate. Applying artificial intelligence (AI) to scalp electroencephalogram (EEG) interpretation is becoming increasingly common, but other data modalities such as electrocardiograms (ECGs) are simpler to collect and often recorded simultaneously with EEG. Both recordings contain biomarkers in the detection of seizures. Here, we propose a state-of-the-art performing AI system that combines EEG and ECG for seizure detection, tested on clinical data with early evidence demonstrating generalization across hospitals. The model was trained and validated on the publicly available Temple University Hospital (TUH) dataset. To evaluate performance in a clinical setting, we conducted nonpatient-specific inference-only tests on three out-of-distribution datasets, including EPILEPSIAE (30 patients) and the Royal Prince Alfred Hospital (RPAH) in Sydney, Australia (31 patients shortlisted by neurologists and 30 randomly selected). Across all datasets, our multimodal approach improves the area under the receiver operating characteristic curve (AUC-ROC) by an average margin of 6.71% and 14.42% for prior state-of-the-art approaches using EEG and ECG alone, respectively. Our model’s state-of-the-art performance and robustness to out-of-distribution datasets can improve the accuracy and efficiency of epilepsy diagnoses.

Introduction

Epilepsy diagnosis currently relies on the "gold standard" of scalp electroencephalogram (EEG) readings, which are notoriously difficult and time-consuming for clinicians to interpret. While AI has shown promise in automating seizure detection, most existing models suffer from a "generalization gap": they perform well on data from the hospital where they were trained but often fail when deployed in new clinical environments with different equipment or patient demographics.

Furthermore, most systems rely solely on EEG. However, seizures often trigger physiological changes outside the brain, such as ictal tachycardia (rapid heart rate), which occur in over 80% of partial-onset seizures. This paper addresses the challenge of building a multimodal system that is not only more accurate but also robust enough to handle "out-of-distribution" (OOD) data—meaning it works reliably across different continents and recording infrastructures without needing any retraining.

Methods

The proposed deep learning architecture processes EEG and ECG signals through two specialized branches before fusion:

  1. EEG Branch (ConvLSTM): Uses a Convolutional Long Short-Term Memory network to capture both spatial patterns across electrodes and temporal patterns over time.
  2. ECG Branch (ResConv): Employs a residual CNN (ResNet-style) to extract heart rate variability and other cardiac biomarkers from the ECG signal.
  3. The Fusion Layer (Modified EmbraceNet): Standard multimodal AI often concatenates features, which can lead to overfitting. This model uses a modified version of EmbraceNet, employing a multinomial sampling process to model correlations between EEG and ECG. Residual connections were added to ensure the model can still learn from the independent contributions of each modality, even if the other is noisy or missing.
The proposed multimodal fusion architecture featuring EEG and ECG branches with a modified EmbraceNet layer and residual connections.

Before entering the networks, EEG data undergoes Independent Component Analysis (ICA) to remove eye-movement artifacts, and both signals are converted into frequency-domain representations using Short-Time Fourier Transforms (STFT).

Datasets

The study is notable for its rigorous cross-continental validation:

  • Training & Validation: The Temple University Hospital (TUH) Seizure Corpus (USA), the world’s largest open database of its kind.
  • OOD Testing (Europe): The EPILEPSIAE dataset, featuring 30 patients.
  • OOD Testing (Australia): Data from the Royal Prince Alfred Hospital (RPAH), split into a "neurologist-selected" group (31 patients) and a "randomly selected" group (30 patients).

Testing on the European and Australian datasets was done in a "pseudo-prospective" manner—the model was fixed after training on US data and never saw the other datasets during its development.

Key Results

The multimodal approach consistently outperformed single-modality baselines and prior state-of-the-art fusion methods:

  • Accuracy Boost: The system improved the Area Under the Curve (AUC-ROC) by an average of 6.71% over EEG-only models and 14.42% over ECG-only models across all datasets.
  • State-of-the-Art Fusion: It outperformed the original EmbraceNet architecture by a margin of 1.76%, proving the value of the added residual connections.
  • Robustness to Missing Data: One of the most impressive findings is that the system remains effective even if one sensor fails. If the ECG signal is lost, the model's performance on EEG remains stable (and vice versa), making it far more practical for real-world ambulatory monitoring where electrodes often lose contact.
  • Generalization: On the Australian RPAH randomized dataset, the model achieved an AUC-ROC of 0.8923, a remarkably high score for data recorded on entirely different hardware than the training set.
Comparison of AUC performance across different datasets and missing modality scenarios, demonstrating the superiority and robustness of the proposed multimodal approach.

Discussion and Conclusion

By focusing on a fusion architecture that balances modal independence with cross-modal correlation, the authors proved that a model trained in Philadelphia can work effectively in Sydney or Germany without local fine-tuning. Despite the high performance, several hurdles remain. The model still relies on a relatively high number of EEG channels (16+); for truly "ambient" or wearable use, reducing the number of electrodes while maintaining accuracy is a key next step. Additionally, the datasets used primarily featured adult patients; pediatric seizure patterns can differ significantly and require further validation. While the OOD testing emulates a prospective study, true clinical deployment will require real-time testing in live hospital environments to assess how it assists clinicians in practice.

Summary updated

Abstract

Abstract Epilepsy is one of the most common severe neurological disorders worldwide. The International League Against Epilepsy (ILAE) define epilepsy as a brain disorder that generates (1) two unprovoked seizures more than 24 hrs apart, or (2) one unprovoked seizure with at least 60% risk of recurrence over the next ten years. Complete remission has been defined as ten years seizure free with the last five years medication free. This requires a cost-effective ambulatory ultra-long term out-patient monitoring solution. The common practice of self-reporting is inaccurate. Applying artificial intelligence (AI) to scalp electroencephalogram (EEG) interpretation is becoming increasingly common, but other data modalities such as electrocardiograms (ECGs) are simpler to collect and often recorded simultaneously with EEG. Both recordings contain biomarkers in the detection of seizures. Here, we propose a state-of-the-art performing AI system that combines EEG and ECG for seizure detection, tested on clinical data with early evidence demonstrating generalization across hospitals. The model was trained and validated on the publicly available Temple University Hospital (TUH) dataset. To evaluate performance in a clinical setting, we conducted nonpatient-specific inference-only tests on three out-of-distribution datasets, including EPILEPSIAE (30 patients) and the Royal Prince Alfred Hospital (RPAH) in Sydney, Australia (31 patients shortlisted by neurologists and 30 randomly selected). Across all datasets, our multimodal approach improves the area under the receiver operating characteristic curve (AUC-ROC) by an average margin of 6.71% and 14.42% for prior state-of-the-art approaches using EEG and ECG alone, respectively. Our model’s state-of-the-art performance and robustness to out-ofdistribution datasets can improve the accuracy and efficiency of epilepsy diagnoses.
BibTeX
@misc{yang2021multimodal,
  author = {Yikai Yang and Nhan Duy Truong and Jason K. Eshraghian and Christina Maher and Armin Nikpour and Omid Kavehei},
  title = {{A multimodal AI system for out-of-distribution generalization of seizure detection}},
  year = {2021},
  doi = {10.1101/2021.07.02.450974},
  howpublished = {bioRxiv},
}
Figure