基于因果历史上下文的轻量级睡眠分期方法
A Lightweight Sleep Staging Method Based on Causal Historical Context
摘要: 针对轻量级单片段睡眠分期难以充分利用跨片段历史信息,以及部分序列模型在连续预测过程中依赖未来上下文的问题,提出一种基于因果历史上下文的轻量级睡眠分期方法MSA-TC-Lite。该方法冻结MSA-CNN small的局部特征编码路径,将当前片段与此前9个片段构成单向历史窗口,并利用轻量时序模块建模历史依赖;连续推理时通过缓存历史特征减少重复编码。在Sleep-EDF-20上采用受试者级十折交叉验证,MSA-TC-Lite在41,957个具有完整历史上下文的测试片段上取得83.89%的Accuracy和78.15%的Macro-F1,较MSA-CNN small分别提高2.18和4.77个百分点,其中N1和REM的F1分别提高14.88和6.50个百分点。No-History对照和历史上下文扰动结果进一步表明,性能改善与真实历史内容及其时间排列的利用具有较一致的关联。缓存式连续推理将稳态计算量由12.164 M MACs降低至1.319 M MACs。结果表明,该方法能够在不使用未来信息的条件下改善轻量级睡眠分期性能,并减少连续推理过程中的重复计算。
Abstract: To address the difficulty of lightweight single-epoch sleep staging in fully exploiting cross-epoch historical information and the reliance of some sequence-based models on future context during continuous prediction, a lightweight sleep staging method based on causal historical context, termed MSA-TC-Lite, is proposed. The method freezes the local feature encoding pathway of MSA-CNN small and constructs a unidirectional historical window consisting of the current epoch and the preceding nine epochs. A lightweight temporal module is then used to model dependencies across historical representations. During continuous inference, previously computed historical features are cached to avoid repeated encoding. Subject-wise ten-fold cross-validation was conducted on Sleep-EDF-20. On 41,957 test epochs with complete historical context, MSA-TC-Lite achieved an Accuracy of 83.89% and a Macro-F1 of 78.15%, outperforming MSA-CNN small by 2.18 and 4.77 percentage points, respectively. The F1 scores of N1 and REM increased by 14.88 and 6.50 percentage points. The No-History control and historical-context perturbation analyses further showed that the performance improvement was consistently associated with the use of real historical content and its temporal arrangement. Cached continuous inference reduced the steady-state computational cost from 12.164 M MACs to 1.319 M MACs. These results indicate that MSA-TC-Lite improves lightweight sleep staging without using future information while reducing redundant computation during continuous inference.
文章引用:邓博恺. 基于因果历史上下文的轻量级睡眠分期方法[J]. 计算机科学与应用, 2026, 16(9): 1-13. https://doi.org/10.12677/csa.2026.169284

参考文献

