An unsupervised transfer learning sleep staging method and device

By introducing ADSBN and DSAN modules into the sleep staging model, and combining dynamic batch normalization and iterative self-training, the problems of insufficient generalization ability and mismatch of class distribution in sleep staging models across datasets are solved, and accurate sleep staging and sleep disorder diagnosis across subject domains are achieved.

CN119896449BActive Publication Date: 2026-05-29BEIJING INST OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INST OF TECH
Filing Date
2024-12-30
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing sleep staging models lack generalization ability when trained across datasets, cannot effectively extract subject domain invariant features, and suffer from source and target domain feature loss and fine-grained class distribution mismatch, resulting in decreased classification performance.

Method used

An ADSBN module is added between each layer of the TS-AGCM model and connected to a deep subdomain adaptation network (DSAN). Pseudo-labels are generated through dynamic batch normalization and iterative self-training. A global loss function is constructed to achieve domain-invariant feature extraction, thus solving the problem of fine-grained class distribution mismatch.

Benefits of technology

It improves the generalization performance of the sleep staging model, making it suitable for unlabeled datasets, accurately staging sleep disorders and supporting their diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119896449B_ABST
    Figure CN119896449B_ABST
Patent Text Reader

Abstract

The application provides a kind of unsupervised transfer learning sleep staging method and device, belong to sleep health monitoring and information technology cross field.The specific process of the method is as follows: constructing neural network architecture: adding ADSBN module between each layer of neural of TS-AGCM model, the output end of the TS-AGCM model is connected with depth sub-domain adaptive network DSAN model;Determine the global loss function: including the classification loss function based on pseudo label, the source domain classification loss function dependent on the sleep label of source domain and DSAN loss function;Train neural network and use the trained neural network model to sleep staging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention proposes an unsupervised transfer learning method and device for sleep staging, which belongs to the interdisciplinary field of sleep health monitoring and information technology. Background Technology

[0002] Sleep occupies one-third of a person's life, making the monitoring of sleep quality a significant need. Research shows that good sleep quality is beneficial to physical and mental health. Sleep disorders such as insomnia and sleep apnea lead to decreased sleep quality, which in turn induces physiological health problems. To assist in the diagnosis of sleep disorders, polysomnography (PSG) is often used to support sleep stage monitoring, specifically including physiological information such as electroencephalography (EEG), electrooculography (EOG), electromyography (EMG), and electrocardiography (ECG). According to the American Academy of Sleep Medicine (AASM) standards, PSG signals are segmented into 30-second EEG signal segments and divided into five sleep stages, including wakefulness (W), rapid eye movement (REM), and three non-rapid eye movement (NREM) stages (N1, N2, and N3). Traditional sleep staging methods rely on manual interpretation based on several physiological characteristics. This method is time-consuming, labor-intensive, and highly subjective. Therefore, many studies have proposed automated sleep staging systems to avoid subjective sleep assessment and improve the accuracy of sleep staging.

[0003] Currently, numerous studies have applied various machine learning methods to the field of sleep staging. Traditional machine learning methods, such as Support Vector Machines (SVM) and Random Forests (RF), typically require manual feature extraction and are heavily reliant on prior sleep knowledge and feature quality. In recent years, deep learning methods, such as Convolutional Neural Networks (CNN) and Recurrent Neural Networks (RNN), have achieved significant success in sleep staging due to their advantage of automatically learning useful features from raw data. For example, Tsinalis et al. designed a convolutional neural network with fully connected layers to classify sleep stages using single-channel EEG, achieving an accuracy of approximately 82%. Supratak et al. proposed a model called DeepSleepNet, which utilizes a convolutional neural network to extract time-invariant features from single-channel EEG and simultaneously employs a Bidirectional Long Short-Term Memory (Bi-LSTM) network to learn transition rules between different sleep stages from EEG signals, achieving an accuracy of approximately 86.2%. In addition, Chen et al. proposed a concurrent sleep staging network called TS-AGCM by combining graph convolutional networks (GCN) and self-attention mechanisms. This network takes into account the spatial connectivity features of multichannel EEG and further improves the classification accuracy, F1 score and other indicators.

