Sleep staging method based on semi-supervised learning

By constructing a multi-branch deep neural network and a semi-supervised contrastive learning method, the problems of difficult PPG data labeling and strong individual differences were solved, achieving accurate sleep staging with a small amount of labeled data, and improving the model's generalization ability and classification accuracy.

CN120918582APending Publication Date: 2025-11-11BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511099063.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing sleep staging methods based on PPG suffer from performance degradation due to difficulties in labeling PPG data, and poor generalization performance due to strong individual variability, especially when labeled data is insufficient.

Method used

A sleep staging model integrating raw data and features is constructed. A multi-branch deep neural network structure is adopted, combining a CNN encoder, a sequence encoder, and a classifier. A semi-supervised contrastive learning method based on soft-label adjusted features is designed. The model is trained using unlabeled PPG data, and the generalization ability of the model is improved by confidence coefficient and feature adjustment.

Benefits of technology

Achieving more accurate sleep stage classification with limited labeled data improves the model's generalization ability and classification accuracy. It effectively utilizes unlabeled PPG data, mitigates the impact of individual differences, and enhances the model's adaptability and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120918582A_ABST
    Figure CN120918582A_ABST
Patent Text Reader

Abstract

A sleep staging method based on semi-supervised learning belongs to the field of artificial intelligence and health monitoring, and comprises the following steps: preprocessing original PPG signals, extracting heart rate and respiration signals, calculating morphological and frequency domain features, extracting sleep staging related representation features, modeling short-time features and long-time changes of sleep, and outputting a classification result of each sleep stage; calculating supervised loss by using the labeled PPG data, predicting unlabeled PPG data to obtain a soft label, screening a high-confidence sample, and converting the soft label into a hard label to calculate unsupervised loss; calculating a confidence coefficient, calculating category center features of each sleep stage category, and performing feature adjustment; performing confidence weighting on the sample features and the category center features; and constructing positive and negative sample pairs to carry out semi-supervised contrast learning. According to the method, the generalization ability of the sleep staging model is enhanced, the sleep staging accuracy is improved, and the method can be applied to scenes such as family health management, auxiliary diagnosis and sleep monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence and health monitoring technology, specifically relating to a sleep staging method based on semi-supervised learning. Background Technology

[0002] The current gold standard for sleep monitoring requires collecting polysomnography (PSG) data in a hospital environment. However, this method suffers from drawbacks such as cumbersome device wearing, reliance on manual annotation by experts, and the potential for sleep disturbances in the hospital environment. To achieve more convenient daily sleep monitoring, contactless and wearable devices are gaining attention. Contactless methods (such as smart mattresses, ultra-wideband devices, and WiFi devices) primarily monitor chest wall movement and heart activity, using respiratory and heart rate signals to infer sleep stages. However, their deployment depends on specific environments and is difficult to adapt to mobile scenarios in daily life. In contrast, while some contact devices (such as sternal patches and earplugs) can perform monitoring in mobile scenarios, their wearing comfort is poor, affecting rest quality and resulting in low user acceptance.

[0003] Currently, wearable devices, especially smartwatches and smart rings based on photoplethysmography (PPG) and accelerometer (ACC), are gaining widespread attention. These devices not only offer continuous daily sleep monitoring capabilities but are also more comfortable and convenient to wear. Existing PPG-based sleep staging methods mainly fall into two categories: methods based on raw data and methods based on feature extraction. Methods based on raw data utilize the rich information contained in the raw signals, requiring a large amount of labeled data to establish task-related relationships and suppress irrelevant interference. Methods based on feature extraction extract features highly correlated with sleep stages, such as heart rate, heart rate variability, and respiration, to complete the staging process. However, this process may lose potentially crucial information from the raw data, limiting their performance in complex sleep staging tasks. Furthermore, there is currently a lack of effective methods for utilizing unlabeled PPG data in sleep tasks, resulting in the underutilization of readily available unlabeled data and the failure to realize its application potential. On the other hand, PPG data varies significantly between individuals, making existing PPG-based sleep staging methods susceptible to individual characteristics and limiting their generalization ability; this problem is particularly pronounced when labeled data is insufficient. How to achieve reliable sleep staging under limited labeled data conditions remains a challenging problem that deserves further research. Summary of the Invention

