计算机科学 ›› 2026, Vol. 53 ›› Issue (11A): 251000072-771.doi: 10.11896/jsjkx.251000072

• 大数据&数据科学 • 上一篇    下一篇

动态权重Transformer架构下的单通道睡眠分期多尺度时空建模

王婵飞, 孔惠圆, 邸德刚, 许亚美   

  1. 兰州理工大学计算机与通信学院 兰州 730050
  • 出版日期:2026-11-16 发布日期:2026-11-16
  • 通讯作者: 孔惠圆(232085404032@lut.edu.cn)
  • 作者简介:(wangchanfei@163.com)
  • 基金资助:
    国家自然科学基金(62061024)

Single-channel Sleep Staging via Multi-scale Spatio-Temporal Modeling Within Dynamic Weight Transformer Architecture

WANG Chanfei, KONG Huiyuan, DI Degang, XU Yamei   

  1. Country College of Computer and Communication,Lanzhou University of Technology,Lanzhou 730050,China
  • Published:2026-11-16 Online:2026-11-16
  • About author:WANG Chanfei,born in 1983,Ph.D,associate professor,master’s supervisor.Her main research interests include the efficient signal detection mechanism in communication systems and sleep stage classification.
    KONG Huiyuan,born in 2001,postgra-duate.Her main research interests include artificial intelligence and sleep staging.
  • Supported by:
    This work was supported by the National Natural Science Foundation of China(62061024).

摘要: 睡眠分期是评估睡眠质量和诊断睡眠障碍的重要基础。基于多通道脑电信号(Electroencephalogram,EEG)的分析方法虽然准确,但其复杂的采集过程限制了临床应用。为此,文中提出了一种基于Transformer架构的单通道EEG睡眠分期模型。其核心创新体现在两个方面:首先,设计了多尺度时空特征提取模块,通过注意力机制和位置编码有效捕获EEG信号中的波形特征;其次,在Transformer编码器中引入可学习的动态权重注意力机制,通过参数化的注意力权重分配,实现了对不同特征空间的自适应信息提取。所提出的时空依赖建模模块通过多尺度特征提取与动态权重分配机制,有效捕捉了睡眠EEG信号中的跨时段长程依赖关系,实现了对睡眠周期动态变化的精准表征。为验证所提算法的有效性,文中选取了 Sleep-EDF20,Sleep-EDF78 以及 SHHS 这3个公共数据集开展实验。实验结果显示,该算法在上述3个数据集上的准确率分别达到了 84.5%,80.8% 和 83.6%。消融研究进一步证实:所提出的模块比传统意义上的卷积神经网络更具优势,N1期识别率提高0.55%。所提模型不仅为单通道EEG分析提供了新思路,其设计更有利于移动健康设备的部署应用。

关键词: Transformer, 单通道EEG, 睡眠分期, 权重注意力

Abstract: Sleep staging is an important basis for evaluating sleep quality and diagnosing sleep disorders.Although analysis methods based on multi-channel electroencephalogram(EEG) signals are accurate,their complex acquisition process limits clinical application.Therefore,this paper proposes a single-channel EEG sleep staging model based on the Transformer architecture.The core innovation lies in two aspects.Firstly,a multi-scale spatiotemporal feature extraction module is designed,which effectively captures the waveform features of EEG signals through the attention mechanism and position encoding.Secondly,a learnable dynamic weight attention mechanism is introduced in the Transformer encoder,achieving adaptive information extraction in different feature spaces through parameterized attention weight allocation.The proposed spatiotemporal dependency modeling module effectively captures the cross-time-scale long-range dependencies in sleep EEG signals,achieving precise representation of the dynamic changes in sleep cycles.To verify the effectiveness of the proposed algorithm,experiments are conducted on three public datasets:Sleep-EDF20,Sleep-EDF78,and SHHS.Experimental results show that the accuracy of the algorithm on these three datasets reaches 84.5%,80.8%,and 83.6% respectively.Ablation studies further confirm that the proposed module has more advantages than traditional convolutional neural networks,with an increase of 0.55% in the recognition rate of the N1 stage.This research not only provides a new idea for single-channel EEG analysis,but also makes the design more conducive to the deployment and application of mobile health devices.

Key words: Transformer, Single-channel EEG, Sleep staging, Weight attention

中图分类号: 

  • TP18
