Automated Sleep Spindle Analysis in Epilepsy EEG Using Deep Learning
Abstract
1. Introduction
2. Materials and Data Recording Details
2.1. Ethics Statement
2.2. Participants
- Early childhood (1–3 years): 2 patients (ages 2 and 3);
- Preschool age (4–6 years): 3 patients (ages 4, 5, and 6);
- Primary school age (7–11 years): 6 patients (ages 7, 8, 8, 8, 8, and 10);
- Adolescence (12–18 years): 1 patient (age 12).
2.3. Data Acquisition and Automatic Preprocessing by NeuroScope Software
- Sweep speed: 30 mm/s;
- Sensitivity: 7–15 μV/mm;
- Low-frequency cutoff: 0.5 Hz;
- High-frequency cutoff: 70 Hz;
- Notch filter: 50 Hz (to suppress power-line interference).
2.4. Sleep Spindle Annotation
- Definite spindles (SP): amplitude ≥ 20 μV, duration ≥ 1 s, located in fronto-central and vertex regions. SP serve as high-confidence “anchor” examples, offering clean prototypes of frequency, temporal profile, and waveform shape. They reduce noise in the training set and ensure stable learning during early stages.
- Probable spindles (PS): amplitude < 20 μV, duration ≥ 0.5 s, located in vertex and partially fronto-temporal regions. PS capture borderline cases between genuine spindles and other oscillations (e.g., partial arousals, artifacts). Including these examples improves the model’s ability to generalize and reduces overfitting to only idealized patterns.
- Dubious spindles (DS): amplitude 10–15 μV or duration < 0.5 s, isolated in frontal or vertex regions, with unclear morphology. DS act as challenging negative or weakly positive examples. They train the network to reject artifacts and ambiguous oscillations, reflecting the complexity of real-world EEG recordings, particularly in epilepsy. Balanced sampling of these categories across training batches prevents overrepresentation of any one class and improves gradient stability.
2.5. EEG Data Sets Containing Sleep Spindles
2.6. The Montreal Archive of Sleep Studies (MASS)
3. Methodology
3.1. Data Preprocessing for Sleep Spindle Analysis
3.2. Sleep Spindle Characteristics
3.3. Performance of DNN Architectures on Pathological Spindles
3.3.1. SlumberNet Architecture
3.3.2. U-Net Architecture
3.4. Sleep EEG Event Detector
3.5. Training Process and Evaluation Metrics
3.5.1. Segmentation-Based vs. Segmentation-Free Approaches
- Segmentation-based approach: Sleep spindles were first detected using DNN models in a sequence labeling framework, where each EEG time point was classified as spindle or non-spindle. Spindle characteristics were then computed from the resulting segmentation.
- Segmentation-free approach: Spindle characteristics were predicted directly from raw EEG segments using regression models, without an intermediate segmentation step.
3.5.2. Loss Functions
3.5.3. Evaluation Metrics
3.5.4. Hyperparameter Optimization
4. Results
4.1. Comparison of DL Architectures for Sleep Spindle Segmentation
4.2. Comparison of Segmentation-Based and Segmentation-Free Approaches
4.2.1. Distribution Analysis
4.2.2. Prediction Accuracy
4.2.3. Error Analysis
4.3. Alterations in Sleep Spindle Properties in Established Epilepsy
5. Discussion
5.1. Clinical Model Selection Framework
- High-Precision Option (e.g., SEED): Prioritizes minimizing false positives. This is advantageous in diagnostic contexts, where misclassifying epileptiform discharges or noise as spindles can corrupt biomarker quantification and lead to misleading conclusions. In this setting, SEED provides high confidence in detected spindles.
- High-Recall Option (e.g., 1D U-Net): Prioritizes capturing all true spindles, tolerating more false positives. This is valuable for screening or longitudinal monitoring, where the cost of missing altered spindle activity outweighs the burden of reviewing additional candidate events.
5.2. Synthesis of Challenges and Contributions
- Limited annotated clinical data. We mitigate this barrier by introducing a curated dataset of sleep spindles in pediatric epilepsy, showing that DNNs remain effective despite pathological spindle morphology. This resource provides a foundation for future model development and benchmarking in clinical populations.
- Building reliable clinical pipelines. We demonstrate and validate robust spindle segmentation as a key pipeline component. Automating this step reduces expert workload, improves reproducibility, and enables integration of spindle analysis into diagnostic and monitoring workflows.
5.3. Interpretability of the Models’ Outcomes
5.4. The Critical Data Gap in Epilepsy Sleep Research
6. Conclusions and Future Directions
- (i)
- Dataset Expansion: Curating a larger, multi-center dataset encompassing diverse epilepsy syndromes and age groups to enhance model generalizability and robustness.
- (ii)
- Clinical Translation: Developing real-time detection algorithms and integrating spindle analysis with other EEG biomarkers (e.g., slow waves, epileptiform discharges) into a unified clinical dashboard to aid diagnosis and monitor therapy response.
- (iii)
- Validation: The essential next step towards clinical implementation is a rigorous external validation of our models and proposed pipeline on a completely independent patient cohort to confirm their efficacy and reliability.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Loomis, A.L.; Harvey, E.N.; Hobart, G. Potential rhythms of the cerebral cortex during sleep. Science 1935, 81, 597–598. [Google Scholar] [CrossRef]
- Fernandez, L.M.; Lüthi, A. Sleep spindles: Mechanisms and functions. Physiol. Rev. 2020, 100, 805–868. [Google Scholar] [CrossRef] [PubMed]
- Schönauer, M.; Pöhlchen, D. Sleep spindles. Curr. Biol. 2018, 28, R1129–R1130. [Google Scholar] [CrossRef] [PubMed]
- Schabus, M.; Hoedlmoser, K.; Pecherstorfer, T.; Anderer, P.; Gruber, G.; Parapatics, S.; Sauter, C.; Kloesch, G.; Klimesch, W.; Saletu, B.; et al. Interindividual sleep spindle differences and their relation to learning-related enhancements. Brain Res. 2008, 1191, 127–135. [Google Scholar] [CrossRef]
- Kumral, D.; Matzerath, A.; Leonhart, R.; Schönauer, M. Spindle-dependent memory consolidation in healthy adults: A meta-analysis. Neuropsychologia 2023, 189, 108661. [Google Scholar] [CrossRef]
- Staresina, B.P. Coupled sleep rhythms for memory consolidation. Trends Cogn. Sci. 2024, 28, 339–351. [Google Scholar] [CrossRef]
- Dehnavi, F.; Koo-Poeggel, P.C.; Ghorbani, M.; Marshall, L. Memory ability and retention performance relate differentially to sleep depth and spindle type. iScience 2023, 26, 108154. [Google Scholar] [CrossRef] [PubMed]
- Hahn, M.; Joechner, A.K.; Roell, J.; Schabus, M.; Heib, D.P.; Gruber, G.; Peigneux, P.; Hoedlmoser, K. Developmental changes of sleep spindles and their impact on sleep-dependent memory consolidation and general cognitive abilities: A longitudinal approach. Dev. Sci. 2019, 22, e12706. [Google Scholar] [CrossRef]
- Champetier, P.; André, C.; Weber, F.D.; Rehel, S.; Ourry, V.; Laniepce, A.; Lutz, A.; Bertran, F.; Cabé, N.; Pitel, A.L.; et al. Age-related changes in fast spindle clustering during non-rapid eye movement sleep and their relevance for memory consolidation. Sleep 2023, 46, zsac282. [Google Scholar] [CrossRef]
- Sheybani, L.; Frauscher, B.; Bernard, C.; Walker, M.C. Mechanistic insights into the interaction between epilepsy and sleep. Nat. Rev. Neurol. 2025, 21, 177–192. [Google Scholar] [CrossRef]
- Abdelaal, M.S.; Kato, T.; Natsubori, A.; Tanaka, K.F. Temporal and potential predictive relationships between sleep spindle density and spike-and-wave discharges. Eneuro 2024, 11, 1–16. [Google Scholar] [CrossRef] [PubMed]
- Hirsch, E.; French, J.; Scheffer, I.E.; Bogacz, A.; Alsaadi, T.; Sperling, M.R.; Abdulla, F.; Zuberi, S.M.; Trinka, E.; Specchio, N.; et al. ILAE definition of the idiopathic generalized epilepsy syndromes: Position statement by the ILAE task force on nosology and definitions. Epilepsia 2022, 63, 1475–1499. [Google Scholar] [CrossRef]
- Kramer, M.A.; Stoyell, S.M.; Chinappen, D.; Ostrowski, L.M.; Spencer, E.R.; Morgan, A.K.; Emerton, B.C.; Jing, J.; Westover, M.B.; Eden, U.T.; et al. Focal sleep spindle deficits reveal focal thalamocortical dysfunction and predict cognitive deficits in sleep activated developmental epilepsy. J. Neurosci. 2021, 41, 1816–1829. [Google Scholar] [CrossRef]
- Roebber, J.K.; Lewis, P.A.; Crunelli, V.; Navarrete, M.; Hamandi, K. Effects of anti-seizure medication on sleep spindles and slow waves in drug-resistant epilepsy. Brain Sci. 2022, 12, 1288. [Google Scholar] [CrossRef]
- Bernard, C.; Frauscher, B.; Gelinas, J.; Timofeev, I. Sleep, oscillations, and epilepsy. Epilepsia 2023, 64, S3–S12. [Google Scholar] [CrossRef] [PubMed]
- Gonzalez, C.; Jiang, X.; Gonzalez-Martinez, J.; Halgren, E. Human spindle variability. J. Neurosci. 2022, 42, 4517–4537. [Google Scholar] [CrossRef] [PubMed]
- Ujma, P.P. Sleep spindles and general cognitive ability—A meta-analysis. Sleep Spindl. Cortical States 2021, 2, 1–17. [Google Scholar] [CrossRef]
- Zou, C.; Wang, Z.; Xiao, K.; Hu, X.; Wu, D.; Luo, B.; Min, R. Plastic Optical Fiber with Spherical Lens Embedded in Mattress for Sleep Monitoring. IEEE Sens. J. 2025, 25, 17144–17152. [Google Scholar] [CrossRef]
- Bukhari, M.A.A.; Alghtani, M.A.M.; Aljohani, Z.; Qasem, A.; Alhazmi, I. Diagnosis and treatment of sleep disorders: A brief review. Int. J. Med. Dev. Ctries. 2021, 5, 364–369. [Google Scholar] [CrossRef]
- Huang, J.; Ren, L.; Feng, L.; Yang, F.; Yang, L.; Yan, K. AI empowered virtual reality integrated systems for sleep stage classification and quality enhancement. IEEE Trans. Neural Syst. Rehabil. Eng. 2022, 30, 1494–1503. [Google Scholar] [CrossRef]
- Redline, S.; Purcell, S.M. Sleep and Big Data: Harnessing data, technology, and analytics for monitoring sleep and improving diagnostics, prediction, and interventions—An era for Sleep-Omics? Sleep 2021, 44, zsab107. [Google Scholar] [CrossRef]
- Cay, G.; Ravichandran, V.; Sadhu, S.; Zisk, A.H.; Salisbury, A.L.; Solanki, D.; Mankodiya, K. Recent advancement in sleep technologies: A literature review on clinical standards, sensors, apps, and AI methods. IEEE Access 2022, 10, 104737–104756. [Google Scholar] [CrossRef]
- Al-Salman, W.; Li, Y.; Wen, P. Detecting sleep spindles in EEGs using wavelet fourier analysis and statistical features. Biomed. Signal Process. Control 2019, 48, 80–92. [Google Scholar] [CrossRef]
- Tsanas, A.; Clifford, G.D. Stage-independent, single lead EEG sleep spindle detection using the continuous wavelet transform and local weighted smoothing. Front. Hum. Neurosci. 2015, 9, 181. [Google Scholar] [CrossRef] [PubMed]
- Adamczyk, M.; Genzel, L.; Dresler, M.; Steiger, A.; Friess, E. Automatic sleep spindle detection and genetic influence estimation using continuous wavelet transform. Front. Hum. Neurosci. 2015, 9, 624. [Google Scholar] [CrossRef]
- Sitnikova, E.; Hramov, A.E.; Koronovsky, A.A.; van Luijtelaar, G. Sleep spindles and spike–wave discharges in EEG: Their generic features, similarities and distinctions disclosed with Fourier transform and continuous wavelet analysis. J. Neurosci. Methods 2009, 180, 304–316. [Google Scholar] [CrossRef] [PubMed]
- Zhuang, X.; Li, Y.; Peng, N. Enhanced automatic sleep spindle detection: A sliding window-based wavelet analysis and comparison using a proposal assessment method. Appl. Inform. 2016, 3, 11. [Google Scholar]
- Zhou, S.; Zhang, X.; Yu, Z. A sleep spindle detection algorithm based on SVM and WT. In Proceedings of the 2017 29th Chinese Control and Decision Conference (CCDC), Chongqing, China, 28–30 May 2017; pp. 2213–2217. [Google Scholar]
- Hekmatmanesh, A.; Mikaeili, M.; Sadeghniiat-Haghighi, K.; Wu, H.; Handroos, H.; Martinek, R.; Nazeran, H. Sleep spindle detection and prediction using a mixture of time series and chaotic features. Adv. Electr. Electron. Eng. 2017, 15, 435–447. [Google Scholar] [CrossRef]
- Duman, F.; Erdamar, A.; Erogul, O.; Telatar, Z.; Yetkin, S. Efficient sleep spindle detection algorithm with decision tree. Expert Syst. Appl. 2009, 36, 9980–9985. [Google Scholar] [CrossRef]
- Jiang, D.; Ma, Y.; Wang, Y. A robust two-stage sleep spindle detection approach using single-channel EEG. J. Neural Eng. 2021, 18, 026026. [Google Scholar] [CrossRef]
- Bhattacharyya, S.; Ghoshal, S.; Biswas, A.; Mukhopadhyay, J.; Majumdar, A.K.; Majumdar, B.; Mukherjee, S.; Singh, A.K. Automatic sleep spindle detection in raw EEG signal of newborn babies. In Proceedings of the 2011 3rd International Conference on Electronics Computer Technology, Kanyakumari, India, 8–10 April 2011; Volume 1, pp. 73–77. [Google Scholar]
- Wei, L.; Ventura, S.; Lowery, M.; Ryan, M.A.; Mathieson, S.; Boylan, G.B.; Mooney, C. Random forest-based algorithm for sleep spindle detection in infant EEG. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; pp. 58–61. [Google Scholar]
- Wei, L.; Ventura, S.; Mathieson, S.; Boylan, G.B.; Lowery, M.; Mooney, C. Spindle-AI: Sleep spindle number and duration estimation in infant EEG. IEEE Trans. Biomed. Eng. 2021, 69, 465–474. [Google Scholar] [CrossRef]
- Yasuhara, N.; Natori, T.; Hayashi, M.; Aikawa, N. A study on automatic detection of sleep spindles using a long short-term memory network. In Proceedings of the 2019 IEEE 62nd International Midwest Symposium on Circuits and Systems (MWSCAS), Dallas, TX, USA, 4–7 August 2019; pp. 45–48. [Google Scholar]
- Kulkarni, P.M.; Xiao, Z.; Robinson, E.J.; Jami, A.S.; Zhang, J.; Zhou, H.; Henin, S.E.; Liu, A.A.; Osorio, R.S.; Wang, J.; et al. A deep learning approach for real-time detection of sleep spindles. J. Neural Eng. 2019, 16, 036004. [Google Scholar] [CrossRef] [PubMed]
- Tan, D.; Zhao, R.; Sun, J.; Qin, W. Sleep spindle detection using deep learning: A validation study based on crowdsourcing. In Proceedings of the 2015 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Milan, Italy, 25–29 August 2015; pp. 2828–2831. [Google Scholar]
- Devuyst, S.; Dutoit, T.; Stenuit, P.; Kerkhofs, M. Automatic sleep spindles detection—overview and development of a standard proposal assessment method. In Proceedings of the 2011 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Boston, MA, USA, 30 August–3 September 2011; pp. 1713–1716. [Google Scholar]
- Quan, S.F.; Howard, B.V.; Iber, C.; Kiley, J.P.; Nieto, F.J.; O’Connor, G.T.; Rapoport, D.M.; Redline, S.; Robbins, J.; Samet, J.M.; et al. The sleep heart health study: Design, rationale, and methods. Sleep 1997, 20, 1077–1085. [Google Scholar] [CrossRef]
- Kemp, B.; Zwinderman, A.H.; Tuk, B.; Kamphuisen, H.A.; Oberye, J.J. Analysis of a sleep-dependent neuronal feedback loop: The slow-wave microcontinuity of the EEG. IEEE Trans. Biomed. Eng. 2000, 47, 1185–1194. [Google Scholar] [CrossRef]
- Sun, C.; Jing, J.; Turley, N.; Alcott, C.; Kang, W.Y.; Cole, A.J.; Goldenholz, D.M.; Lam, A.; Amorim, E.; Chu, C.; et al. Harvard Electroencephalography Database: A comprehensive clinical electroencephalographic resource from four Boston hospitals. Epilepsia 2025, 66, 3411–3425. [Google Scholar] [CrossRef]
- O’reilly, C.; Gosselin, N.; Carrier, J.; Nielsen, T. Montreal Archive of Sleep Studies: An open-access resource for instrument benchmarking and exploratory research. J. Sleep Res. 2014, 23, 628–635. [Google Scholar] [CrossRef]
- Coppieters’t Wallant, D.; Maquet, P.; Phillips, C. Sleep spindles as an electrographic element: Description and automatic detection methods. Neural Plast. 2016, 2016, 6783812. [Google Scholar] [CrossRef]
- Schiller, K.; Avigdor, T.; Abdallah, C.; Sziklas, V.; Crane, J.; Stefani, A.; Peter-Derex, L.; Frauscher, B. Focal epilepsy disrupts spindle structure and function. Sci. Rep. 2022, 12, 11137. [Google Scholar] [CrossRef]
- Bandarabadi, M.; Herrera, C.; Gent, T.; Bassetti, C.; Schindler, K.; Adamantidis, A. A role for spindles in the onset of rapid eye movement sleep. Nat. Commun. 2020, 11, 5247. [Google Scholar] [CrossRef] [PubMed]
- You, J.; Jiang, D.; Ma, Y.; Wang, Y. SpindleU-Net: An adaptive u-net framework for sleep spindle detection in single-channel EEG. IEEE Trans. Neural Syst. Rehabil. Eng. 2021, 29, 1614–1623. [Google Scholar] [CrossRef] [PubMed]
- Fraiwan, M.; Khasawneh, N. Visual identification of sleep spindles in EEG waveform images using deep learning object detection (YOLOv4 vs. YOLOX). Clust. Comput. 2024, 27, 13607–13620. [Google Scholar] [CrossRef]
- Jha, P.K.; Valekunja, U.K.; Reddy, A.B. SlumberNet: Deep learning classification of sleep stages using residual neural networks. Sci. Rep. 2024, 14, 4797. [Google Scholar] [CrossRef] [PubMed]
- Tapia-Rivas, N.I.; Estévez, P.A.; Cortes-Briones, J.A. A robust deep learning detector for sleep spindles and K-complexes: Towards population norms. Sci. Rep. 2024, 14, 263. [Google Scholar] [CrossRef]
- Lacourse, K.; Yetton, B.; Mednick, S.; Warby, S.C. Massive online data annotation, crowdsourcing to generate high quality sleep spindle annotations from EEG data. Sci. Data 2020, 7, 190. [Google Scholar] [CrossRef] [PubMed]
- Chambon, S.; Thorey, V.; Arnal, P.J.; Mignot, E.; Gramfort, A. DOSED: A deep learning approach to detect multiple sleep micro-events in EEG signal. J. Neurosci. Methods 2019, 321, 64–78. [Google Scholar] [CrossRef]
- Tapia, N.I.; Estévez, P.A. RED: Deep recurrent neural networks for sleep EEG event detection. In Proceedings of the 2020 International Joint Conference on Neural Networks (IJCNN), Glasgow, UK, 19–24 July 2020; pp. 1–8. [Google Scholar]
- Kaulen, L.; Schwabedal, J.T.; Schneider, J.; Ritter, P.; Bialonski, S. SUMO: Advanced sleep spindle identification with neural networks. arXiv 2022, arXiv:2202.05158. [Google Scholar]