[0004] The purpose of this invention is to provide a sleep staging method based on semi-supervised learning, which aims to solve the problems of declining model performance in existing PPG-based sleep staging methods due to difficulties in PPG data annotation, as well as the problems of poor model generalization performance caused by insufficient labeled data and strong individual differences in PPG data in sleep staging tasks.

[0005] The technical solution adopted by this invention to solve the technical problem is as follows:

[0006] This invention provides a sleep staging method based on semi-supervised learning, comprising the following steps:

[0007] A sleep staging model integrating raw data and features is constructed, consisting of a CNN encoder, a sequence encoder, and a classifier. The raw PPG signal is preprocessed to extract heart rate and respiratory signals, and morphological and frequency domain features are calculated. Sleep staging-related representation features are extracted using the CNN encoder. The sequence encoder is used to comprehensively model the short-term features and long-term changes of sleep. The classification results of each sleep stage are output through the classifier.

[0008] We design a semi-supervised contrastive learning method based on soft-label adjusted features. During training, the sleep staging model calculates supervised loss using labeled PPG data, predicts unlabeled PPG data to obtain soft labels, selects high-confidence samples based on probability entropy and a set threshold, and converts their soft labels into hard labels to calculate unsupervised loss. We calculate the confidence coefficient of each unlabeled PPG data based on the probability distribution and probability entropy of the soft labels. We calculate the category center features for each sleep staging category based on the confidence coefficients and adjust the features for each sample. We perform a confidence-weighted linear combination of each sample feature and the corresponding category center feature. We construct positive and negative sample pairs for semi-supervised contrastive learning.

[0009] Furthermore, the original PPG signal is preprocessed by low-pass filtering and downsampling; heart rate and respiratory signals are extracted using peak detection and filtering methods; and morphological and frequency domain features are extracted for each heart rate and respiratory signal using a sliding window method.

[0010] Furthermore, the CNN encoder includes multiple processing branches, each processing branch corresponds to a type of input data, and each processing branch includes multiple residual convolutional network coding blocks.

[0011] Furthermore, each residual convolutional network encoding block includes a convolutional layer, a normalization layer, and a max pooling layer, and employs two non-linear activation functions. By concatenating features, feature channels are expanded and residual connections are constructed to deepen the network while preserving shallow features.

[0012] Furthermore, the sequence encoder includes two dilated convolutional layers, a nonlinear activation function, a normalization layer, and a random deactivation layer. The dilated convolutional layers are used to gradually increase the convolutional dilation rate to capture the long-term temporal dependence of fused features and to mine the temporal change patterns in the continuous sleep process.

[0013] Furthermore, the classifier employs a two-layer convolutional neural network structure to map the multidimensional features in multiple stage units output by the sequence encoder into predicted probabilities for different sleep stages.

[0014] Furthermore, the formula for calculating the confidence coefficient is as follows:

[0015]

[0016] Among them, coeff i,j Let be the confidence coefficient for the i-th sample belonging to sleep stage j, calculated using the sleep stage model. Let be the predicted probability of the i-th sample belonging to sleep stage j, calculated using the sleep stage model. For prediction probability The calculated standardized probability entropy.

[0017] Furthermore, the calculation formula for the feature adjustment is as follows:

[0018]

[0019] in, For the category center feature of sleep stage category j, fea i Let N be the features of the i-th sample output by the CNN encoder. B Coeff is the number of samples in the current batch. i,j is the confidence coefficient for the i-th sample belonging to sleep stage category j, calculated using the sleep stage model.

[0020] Furthermore, the sleep staging model performs a confidence-weighted linear combination of each sample feature and its corresponding class center feature, calculated as follows:

[0021]

[0022] in, The feature of the i-th sample is the feature adjusted based on the category center feature of sleep stage category j, where featurea is the feature of the i-th sample. i For the features of the i-th sample output by the CNN encoder, coeff i,j Let be the confidence coefficient for the i-th sample belonging to sleep stage j, calculated using the sleep stage model. The category center feature is for sleep stage category j.