[0004] While there has been considerable research and experimentation in academia regarding deep learning-assisted sleep staging, particularly with models like GraphSleepNet based on graph convolution methods achieving good classification results, most studies are limited to the common characteristics of sleep data. Differences in age, gender, ethnicity, and physiological state among different subjects all affect classification performance and hinder classifier generalization. Therefore, to meet the performance requirements of sleep staging models in practical applications, these differences need to be further considered. Transfer learning is an effective method for addressing these differences. Transfer learning aims to transfer knowledge learned in one dataset (source domain) to a related but not identical dataset (target domain), aligning the data distribution between the source and target domains. Transfer learning approaches include fine-tuning and unsupervised learning. The former requires a large-scale source domain dataset to enhance its generalization ability and a labeled target domain dataset for fine-tuning the model. In practice, while sleep experts can classify and label PSG signals in hospitals and research institutions, obtaining sleep staging labels for individuals using portable devices to collect PSG signals daily is too costly, making fine-tuning-based transfer learning difficult. Unsupervised Domain Adaptation (UDA) can train models using labeled source domain data and unlabeled target domain data, and is applicable to sleep staging.

[0005] In the field of unsupervised learning, model "transfer" is mainly achieved by aligning features from different domains. Existing approaches include discrepancy-based and adversarial-based approaches. Discrepancy-based approaches, such as Maximum Mean Difference (MMD) and Correlation Alignment (CORAL), focus on minimizing the distance between the source and target domain distributions. In practice, Tang et al. proposed an end-to-end deep domain adaptation framework, using an MMD-based domain alignment layer to extract domain-invariant features and introducing a multi-class Focal Loss loss function to address the imbalance in the number of sleep stages. Chambon et al. used optimal transfer domain adaptation to enhance feature transferability between the source and target domains. The adversarial-based approach mimics adversarial training in Generative Adversarial Networks (GANs). In practice, Zhao et al. integrated conditional and cooperative adversarial domain adaptation modules, deploying a domain classifier in each feature extraction block at different scales to help the network reduce the distribution distance between different domains. Nasiri et al. introduced adversarial domain adaptation to facilitate model adaptation on different datasets due to differences between subjects, acquisition devices, and other factors.

[0006] The background research and literature review described above provide valuable references for developing novel unsupervised transfer learning sleep staging models. However, two shortcomings need to be addressed. First, most of the aforementioned methods rely on completely shared models when extracting features from source and target domain data; that is, the models have the same architecture and weights. This approach may lead to the loss of features in specific domains of both the source and target domains, potentially negatively impacting classification performance in the target domain. Second, these methods primarily focus on adjusting the overall distribution between the source and target domains, without addressing the issue of fine-grained class distribution mismatches between domains. Therefore, target samples belonging to a specific class may be misaligned with different classes in the source domain, leading to misclassification. Summary of the Invention

[0007] In view of this, the present invention provides an unsupervised transfer learning method and apparatus for sleep staging, which enables the sleep staging model to have the ability to extract domain-invariant features, thereby achieving accurate sleep staging.

[0008] The technical solution for implementing the present invention is as follows:

[0009] In a first aspect, the present invention provides an unsupervised transfer learning method for sleep staging, the specific process of which is as follows:

[0010] Constructing a neural network architecture: Add an ADSBN module between each layer of neurons in the TS-AGCM model, and connect the output of the TS-AGCM model to the deep subdomain adaptation network DSAN;

[0011] Determine the global loss function: including the pseudo-label-based classification loss function. Depends on source domain sleep tag y s Source domain classification loss function and DSAN loss function L LMMD ;

[0012] Training the neural network: First, a supervised model is trained by performing r iterations on the model using source domain data. Second, the supervised model is used to predict unlabeled data, and pseudo-labels are assigned to the predictions that meet the requirements. Third, the pseudo-labeled data is merged with the source domain data for the next model training. The pseudo-labels generated in the previous iteration will be used in the next iteration. The above process is repeated until all data is labeled or the maximum number of iterations is reached. Finally, the final neural network model used for prediction is obtained.

[0013] Sleep staging: Sleep staging is performed using the trained neural network model.

[0014] Optionally, the ADSBN module of this invention includes Domain-Specific Batch Normalization (DSBN) operations and Dynamic Batch Normalization (ABN) operations; wherein,

[0015] The Dynamic Batch Normalization (ABN) operation is used to fuse the data distributions of the source and target domains and calculate the cross-domain moment estimate as the moment estimate of the target domain in the DSBN operation.

