Hierarchical Deep Learning for Comprehensive Epileptic Seizure Analysis: From Detection to Fine-Grained Classification - Peter Akor; Godwin Enemali; Usman Muhammad; Rajiv Ranjan Singh; Hadi Larijani (Information)
Epileptic seizure detection and classification from EEG recordings faces significant challenges due to extreme class imbalance. Analysis of the Temple University Hospital Seizure (TUSZ) dataset reveals imbalance ratios of 150:1 between common and rare seizure types, with high temporal heterogeneity (seizure durations of 1–1638 s). We propose a cascaded deep learning architecture with two specialized CNNs: a binary detector followed by a multi-class classifier. This approach decomposes the classification problem, reducing the maximum imbalance from 150:1 to manageable levels (9:1 binary, 5:1 type). The architecture implements a high-confidence filtering mechanism (threshold = 0.9), creating a 99.5% pure dataset for type classification, dynamic class-weighted optimization proportional to inverse class frequencies, and information flow refinement through progressive stages. Loss dynamics analysis reveals that our weighting scheme strategically redistributes optimization attention, reducing variance by 90.7% for majority classes while increasing variance for minority classes, ensuring all seizure types receive proportional learning signals regardless of representation. The binary classifier achieves 99.64% specificity and 98.23% sensitivity (ROC-AUC = 0.995). The type classifier demonstrates >99% accuracy across seven seizure categories with perfect (100%) classification for three seizure types despite minimal representation. Cross-dataset validation on the University of Bonn dataset confirms robust generalization (96.0% accuracy) for binary seizure detection. This framework effectively addresses multi-level imbalance in neurophysiological signal classification with hierarchical class structures.