| In medicine,Sleep staging is essential for evaluating sleep quality,and it is mainly based on Polysomnography.Sleep stage scoring is a preparatory work for doctors to diagnose sleep disorders,and it is also a critical basis for exploring sleep patterns and analyzing sleep health.The rules for judging sleep stages are complex,and the time of Polysomnography is long,which results in a heavy workload for doctors to judge sleep states.Therefore,the automatic sleep staging method of Polysomnography has high practical value.Based on contrastive learning,this paper investigates a method for automatic sleep staging using raw EEG signals.The main contents of the paper include:In this paper,the unsupervised pre-training task of encoder network is completed by contrastive learning.We found a suitable data augmentation method for the pre-training task of raw EEG signals.The data augmentation method is based on the continuity of the sleep process.Signal mask and shift improved the performance of encoder network in sleep staging.To integrate the information of time series,a linear sequence classifier is used to replace the recurrent neural network which is widely used.The accuracy we get is comparable to the current state-of-the-art deep sleep staging models.Moreover,our model has fewer network parameters,and its structure is simpler than other sleep staging models.Compared with supervised pre-training,the encoder network after contrastive pre-training is more robust.Even if the labeled data is insufficient,the contrastive pre-training model still maintains a high accuracy rate.Based on the linear separability of encode vectors,we design an unsupervised algorithm for sleep staging.We cluster the encode vectors using a Gaussian mixture model,then infer sleep state based on the regularity of sleep state changes,and finally complete the unsupervised sleep staging task.Experiments show that the contrastive learning method is robust,it works even with few labels.Contrastive learning has practical value. |