[0016] Optionally, the data distributions of the source domain and the target domain in this invention are P, respectively. s (·) and P t (·), the process of fusing the source domain and target domain data distributions into P ts ;

[0017] P ts =qP t (·)+(1-q)P s (·)

[0018] Where q is a fusion factor that controls the degree of contribution of the weights of the source domain and the target domain;

[0019] The cross-domain moment estimate is calculated by the following formula;

[0020] μ ts =qμ t +(1-q)μ s

[0021] (σ ts ) 2 =q((σ t ) 2 +(μ t -μ ts ) 2 )+(1-q)((σ s ) 2 +(μ s -μ ts ) 2 )

[0022] Where, μ t and μ s These are the global first moments of the current batch of data in the target and source domains, respectively, (σ) t ) 2 and (σ) s ) 2 These are the second-order moment estimates for the current batch of data in the target and source domains, respectively.

[0023] Optionally, the fusion factor q of the dynamic batch normalization (ABN) operation described in this invention is used as one of the model parameters according to the global loss function L. all Optimize;

[0024] Suppose that during training, there is a parameter set q = {q1, q2, ..., q...} n}where q iThis represents the fusion factor of the i-th ASBN layer, which is updated with a learning rate lr through backpropagation and gradient descent.

[0025]

[0026] Optionally, during the training phase of the model, the present invention selects prediction results that meet the probability threshold or K-Best standard and assigns them pseudo-labels.

[0027] Optionally, this invention determines a global loss function: a classification loss function based on pseudo-labels. Depends on source domain sleep tag y s Source domain classification loss function and DSAN loss function L LMMD Determine the global loss function L all for:

[0028]

[0029] Here, α1 and α2 are the set weights.

[0030] Optionally, the DSAN loss function L described in this invention LMMD for:

[0031]

[0032] in, To balance the hyperparameters of the classification loss function and the domain adaptation loss function, It is on Hilbert space H, concerning two distributions P s (·) and P t The measure of the difference between (·), where l represents the l-th layer of the deep network.

[0033] Optionally, in the target domain, this invention uses a classification loss function based on pseudo-labels. Defined as follows

[0034]

[0035] Among them, l [·] This represents the index function, which is defined when the condition is met. When it is 1, it is 0. This represents the probability that the model predicts the target domain data to be of the Cth class. This indicates that the distribution P follows the target domain distribution. t (·) The expected result of the calculation of all input data.

[0036] Optionally, in the source domain, this invention is based on the sleep tag y s Source domain classification loss function Formalized as follows:

[0037]

[0038] Among them, l [·] This represents the index function, which is defined when the condition is met. When it is 1, it is 0. This represents the probability that the model predicts the data to be of the Cth class from the source domain. This indicates that the pair follows a source predomain distribution P. s (·) The expected result of the calculation of all input data.

[0039] Secondly, the present invention provides an unsupervised transfer learning sleep staging device, trained using the aforementioned sleep staging method, comprising a TS-AGCM model with an added ADSBN module and a DSAN model; wherein...

[0040] The TS-AGCM model is used to extract and fuse the spatiotemporal information features of the input multi-channel sleep signals and output the fused features in a specific domain.

[0041] The DSAN model is used to minimize the local maximum mean difference of the fused features, and finally outputs the sleep staging results.

[0042] Beneficial effects:

[0043] First, the present invention is based on a novel unsupervised learning neural network architecture for sleep staging based on differences (TS-AGCM-DA), which integrates the original spatiotemporal graph convolutional model with transfer learning methods into a unified framework. It aims to extract domain-invariant features across subjects and improve the generalization performance of the model. This model can be applied to sleep staging prediction across datasets and can adapt to sleep staging scenarios in unlabeled datasets.

[0044] Second, the present invention TS-AGCM-DA contains three key designs: iterative self-training, deep subdomain adaptation network (DSAN), and dynamic domain-specific batch normalization (ADSBN). It uses cross-validation to test the model's classification accuracy, uses the training set as the source domain data and the test set as the target domain data, and adds unlabeled test set sleep signals during the model training process, so that the sleep staging model has the ability to extract domain-invariant features.