[0023] Furthermore, the formula for calculating the contrastive learning loss function of the semi-supervised contrastive learning is as follows:

[0024]

[0025] Where S is the set of all features after feature adjustment, P(s) is the set of positive sample features belonging to the same category as feature s, p is the positive sample feature in the positive sample feature set P(s), a is the negative sample feature not in the positive sample feature set P(s), S\{s} is the set after removing the current feature s from set S, z s z p z a These are the vector representations of the current feature, positive sample feature, and negative sample feature obtained by the encoder, respectively, and τ is the temperature coefficient controlling the learning rate.

[0026] The beneficial effects of this invention are:

[0027] This invention provides a semi-supervised learning-based sleep staging method. Utilizing raw PPG signals collected by wearable devices, it fuses raw data with physiological features to achieve more accurate sleep stage classification with limited labeled data. Compared to existing technologies, this invention has the following advantages:

[0028] 1) This invention constructs a multi-branch sleep staging model that integrates the original PPG signal with heart rate and respiratory signals and their characteristics, effectively utilizing the richer information and strong correlation of the original PPG signal.

[0029] 2) This invention proposes a semi-supervised contrastive learning (FASL) method based on soft-labeled adjusted features, which effectively utilizes a large amount of unlabeled PPG data to improve the performance of the sleep staging model on the test set. Simultaneously, this semi-supervised contrastive learning method sets contrastive learning tasks for features from shallow features with small individual differences, which helps alleviate the overfitting tendency of the sleep staging model to individuals in the training set, thereby enhancing the generalization ability of the sleep staging model and improving the accuracy of sleep staging.

[0030] 3) This invention implements a soft-label confidence coefficient mechanism, which avoids the situation where a large amount of low-confidence unlabeled PPG data is discarded in existing PPG-based sleep staging methods, improves the utilization rate of unlabeled PPG data, and thus improves the generalization ability of the sleep staging model.

[0031] 4) This invention implements a feature adjustment mechanism to optimize the features of low-confidence samples, making them more suitable for semi-supervised contrastive learning tasks and improving the accuracy of sleep staging model classification.

[0032] 5) The sleep staging method based on semi-supervised learning provided by this invention can be widely used in various application scenarios such as family health management, auxiliary diagnosis, and sleep monitoring. Attached Figure Description

[0033] Figure 1The present invention provides a system architecture flowchart for a sleep staging method based on semi-supervised learning.

[0034] Figure 2 This is a diagram of the ResCNN encoding block architecture.

[0035] Figure 3 This is a diagram of the sequence encoder architecture. Detailed Implementation

[0036] The present invention will be further described in detail below with reference to the accompanying drawings.

[0037] This invention provides a sleep staging method based on semi-supervised learning, which mainly includes: constructing a sleep staging model that integrates original data and features to perform multidimensional processing on PPG data, and designing a semi-supervised contrastive learning (FASL) method based on soft label adjusted features to improve the generalization ability of the sleep staging model.

[0038] See Figure 1 The present invention provides a sleep staging method based on semi-supervised learning, the specific implementation process of which is as follows:

[0039] (1) Construct a sleep staging model that integrates raw data and features;

[0040] This invention uses raw PPG signals collected by wearable devices and combines the complementary advantages of raw data with sleep-related features such as heart rate and respiration to design a sleep staging model that integrates raw data and features by simultaneously inputting raw signals and feature information.

[0041] The sleep staging model, which integrates raw data and features, employs a multi-branch deep neural network structure to achieve multi-dimensional processing of PPG data, thereby improving classification accuracy. First, the continuously acquired raw PPG signals undergo low-pass filtering and downsampling preprocessing to extract high-quality PPG data. Then, peak detection and filtering methods are used to extract sleep-related physiological signals such as heart rate and respiration from the PPG data, and morphological and frequency domain features are further calculated. These preprocessed raw PPG signals, heart rate and respiration signals, and derived features (morphological and frequency domain features) are then input into three different CNN encoders with varying parameter configurations for preliminary feature extraction to obtain more effective sleep staging-related representations. Subsequently, these sleep staging-related representations are input into a sequence encoder to uncover longer-term temporal dependencies, thus comprehensively modeling both short-term and long-term sleep characteristics. Finally, a classifier outputs the classification results for each sleep stage.

