Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Sep;55(5):103098.
doi: 10.1016/j.neucli.2025.103098. Epub 2025 Aug 21.

Electrocardiogram (ECG)-based seizure detection using supervised machine-learning

Affiliations
Free article

Electrocardiogram (ECG)-based seizure detection using supervised machine-learning

Eva Diab et al. Neurophysiol Clin. 2025 Sep.
Free article

Abstract

Background: We conducted a pilot study utilizing automatic delineation of electrocardiogram (ECG) and machine learning that considered all components of the ECG complex for seizure detection. The primary outcome was to assess the feasibility of this method. The secondary outcome was to identify the most effective machine learning algorithm.

Methods: We screened ECG recordings from patients included in the EPICARD cohort who underwent video-electroencephalogram monitoring. A total of 47 seizures from 32 patients were selected. Epochs of 90 min surrounding the seizures were retained. Each ECG was converted into a sequence of heartbeats modeled as a P-Q-R-S-T succession. Derivative quantities measuring time variations between the inner and outer components of heartbeats were computed, designated as δX and ΔX. Our algorithm monitored 3 to 60 successive heartbeats within a sliding window. An alarm was triggered when more than N heartbeats were classified as in-seizure (N between 3 and 20). Heartbeats were categorized as in-seizure by trained neurophysiologists. We used automated machine learning (auto-ML) platforms (Dataiku & Flaml) to assess six different algorithms: Random Forest, LightGBM, XGBoost, Decision Tree, K-Nearest Neighbors, and Extra Trees.

Results: The Extra Trees algorithm provided the best seizure detection performance regardless of the validation method used. Although longer-window models enhance detection sensitivity, they do so at the cost of delayed identification. A model analyzing 60 heartbeats with a trigger of 20 achieved 86 % sensitivity and 99.9 % specificity.

Discussion: Automatic delineation is reliable, however the false alarm rate remains high (1.5 per hour). Future work should focus on personalizing detection algorithms to improve this false alarm rate.

Keywords: Automated detection; Electrocardiogram; Epilepsy; Machine learning; Seizures.

PubMed Disclaimer

Conflict of interest statement

Declaration of competing interest None of the authors has any conflict of interest to disclose.

LinkOut - more resources