[0045] Third, this invention is applicable to sleep staging of multi-channel sleep signals, thereby supporting the diagnosis of sleep disorder-related diseases. Attached Figure Description

[0046] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 This is a flowchart illustrating the method of the present invention. Detailed Implementation

[0048] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0049] It should be noted that, in the absence of conflict, the following embodiments and features can be combined with each other; and, based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0050] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0051] To overcome the limitations of existing sleep staging models in generalizing across datasets and extracting subject-domain invariant features, this embodiment proposes an unsupervised transfer learning sleep staging method based on feature differences. The technical flowchart of this invention is shown below. Figure 1 As shown, the detailed process is as follows:

[0052] Constructing a neural network architecture: Add an ADSBN module between each layer of neurons in the TS-AGCM model, and connect the output of the TS-AGCM model to the deep subdomain adaptation network DSAN;

[0053] Determine the global loss function: including the pseudo-label-based classification loss function. Depends on source domain sleep tag y s Source domain classification loss function and DSAN loss function L LMMD ;

[0054] Training the neural network: First, a supervised model is trained by performing r iterations on the source domain data. Second, the model is used to predict unlabeled data, and pseudo-labels are assigned to the predictions that meet the requirements. Third, the pseudo-labeled data is merged with the source domain data for the next model training. The pseudo-labels generated in the previous iteration will be used in the next iteration. The above process is repeated until all data is labeled or the maximum number of iterations is reached. Finally, the final neural network model used for prediction is obtained.

[0055] Sleep staging: Sleep staging is performed using the trained neural network model.

[0056] In this embodiment, the neural network is constructed based on the TS-AGCM model (a sleep staging model based on temporal self-attention and dynamic graph convolution (202310356676.3)). Furthermore, an ADSBN module is added between each layer of the TS-AGCM model. The ADSBN module contains two branches, one for processing the source domain and the other for processing the target domain. In this embodiment, the TS-AGCM module uses temporal information processing based on self-attention and dynamic graph convolution to obtain fusion features containing rich spatiotemporal information. This module is a shared feature extraction module, taking PSG signal data from the source and target domains as input and outputting fusion features from both the source and target domains. The ADSBN module is further added to obtain statistical information specific to the source and target domains, helping to better classify the target domain data. Simultaneously, during training, the predicted labels of the unlabeled target domain data are used as pseudo-labels for the next model training iteration, thus solving the problem of mismatched fine-grained category distributions between different domains.

[0057] Furthermore, the ADSBN module in this embodiment includes Domain-Specific Batch Normalization (DSBN) operation and Dynamic Batch Normalization (ABN) operation; the Dynamic Batch Normalization (ABN) operation is used to fuse the data distributions of the source domain and the target domain, and the cross-domain moment estimate is calculated as the moment estimate of the target domain in the DSBN operation.

[0058] This embodiment is based on the Dynamic Domain Specific Batch Normalization (ADSBN) module, which relies on the batch normalization (BN) operation. It has two branches, applied to the source and target domains respectively, to obtain statistical information unique to each domain. DSAN is a difference-based conditional distribution adaptive method. Its core function is to make the distribution of each category in the source and target domain data similar, rather than simply making the overall distributions of different domains similar. The two operations are described in detail below:

[0059] Domain-Specific Batch Normalization (DSBN) operation: Implemented using existing technology, the core idea is that the source and target domains each use their own BN modules. Given an F-dimensional input in either the source or target domain. Where dom∈{s,t}. The BN layer first processes the input... Normalize the data so that the mean of each scalar feature is 0 and the variance is 1.

[0060]

[0061] in, For spatiotemporal information, The mean of spatiotemporal information, Variance of spatiotemporal information;

[0062] After normalization, since the operation alters the original data's information representation and affects the neural network's learning characteristics, a further linear inverse transform is considered to restore the data's inherent expressive power. The final DSBN layer can be written as follows:

[0063]

[0064] Where, γ dom and β dom These are trainable parameters that can recover the model's representational power. Thus, regardless of the mean and variance of the input to that layer, after the Batch Normalization (BN) operation, their mean and variance become the learnable β and γ, respectively. and When the time is right, an equivalent transformation can be achieved, while preserving the original input feature distribution information.