[0042] The sleep staging model constructed in this invention, which integrates raw data and features, can achieve accurate sleep staging training on a small amount of labeled data by utilizing the rich information in the raw PPG signal and the strong correlation advantage of its features.

[0043] Specifically, the sleep staging model constructed in this invention, which integrates raw data and features, adopts a multi-branch deep neural network structure, mainly comprising three modules: a CNN-based encoder, a sequence encoder, and a classifier.

[0044] 1) CNN-based encoder;

[0045] The CNN encoder processes three types of continuous 10-hour input data in parallel: the raw PPG signal preprocessed by low-pass filtering and downsampling, the heart rate and respiratory signals extracted from the PPG data by peak detection and filtering, and the sleep stage-related representation features extracted from these signals.

[0046] Specifically, firstly, the original PPG signal was low-pass filtered at 10Hz to remove high-frequency noise and downsampled to 34.13Hz, resulting in a data dimension of [1228800, 1]. Then, peak detection and filtering methods were used to extract four heart rate and respiratory signals from the PPG data, which were interpolated to 2Hz, resulting in a data dimension of [72000, 4]. Based on this, for each heart rate and respiratory signal, a sliding window method (window size 30 seconds, step size 10 seconds) was used to extract morphological features (NN interval mean, SDNN, SDSD) and frequency domain features (VLF, LF, HF, Total Power). Each sliding window yielded 28 sleep stage-related representation features. Finally, these features were concatenated in chronological order to form 10 hours of continuous input data, resulting in a data dimension of [3598, 28].

[0047] To effectively fuse the three different types of input data, the CNN encoder designs an independent processing branch for each type of input data. Each processing branch consists of several Residual Convolutional Network (ResCNN) coding blocks, and the number of ResCNN coding blocks is set according to the characteristics of the input data.

[0048] like Figure 2As shown, within each ResCNN encoding block, its core structure mainly includes two convolutional layers (used to extract and integrate features at different scales layer by layer, expanding the receptive field) and a normalization layer (LayerNorm) (used to perform mean-variance normalization on the channel dimensions, stabilizing the input distribution of each layer and accelerating convergence). It also employs two non-linear activation functions (LeakyReLU) to provide non-linear capabilities and retain small gradients in the negative interval, preventing neuron "death." One of the key design features of this core structure is the expansion of feature channels through feature concatenation and the construction of residual connections. This deepens the network while preserving shallow features, ensuring that gradients can effectively backpropagate, thus improving the expressive power and training efficiency of the CNN encoder.

[0049] Furthermore, a max-pooling layer is applied at the end of each ResCNN encoding block to shorten the feature sequence length. Considering the significant differences in initial length, number of channels, and signal characteristics among the three different types of input data, each processing branch uses a different number of ResCNN encoding blocks, and the convolutional kernel size and pooling stride are adjusted accordingly. Through this multi-processing branch architecture, the CNN encoder can fully adapt to the characteristics of different types of input data and effectively model them during the encoding process. Ultimately, the feature sequences output by all processing branches are unified to the same temporal resolution: a length of 1200 (i.e., 10 hours × 3600 seconds / hour ÷ 30 seconds / sleep stage = 1200 stage units), and the output feature dimension of each processing branch is 256. After merging the three paths, a 768-dimensional joint feature sequence is obtained. This ResCNN encoding block structure design achieves temporal alignment of different types of input data and precisely corresponds to the sleep stage labeling with one label every 30 seconds, thus providing unified, high-quality sleep stage-related representation features for subsequent modeling.

[0050] 2) Sequence Encoder;