| Indicator | Description |
|---|---|
| Total Participants | 24 individuals (12 epilepsy patients, 12 healthy controls) |
| Age Statistics | Median age: 7.5 years, Range: 2–12 years |
| Age Cohorts |
|
| EEG System | NeuroScope system (Russia) with 10–20 electrodes placement |
| Montage Types | Bipolar and monopolar (referential) montages |
| Sweep Speed | 30 mm/s |
| Sensitivity | 7–15 μV/mm |
| Low-frequency Cutoff | 0.5 Hz |
| High-frequency Cutoff | 70 Hz |
| Notch Filter | 50 Hz (to suppress power-line interference) |
| Sleep Stage Analyzed | 10-min segments of stage N2 non-REM sleep |
| Spindle Frequency Range | 9–15 Hz in fronto-central and vertex regions |
| Annotation Protocol | Independent review by two EEG experts (>5 years experience) with consensus-based boundary determination |
| Definite Spindles (SP) | Amplitude ≥ 20 μV, duration ≥ 1 s, located in fronto-central and vertex regions |
| Probable Spindles (PS) | Amplitude < 20 μV, duration ≥ 0.5 s, located in vertex and partially fronto-temporal regions |
| Dubious Spindles (DS) | Amplitude 10–15 μV or duration < 0.5 s, isolated in frontal or vertex regions, with unclear morphology |
| Preprocessing | Automatic preprocessing using NeuroScope software with standardized filtering and artifact reduction procedures |
| Data Quality | Ensured signal quality and consistency across recordings |
| SEED | U-Net | |
|---|---|---|
| Precision | ||
| Recall | ||
| F1-score |
| SEED | U-Net | |
|---|---|---|
| Precision | ||
| Recall | ||
| F1-score |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gromov, N.V.; Lebedeva, A.V.; Sharkov, A.A.; Grebenyukova, A.D.; Malkov, A.E.; Gerasimova, S.A.; Smirnov, L.A.; Levanova, T.A.; Pisarchik, A.N. Automated Sleep Spindle Analysis in Epilepsy EEG Using Deep Learning. Technologies 2025, 13, 524. https://doi.org/10.3390/technologies13110524
Gromov NV, Lebedeva AV, Sharkov AA, Grebenyukova AD, Malkov AE, Gerasimova SA, Smirnov LA, Levanova TA, Pisarchik AN. Automated Sleep Spindle Analysis in Epilepsy EEG Using Deep Learning. Technologies. 2025; 13(11):524. https://doi.org/10.3390/technologies13110524
Chicago/Turabian StyleGromov, Nikolay V., Albina V. Lebedeva, Artem A. Sharkov, Anna D. Grebenyukova, Anton E. Malkov, Svetlana A. Gerasimova, Lev A. Smirnov, Tatiana A. Levanova, and Alexander N. Pisarchik. 2025. "Automated Sleep Spindle Analysis in Epilepsy EEG Using Deep Learning" Technologies 13, no. 11: 524. https://doi.org/10.3390/technologies13110524
APA StyleGromov, N. V., Lebedeva, A. V., Sharkov, A. A., Grebenyukova, A. D., Malkov, A. E., Gerasimova, S. A., Smirnov, L. A., Levanova, T. A., & Pisarchik, A. N. (2025). Automated Sleep Spindle Analysis in Epilepsy EEG Using Deep Learning. Technologies, 13(11), 524. https://doi.org/10.3390/technologies13110524