[0065] The use of the model is divided into two stages: training and testing (prediction). In the testing stage (e.g., inputting a data point to predict the sleep stage of that data), when normalizing according to equation (1), since E[x] and Var[x] cannot be calculated as in the training stage, an additional mean and variance are required for it to call equation (1) for calculation. This additional mean and variance are the "global first moment and second moment estimates" obtained in the training stage according to equations (3) and (4).

[0066] In summary, during the testing phase, the model will directly use fixed mean and variance in the BN operation (generally using global moment estimation over this domain). Therefore, during the training phase, DSBN also needs to independently calculate the global mean and variance of each domain feature activation using an exponential moving average (EMA) with a pre-given parameter τ (τ is generally set to 0.9-0.999).

[0067]

[0068] Where, μ dom and (σ)dom ) 2 This refers to the estimation of the global first and second moments over the domain dom.

[0069] During the DSBN testing phase, the estimated mean and variance of each domain obtained through the above two formulas are used for the normalization of samples in the corresponding domain.

[0070] Dynamic Batch Normalization (ABN) Operation: In DSBN, it can be noted that only local moments of the target domain data are used when processing the target domain. However, considering that the target domain data is usually small, moment estimation based solely on the target domain data is prone to noise and inaccuracy. Therefore, using moment estimation results from a larger source domain dataset can potentially improve the robustness of statistical estimation.

[0071] Dynamic Batch Normalization (ABN) operates by introducing cross-domain statistics to explicitly control the degree of statistical alignment. Let the data distributions of the source and target domains be P0 and P1, respectively. s (·) and P t (·) can be used to merge the two distributions.

[0072] P ts =qP t (·)+(1-q)P s (·) (5)

[0073] Where q∈[0,1] is a fusion factor that controls the degree of contribution of the source domain and the target domain weights.

[0074] The cross-domain moment estimate can be calculated using the following formula.

[0075] μ ts =qμ t +(1-q)μ s (6)

[0076] (σ ts ) 2 =q((σ t ) 2 +(μ t -μ ts ) 2 )+(1-q)((σ s ) 2 +(μ s -μ ts ) 2 (7) where μ t μ s Let σ be the global first moment (mean) of the current batch of data in the target domain and source domain, respectively. t ) 2 、(σ s ) 2These are the second-order moment estimates (variances) of the current batch of data in the target and source domains, respectively.

[0077] The cross-domain moment estimate is used as the moment estimate of the target domain in the DSBN layer.

[0078] Furthermore, in this embodiment, the Dynamic Domain-Specific Batch Normalization (ADSBN) module also sets a fusion factor during the training process to fuse the statistical information obtained from the source domain into the batch normalization (BN) of the target domain, thereby reducing the uncertainty of the target domain moment estimation and helping to better classify the target domain data.

[0079] In this embodiment, during the training phase, the fusion factor q of the Dynamic Batch Normalization (ABN) layer is used as one of the model parameters based on the global loss function L. all Optimization is performed. During training, there is a parameter set q = {q1, q2, ..., q...} n}, where q i This represents the fusion factor of the i-th ASBN layer, which is updated with a learning rate lr through backpropagation and gradient descent.

[0080]

[0081] Furthermore, this embodiment determines the global loss function: a classification loss function based on pseudo-labels. Depends on source domain sleep tag y s Source domain classification loss function and DSAN loss function L LMMD Determine the global loss function L all for:

[0082]

[0083] In this model, the source domain classification module is assigned a weight of 1 as a basic module, and the values ​​of two hyperparameters, α1 and α2, are adjusted to control the contributions of the DSAN and target domain classification loss functions. The three loss functions are integrated to guide the shared feature network module in generating globally invariant features, while also better reducing distributional differences between different subdomains of the same category.

[0084] Furthermore, embodiments of this application address the depth subdomain adaptation loss function L. LMMD Detailed introduction:

[0085] First, pseudo-labels are assigned to the target domain data based on the network output. Source domain datasets are categorized. and target domain dataset Divided into C subdomains and Where c∈{1,2,…,C} represents the category label, and their respective distributions are represented by P. s c (·) and P t c (·). Based on the concept of Local Maximum Mean Difference (LMMD), for a network with L layers, the sub-domain adaptive loss function of the l-th layer can be expressed as:

[0086]

[0087] in, To balance the hyperparameters of the classification loss function and the domain adaptation loss function, It is on Hilbert space H, concerning two distributions P s (·) and P t The measure of the difference between (·); l represents the l-th layer of the deep network.

