A multi-modal balanced sleep stage classification model training method
Through multiple rounds of training, the parameters are updated by combining feature extractors and classifiers/domain discriminators to achieve a balance between modalities and improve domain generalization ability. This solves the problems of modal differences and insufficient cross-individual generalization ability in multimodal sleep stage classification, and improves classification accuracy and generalization ability.
Patent Information
- Application Number
- CN202410667497.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2044-05-28
AI Technical Summary
Existing technologies suffer from modal differences that affect the multimodal fusion effect in multimodal sleep stage classification, and lack cross-individual generalization ability, making it difficult to achieve both intermodal balance and domain generalization ability improvement.
Through multiple rounds of training, modal features are extracted from each modality's physiological time-series signal using a feature extractor. These features are then combined with a classifier and a domain discriminator to classify sleep stages and determine domains. The parameters of the feature extractor are updated using classification loss and domain discriminator loss. The parameters of the classifier and domain discriminator are adjusted based on modal performance indicators and gradients to achieve a balance between modalities and improve domain generalization ability.
It improves the accuracy of sleep stage classification and cross-individual generalization ability, achieves multimodal balance, and solves the problem that existing technologies only consider two-modal balance and cannot be extended to multimodal balance.
Smart Images

Figure CN118690223B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning, specifically to the field of sleep stage classification within machine learning, and more specifically, to a method for training a multimodal balanced sleep stage classification model. Background Technology
[0002] Sleep monitoring and staging are crucial for humans, providing valuable insights into individual sleep quality and the diagnosis of sleep-related disorders. Sleep stage classification has wide applications in disease monitoring, planning, and intervention, and is of great significance to human health.
[0003] The most commonly used sleep stage classification standard is the American Academy of Sleep Medicine (AASM) standard. In 2007, the AASM standard, based on multimodal temporal physiological signals (isomorphic multimodal) from polysomnography (PSG), including electroencephalogram (EEG), electrocardiogram (ECG), electrooculogram (EOG), and electromyography (EMG), divided sleep into five stages: wakefulness, rapid eye movement (REM), and three non-rapid eye movement (NREM) stages. NREM comprises three stages, named stage 1 (N1), stage 2 (N2), and stage 3 (N3). Stages N1 and N2 belong to light sleep, while stage N3 belongs to deep sleep. These five sleep stages correspond to the five categories of the sleep stage classification (i.e., sleep staging) task. Based on internationally recognized sleep stage classification standards, sleep monitoring plays an indispensable role in many fields such as healthcare and disease diagnosis.
[0004] Initially, researchers manually classified sleep stages based on the AASM standard from the perspectives of signal processing and medical knowledge to study issues related to sleep staging. With the rise of deep learning, researchers began to use automated feature learning to address the time-consuming and labor-intensive nature of sleep staging. In addition to simple models such as CNNs and RNNs, researchers introduced attention mechanisms to capture discriminative features based on the relative importance of different sleep stages. However, modal differences exist when multiple PSG modalities jointly represent sleep states. To explore these differences, researchers designed pro-modal feature learning and fusion methods to capture cross-modal differential features. Furthermore, researchers developed attention-based fusion techniques to enable multimodal models to focus on more important modalities. However, attention mechanisms amplify the dominance of stronger modalities, exacerbating the inherent imbalances between them, which further hinder the model's potential to utilize all modalities.
[0005] Furthermore, PSG signals exhibit significant dependencies among individuals, and existing general sleep staging methods aim to enhance the model's cross-individual generalization ability. Pre-training and fine-tuning methods from transfer learning have been introduced for individualized calibration. Unfortunately, this approach requires large amounts of data and labeled data for some target individuals, presenting inconveniences. Therefore, domain generalization methods have been integrated. For example, some researchers have introduced domain adversarial methods to obfuscate the distinctions between domains (i.e., subjects) by backpropagating the negative gradient of the domain discriminative loss, thereby enabling the model to learn domain-invariant information beneficial for generalizing to unseen domains. To balance the classification capabilities of different modalities and optimize each modality, some researchers balance the gradients of two modality-specific feature extractors based on the classification performance of each modality.
[0006] Traditional domain adversarial methods have enhanced the model's cross-subject generalization ability to some extent. However, in tasks based on multimodal data, modality differences affect the fusion effect of multimodal data, and these differences are not only reflected in classification performance but also in domain discrimination performance. Classification performance varies across different modalities, and the differences are even greater within different individual domains.
[0007] It should be noted that the background information provided is only for illustrating relevant information about the present invention to aid in understanding the technical solutions of the present invention, and does not imply that the relevant information is necessarily prior art. In the absence of evidence indicating that the relevant information was disclosed before the filing date of this invention, the relevant information should not be considered prior art. Summary of the Invention
[0008] Therefore, the purpose of this invention is to overcome the shortcomings of the prior art and provide a training method for a multimodal balanced sleep stage classification model.
[0009] The objective of this invention is achieved through the following technical solution:
[0010] According to a first aspect of the present invention, a method for training a sleep stage classification model is provided, the method comprising: acquiring a training set, the training set including multiple samples, a category label indicating the sleep stage category corresponding to each sample, and a domain label indicating the domain to which each sample belongs, wherein the samples are multimodal physiological time-series signals, and the domain is related to a user or user group; performing multiple rounds of training on a preset sleep stage classification model and a domain discriminator using the training set to obtain a trained sleep stage classification model, wherein in each round of training: extracting modal features from each modal physiological time-series signal using a feature extractor in the classification model; classifying sleep stages according to each modal feature and a fusion feature using a classifier in the classification model, wherein the fusion feature includes all modal features; and classifying sleep stages according to each modal feature and the fusion feature using a domain discriminator. Each modality is used to perform domain discrimination based on its fused features. The classification performance index for each modality is determined using the results of sleep stage classification based on each modality feature and the category labels. The classification loss is determined using the results of sleep stage classification based on the fused features and the category labels. The domain discrimination performance index for each modality is determined using the results of domain discrimination based on each modality feature and the domain labels. The domain discrimination loss is determined using the results of domain discrimination based on the fused features and the domain labels. The parameters of the feature extractor are updated based on the total loss determined by the classification loss and the domain discrimination loss. The parameters related to the modality are updated based on the gradient determined by the classification loss and the classification performance index for each modality. The parameters related to the modality are those used to process the corresponding modality features.
[0011] In some embodiments of the present invention, the fusion feature is a U×C dimensional feature formed by sequentially splicing or stacking the modal features of U modalities, where U is the total number of modalities corresponding to the multimodal physiological time-series signal, C is the dimension of a single modal feature, the nth position is the modal feature of the nth modality, and n∈[1,U]. When the classifier performs sleep stage classification based on each modal feature and the neighborhood discriminator performs neighborhood discrimination based on each modal feature, the input modal feature of the uth modality is pre-pasted with zeros to construct a U×C dimensional format with the same scale as the fusion feature, where the uth position is the modal feature of the uth modality, and all other positions except the uth position are 0, and u∈[1,U].
[0012] In some embodiments of the present invention, any one of the classification performance index and domain discriminant performance index for each modality is determined as follows: each modality feature is input into a classifier or a domain discriminator to obtain a predicted value corresponding to each modality; based on the predicted value and the corresponding label for each modality, a performance value corresponding to each modality is determined; based on the performance value corresponding to each modality and the performance values of all modalities, a performance score corresponding to each modality is determined; based on the variance between the performance score corresponding to each modality and the modality average ratio, a performance index for each modality is determined.
[0013] In some embodiments of the present invention, in each training round, the parameters related to the modality in the classifier are updated based on the classification performance index of each modality and the gradient determined by the classification gradient calculated from the classification loss, and the parameters related to the modality in the neighborhood discriminator are updated based on the domain discriminant performance index of each modality and the gradient determined by the domain discriminant gradient calculated from the domain discriminant loss.
[0014] In some embodiments of the present invention, in each training round, any modality-related parameter in the classifier and the domain discriminator is updated in the following manner: the corresponding first-order moment estimate and second-order moment estimate in the current round are updated based on the performance index of each modality, the gradient determined by the corresponding gradient calculated based on the corresponding loss, and the first-order moment estimate and second-order moment estimate related to the modality updated in the previous round; the updated first-order moment estimate and second-order moment estimate are corrected based on the decay factor; the modality-related parameters in the current round of the classifier or the domain discriminator are updated based on the corrected first-order moment estimate, second-order moment estimate, and the parameters related to the modality updated in the previous round.
[0015] In some embodiments of the present invention, the update of the parameters related to the modality in the current round classifier or neighborhood discriminator is expressed as follows:
[0016]
[0017] Where 'a' represents the classifier or domain discriminator. This represents the parameter related to the u-th mode in round ta. This represents the parameters related to the u-th mode that are updated in round t-1, a. This represents the first-order moment estimate related to the u-th mode after the t-th round of correction. Let represent the second-order moment estimate related to the u-th mode after the t-th round of correction, where ∈1 represents a constant and η represents the learning rate.
[0018] In some embodiments of the present invention, either the classification loss or the domain discrimination loss is calculated as follows:
[0019]
[0020] Among them, G a This represents a classifier or domain discriminator, where I represents the total number of training samples, and K... a G represents the total number of category labels or domain labels. a (f i ) represents G a The predicted value of the fusion feature of the i-th sample output, f i This represents the fusion feature of the i-th sample. This represents the predicted label of the i-th sample. Let represent an indicator function that indicates whether the predicted label of the i-th sample is equal to its corresponding label. The function value is 1 if it is not 1, and 0 otherwise.
[0021] According to a second aspect of the present invention, a method for sleep stage classification is provided, the method comprising: acquiring a multimodal physiological time-series signal to be classified; classifying the multimodal physiological time-series signal to be classified using a trained sleep stage classification model obtained by the method described in the first aspect of the present invention, thereby obtaining a sleep stage classification result.
[0022] Compared with the prior art, the advantages of the present invention are as follows:
[0023] (1) By extracting features from the physiological time-series signals of each modality using a feature extractor specific to each modality, the features that perform well in that modality can be captured better, enabling the classifier and the domain discriminator to learn the relevant knowledge and improve classification ability and domain generalization ability. Furthermore, by updating the parameters of the feature extractor through the total loss determined by the classification loss and the domain discriminant loss, the ability of the feature extractor specific to each modality can be improved, the differences between modalities can be reduced, and the modal features extracted by the updated feature extractor can be better.
[0024] (2) The gradients of the classifier and the neighborhood discriminator are adaptively adjusted by the performance index of each modality. The larger performance index increases the attention of the classifier or the neighborhood discriminator to the unbalanced modality-related parameters, while the smaller performance index reduces the attention to the well-balanced parameters. Thus, while improving the classification ability and the neighborhood discrimination ability, the balance between multiple modalities can also be achieved. This solves the problem that the existing technology only considers the balance between two modalities and cannot be extended to the balance of multiple modalities. Attached Figure Description
[0025] The embodiments of the present invention will be further described below with reference to the accompanying drawings, wherein:
[0026] Figure 1This is a schematic diagram of a method for training a sleep stage classification model according to an embodiment of the present invention;
[0027] Figure 2 This is a schematic diagram illustrating the calculation process of performance indicators for each mode according to an embodiment of the present invention;
[0028] Figure 3 This is a schematic diagram of the classification imbalance results in a comparative experiment according to an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of the domain discrimination imbalance results in a comparative experiment according to an embodiment of the present invention;
[0030] Figure 5 This is a schematic diagram of the prediction accuracy results in a comparative experiment according to an embodiment of the present invention;
[0031] Figure 6 This is a schematic diagram of the visualization results of FeatureNet according to an embodiment of the present invention;
[0032] Figure 7 This is a schematic diagram of the visualization results of SleepMG according to an embodiment of the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention is further described in detail below through specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0034] As mentioned in the background section, while existing modality balancing methods enhance the model's cross-domain generalization ability, they do not consider modality differences, particularly the inter-modal differences in domain generalization ability, which is crucial for sleep staging. Furthermore, although existing modality balancing methods compare the relative performance of two modalities, these methods are only applicable to balancing two modalities and not to balancing multiple modalities. Moreover, existing methods cannot simultaneously achieve a balance between inter-modal classification ability and domain generalization ability.
[0035] To address the aforementioned issues, this invention proposes a multimodal balanced sleep stage classification model training method. By updating the parameters of the feature extractor using the total loss, the feature extractor can better capture modal features, reducing differences between modalities. This allows the classifier and domain discriminator to learn relevant knowledge, improving classification and domain generalization capabilities. Furthermore, by updating the modality-related parameters in the classifier or domain discriminator using the performance metrics and corresponding gradients of each modality, the method strengthens the focus on modality imbalance and weakens the focus on modality balance. This achieves a dual balance between classification and domain generalization capabilities while improving classification and domain generalization abilities, solving the problem that existing technologies only consider the balance between two modalities and cannot be extended to the balance of multiple modalities.
[0036] Before describing the technical solution of the present invention in detail, some parameters used in the embodiments are explained as follows:
[0037] In embodiments and examples of the present invention, a∈{y,d} is used to represent symbols related to categories and domains, K a ∈{K y ,K d} represents the number of category tags and domain tags, k a ∈{k y ,k d} represents the index of the category and the field. The actual labels representing categories and domains, G represents the predicted label for the category and domain. a ∈{G y G d} represent the classifier and the neighborhood discriminator, respectively, θ a ∈{θ y ,θ d} represents the model parameters of the classifier and the domain discriminator, θ a Decomposed into mode-related parameters θ a,u u∈{e,o,m,c} represents modal correlation symbols. Indicates that they come from the same x i The predicted category labels or domain labels for different modalities, f i u θ represents the feature of each mode. f,u This represents a feature extractor specific to each modality. The parameter, θ a,u G represents a Parameters of a specific part of a mode.
[0038] To better understand this invention, the technical solution of this invention will be described in detail below from four aspects: training samples, model structure, training process, and application scenarios.
[0039] I. Training Samples
[0040] Before training the model, training samples need to be organized. According to one embodiment of the present invention, a dataset for sleep stage classification is obtained. The dataset includes multiple samples, a category label for each sample indicating the knowledge sleep stage category, and a domain label indicating the domain to which each sample belongs. The samples are multimodal physiological time-series signals, and the domain is related to a user or user group. The domain is divided by user or by user group, and different domains correspond to different users or user groups. A training set, validation set, and test set are extracted from the dataset according to a certain ratio, or a training set and test set are extracted according to a predetermined ratio. The samples in the extracted training set are used as training samples to train the model.
[0041] According to one embodiment of the present invention, the multimodal physiological timing signals include electroencephalogram (EEG), electrocardiogram (ECG), electrooculogram (EOG), and electromyogram (EMG); wherein each type of electrical signal corresponds to a modality. The sleep stage categories indicated by the category labels include: wakefulness stage, REM (rapid eye movement) stage, and non-REM stage, wherein the non-REM stage can be further divided into: N1 stage, N2 stage, and N3 stage. Therefore, two types of category labels are formed: 1. Wakefulness stage, REM stage, and non-REM stage; 2. Wakefulness stage, REM stage, N1 stage, N2 stage, and N3 stage.
[0042] According to one embodiment of the present invention, the domain can be divided according to users, for example: one user corresponds to one domain, and different domains correspond to different users. Illustratively, if multiple samples all come from the same user, then the domain labels corresponding to the multiple samples of that user are consistent, while the domain labels corresponding to the multiple samples of other users are different from the domain labels corresponding to the multiple samples of that user.
[0043] According to another embodiment of the present invention, the domain can be divided according to user groups. For example, all users can be divided into multiple user groups, and the domain labels corresponding to samples from multiple users in the same user group are consistent, while the domain labels corresponding to samples from users not in user groups are different. For illustration, assume there are 200 users in total, divided into 10 user groups, each user group including 20 users. The domain labels corresponding to samples from the 20 users in each user group are the same, while the domain labels corresponding to samples from users in other groups are different from the domain labels corresponding to samples from users in that group.
[0044] According to one example of the present invention, the dataset can utilize existing datasets, such as datasets ISRUC-S3, MASS-SS3, etc., and the dataset can be divided into training set D according to a predetermined ratio.train ={x i ,y i ,d i |i∈{1,2,…,I}} and test set D test ={x j ,y j |j∈{1,2,…,J}}, where x i Let x represent the i-th sample in the training set, I represent the number of samples in the training set, and x represent the number of samples in the training set. j Let J represent the j-th sample in the test set, and J represent the number of samples in the test set. and PSG signals containing synchronized EEG, EOG, EMG, and ECG, y i ∈{1,2,…,K y} represents the category label corresponding to the i-th sample, K y d represents the number of category labels. i ∈{1,2,…,K d} represents the domain label corresponding to the i-th sample, K d Indicates the number of domain tags.
[0045] II. Model Structure
[0046] This invention proposes a sleep stage classification model, which includes a feature extractor for extracting modal features from each modal physiological time-series signal and a classifier for classifying sleep stages based on the modal features.
[0047] According to one embodiment of the present invention, the present invention utilizes an existing dual-scale convolutional neural network model to construct a dedicated sub-extractor for feature extraction of each modality's physiological time-series signal, thereby capturing the unique features of each modality's physiological time-series signal. The modal features extracted by each dedicated sub-extractor are fused (through splicing, overlaying, or zero-padding, etc.) to obtain sample features. It should be understood that, in addition to using a dual-scale convolutional neural network model to construct a feature extractor to extract modal features, existing feature extraction network models, such as LeNet, AlexNet, and VGG, can also be used to achieve feature extraction. The technical solution of this embodiment can achieve at least the following beneficial technical effects: by using a modality-specific sub-extractor to extract corresponding modal features, it is possible to better capture the highly expressive features in that modality, so that during subsequent training, the classifier and domain discriminator can learn the knowledge corresponding to those features.
[0048] According to one embodiment of the present invention, the classifier includes a fully connected layer and a classification prediction layer. The fully connected layer is used to convolve the modality features and output the class confidence scores of the modality features in each category. The classification prediction layer is used to determine the sleep stage category to which the modality features belong based on the class confidence scores. The fully connected layer can be a single layer or multiple layers. The classification prediction layer can use the Softmax function to determine the category to which the sample belongs based on the confidence scores. It should be understood that, in addition to using fully connected layers to construct the classifier, existing models can also be used for sleep stage classification, such as support vector machines, decision trees, KNN, SVM, etc.
[0049] According to one embodiment of the present invention, the neighborhood discriminator includes a fully connected layer and a neighborhood discrimination layer. The fully connected layer is used to convolve modal features and output the neighborhood confidence of the modal features in each neighborhood. The neighborhood discrimination layer is used to determine the neighborhood to which the modal feature belongs based on the neighborhood confidence. The fully connected layer can be a single layer or multiple layers. The neighborhood discrimination layer can use the Softmax function to determine the neighborhood to which a sample belongs based on the neighborhood confidence, thereby assisting in the training of the sleep stage classification model.
[0050] According to one example of the present invention, sleep stage classification can be defined as: Among them, G f This represents a feature extractor, whose in, A dedicated sub-extractor for extracting EEG signals. A dedicated sub-extractor for extracting electrocardiogram signals. A dedicated sub-extractor for extracting eye-tracking signals. G is a dedicated feature extractor for extracting electromyographic signals. f The parameters are expressed as G y Represents a classifier. Let k represent the predicted class of the i-th sample. y This indicates a category index. f represents multimodal fusion features. i e f i o f i m f i c Indicates from The modal features extracted from [the data]. Domain discrimination can be defined as: Among them, G d Represents the neighborhood discriminator, k d Represents a domain index.
[0051] III. Training Process
[0052] The sleep stage classification model and the domain discriminator were trained multiple times using the training set to obtain the trained sleep stage classification model.
[0053] According to an embodiment of the present invention, in each round of training: modal features are extracted from the physiological time-series signal of each modality using a feature extractor in the classification model; sleep stages are classified according to each modal feature and the fusion feature using a classifier in the classification model, wherein the fusion feature includes all modal features; a neighborhood discriminator is used to perform neighborhood discrimination according to each modal feature and the fusion feature; the classification performance index of the modality is determined using the results of sleep stage classification based on each modal feature and the category label; and the classification loss is determined using the results of sleep stage classification based on the fusion feature and the category label. The domain discrimination performance index of a modality is determined using the results of domain discrimination based on each modality feature and the domain label. The domain discrimination loss is determined using the results of domain discrimination based on fused features and the domain label. The parameters of the feature extractor are updated based on the total loss determined by the classification loss and the domain discrimination loss. The parameters related to the modality in the classifier are updated based on the gradient determined by the classification loss and the classification performance index of each modality. The parameters related to the modality in the domain discriminator are updated based on the gradient determined by the domain discrimination loss and the domain discrimination performance index of each modality. The parameters related to the modality refer to the parameters used to process the corresponding modality features. This embodiment's technical solution can achieve at least the following beneficial technical effects: updating the parameters of the feature extractor using the total loss enables the feature extractor to better capture modality features, thereby improving classification ability and domain generalization ability; updating the modality-related parameters in the classifier or domain discriminator using the performance index of each modality and the corresponding gradient strengthens the focus on modality imbalance and weakens the focus on modality balance, achieving a dual balance between classification ability and domain generalization ability while improving classification ability and domain generalization ability.
[0054] According to one embodiment of the present invention, the parameters of the feature extractor are updated based on the total loss determined by the classification loss and the domain discrimination loss, wherein the total loss can be expressed as: in, Represents classification loss. The domain indicates the loss.
[0055] Schematic, both the classification loss and the domain discrimination loss are calculated using the cross-entropy loss function, whereby either loss is calculated as follows:
[0056]
[0057] Among them, G aG represents a classifier or neighborhood discriminator. a ∈{G y G d}, G y G represents the classifier. d Let I represent the domain discriminator, and K represent the total number of training samples. a G represents the total number of category labels or domain labels. a (f i ) represents G a The predicted value of the fusion feature of the i-th sample output, f i This represents the fusion feature of the i-th sample. This represents the predicted label of the i-th sample. Let represent an indicator function that indicates whether the predicted label of the i-th sample is equal to its corresponding label. The function value is 1, and conversely, it is 0. Illustratively, the predicted label refers to the label determined by the classifier or domain discriminator based on the class confidence or domain confidence output by the fusion feature. For example, the classifier determines the label based on the fusion feature f. i The output category confidence score determines the category label as the sobriety stage, while the fused feature f i The input category label is REM (Rapid Eye Movement) stage. The function value is 0; for example, the neighborhood discriminator determines the value based on the fused feature f. i The domain confidence score of the output indicates that the domain label is 1, and the fused feature f i The input domain label is also 1. The function value is 1.
[0058] According to one embodiment of the present invention, in each training round, the parameters related to that modality in the classifier are updated based on the classification performance index of each modality and the gradient determined by the classification gradient calculated from the classification loss. Similarly, the parameters related to that modality in the neighborhood discriminator are updated based on the domain discriminant performance index of each modality and the gradient determined by the domain discriminant gradient calculated from the domain discriminant loss. Here, the parameters related to each modality in the classifier and the neighborhood discriminator refer to the parameters used to process the features of the corresponding modality.
[0059] According to one embodiment of the present invention, the fusion feature is a U×C dimensional feature constructed by sequentially splicing or stacking the modal features of U modalities, where U is the total number of modalities corresponding to the multimodal physiological time-series signal, C is the dimension of a single modal feature, the nth position is the modal feature of the nth modality, and n∈[1,U]. When using a classifier to classify sleep stages based on each modal feature and using a neighborhood discriminator to perform neighborhood discrimination based on each modal feature, the input modal feature of the uth modality is pre-padded with zeros to construct a U×C dimensional format with the same scale as the fusion feature, where the uth position is the modal feature of the uth modality, and all other positions except the uth position are 0, u∈[1,U]. Illustratively, the fusion feature... When using a classifier to classify sleep stages based on each modality feature and a neighborhood discriminator to perform neighborhood discrimination based on each modality feature, the modality feature of the first input modality can be represented as: Similarly, the modal characteristics of the second mode can be represented as The modal characteristics of the third mode can be expressed as: The modal characteristics of the fourth mode can be represented as follows:
[0060] According to one embodiment of the present invention, any one of the classification performance index and domain discriminant performance index of each modality is determined as follows: inputting the features of each modality into a classifier or a domain discriminator to obtain a predicted value corresponding to each modality; determining the performance value corresponding to each modality based on the predicted value and the corresponding label; determining the performance score corresponding to each modality based on the performance value corresponding to each modality and the performance values of all modalities; and determining the performance index of each modality based on the variance between the performance score corresponding to each modality and the modality average ratio.
[0061] According to an embodiment of the present invention, in each training round, any modality-related parameter in the classifier and the domain discriminator is updated in the following manner: the corresponding first-order moment estimate and second-order moment estimate in the current round are updated based on the performance index of each modality, the gradient determined by the corresponding gradient calculated based on the corresponding loss, and the first-order moment estimate and second-order moment estimate related to the modality updated in the previous round; the updated first-order moment estimate and second-order moment estimate are corrected according to the decay factor; the modality-related parameters in the current round of the classifier or the domain discriminator are updated based on the corrected first-order moment estimate, second-order moment estimate, and the modality-related parameter updated in the previous round.
[0062] According to one example of the invention, such as Figure 1 The diagram illustrates the complete training process. Specifically, the training set is input into the feature extractor, and then into each dedicated sub-extractor... Extract modal features of corresponding physiological time-series signals For example: A dedicated sub-extractor for extracting EEG signals inputs the EEG signal. In this process, the corresponding modal features f are obtained. i e ;akin, A dedicated sub-extractor for extracting EOG signals inputs the EOG signal. In this process, the corresponding modal features f are obtained. i o ; A dedicated sub-extractor for extracting EMG signals inputs the EMG signal. In this process, the corresponding modal features f are obtained. i m ; A dedicated sub-extractor for extracting ECG signals inputs the ECG signal. In this process, the corresponding modal features f are obtained. i c The modal features of the four extracted physiological time-series signals are fused to obtain the fused feature f. i The fused features are input into the classifier and the domain discriminator respectively to obtain the corresponding classification and domain discrimination results. For example, the classifier includes modality-related parameters, as illustrated. This represents the parameters related to EEG signals in the classifier. This represents the parameters in the classifier that are related to the electrocardiogram signal. This represents the parameters in the classifier that are related to the eye-tracking signal. This represents the parameters related to electromyography (EMG) signals in the classifier; after inputting the fused features into the classifier and performing convolution, the confidence score of the fused features in each sleep stage category is output, and the sleep stage category (Wake, N1, N2, N3, REM) is determined based on the confidence score. The domain discriminator includes modality-related parameters, where... This represents the parameters related to EEG signals in the domain discriminator. This represents the parameters related to the ECG signal in the neighborhood discriminator. This represents the parameters related to eye-tracking signals in the domain discriminator. This represents the parameters related to electromyography signals in the domain discriminator; the fused features are input into the domain discriminator and then convolved, outputting the confidence scores of the fused features in each domain, and the domain discrimination (1, 2, ..., K) is determined based on the confidence scores. d -1). Calculate the classification loss based on the classification results and corresponding category labels. and the classification performance metrics corresponding to each modality. Based on classification loss and the parameters of each dedicated sub-extractor Find the gradient Update the parameters of each dedicated sub-extractor based on the classification loss and the classifier parameters. Calculated gradient And update the mode-related parameters in the classifier based on the classification performance metrics for each mode. Calculate the domain discrimination loss based on the domain discrimination results and the corresponding domain labels. and the domain discrimination performance index corresponding to each mode. Based on the domain discrimination loss and the parameters of each dedicated sub-extractor Find the negative gradient Update the parameters of each dedicated sub-extractor based on the domain discrimination loss and the parameters of the neighborhood discriminator. Calculated gradient And update the mode-related parameters in the neighborhood discriminator with the domain discrimination performance index for each mode. The technical solution of this embodiment can achieve at least the following beneficial technical effects: by using the performance index of each modality, the gradients of the classifier and the domain discriminator can be adaptively adjusted; by using a larger performance index, the attention to the parameters of the unbalanced modality is increased; and by using a smaller performance index, the attention to the well-balanced parameters is reduced. This can achieve the balance of multiple modalities and solve the problem that the prior art only considers the balance between two modalities and cannot be extended to the balance of multiple modalities.
[0063] According to one example of the invention, such as Figure 2 The diagram illustrates the calculation process for the performance metrics of each modality. The specific process is as follows: Each modality feature is input into the classifier and the neighborhood discriminator to obtain the corresponding classification result and neighborhood discrimination result. Either the classification result or the neighborhood discrimination result is obtained in the following manner:
[0064]
[0065] Where a represents the classifier or domain discriminator, a∈{y,d}, y represents the classifier, and d represents the domain discriminator. This represents the result corresponding to the modal feature of the u-th mode in the i-th sample output by a. Let represent the modal feature of the u-th mode in the i-th sample. This modal feature is pre-zero-padding to construct a modal feature with the same scale as the fused feature. This represents the sum of confidence levels for the u-th mode.
[0066] Schematic, the classification performance value of each modality is calculated based on the classification result of each modality and its corresponding category label, and the domain performance value of each modality is calculated based on the domain discrimination result of each modality and its corresponding domain label. Either the classification performance value or the domain discrimination performance value is calculated in the following manner:
[0067]
[0068] Where 'a' represents the classifier or domain discriminator. K represents the classification performance or domain discriminant performance of the u-th modality in the t-th round, where I represents the total number of training samples, and K represents the domain discriminant performance. a Indicates the total number of tags. Let represent an indicator function that indicates whether the predicted label of the i-th sample is equal to its corresponding label. This represents the sum of confidence levels for the u-th mode. The function value is 1 if it is not 1, otherwise the function value is 0.
[0069] To illustrate, the performance score for each modality is calculated based on the performance value of each modality and the performance values of all modalities. The calculation method can be expressed as follows:
[0070]
[0071] in, This represents the classification performance score or domain discrimination performance score of the u-th modality in the t-th round, where U represents the total number of modalities.
[0072] Schematic, the performance index of each mode is calculated based on the variance between the performance score of each mode and the mode mean ratio. The calculation method can be expressed as follows:
[0073]
[0074] in, Let represent the classification performance index or domain discrimination performance index of the u-th modality in the t-th round, where U represents the total number of modalities, and tanh is a smooth activation function. Illustratively, the smaller the calculated performance index, the more balanced the modalities are in terms of classification or domain discrimination.
[0075] Indicatively, the classification gradient is calculated based on the classification loss to obtain the classification gradient and the classification performance index of each mode to determine the corresponding classification equilibrium gradient. The domain discriminant gradient is calculated based on the domain discriminant loss to obtain the domain discriminant gradient and the domain discriminant performance index of each mode to determine the corresponding domain discriminant equilibrium gradient. Any equilibrium gradient is calculated as follows:
[0076]
[0077] in, Let represent the equilibrium gradient corresponding to the u-th mode in the t-th round. This represents the classification gradient or domain discrimination gradient of the u-th mode in the t-th round.
[0078] As an illustration, the first-order moment estimates and second-order moment estimates corresponding to the gradient are initialized to zero. In each training round, the first-order moment estimates and second-order moment estimates corresponding to the current round are updated based on the first-order moment estimates and second-order moment estimates updated in the previous round and the corresponding balancing gradient. As an illustration, the first-order moment estimate is calculated in the following way:
[0079]
[0080] in, This represents the first-order moment estimate of the u-th mode in the t-th round. Let β1 represent the first-order moment estimate of the u-th mode in the (t-1)-th round, and let β1 represent the decay factor of the first-order moment estimate.
[0081] Schematic, the second-order moment estimate is calculated as follows:
[0082]
[0083] in, This represents the second-order moment estimate of the u-th mode in the t-th round. Let β2 represent the second-order moment estimate of the u-th mode in the (t-1)-th round, and let β2 represent the decay factor of the first-order moment estimate.
[0084] To illustrate, in order to prevent the first-order and second-order moment estimates from biasing to zero, the updated first-order and second-order moment estimates are corrected according to the corresponding attenuation factors. The correction method can be expressed as follows:
[0085]
[0086]
[0087] in, This represents the corrected first-order moment estimate. This represents the corrected second-order moment estimate.
[0088] Schematic, based on the corrected first-moment estimate, second-moment estimate, and the previously updated modality-related parameters, the current classifier or neighborhood discriminator updates the modality-related parameters. The update of any modality-related parameter in the current classifier or neighborhood discriminator can be expressed as:
[0089]
[0090] Where 'a' represents the classifier or domain discriminator. This represents the parameter related to the u-th mode in the t-th round classifier or neighborhood discriminator. This represents the updated parameters related to the u-th mode in the (t-1)-th round classifier or neighborhood discriminator. This represents the first-order moment estimate related to the u-th mode after the t-th round of correction. Let represent the second-order moment estimate associated with the u-th mode after the t-th round of correction, where η represents the learning rate and ∈1 represents a preset constant to prevent division by zero.
[0091] IV. Application Scenarios
[0092] According to an embodiment of the present invention, a sleep stage classification method is provided, the method comprising: acquiring multimodal physiological time-series information to be classified; and using a trained sleep stage classification model obtained by training the sleep stage classification model according to the method described in the foregoing embodiment to classify the sleep stage classification model to classify the sleep stage to be classified, thereby obtaining a sleep stage classification result.
[0093] To demonstrate the technical effects of this invention, the inventors conducted experiments, and the relevant experimental data are as follows:
[0094] (1) Dataset and Preprocessing
[0095] The inventors evaluated the proposed method on two public datasets (ISRUC-S3 and MASS-SS3). For fair comparison, motion and unknown phases were removed from the datasets, and N3 and N4 phases were merged into a single N3 phase, generating five sleep stage categories: wakefulness, N1, N2, N3, and REM, according to the AASM standard. Each PSG recording was downsampled to 100Hz and divided into 30-second periods.
[0096] The ISRUC-S3 dataset consists of PSG data collected from 10 subjects (one male and nine females) over an 8-hour period over one night, containing 8589 sleep periods. In the experiment, 10 out of 12 channels were selected, with the leg EMG data moved away from the EEG data. These 10 channels comprised four modalities: six EEG signal channels, two EOG signal channels, one EMG signal channel, and one ECG signal channel.
[0097] The MASS-SS3 dataset contains PSG data from 62 subjects (28 men and 34 women) collected over an 8-hour period in one night, comprising 59,304 sleep periods. The experiment used 10 channels similar to the ISRUC-S3 dataset, representing four modalities.
[0098] (2) Experimental setup
[0099] In the experiment, FeatureNet was used as a multimodal sleep staging method. The dataset uses a backbone network of MultmodelGeneralizable (NaiveMG) and the method proposed in this invention (hereinafter referred to as SleepMG), and employs a leave-one-out-of-subjects method to divide the dataset into five domains with different subjects. Five-fold cross-validation is then performed to divide the dataset into training and test sets. From the training set, 20% is further allocated as a validation set. The best model based on the validation set is saved and evaluated on the cross-domain test set. The final reported results represent the overall evaluation of the entire dataset.
[0100] In the experiment, the Adam optimizer was used for model optimization, with a learning rate of 0.001, a decay factor β1 of 0.5, and β2 of 0.999. The batch size for data processing was 256, and the training epochs were set to 50. The gradient reversal ratios used in training for the ISRUC-S3 and MASS-SS3 datasets were set to 0.1 and 1, respectively.
[0101] (3) Evaluation indicators
[0102] Accuracy, F1 score, macro F1 score, and Kappa coefficient were used as evaluation metrics in this experiment, among which:
[0103] Accuracy is defined as:
[0104]
[0105] Wherein, TP represents the number of samples correctly classified in the current sleep stage, FP represents the number of samples from other sleep stages that are misclassified as belonging to the current sleep stage, FN represents the number of samples in the current sleep stage that are misclassified as belonging to other stages, and TN represents the number of samples from other sleep stages that are accurately classified as not belonging to the current sleep stage.
[0106] The F1 value is defined as:
[0107]
[0108] The F1 score is defined as the harmonic mean of recall and precision (Precision measures how many samples predicted as belonging to a specific stage actually belong to that specific stage, while Recall measures how many samples actually belonging to a specific stage are successfully predicted).
[0109] The macro F1 value is defined as:
[0110]
[0111] Where r represents a specific sleep stage category, and R represents the total number of sleep stage categories.
[0112] The Kappa coefficient is defined as:
[0113]
[0114] Where p0 refers to the relative observational consistency among evaluators, while p e It represents the assumed probability of consistency of chance or consistency of probability.
[0115] (4) Comparison Method
[0116] This experiment selected eight classic and state-of-the-art sleep staging methods as baseline methods from four perspectives, including: four traditional sleep staging methods, one generalizable sleep staging method based on transfer learning to improve cross-domain sleep staging, two multimodal sleep staging methods involving modality-specific feature extractors, and a fusion and balancing method specifically designed for multimodal sleep staging, including:
[0117] FeatureNet: This traditional method uses a dual-scale CNN architecture with different kernel sizes and channel configurations. The first set of kernels consists of a size of {50, 8, 8, 8} and the corresponding channels of {32, 64, 64, 64}. The second set of kernels consists of a size of {64, 8, 6, 6, 4} and the corresponding channels of {64, 64, 64, 64}.
[0118] DeepSleepNet: This traditional method uses a CNN-BiLSTM model. The CNN captures local temporal modalities and spatial relationships, while the BiLSTM component captures long-term temporal dependencies.
[0119] MaskSleepNet: This traditional method combines a dual-scale CNN for feature extraction, squeeze and activation blocks for optimizing feature weights, and multi-head attention for capturing temporal information.
[0120] AttnSleep: This traditional approach integrates a multi-resolution CNN model, adaptive feature recalibration for learning interdependencies between features, and multi-head attention for capturing temporal dependencies.
[0121] DAN: The improved generalized sleep staging method is based on CNN-BiGRU and utilizes MMD alignment to learn domain-invariant representations.
[0122] SleepPrintNet: This multimodal sleep staging method involves modality-specific feature learning based on a one-dimensional convolutional model. In addition to learning the temporal features of all PSG modes, it also focuses on learning the spectral spatial features of EEG modes.
[0123] MMASleepNet: This multimodal sleep staging method combines a one-dimensional convolutional model with squeezing and excitation to learn features specific to a particular modality, and utilizes feature fusion based on a transformer encoder model.
[0124] OGM-GE: This modality balancing method was originally an audiovisual bimodal balancing method, which improves the model by balancing the classification performance of the two modalities and the gradient of the modulated feature extractor.
[0125] (5) Comparison of experimental results
[0126] To demonstrate the advantages of the proposed method in sleep staging, SleepMG was compared with the eight methods mentioned above in an experiment. The experimental results are shown in Table 1:
[0127] Table 1 Performance comparison of SleepMG and existing methods on two public datasets.
[0128]
[0129] As shown in Table 1, SleepMG outperforms other methods in every metric across both datasets. On the ISRUC-S3 dataset, the second-best accuracy method is DAN, while SleepMG improves accuracy by nearly two percentage points, and by approximately 3.6% compared to other methods (e.g., FeatureNet). On the MASS-SS3 dataset, the second-best method is OGM-GE, but SleepMG further improves accuracy by approximately 1.0%, highlighting the importance of modality balance and SleepMG's ability to balance the two performance modes. The experimental results in Table 1 demonstrate SleepMG's superior performance in balancing classification and domain-discriminative modalities.
[0130] To further verify the progress of this invention in achieving modality balance, the changes in modality imbalance during training using the ISRUC-S3 dataset were visualized. The modality imbalance in classification and domain discrimination performance was represented by the sum of squares of the average relative differences. This is used as a measure. The lower the degree of modal imbalance, the more balanced the modes are. The experimental results are as follows: Figure 3 and Figure 4 As shown, Figure 3 It demonstrates the imbalance of the classification. Figure 4 This demonstrates the imbalance in domain discrimination, based on Figure 3 and Figure 4As can be seen, the SleepMG method exhibits lower modality imbalance in both classification and domain discrimination, indicating better mode balance. Furthermore, the changes in test accuracy are visualized, such as... Figure 5 As shown, this reveals that cross-domain sleep staging on the test set is significantly improved when the modalities are more balanced.
[0131] To further demonstrate the contributions of each module in SleepMG, ablation experiments were conducted on two public datasets to compare the performance of the dedicated sub-extractor (M) and the generalization module (G). The experimental results are shown in Table 2.
[0132] Table 2 Ablation results of dedicated sub-extractor (M) and generalization module (G)
[0133]
[0134] This experiment uses FeatureNet as the backbone (i.e., ×), with a dedicated sub-extractor used to extract modal features from specific physiological time-series signals. These modal features are then directly concatenated and fused. The generalizable module comprises the classifier and the domain discriminator. Experiments on sleep stage classification on two datasets show that the generalization module provides a slight improvement, while the dedicated sub-extractor exhibits a more significant effect than the generalization module alone. Furthermore, the combination of the dedicated sub-extractor and the generalizable module brings a significant improvement.
[0135] To explore effective feature fusion methods for multimodal sleep staging, this experiment used FeatureNet to extract unimodal features and fused them with direct concatenation, self-attention weighting, and modality balancing methods, respectively. The experimental results are shown in Table 3.
[0136] Table 3 Ablation experimental results of different multimodal feature fusion methods
[0137]
[0138] As shown in Table 3, the experimental results indicate that self-attention performs worse than direct concatenation. Conversely, the modality balancing method performs well on both datasets. This suggests that self-attention focuses more on well-performing modalities, exacerbating the modality imbalance and impairing classification. Furthermore, unlike attention-based methods, the balancing method assigns greater weights to poorly performing modalities, which positively contributes to classification accuracy.
[0139] To further verify the technical effect of the present invention in achieving balance, the balance effects of different components in the sleep stage classification model and the domain discriminator in the embodiments of the present invention were compared. The experimental results are shown in Table 4:
[0140] Table 4. Balancing Effects of Different Components in the Sleep Stage Classification Model and Domain Discriminator
[0141]
[0142] As shown in Table 4, balancing modality-specific feature extractors (i.e., dedicated sub-extractors) has little or no effect, while fine-grained intermodal balancing of the modality-specific parts of classifiers and domain discriminators has a positive effect. In multimodal feature learning, focusing solely on achieving modality balance can significantly weaken the model's ability to extract modality-related information. In domain adversarial learning, classification ability and domain discrimination ability are often considered opposing goals. However, imbalances between the two modalities can negatively impact model performance. For example, if there are significant differences in domain discrimination ability between different modalities, the model may learn irrelevant information related to modality-related or modality-specific participants, which may limit the model's ability to generalize across domains. This intermodal imbalance can impair performance. In summary, imbalances between these two modalities negatively impact model performance. Fine-grained intermodal balancing of classification and domain discrimination abilities is crucial to mitigating these negative effects and improving the overall performance of sleep staging.
[0143] To enable more visual analysis, this experiment utilizes t-SNE to visualize the feature embeddings of the FeatureNet and SleepMG methods, such as... Figure 6 and Figure 7 As shown, Figure 6 The visualization results of FeatureNet are shown. Figure 7 The visualization results of SleepMG are shown, based on Figure 6 and Figure 7 The visualization results show that SleepMG exhibits clearer classification boundaries than the FeatureNet method. For example, in SleepMG, the clusters representing the deep sleep stage N3 are fewer in number and more tightly grouped, while the clusters representing the N2 stage (represented in green) clearly separate the blue N3 stage from other stages. The light sleep stage N1 is the most difficult to distinguish, appearing as tightly grouped yellow clusters in SleepMG, showing clearer boundaries.
[0144] In summary, the method for training a sleep stage classification model proposed in this invention has the following advantages:
[0145] (1) By extracting features from the physiological time-series signals of each modality using a feature extractor specific to each modality, the features that perform well in that modality can be captured better, enabling the classifier and the domain discriminator to learn the relevant knowledge and improve classification ability and domain generalization ability. Furthermore, by updating the parameters of the feature extractor through the total loss determined by the classification loss and the domain discriminant loss, the ability of the feature extractor specific to each modality can be improved, the differences between modalities can be reduced, and the modal features extracted by the updated feature extractor can be better.
[0146] (2) The gradients of the classifier and the neighborhood discriminator are adaptively adjusted by the performance index of each modality. The larger performance index increases the attention of the classifier or the neighborhood discriminator to the unbalanced modality-related parameters, while the smaller performance index reduces the attention to the well-balanced parameters. Thus, while improving the classification ability and the neighborhood discrimination ability, the balance between multiple modalities can also be achieved. This solves the problem that the existing technology only considers the balance between two modalities and cannot be extended to the balance of multiple modalities.
[0147] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.
[0148] This invention can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0149] Computer-readable storage media can be tangible devices that hold and store instructions for use by an instruction execution device. Computer-readable storage media can be, for example, including but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.
[0150] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for training a sleep stage classification model, characterized in that, The method includes: Obtain a training set, which includes multiple samples, a category label indicating the sleep stage category for each sample, and a domain label indicating the domain to which each sample belongs. The samples are multimodal physiological time-series signals, and the domain is related to the user or user group. The training set is used to train the preset sleep stage classification model and the domain discriminator in multiple rounds to obtain the trained sleep stage classification model. In each round of training: the feature extractor in the classification model extracts modal features from each modal physiological time-series signal, and the classifier in the classification model classifies sleep stages according to each modal feature and the fusion feature, wherein the fusion feature includes all modal features. A domain discriminator is used to perform domain discrimination based on each modality feature and fused feature; The classification performance index of the modality is determined by using the results of sleep stage classification based on each modality feature and the category label, and the classification loss is determined by using the results of sleep stage classification based on the fusion feature and the category label. The domain discrimination performance index of the modality is determined by using the results of domain discrimination based on each modality feature and the domain label, and the domain discrimination loss is determined by using the results of domain discrimination based on the fused features and the domain label; The parameters of the feature extractor are updated based on the total loss determined by the classification loss and the domain discriminant loss. The parameters in the classifier related to that mode are updated based on the gradient determined by the classification loss and the classification performance index for each mode. The parameters in the neighborhood discriminator related to that mode are updated based on the gradient determined by the domain discriminant loss and the domain discriminant performance index for each mode. The parameters related to that mode refer to the parameters used to process the features of the corresponding mode. The total loss is: , Represents classification loss. The domain discriminant loss is represented by the classification gradient and the classification performance index of each mode, respectively, to determine the corresponding classification equilibrium gradient. Similarly, the domain discriminant gradient and the domain discriminant performance index of each mode are used to determine the corresponding domain discriminant equilibrium gradient. Any equilibrium gradient is calculated as follows: , Indicates the first Wheel of Life The corresponding equilibrium gradient for each mode, Indicates the first Wheel of Life The classification gradient or domain discrimination gradient of a modality.
2. The method according to claim 1, characterized in that, The fusion feature is a U×C dimensional feature formed by sequentially splicing or stacking the modal features of U modalities, where U is the total number of modalities corresponding to the multimodal physiological time-series signal, C is the dimension of a single modal feature, the nth position is the modal feature of the nth modality, and n∈[1,U]. When classifying sleep stages using a classifier based on each modality feature and when performing domain discrimination using a domain discriminator based on each modality feature, the modality feature of the input u-th modality is pre-padding with zeros to construct a U×C dimensional format with the same scale as the fused feature, where the u-th position is the modality feature of the u-th modality, and all other positions except the u-th position are 0, u∈[1,U].
3. The method according to claim 2, characterized in that, The classification performance index and domain discrimination performance index for each modality are determined in the following manner: Each modality feature is input into a classifier or a domain discriminator to obtain the predicted value for each modality. Based on the predicted value and the corresponding label for each mode, determine the performance value for each mode; Based on the performance value corresponding to each mode and the performance values of all modes, determine the performance score corresponding to each mode; The performance index for each mode is determined based on the variance between the performance score corresponding to each mode and the mode average ratio.
4. The method according to claim 3, characterized in that, In each training round, the parameters related to that mode in the classifier are updated based on the classification performance index of each mode and the gradient determined by the classification gradient calculated from the classification loss. The parameters related to that mode in the neighborhood discriminator are updated based on the domain discriminant performance index of each mode and the gradient determined by the domain discriminant gradient calculated from the domain discriminant loss.
5. The method according to claim 4, characterized in that, In each training round, any modality-related parameter in the classifier and the domain discriminator is updated as follows: The first and second moment estimates in the current round are updated based on the performance index of each mode, the gradient determined by the corresponding gradient calculated from the corresponding loss, and the first and second moment estimates related to the mode updated in the previous round. The updated first and second moment estimates are then corrected based on the decay factor. The parameters related to the mode in the current classifier or domain discriminator are updated based on the corrected first-order moment estimate, second-order moment estimate, and the previously updated parameters related to the mode.
6. The method according to claim 5, characterized in that, The update of the parameters related to this mode in the current round classifier or neighborhood discriminator is expressed as follows: ; in, This represents a classifier or neighborhood discriminator. Indicates the first wheel Middle and the first A mode-related parameter, express wheel The updated version of the first A mode-related parameter, Indicates the first After the round of correction and the first First-order moment estimation of modal correlation Indicates the first After the round of correction and the first Second-order moment estimation of modal correlation Represents a constant. This represents the learning rate.
7. The method according to claim 5, characterized in that, The classification loss and the domain discrimination loss are calculated as follows: ; in, This represents a classifier or neighborhood discriminator. This represents the total number of training samples. This indicates the total number of category labels or domain labels. express The output of the first The predicted value of the fusion feature of each sample. Indicates the first The fusion features of each sample Indicates the first Predicted label for each sample, Indicates the instruction of the first An indicator function for whether the predicted label of a sample is equal to its corresponding label. The function value is 1 if it is true, and 0 otherwise.
8. A method for classifying sleep stages, characterized in that, The method includes: Acquire multimodal physiological time-series signals to be classified; The multimodal physiological time-series signal to be classified is classified using a sleep stage classification model trained as described in any one of claims 1-7, to obtain the sleep stage classification result.
9. A computer-readable storage medium, characterized in that, It stores a computer program that can be executed by a processor to implement the steps of the method according to any one of claims 1 to 8.
10. An electronic device, characterized in that, include: One or more processors; as well as Memory, wherein the memory is used to store executable instructions; The one or more processors are configured to implement the steps of the method of any one of claims 1 to 8 by executing the executable instructions.
