基于知识蒸馏的轻量化睡眠分期模型研究
Research on a Lightweight Sleep Staging Model Based on Knowledge Distillation
摘要: 面向大规模睡眠模型难以在资源受限环境部署以及轻量模型特征表示能力不足的问题,本文提出一种基于知识蒸馏的轻量化睡眠分期方法,实现大规模睡眠模型向轻量网络的知识迁移。该方法以SleepGPT作为教师模型,将教师模型输出的软标签知识迁移至轻量学生网络SpectralContextSleepNet,通过教师软目标指导学生模型训练,在降低模型复杂度的同时提升轻量模型的睡眠阶段判别能力。本文在Sleep-EDF SC数据集上开展实验,从睡眠分期性能和模型复杂度两个方面对所提出方法进行评估。实验结果表明,基于知识蒸馏训练的轻量学生模型相比直接训练的轻量学生模型获得更优的睡眠分期性能,并在保持有效分类能力的基础上显著降低模型计算和存储开销。其中,学生模型包含1,048,725个参数,相比教师模型参数量降低约130倍,表明知识蒸馏在大规模睡眠模型轻量化迁移中具有应用潜力。本文方法通过利用大规模睡眠模型中的软标签知识增强轻量网络分类能力,在模型性能与计算效率之间取得较好的平衡,为构建高效、轻量化自动睡眠分期模型提供了一种可行方案。
Abstract: Large-scale sleep models face challenges in deployment under resource-constrained environments due to their high computational and storage costs, while lightweight models often suffer from limited feature representation capability. To address these issues, this paper proposes a knowledge distillation-based lightweight sleep staging method, which transfers knowledge from a large-scale sleep model to a lightweight network. Specifically, SleepGPT is employed as the teacher model, and the soft-label knowledge generated by the teacher model is transferred to the lightweight student network SpectralContextSleepNet. By optimizing the student model with teacher-guided soft targets, the proposed method improves the sleep-stage discrimination capability of the light-weight model while reducing model complexity. Experiments are conducted on the Sleep-EDF SC dataset to evaluate the proposed method from both sleep staging performance and model complexity perspectives. Experimental results demonstrate that the distilled lightweight student model achieves better sleep staging performance than the directly trained lightweight model while significantly reducing computational and storage costs. The student model contains 1,048,725 parameters, achieving approximately 130× parameter reduction compared with the teacher model, indicating the potential of knowledge distillation for lightweight migration of large-scale sleep models. The proposed method enhances the classification capability of lightweight networks by leveraging soft-label knowledge from large-scale sleep models, achieving a favorable balance between sleep staging performance and computational efficiency. It provides a feasible approach for developing efficient and lightweight automatic sleep staging models.
文章引用:王丹. 基于知识蒸馏的轻量化睡眠分期模型研究[J]. 计算机科学与应用, 2026, 16(9): 74-84. https://doi.org/10.12677/csa.2026.169290

参考文献

[1] Iber, C., Ancoli-Israel, S., Chesson, A.L., et al. (2007) The AASM Manual for the Scoring of Sleep and Associated Events: Rules, Terminology and Technical Specifications. American Academy of Sleep Medicine.
[2] Moser, D., Anderer, P., Gruber, G., Parapatics, S., Loretz, E., Boeck, M., et al. (2009) Sleep Classification According to AASM and Rechtschaffen & Kales: Effects on Sleep Scoring Parameters. Sleep, 32, 139-149.
https://doi.org/10.1093/sleep/32.2.139
[3] 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
[4] Phan, H., Andreotti, F., Cooray, N., Chen, 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
[5] 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
[6] Perslev, M., Darkner, S., Kempfner, L., Nikolic, M., Jennum, P.J. and Igel, C. (2021) U-Sleep: Resilient High-Frequency Sleep Staging. NPJ Digital Medicine, 4, Article No. 72.
https://doi.org/10.1038/s41746-021-00440-5
[7] Han, S., Mao, H. and Dally, W.J. (2016) Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. International Conference on Learning Representations, San Juan, 2-4 May 2016, 1-14.
[8] Kaplan, J., Mccandlish, S., Henighan, T., et al. (2020) Scaling Laws for Neural Language Models.
https://arxiv.org/abs/2001.08361
[9] Huang, W., Wang, Y., Cheng, H., Xu, W., Li, T., Wu, X., et al. (2026) A Unified Time-Frequency Foundation Model for Sleep Decoding. Nature Communications, 17, Article No. 1198.
https://doi.org/10.1038/s41467-025-67970-4
[10] Hinton, G., Vinyals, O. and Dean, J. (2015) Distilling the Knowledge in a Neural Network.
https://arxiv.org/abs/1503.02531
[11] Phan, H., Mikkelsen, K., Chen, 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
[12] Yang, B., Zhu, X., Liu, Y. and Liu, H. (2021) A Single-Channel EEG Based Automatic Sleep Stage Classification Method Leveraging Deep One-Dimensional Convolutional Neural Network and Hidden Markov Model. Biomedical Signal Processing and Control, 68, Article ID: 102581.
https://doi.org/10.1016/j.bspc.2021.102581
[13] Banville, H., Chehab, O., Hyvärinen, A., Engemann, D. and Gramfort, A. (2021) Uncovering the Structure of Clinical EEG Signals with Self-Supervised Learning. Journal of Neural Engineering, 18, Article ID: 046020.
https://doi.org/10.1088/1741-2552/abca18
[14] Romero, A., Ballas, N., Kahou, S.E., et al. (2015) FitNets: Hints for Thin Deep Nets. International Conference on Learning Representations, San Diego, 7-9 May 2015, 1-13.
[15] Park, W., Kim, D., Lu, Y. and Cho, M. (2019) Relational Knowledge Distillation. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, 11-15 June 2025, 3967-3976.
https://doi.org/10.1109/cvpr.2019.00409
[16] Zhang, L., Song, J., Gao, A., Chen, J., Bao, C. and Ma, K. (2019) Be Your Own Teacher: Improve the Performance of Convolutional Neural Networks via Self Distillation. 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, 27-28 October 2019, 3713-3722.
https://doi.org/10.1109/iccv.2019.00381
[17] Gou, J., Yu, B., Maybank, S.J. and Tao, D. (2021) Knowledge Distillation: A Survey. International Journal of Computer Vision, 129, 1789-1819.
https://doi.org/10.1007/s11263-021-01453-z
[18] Gaiduk, M., Serrano Alarcón, Á., Seepold, R. and Martínez Madrid, N. (2023) Current Status and Prospects of Automatic Sleep Stages Scoring: Review. Biomedical Engineering Letters, 13, 247-272.
https://doi.org/10.1007/s13534-023-00299-3
[19] Kullback, S. and Leibler, R.A. (1951) On Information and Sufficiency. The Annals of Mathematical Statistics, 22, 79-86.
https://doi.org/10.1214/aoms/1177729694
[20] Kemp, B., Zwinderman, A.H., Tuk, B., et al. (2000) Analysis of a Sleep-Dependent Neuronal Oscillation in the Human Sleep Electroencephalogram. Journal of Neuroscience Methods, 95, 33-41.
[21] Goldberger, A.L., Amaral, L.A.N., Glass, L., Hausdorff, J.M., Ivanov, P.C., Mark, R.G., et al. (2000) PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation, 101, e215-e220.
https://doi.org/10.1161/01.cir.101.23.e215