[0088] The right item is further expanded as

[0089]

[0090] in, For having a characteristic kernel Regenerated Hilbert space (RKHS). l The kernel is the activation feature output of the l-th layer. Inner product operation is φ(·) represents a certain mapping relationship of features. and They represent and The weights belonging to category c are shown in equation (11).

[0091]

[0092] For samples in the source domain, use their actual sleep labels. The weight of each sample is calculated as a one-hot vector. For samples in the target domain, use the probability distribution output by the network. Calculate sample weights At this point, L can be calculated. LMMD result.

[0093] Furthermore, in this embodiment, a classification loss function based on pseudo-labels is used in the target domain. Defined as follows

[0094]

[0095] Among them, l [·]This represents the index function, which is defined when the condition is met. It is 1 when the target field label is C, and 0 otherwise. This represents the probability that the model predicts the target domain data to be of the Cth category. This indicates that the distribution P follows the target domain distribution. t (·) The expected result of the calculation of all input data.

[0096] Similarly, depending on the source domain sleep tag y s Source domain classification loss function Formalized as follows:

[0097]

[0098] in, This indicates that the pair follows a source predomain distribution P. t The expected result of the calculation of all input data.

[0099] Secondly, the present invention provides an unsupervised transfer learning sleep staging device, trained using the aforementioned sleep staging method, comprising a TS-AGCM model with an added ADSBN module and a DSAN model; wherein...

[0100] The TS-AGCM model is used to extract and fuse the spatiotemporal information features of the input multi-channel sleep signals and output the fused features in a specific domain.

[0101] The DSAN model is used to minimize the local maximum mean difference of the fused features, reduce the differences between the distributions of relevant subdomains of activation features in layer L, thereby solving the domain adaptation problem in transfer learning and finally outputting the sleep staging results.

[0102] In this embodiment, the dataset is divided into a source domain and a target domain. The spatiotemporal information of each domain is extracted by a shared feature module based on the TS-AGCM model and input as fused features into the ADSBN module. At this point, the features also contain domain-specific information. Subsequently, the features and labels from both domains are input into the DSAN module, which optimizes the model parameters according to a set loss function. Simultaneously, the DSAN module runs in conjunction with an iterative self-training module to generate predicted labels for the source and target domains. Finally, the model iteratively improves classification performance on the source domain dataset while also effectively classifying sleep signals on the target domain dataset, resolving the domain bias problem and achieving good knowledge transfer.

[0103] Example:

[0104] This embodiment has been validated on the MASS-SS3 and ISRUC-S3 datasets. The results were compared with 12 different baseline methods (including machine learning, deep learning, and graph convolution) on both datasets, and the present invention achieved the best performance (as shown in Tables 1 and 2). In summary, the feature-difference-based unsupervised transfer learning framework presented in this invention can serve as a supplementary tool for sleep staging, helping to improve the diagnostic capabilities for sleep disorder events, and has potential value and application prospects in portable wearable sleep health monitoring.

[0105] Table 1. Performance comparison of TS-AGCM-DA and baseline models on the MASS-SS3 dataset.

[0106]

[0107]

[0108] Table 2. Performance comparison of TS-AGCM-DA and baseline models on the I SRUC-S3 dataset.

[0109]

[0110] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An unsupervised transfer learning sleep staging method, characterized in that, The specific process is as follows: A neural network model is constructed: A dynamic domain-specific batch normalized (ADSBN) module is added between each layer of the TS-AGCM sleep staging model, which is based on temporal self-attention and dynamic graph convolution. The output of the TS-AGCM model is connected to the deep subdomain adaptation network (DSAN). The ADSBN module includes a domain-specific batch normalized (DSBN) operation and a dynamic batch normalized (ABN) operation. The dynamic batch normalized (ABN) operation is used to fuse the data distributions of the source and target domains and calculate the cross-domain moment estimate as the moment estimate of the target domain in the DSBN operation. The TS-AGCM model is used to extract and fuse the spatiotemporal information features of the input multi-channel sleep signals and output the fused features in a specific domain; the DSAN model is used to minimize the local maximum mean difference of the fused features and finally output the sleep staging results. Determine the global loss function: including the pseudo-label-based classification loss function. Dependent on source domain sleep tags Source domain classification loss function and DSAN loss function ; Training the neural network: First, train the model using source domain data. r The training of the next iteration yields a supervised model; next, the supervised model is used to predict unlabeled target domain data, and the prediction results that meet the requirements are assigned pseudo-labels; next, the target domain data with pseudo-labels are merged with the source domain data for the next model training, and the pseudo-labels generated in the previous iteration will be used in the next iteration. The above process is repeated until all data are labeled or the maximum number of iterations is reached; finally, the final neural network model used for prediction is obtained. Sleep staging: Using a trained neural network model to segment sleep signals from multiple channels.