[1] BOOSTANI R,KARIMZADEH F,NAMI M.A comparative re-view on sleep stage classification methods in patients and healthyindividuals[J].Computer Methods and Programs in Biomedicine,2017,140:77-91.
[2] LUYSTER F,STROLLO J R,ZEE P,et al.Sleep:a health im-perative[J].Sleep,2012,35(6):727-734.
[3] JIN Z,JIA K B.Review of Automatic Sleep Staging AlgorithmsBased on Physiological Electrical Signals [J].Journal of Beijing University of Technology,2025,51(4):435-451.
[4] KUO C E,LIANG S F.Automatic stage scoring of single-channel sleep EEG based on multiscale permutation entropy[C]//2011 IEEE Biomedical Circuits and Systems Conference(BioCAS).IEEE,2011:448-451.
[5] WILLEMEN T,VAN DEUN D,VERHAERT V,et al.Anevaluation of cardiorespiratory and movement features with respect to sleep-stage classification[J].IEEE Journal of Biome-dical and Health Informatics,2013,18(2):661-669.
[6] ANDERER P,ROSS M,CERNY A,et al.Automated scoring of sleep and associated events[M]//Advances in the Diagnosis and Treatment of Sleep Apnea:Filling the Gap Between Physicians and Engineers.Cham:Springer International Publishing,2022:107-130.
[7] LU H T,LUO M K.Based on the deep study of computer vision research progress [J].Journal of Data Acquisition & Processing,2022(2):037.
[8] GU J,WANG Z,KUEN J,et al.Recent advances in convolutionalneural networks[J].Pattern Recognition,2018,77:354-377.
[9] COMPUTATION N.Long short-term memory[J].NeuralComput,2016,9:1735-1780.
[10] HASSAN A R,BHUIYAN M I H.Computer-aided sleep staging using complete ensemble empirical mode decomposition with adaptive noise and bootstrap aggregating[J].Biomedical Signal Processing and Control,2016,24:1-10.
[11] PHAN H,CHÉN O Y,TRAN M C,et al.XSleepNet:Multi-view sequential model for automatic sleep staging[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2021,44(9):5903-5915.
[12] SUNDAR G N,NARMADHA D,JONE A A A,et al.Automated sleep stage classification insleep apnoea using convolutional neural networks[J].Informatics in Medicine Unlocked,2021,26:100724.
[13] BISHOP C M,BISHOP H.Deep learning:Foundations and concepts[M].Springer Nature,2023.
[14] SUPRATAK A,DONG H,WU C,et al.DeepSleepNet:A model for automatic sleep stage scoring based on raw single-channel EEG[J].IEEE Transactions on Neural Systems and Rehabilitation Engineering,2017,25(11):1998-2008.
[15] SUPRATAK A,GUO Y.TinySleepNet:An efficient deep learning model for sleep stage scoring based on raw single-channel EEG[C]//2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society(EMBC).IEEE,2020:641-644.
[16] SAJAD M,FATEMEH A,RAJENDRA U A.SleepEEGNet:Automated sleep stage scoring with sequence to sequence deep learning approach [J].PloS One,2019,14(5):e0216456.
[17] LIU Z,QIN M,LU Y,et al.DenSleepNet:DenseNet based mo-del for sleep staging with two-frequency feature fusion and coordinate attention[J].Biomedical Engineering Letters,2023,13(4):751-761.
[18] GUILLOT A,THOREY V.RobustSleepNet:Transfer learning for automated sleep staging at scale[J].IEEE Transactions on Neural Systems and Rehabilitation Engineering,2021,29:1441-1451.
[19] PERSLEV M,DARKNER S,KEMPFNER L,et al.U-Sleep:resilient high-frequency sleep staging[J].NPJ Digital Medicine,2021,4(1):72.
[20] ZHAO C,LI J,GUO Y.SleepContextNet:A temporal context network for automatic sleep staging based single-channel EEG[J].Computer Methods and Programs in Biomedicine,2022,220:106806.
[21] RU Y,AN G,WEI Z,et al.Epilepsy detection based on multi-head self-attention mechanism[J].PloSOne,2024,19(6):e0305166.
[22] ELDELE E,CHEN Z,LIU C,et al.An attention-baseLu H,Luo M.Survey onnew progresses of deep learning based computer vision[J].Journal of Data Acquisition and Processing,2022,37(2):247-78.
[23] LIU J W,SONG Z Y.Overview of recurrent neural networks[J].Control and Decision,2022,37(11):2753-2768.
[24] CHEN J J,LIU B,LIN W W,et al.Survey of transformer-based ttime series forecasting methods[J].Computer Science,2025,52(6):96-10.
[25] SONG S,LAM J C K,HAN Y,et al.ResNet-LSTM for real-time pm 2.5 and pm estimation using sequential smartphone images [J].IEEE Access,2020,8:220069-220082.
[26] PHAN H,ANDREOTTI F,COORAY N,et al.Joint classificationand prediction CNN framework for automatic sleep stage classification[J].IEEE Transactions on Biomedical Engineering,2018,66(5):1285-1296.
[27] EMADELDEEN E,ZHENGHUA C,CHENGYU L,et al.Anattention-based deep learning approach for sleep stage classification with single-channel EEG [J].IEEE Transactions on Neural Systems and Rehabilitation Engineering:A Publication of the IEEE Engineering in Medicine and Biology Society,2021,29:809-818.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!