Search for a command to run...
Sleep-wake states bidirectionally interact with epilepsy and seizures, but the mechanisms are unknown. A barrier to comprehensive characterization and the study of mechanisms has been the difficulty of annotating large chronic recording datasets. To overcome this barrier, we sought to develop an automated method of classifying sleep-wake states, seizures, and the postictal state in mice ranging from controls to mice with severe epilepsy with accompanying background electroencephalographic (EEG) abnormalities. We utilized a large dataset of recordings, including electromyogram, EEG, and hippocampal local field potentials, from control and intra-amygdala kainic acid-treated mice. We found that an existing sleep-wake classifier performed poorly, even after retraining. A support vector machine, relying on typically used scoring parameters, also performed below our benchmark. We then trained and evaluated several multilayer neural network architectures and found that a bidirectional long short-term memory-based model performed best. This "Sleep-Wake and Ictal State Classifier" (SWISC) showed high agreement between ground-truth and classifier scores for all sleep and seizure states in an unseen and unlearned epileptic dataset (average agreement 96.41% ± SD 3.80%) and saline animals (97.77 ± 1.40%). Channel dropping showed that SWISC was primarily dependent on hippocampal signals yet still maintained good performance (∼90% agreement) with EEG alone, thereby expanding the classifier's applicability to other epilepsy datasets. SWISC enables the efficient combined scoring of sleep-wake and seizure states in mouse models of epilepsy and healthy controls, facilitating comprehensive and mechanistic studies of sleep-wake and biological rhythms in epilepsy.