A new artificial intelligence model can detect epileptic seizures in electroencephalogram, or EEG, recordings with an average sensitivity of 99.8 percent and an average accuracy of 99.3 percent, according to a study published in the journal Brain Informatics. The model, called EffiFormer, was tested on the publicly available CHB-MIT dataset, a collection of long-term scalp EEG recordings from pediatric patients at Children’s Hospital Boston, and it achieved these results while also explaining, in quantitative terms, which parts of the brain signal drove its decisions.
Epilepsy is one of the most common neurological conditions in the world. The World Health Organization estimates that around 50 million people live with the disorder, which is characterized by recurrent seizures caused by abnormal bursts of electrical activity in the brain. Although anti-epileptic drugs are the standard treatment, nearly 30 percent of patients continue to have seizures despite therapy. That treatment gap makes fast and accurate seizure detection a pressing clinical need, because catching a seizure as it begins allows for prompt intervention that can dramatically improve patient safety.
EEG remains one of the best tools for this task. The recordings capture the firing of electrical impulses by groups of neurons and can be divided into phases: the preictal period before a seizure, the ictal period of the seizure itself, the postictal recovery period, and the interictal interval between events. But reviewing EEG manually is slow, inefficient, and heavily dependent on the experience of the reader. Automated approaches have therefore moved from hand-engineered signal features, such as Fourier analysis, toward deep learning systems that learn patterns directly from the data.
The research team, led by Aaranay Aadi, Divyansh Sukhija and Rishabh Shetty with colleagues including Vijaypal Singh Dhaka, built EffiFormer as a hybrid of two architectures. The first is EfficientNet-B3, a convolutional neural network pretrained on the ImageNet image database, which excels at extracting localized spatial patterns. The second is DeiT-III, a data-efficient vision transformer, whose self-attention mechanism captures long-range dependencies across an image. Raw EEG signals are first cleaned with a notch filter to remove 50 Hz power-line noise and a high-pass filter at 1 Hz to eliminate baseline drift, then segmented into 30-second non-overlapping windows. Each window is converted into a time-frequency spectrogram using the Short-Time Fourier Transform, producing a 65-by-30 matrix that is resized to 224 by 224 pixels and mapped to three RGB channels so that image-ready networks can process it.
A central challenge was the extreme class imbalance in the data. Seizure activity accounts for roughly 3.25 hours out of about 983 hours of recording, meaning non-seizure segments make up approximately 99.67 percent of the corpus. To keep the model from simply learning to predict the majority class, the researchers combined focal loss, which down-weights easy examples during training, with dynamic oversampling. An online variant of SMOTE, the Synthetic Minority Oversampling Technique, generated synthetic seizure samples at the batch level during training, using the five nearest neighbors of each ictal sample and creating two synthetic counterparts per real one. Because this oversampling ran in runtime memory and drew only from training distributions, the validation and test sets consisted entirely of original, non-augmented EEG segments, avoiding information leakage.
Evaluation was performed under a patient-specific protocol, with each patient’s data divided into a 60-20-20 training-validation-testing split. Across the 22 patients, the model reached a mean area under the ROC curve of 0.99, with several patients achieving a perfect 1.00, and a mean false positive rate of 0.15 per hour, equivalent to roughly one false alarm every 6.6 hours of monitoring. Event-based analysis revealed that 4 of 175 seizure events went undetected; most of these missed events were very brief seizures lasting less than 15 seconds, in which motion artifacts or low-amplitude discharges obscured the spectral structure at the 30-second window scale. A permutation test with 1,000 shuffled labelings produced a chance-level AUC near 0.50, and the observed mean AUC of 0.99 yielded a p-value below 0.001, indicating the performance is unlikely to be a statistical fluke.
Ablation experiments showed that each component contributed measurably. Compared with a standard vision transformer, which achieved an AUC of 0.86 and a sensitivity of 76.6 percent on the same data, EffiFormer’s hybrid design lifted sensitivity to 99.8 percent. Removing the fusion layer or dropout reduced generalization, and running EfficientNet or DeiT-III alone trained faster, at 690 and 720 seconds per epoch respectively versus 1,290 seconds for the full model, but at the cost of classification robustness. Among the augmentation strategies, SMOTE delivered the largest single gain, raising the AUC by 1.98 percentage points from a focal-loss-only baseline of 96.55 percent, while warping, MixUp and image-level augmentations added smaller incremental improvements.
Perhaps the most distinctive feature of the work is its interpretability framework. Rather than relying on transformer attention weights, which have well-documented limitations as indicators of feature importance, the team used post-hoc SHAP values to attribute the model’s decisions to specific time-frequency regions of each spectrogram. Three quantitative metrics were defined in advance: Clinical Spectral Agreement, which measures the fraction of attribution mass falling in clinically relevant frequency bands; faithfulness under perturbation, measured as the area under the perturbation curve when top-ranked patches are masked; and an Explanation Consistency Score capturing stability across seizure events within a patient. EffiFormer scored 89.2 percent on spectral agreement, 0.18 on the perturbation metric, indicating that masking the attributed regions rapidly collapses the model’s confidence, and 0.86 on consistency.
The attribution maps themselves told a coherent neurophysiological story. For seizure windows, high-magnitude attribution hotspots localized to the 3 to 12 Hz range, corresponding to the rhythmic theta and delta discharges that neurologists recognize as markers of ictal onset, while non-seizure windows showed diffuse, low-magnitude attributions. The authors argue that this convergence of evidence addresses a known concern for patient-specific EEG models: shortcut learning, in which a model exploits stable statistical regularities in recording conditions rather than genuine seizure signatures. Because the attributions concentrate in established ictal bands, depend on those regions for the classification, and remain stable across events, the researchers conclude that shortcut learning is not the primary driver of the reported performance, though they note that definitively ruling out spectral bias would require dedicated frequency-band masking experiments they leave to future work.
The authors are careful to frame the scope of these results. All experiments were conducted on CHB-MIT, a benchmark recorded in a controlled clinical environment that lacks the motion artifacts, electrode displacement and environmental noise of real-world EEG acquisition, so the performance figures should be interpreted within that experimental context. The SHAP-based analysis, while quantitatively grounded and aligned with established neurophysiological markers, has not yet been formally evaluated by clinical neurologists, and the study demonstrates computational interpretability rather than clinician-validated diagnosis. The team proposes that the interpretability metrics could eventually support a clinician-in-the-loop workflow, in which high spectral-agreement detections are flagged for expedited review and low-agreement detections are deprioritized as possible artifacts, and they identify prospective evaluation under real-world recording conditions as the necessary next step before any clinical deployment.
Subject of Research: A hybrid vision transformer-CNN deep learning model for interpretable detection of epileptic seizures in EEG recordings
Article Title: Effiformer: a unified data-efficient vision transformer-CNN framework for interpretable epileptic seizure detection
Article References: Aadi, A., Sukhija, D., Shetty, R., Shukla, P., & Dhaka, V. S. (2026). Effiformer: a unified data-efficient vision transformer-CNN framework for interpretable epileptic seizure detection. Brain Informatics, 13(1), Article 35. https://doi.org/10.1186/s40708-026-00320-2
Image Credits: AI Generated
DOI: 10.1186/s40708-026-00320-2
Keywords: epilepsy, seizure detection, EEG, vision transformer, deep learning, CHB-MIT dataset, SHAP interpretability, SMOTE, spectrograms, machine learning, clinical AI, Brain Informatics
News Source: Cassandra Pierce. (October 30, 2026). Hybrid AI Spots Seizures in Brain Recordings With Near-Perfect Accuracy. Scienmag.



