Using vision transformers for electrographic seizure classification to aid physician review of intracranial electroencephalography recordings

  • Muhammad Furqan Afzal
  • , Sharanya A. Desai
  • , Wade Barry
  • , Thomas K. Tcheng
  • , Jonathan Kuo
  • , Shawna W. Benard
  • , Christopher B. Traner
  • , David Greene
  • , Cairn G. Seale
  • , Martha J. Morrell

Research output: Contribution to journalArticlepeer-review

Abstract

We introduce a vision transformer (ViT)-based approach for automated electrographic seizure classification using time-frequency spectrogram representations of intracranial EEG (iEEG) recordings collected from patients implanted with the NeuroPace® RNS® System. The ViT model was trained and evaluated using 5-fold cross-validation on a large-scale dataset of 136,878 iEEG recordings from 113 patients with drug-resistant focal epilepsy, achieving an average test accuracy of 96.8%. Clinical validation was performed on an independent expert-labeled dataset of 3,010 iEEG recordings from 241 patients, where the model achieved 95.8% accuracy and 94.8% F1 score on recordings with unanimous expert agreement, outperforming both ResNet-50 and standard 2D CNN baselines. To evaluate generalizability, the model was tested on a separate out-of-distribution dataset of 136 recordings from 44 patients with idiopathic generalized epilepsy (IGE), achieving over 75% accuracy and F1 scores across all expert comparisons. Explainability analysis revealed focused attention on characteristic electrographic seizure patterns within iEEG time-frequency spectrograms during high-confidence seizure predictions, while more diffuse attention was observed in non-seizure classifications, providing insight into the underlying decision process. By enabling reliable electrographic seizure classification, this approach may assist physicians in the manual review of large volumes of iEEG recordings.

Original languageEnglish
Article number1680395
JournalFrontiers in Human Neuroscience
Volume19
DOIs
StatePublished - 2025
Externally publishedYes

Keywords

  • deep learning
  • electrographic seizure classification
  • epilepsy
  • explainability
  • intracranial EEG
  • vision transformer (ViT)

Fingerprint

Dive into the research topics of 'Using vision transformers for electrographic seizure classification to aid physician review of intracranial electroencephalography recordings'. Together they form a unique fingerprint.

Cite this