[0051] These sleep stage-related representations are input into a sequence encoder to uncover longer-term temporal dependencies, thereby comprehensively modeling both short-term features and long-term variations in sleep. For example... Figure 3As shown, the sequence encoder mainly consists of two dilated convolution layers (used to capture short-term and long-term temporal dependencies, respectively), a nonlinear activation function (LeakyReLU) (which introduces nonlinearity to fit complex temporal patterns while avoiding the "dead" neuron problem of traditional ReLU), and a normalization layer (LayerNorm) (used to stabilize the hidden state distribution, reduce internal covariate shifts, and accelerate convergence). A random deactivation layer is placed at the end to break the co-adaptation between features, prevent overfitting, and improve the model's generalization ability. The sequence encoder uses the dilated convolution layers to gradually increase the convolution dilation rate to capture the long-term temporal dependencies of fused features, thereby better uncovering temporal change patterns during continuous sleep. The data output dimension of the sequence encoder remains unchanged from the input dimension, still [1200, 768].

[0052] 3) Classifier;

[0053] The classifier specifically adopts a two-layer convolutional neural network structure. The classifier maps the 768-dimensional features in the 1200 stage units output by the sequence encoder to the predicted probabilities of four sleep stages (awake stage, light sleep stage, deep sleep stage, and REM sleep stage). The data output dimension of the classifier is [1200, 4].

[0054] (2) Design a semi-supervised contrastive learning (FASL) method based on features adjusted by soft labels;

[0055] The semi-supervised contrastive learning (FASL) method, based on soft-labeled feature adjustment, fully utilizes a large amount of unlabeled PPG data to improve the model's generalization ability with only a small amount of labeled data. During training, on the one hand, supervised loss is calculated using labeled PPG data; on the other hand, for unlabeled PPG data, class probabilities (i.e., soft labels) are first predicted using a sleep staging model that integrates the original data and features. Then, high-confidence samples are selected based on probability entropy and a set threshold, and their soft labels are converted to hard labels to calculate unsupervised loss. Simultaneously, confidence coefficients are calculated based on the probability distribution and probability entropy of the soft labels. Each sample feature is then linearly combined with its corresponding class center feature using confidence weighting to construct more representative positive and negative sample pairs, further optimizing the contrastive learning task. This method not only improves the efficiency of unlabeled PPG data utilization and reduces the model's sensitivity to task-irrelevant features and individual differences, but also effectively alleviates the performance degradation caused by insufficient labeled data.

[0056] This invention presents a semi-supervised contrastive learning (FASL) method based on soft-labeled feature adjustment. This method fully utilizes unlabeled PPG data to address the insufficient generalization of models caused by a lack of labeled data in sleep staging tasks. By effectively utilizing unlabeled PPG data, the dependence of model training on labeled data is reduced. The method mainly includes three steps: soft-label confidence calculation, feature adjustment, and semi-supervised contrastive learning.

[0057] 1) Calculation of confidence scores for soft labels;

[0058] In semi-supervised contrastive learning methods, unlabeled PPG data is first processed by the aforementioned sleep staging model that integrates the original data and features to obtain the predicted probability (i.e., soft label) of each staging unit across the four sleep staging categories. Existing PPG-based sleep staging methods typically employ a fixed threshold strategy, considering the corresponding label as a valid supervision signal only when the predicted probability of a sleep staging category exceeds a set confidence threshold. This approach leads to the exclusion of a large number of samples with confidence levels slightly below the threshold but still possessing learning value from training. Furthermore, the model tends to utilize high-confidence samples during training, thus limiting the applicability of unlabeled PPG data, reducing overall training effectiveness, and weakening the model's generalization ability.

[0059] To address this, this invention introduces a strategy based on a dynamic confidence coefficient in the soft-label confidence calculation process. Each unlabeled PPG data sample is assigned a confidence coefficient calculated by combining its soft-label distribution and probability entropy, used to quantify the level of certainty of the sleep staging model's current prediction results. This dynamic confidence coefficient not only preserves the sleep staging model's ability to utilize high-confidence samples but also allows it to utilize potentially useful information samples with lower confidence within a reasonable range. This improves the utilization efficiency of unlabeled PPG data, enhances the sleep staging model's adaptability to complex data distributions, and ultimately promotes improved generalization performance of the sleep staging model.