2. The unsupervised transfer learning sleep staging method according to claim 1, characterized in that, Let the data distributions of the source domain and the target domain be respectively and The process of fusing the source and target domain data distributions into... ; in, It is a fusion factor that controls the degree of contribution of the weights of the source domain and the target domain; The cross-domain moment estimate is calculated by the following formula; in, and These are the global first moments of the current batch of data in the target and source domains, respectively. and These are the second-order moment estimates of the current batch of data in the target domain and the source domain, respectively. and The symbols represent the cross-domain first and second moment estimates that incorporate data features from the target domain t and the source domain s, respectively.

3. The unsupervised transfer learning sleep staging method according to claim 2, characterized in that, The fusion factor of the dynamic batch normalized ABN operation As one of the model parameters, it is based on the global loss function. Optimize; Assume there is a parameter set during training. ,in Indicates the first The fusion factor of each ADSBN layer is obtained through backpropagation and gradient descent with a learning rate. Update; 。 4. The unsupervised transfer learning sleep staging method according to claim 1, characterized in that, During the training phase of the neural network, prediction results that meet the probability threshold or K-Best criteria are selected and assigned pseudo-labels.

5. The unsupervised transfer learning sleep staging method according to claim 1, characterized in that, Pseudo-label-based classification loss function Dependent on source domain sleep tags Source domain classification loss function and DSAN loss function Determine the global loss function for: in, and To set weights.

6. The unsupervised transfer learning sleep staging method according to claim 5, characterized in that, The DSAN loss function for: in, To balance the hyperparameters of the classification loss function and the domain adaptation loss function, It is on Hilbert space H, concerning two distributions and Measurement of differences between them Indicates the deep network's first layer, This indicates the total number of layers in the network.

7. The unsupervised transfer learning sleep staging method according to claim 5, characterized in that, In the target domain, the classification loss function based on pseudo-labels. Defined as follows in, This represents the index function, which is defined when the condition is met. When it is 1, it is 0. The model predicts the first value for the target domain data. The probability of each category This indicates that the distribution follows the target domain distribution. The expected value of the calculation results of all input data, where c represents the category label, which takes values ​​from 1 to C, and C represents the total number of categories; This represents the predicted value of the label assigned to the target domain data.

8. The unsupervised transfer learning sleep staging method according to claim 5, characterized in that, In the source domain, based on sleep tags Source domain classification loss function Formalized as follows: in, This represents the index function, which is defined when the condition is met. When it is 1, it is 0. The model predicts the first value for the source domain data. The probability of each category This indicates that the pair follows a source predomain distribution. The expected value of the calculation results of all input data, where c represents the category label, which takes values ​​from 1 to C, and C represents the total number of categories; This represents the predicted value of the source domain sleep label.

9. An unsupervised transfer learning sleep staging device, trained using the sleep staging method of any one of claims 1-8, comprising a TS-AGCM sleep staging model based on temporal self-attention and dynamic graph convolution and a deep subdomain adaptation network (DSAN) model, both with the addition of a dynamic domain-specific batch normalized (ADSBN) module; wherein the ADSBN module includes a domain-specific batch normalized (DSBN) operation and a dynamic batch normalized (ABN) operation; wherein, The dynamic batch normalized ABN operation is used to fuse the data distributions of the source and target domains, and calculate the cross-domain moment estimate as the moment estimate of the target domain in the DSBN operation; wherein, The TS-AGCM model is used to extract and fuse the spatiotemporal information features of the input multi-channel sleep signals and output the fused features in a specific domain. The DSAN model is used to minimize the local maximum mean difference of the fused features, and finally outputs the sleep staging results.