ENVIRONMENT AND TECHNOLOGIES

Interpreted EEG-based sleep staging model with explanation of decisions using attention maps and analysis of physiological patterns of sleep spindles and K-complexes

Authors

  • Chuangyi Zhang Henan University of Science and Technology, 263 Kaiyuan Ave, Jianxi District, Luoyang, Henan, 471023, China

How to cite

GOST Zhang C. Interpreted EEG-based sleep staging model with explanation of decisions using attention maps and analysis of physiological patterns of sleep spindles and K-complexes // Environmental Management Issues. 2026. Vol. 5. No. 1. P. 10-20. DOI: 10.25726/v5847-2945-3820-j
APA Zhang, C. (2026). Interpreted EEG-based sleep staging model with explanation of decisions using attention maps and analysis of physiological patterns of sleep spindles and K-complexes. Environmental Management Issues, 5(1), 10-20. https://doi.org/10.25726/v5847-2945-3820-j

Abstract

The developed interpretable neural network architecture for automatic sleep staging from electroencephalography signals integrates a convolutional encoder with a two-level multi-head attention mechanism. This ensures both high classification accuracy for the five sleep stages and the ability to visualize and quantitatively analyze the foundations of decision-making through attention maps. The model's internal representations, extracted in the form of attention maps at the intra-epoch and inter-epoch levels, demonstrate a pronounced specialization of individual attention heads in relation to the key physiological graphoelements of stage N2: the third head exhibits more than a threefold increase in the normalized energy contribution with a mean value of 3.561 in the vicinity of sleep spindles, which are characterized by oscillations in the 11-16 Hz range, while the first head demonstrates predominant sensitivity to K-complexes with biphasic morphology and a mean contribution of 3.214. This is confirmed by functional dissociation and the statistical significance of the results. Quantitative indicators of consistency between the attention maps and expert-verified positions of these patterns, including an integral measure of exceeding the baseline attention level by a factor of 3.388, sensitivity of 0.741, and specificity of 0.823 for spindles under threshold binarization, indicate that classification relies directly on physiologically grounded features that correspond to the neurophysiological mechanisms underlying the generation of these graphoelements. The inter-epoch attention component reproduces known macrostructural sleep patterns, revealing variable contextual dependence of stages – from a minimal effective context width of 3.12 epochs and a high proportion of attention to the current epoch for N3 to a maximal width of 7.81 epochs with pronounced asymmetry toward preceding epochs for N1 – which precisely reflects clinical practice in differential diagnosis. The overall classification quality metrics on a large array of recordings reach a macro-averaged F1-score of 0.808 and an overall accuracy of 0.876, with the expected reduction in metrics for stage N1 due to its transitional character and class imbalance. The high reproducibility of the identified patterns of attention head specialization across multiple training runs with different initial conditions, a moderate Spearman correlation of 0.437 between spindle amplitude and combined attention contribution, and the stability of results within cross-validation confirm the structural isomorphism between the model's internal mechanisms and expert somnological knowledge. This level of transparency and verifiability of decisions meets stringent regulatory requirements for software as a medical device, opening prospects for integration into decision support systems in sleep laboratories, application in telemedicine conditions for remote monitoring, and the use of binarized attention maps as an auxiliary tool for semi-automatic detection and annotation of physiological events associated with cognitive health assessment. The proposed approach to the quantitative assessment of interpretability through normalized energy contribution and correlation analysis with physiological annotations establishes a methodological basis for standardizing artificial intelligence validation in biomedical time series analysis tasks, substantially increasing confidence in automated tools in neurophysiology and related fields of clinical medicine.

Keywords

sleep staging EEG attention maps sleep spindles K complexes

References

Avakumov S.V. Physiology and psychology of dreams // Effective pharmacotherapy. 2013. № 12. pp. 16-21.

Vasiliev E.N., Uryvaev Yu.V. The relationship of rapid changes in the individual subrange of electroencephalogram waves and cardiac rhythm during sleep // Human рhysiology. 2006. Vol. 32. № 4. pp. 18-23.

Verbitsky E.V., Poluektov M.G. Energy processes in the sleep-wake cycle // Korsakov journal of neurology and psychiatry. 2025. Vol. 125. № 5-2. pp. 8-13.

Golovatyuk A.O., Poluektov M.G. Sleep on request // Effective pharmacotherapy. 2022. Vol. 18. № 36. pp. 70-77.

Gruzdeva S.S., Petrenko N.E., Cheremushkin E.A., Dorokhov V.B. An experimental model of consciousness in the sleep-wake paradigm: determining the moment of consciousness activation upon awakening based on electromyogram and button pressing // Cognitive science in Moscow: new research: conf. proceed. M., 2019. pp. 593-597

Dementienko V.V., Dorokhov V.B., Gerus S.V., Koreneva L.G., Markov A.G., Shakhnarovich V.M. A biomathematic model of the human operator falling asleep process // Human рhysiology. 2008. Vol. 34. № 5. pp. 63-72.

Machikhin V.A., Nikolskaya Yu.V., Antipova T.A. and others. To compare the speed and accuracy of fractal methods of deterministic chaos recognition of sleep stages by a somnographic device // VI scien. forum telecommunications: theory and technologies TTT-2023: mat. of the XX Inter. scien. and tech. conf. Kazan, 2023. pp. 20-22.

Mozgovoy V.V., Somova A.A., Cherkasov B.V., Smirnov V.K. Modeling of an intelligent device for determining the human REM sleep phase // Application and development of neural network modeling for solving fundamental problems in science and technology: proceedings of the International Youth Scientific and Practical Conference. 2018. pp. 180-185.

Pigarev I.N., Pigareva M.L. The progress of sleep research in the era of electrophysiology. Visceral theory of sleep // S.S. Korsakov journal of neurology and psychiatry. 2018. Vol. 118. № 4-2. pp. 5-13.

Pigarev I.N., Pigareva M.L. Sleep, emotions and visceral control // Human physiology. 2013. Vol. 39. № 6. pp. 31-44.

Putilov A.A., Verevkin E.G. Generalized model of three processes of cyclic regulation of sleep wakefulness // Bulletin of Siberian medicine. 2013. Vol. 12. № 2. pp. 266-274.

Putilov A.A. Three stages of slow sleep: chronophysiological reality or just a conditional division of the process of gradual deepening of sleep? // Effective pharmacotherapy. 2015. № 53. pp. 6-15.

Skibitskaya N.Y., Khokhlov E.S., Martynov I.A. Construction and analysis of a mathematical model of factors affecting sleep disorders // Analytical and numerical methods of modeling natural science and social problems (AHM-2023): mat. of the XVIII All-Rus. scien. and tech. сonf. Penza, 2023. Vol. 2. pp. 150-154.

Shepovalnikov A.N. Reflection of the activity of neurophysiological mechanisms of sleep stage switching in the organization of interregional connections of neocortical biopotentials: research report (grant No. 10-06-01000). M.: Russian Humanitarian Scientific Foundation, 2010. 45 p.

Issue

Section

ENVIRONMENT AND TECHNOLOGIES
Want to publish with us?
Submit an article

Machine-readable metadata

Similar Articles

You may also start an advanced similarity search for this article.