[0060] Specifically, the formula for calculating the confidence coefficient is as follows:

[0061]

[0062] Among them, coeff i,j Let be the confidence coefficient for the i-th sample belonging to sleep stage j, calculated using the sleep stage model. Let be the predicted probability of the i-th sample belonging to sleep stage j, calculated using the sleep stage model. For prediction probability The calculated standardized probability entropy.

[0063] The formula (1) for calculating the confidence level of soft labels ensures that high-confidence samples obtain higher confidence coefficients and low-confidence samples obtain lower confidence coefficients, thereby enabling a large number of low-confidence samples to participate in model training, improving the utilization rate of unlabeled PPG data and the generalization of the model.

[0064] 2) Feature adjustment;

[0065] Because a large number of low-confidence samples lack effective predictive labels, these low-confidence samples are directly discarded in existing PPG-based sleep staging methods. However, in this invention, a large number of low-confidence samples are included in the training process by using confidence weighting to bring their features closer to the category center. Specifically, the sleep staging model, which integrates the original data and features, calculates the category center features for each sleep staging category in each training batch based on the aforementioned dynamic confidence coefficient and adjusts the features for each sample. The specific calculation formula for feature adjustment is as follows:

[0066]

[0067] in, For the category center feature of sleep stage category j, fea i Let N be the features of the i-th sample output by the CNN encoder. B This represents the number of samples in the current batch.

[0068] Based on the central features of sleep stage categories, the sleep staging model adjusts low-confidence samples into high-quality samples suitable for contrastive learning training. Specifically, the sleep staging model linearly combines each sample feature with the sample category prediction confidence and the central features of each sleep stage category, so that the adjusted sample features can better represent its corresponding sleep stage category. The specific calculation formula is as follows:

[0069]

[0070] in, The features of the i-th sample are adjusted by the category center features based on the sleep stage category j.

[0071] 3) Semi-supervised contrastive learning;

[0072] After adjusting the features of low-confidence samples, the sleep staging model constructs positive and negative sample pairs and performs semi-supervised contrastive learning. Positive sample pairs in the sleep staging model are defined as features adjusted with the same class center, while negative sample pairs are defined as features adjusted with different class centers. Based on these positive and negative sample pairs, the training objective of the sleep staging model is to improve its ability to distinguish between different sleep stage categories.

[0073] Specifically, the formula for calculating the contrastive learning loss function in semi-supervised contrastive learning is as follows:

[0074]

[0075] Where S is the set of all features after feature adjustment, P(s) is the set of positive sample features belonging to the same category as feature s, p is the positive sample feature in the positive sample feature set P(s), a is the negative sample feature not in the positive sample feature set P(s), S\{s} is the set after removing the current feature s from set S, z s z p z a These are the vector representations of the current feature, positive sample feature, and negative sample feature obtained by the encoder, respectively. τ is the temperature coefficient for controlling the learning rate, which is preferably set to 0.07.

[0076] This invention demonstrates through relevant experiments that, compared with traditional semi-supervised learning methods, it exhibits significant performance advantages on multiple public datasets (MESA, CFS) and real-world self-collected datasets, achieving substantial improvements in accuracy and generalization ability for sleep staging tasks. Specifically, on the CFS dataset, accuracy, Cohen's Kappa, and F1 score are improved by 7.82%, 9.28%, and 11.08%, respectively; on the MESA dataset, accuracy, Cohen's Kappa, and F1 score are improved by 2.80%, 8.63%, and 5.23%, respectively; and in the real-world scene transfer task on the real-world self-collected dataset, accuracy, Cohen's Kappa, and F1 score are improved by 1.53%, 2.76%, and 2.91%, respectively. Furthermore, this invention effectively improves the utilization of low-confidence unlabeled PPG data, increasing the utilization rate of unlabeled PPG data by approximately 70% compared to traditional semi-supervised learning methods. In terms of individual generalization, this invention also performs well, with significant improvements in the accuracy and stability of cross-individual data classification, demonstrating good potential for practical application and promotion.