[1] Silber, M.H., Ancoli-Israel, S., Bonnet, M.H., Chokroverty, S., Grigg-Damberger, M.M., Hirshkowitz, M., et al. (2007) The Visual Scoring of Sleep in Adults. Journal of Clinical Sleep Medicine, 3, 121-131.
https://doi.org/10.5664/jcsm.26814
[2] Yue, H., Chen, Z., Guo, W., Sun, L., Dai, Y., Wang, Y., et al. (2024) Research and Application of Deep Learning-Based Sleep Staging: Data, Modeling, Validation, and Clinical Practice. Sleep Medicine Reviews, 74, Article ID: 101897.
https://doi.org/10.1016/j.smrv.2024.101897
[3] Liu, P., Qian, W., Zhang, H., Zhu, Y., Hong, Q., Li, Q., et al. (2024) Automatic Sleep Stage Classification Using Deep Learning: Signals, Data Representation, and Neural Networks. Artificial Intelligence Review, 57, Article No. 301.
https://doi.org/10.1007/s10462-024-10926-9
[4] Supratak, A. and Guo, Y. (2020) TinySleepNet: An Efficient Deep Learning Model for Sleep Stage Scoring Based on Raw Single-Channel EEG. 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, 20-24 July 2020, 641-644.
https://doi.org/10.1109/embc44109.2020.9176741
[5] Fiorillo, L., Favaro, P. and Faraci, F.D. (2021) DeepSleepNet-Lite: A Simplified Automatic Sleep Stage Scoring Model with Uncertainty Estimates. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 29, 2076-2085.
https://doi.org/10.1109/tnsre.2021.3117970
[6] Ito, A. and Tanaka, T. (2025) SleepSatelightFTC: A Lightweight and Interpretable Deep Learning Model for Single-Channel EEG-Based Sleep Stage Classification. IEEE Access, 13, 46263-46272.
https://doi.org/10.1109/access.2025.3549436
[7] Wang, F., Zheng, Z., Hu, B., Yang, X., Tang, M. and Huang, H. (2025) EfficientSleepNet: A Novel Lightweight End-To-End Model for Automated Sleep Staging on Single-Channel EEG. ICASSP 2025-2025 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Hyderabad, 6-11 April 2025, 641-644.
https://doi.org/10.1109/icassp49660.2025.10889937
[8] Goerttler, S., Wang, Y., Eldele, E., He, F. and Wu, M. (2026) MSA-CNN: A Lightweight Multi-Scale CNN with Attention for Sleep Stage Classification. Biomedical Signal Processing and Control, 120, Article ID:110141.
https://doi.org/10.1016/j.bspc.2026.110141
[9] Supratak, A., Dong, H., Wu, C. and Guo, Y. (2017) DeepSleepNet: A Model for Automatic Sleep Stage Scoring Based on Raw Single-Channel EEG. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 25, 1998-2008.
https://doi.org/10.1109/tnsre.2017.2721116
[10] Phan, H., Andreotti, F., Cooray, N., Chén, O.Y. and De Vos, M. (2019) SeqSleepNet: End-to-End Hierarchical Recurrent Neural Network for Sequence-to-Sequence Automatic Sleep Staging. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 27, 400-410.
https://doi.org/10.1109/tnsre.2019.2896659
[11] Phan, H., Lorenzen, K.P., Heremans, E., Chén, O.Y., Tran, M.C., Koch, P., et al. (2023) L-SeqSleepNet: Whole-Cycle Long Sequence Modeling for Automatic Sleep Staging. IEEE Journal of Biomedical and Health Informatics, 27, 4748-4757.
https://doi.org/10.1109/jbhi.2023.3303197
[12] Chambon, S., Galtier, M.N., Arnal, P.J., Wainrib, G. and Gramfort, A. (2018) A Deep Learning Architecture for Temporal Sleep Stage Classification Using Multivariate and Multimodal Time Series. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 26, 758-769.
https://doi.org/10.1109/tnsre.2018.2813138
[13] Eldele, E., Chen, Z., Liu, C., Wu, M., Kwoh, C., Li, X., et al. (2021) An Attention-Based Deep Learning Approach for Sleep Stage Classification with Single-Channel EEG. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 29, 809-818.
https://doi.org/10.1109/tnsre.2021.3076234
[14] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A.N., Kaiser, Ł. and Polosukhin, I. (2017) Attention Is All You Need. Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, 4-9 December 2017, 6000-6010.
[15] Phan, H., Mikkelsen, K., Chén, O.Y., Koch, P., Mertins, A. and De Vos, M. (2022) SleepTransformer: Automatic Sleep Staging with Interpretability and Uncertainty Quantification. IEEE Transactions on Biomedical Engineering, 69, 2456-2467.
https://doi.org/10.1109/tbme.2022.3147187
[16] Phyo, J., Ko, W., Jeon, E. and Suk, H.I. (2023) TransSleep: Transitioning-Aware Attention-Based Deep Neural Network for Sleep Staging. IEEE Transactions on Cybernetics, 53, 4500-4510.
https://doi.org/10.1109/tcyb.2022.3198997
[17] Chen, Z., Yang, Z., Zhu, L., Chen, W., Tamura, T., Ono, N., et al. (2023) Automated Sleep Staging via Parallel Frequency-Cut Attention. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 31, 1974-1985.
https://doi.org/10.1109/tnsre.2023.3243589
[18] Guo, Y., Nowakowski, M. and Dai, W. (2024) FlexSleepTransformer: A Transformer-Based Sleep Staging Model with Flexible Input Channel Configurations. Scientific Reports, 14, Article No. 26312.
https://doi.org/10.1038/s41598-024-76197-0
[19] Kemp, B., Zwinderman, A.H., Tuk, B., Kamphuisen, H.A.C. and Oberyé, J.J.L. (2000) Analysis of a Sleep-Dependent Neuronal Feedback Loop: The Slow-Wave Microcontinuity of the EEG. IEEE Transactions on Biomedical Engineering, 47, 1185-1194.
https://doi.org/10.1109/10.867928
[20] Kemp, B. (2013) Sleep-EDF Database Expanded, Version 1.0.0.
https://physionet.org/content/sleep-edfx/1.0.0/
[21] Rechtschaffen, A. and Kales, A. (1968) A Manual of Standardized Terminology, Techniques and Scoring System for Sleep Stages of Human Subjects. U.S. Government Printing Office.