[0077] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A sleep staging method based on semi-supervised learning, characterized in that, Includes the following steps: A sleep staging model integrating raw data and features is constructed, consisting of a CNN encoder, a sequence encoder, and a classifier. The raw PPG signal is preprocessed to extract heart rate and respiratory signals, and morphological and frequency domain features are calculated. Sleep staging-related representation features are extracted using the CNN encoder. The sequence encoder is used to comprehensively model the short-term features and long-term changes of sleep. The classification results of each sleep stage are output through the classifier. We design a semi-supervised contrastive learning method based on soft-label adjusted features. During training, the sleep staging model calculates supervised loss using labeled PPG data, predicts unlabeled PPG data to obtain soft labels, selects high-confidence samples based on probability entropy and a set threshold, and converts their soft labels into hard labels to calculate unsupervised loss. We calculate the confidence coefficient of each unlabeled PPG data based on the probability distribution and probability entropy of the soft labels. We calculate the category center features for each sleep staging category based on the confidence coefficients and adjust the features for each sample. We perform a confidence-weighted linear combination of each sample feature and the corresponding category center feature. We construct positive and negative sample pairs for semi-supervised contrastive learning.

2. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The raw PPG signal was preprocessed by low-pass filtering and downsampling; heart rate and respiratory signals were extracted by peak detection and filtering; and morphological and frequency domain features were extracted for each heart rate and respiratory signal using a sliding window method.

3. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The CNN encoder includes multiple processing branches, each corresponding to a class of input data, and each processing branch includes multiple residual convolutional network coding blocks.

4. The sleep staging method based on semi-supervised learning according to claim 3, characterized in that, Each residual convolutional network encoding block includes a convolutional layer, a normalization layer, and a max pooling layer, and employs two non-linear activation functions. It expands feature channels and constructs residual connections through feature concatenation to deepen the network while preserving shallow features.

5. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The sequence encoder includes two dilated convolutional layers, a nonlinear activation function, a normalization layer, and a random deactivation layer. It utilizes the dilated convolutional layers to gradually increase the convolutional dilation rate to capture the long-term temporal dependencies of fused features and to mine temporal change patterns in continuous sleep processes.

6. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The classifier employs a two-layer convolutional neural network structure to map the multidimensional features in multiple stage units output by the sequence encoder into predicted probabilities for different sleep stages.

7. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The formula for calculating the confidence coefficient is as follows: Among them, coeff i,j Let be the confidence coefficient for the i-th sample belonging to sleep stage j, calculated using the sleep stage model. Let be the predicted probability of the i-th sample belonging to sleep stage j, calculated using the sleep stage model. For prediction probability The calculated standardized probability entropy.

8. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The calculation formula for the feature adjustment is as follows: in, For the category center feature of sleep stage category j, fea i Let N be the features of the i-th sample output by the CNN encoder. B Coeff is the number of samples in the current batch. i,j is the confidence coefficient for the i-th sample belonging to sleep stage category j, calculated using the sleep stage model.

9. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The sleep staging model uses a confidence-weighted linear combination of each sample feature and its corresponding class center feature, calculated as follows: in, The feature of the i-th sample is the feature adjusted based on the category center feature of sleep stage category j, where featurea is the feature of the i-th sample. i For the features of the i-th sample output by the CNN encoder, coeff i,j Let be the confidence coefficient for the i-th sample belonging to sleep stage j, calculated using the sleep stage model. The category center feature is for sleep stage category j.

10. The sleep staging method based on semi-supervised learning according to claim 1, characterized in that, The formula for calculating the contrastive learning loss function in the semi-supervised contrastive learning is as follows: Where S is the set of all features after feature adjustment, P(s) is the set of positive sample features belonging to the same category as feature s, p is the positive sample feature in the positive sample feature set P(s), a is the negative sample feature not in the positive sample feature set P(s), S\{s} is the set after removing the current feature s from set S, z s z p z a These are the vector representations of the current feature, positive sample feature, and negative sample feature obtained by the encoder, respectively, and τ is the temperature coefficient controlling the learning rate.

Citation Information

Cited By

  • Single-channel electroencephalogram sleep analysis method and related equipment

    CN121971042A