Multi-modal balanced sleep stage classification model training method

Through multiple rounds of training and modal performance index adjustment, the problems of modal differences and insufficient domain discrimination performance in the sleep stage classification model were solved, achieving a balance between modalities and improving the accuracy of sleep stage classification.

CN118690223AActive Publication Date: 2024-09-24INST OF COMPUTING TECH CHINESE ACAD OF SCI

Patent Information

Application Number
CN202410667497.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-24
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

Existing sleep stage classification models have modal differences in multi-modal data, resulting in unbalanced classification performance and difficulty in fully utilizing the potential of all modalities. Moreover, although traditional domain adversarial methods enhance cross-individual generalization capabilities, they suffer from inefficiency in the model. There are deficiencies in state differences and domain discrimination performance.

Method used

Using a multi-round training method, the modal features and fusion features are extracted in each round of training for sleep stage classification and domain discrimination, the classification loss and domain discrimination loss are used to update the feature extractor parameters, and the classifier and domain discrimination are adjusted based on modal performance indicators. Adapter parameters to achieve balance between modes and improve domain generalization capabilities.

Benefits of technology

It improves the feature extraction capabilities of each modality, reduces the differences between modalities, enhances the learning capabilities of classifiers and domain discriminators, achieves a balance between multiple modalities, and improves the accuracy of sleep stage classification. and domain generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690223A
    Figure CN118690223A
Patent Text Reader

Abstract

The invention provides a multi-modal balanced sleep stage classification model training method, and the method comprises the steps: obtaining a training set which comprises a plurality of samples, and each sample corresponds to a class label and a domain label; multiple rounds of training are conducted on a preset sleep stage classification model and a domain discriminator through the training set, a trained sleep stage classification model is obtained, and in each round of training, features in samples are extracted through a feature extractor of the classification model, and classification is conducted according to the features through a classifier of the classification model; performing domain discrimination according to the features by using a domain discriminator; determining classification performance indexes and classification losses according to classification results of the features and category labels; determining a domain discrimination performance index and domain discrimination loss according to a domain discrimination result and a domain label of the feature; and updating the parameters of the feature extractor according to the total loss determined by the classification loss and the domain discrimination loss, and updating the parameters in the classifier or the domain discriminator according to the gradient determined by the loss and the performance index.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning, specifically to the field of sleep stage classification in the field of machine learning, and more specifically to a multimodal balanced sleep stage classification model training method. Background Art

[0002] Sleep monitoring and staging are essential to humans and can provide valuable insights into an individual's sleep quality and diagnose sleep-related disorders. Sleep stage classification has wide applications in disease monitoring, scheduling, and intervention, and has important implications for human health.

[0003] The commonly used sleep stage classification standard is the American Academy of Sleep Medicine (AASM) standard. In 2007, the AASM standard was based on the multimodal temporal physiological signals (isomorphic multimodality) of polysomnography (PSG), including electroencephalogram (EEG), electrocardiogram (ECG), electrooculogram (EOG) and electromyography (EMG), etc., and divided sleep into five stages, namely wakefulness (Wake), rapid eye movement (REM), and three non-rapid eye movements (NREM). Among them, NREM contains three stages, named stage 1 (N1), stage 2 (N2) and stage 3 (N3). Stages N1 and N2 belong to the light sleep stage, and stage N3 belongs to the deep sleep stage. These five sleep stages correspond to the five categories of the sleep stage classification (i.e. sleep staging) task. Based on the internationally recognized sleep stage classification standards, sleep monitoring plays an indispensable role in many fields such as healthcare and disease diagnosis.

[0004] Initially, researchers studied issues related to sleep staging by manually classifying sleep stages from the perspective of signal processing and medical knowledge according to the AASM standards. With the rise of deep learning, researchers began to adopt automatic feature learning to solve time-consuming and labor-intensive problems in sleep staging. In addition to simple CNN, RNN and other models, researchers also introduced attention mechanisms to capture distinguishing features based on the relative importance of different sleep periods. However, there are modal differences when multiple PSG modalities jointly represent sleep states. To explore these differences, researchers designed modality-by-modality feature learning and fusion methods to capture differentiated features across modalities. In addition, researchers have developed attention-based fusion techniques that enable multimodal models to focus on more important modalities. However, the attention mechanism amplifies the dominance of stronger modalities and exacerbates the inherent imbalance between them, which further hinders the model from exploiting the potential of all modalities.

[0005] In addition, PSG signals have serious dependencies between different individuals, and existing general sleep staging methods aim to enhance the cross-individual generalization ability of the model. Pre-training and fine-tuning methods in transfer learning are introduced for individual personalized calibration. Unfortunately, this method requires a large amount of data and labeled data of some target individuals, which brings inconvenience. Therefore, domain generalization methods are integrated. For example, some researchers introduced domain adversarial methods to confuse the distinction between domains (i.e., subjects) by back-propagating the negative gradient of the domain discriminant loss, so that the model can learn domain-invariant information that is beneficial for generalization in unseen domains. In order to balance the classification capabilities of the modalities and make each modality as optimal as possible, some researchers balance the gradients of the two modality-specific feature extractors according to the classification performance of the modality.

[0006] Traditional domain adversarial methods have enhanced the model's ability to generalize across subjects to a certain extent. However, in tasks based on multimodal data, modality differences will affect the multimodal fusion effect, and modality differences are not only reflected in classification performance, but also in domain discrimination performance. There are differences in classification performance between different modalities, and the differences are even greater within different individual domains.

[0007] It should be noted that this background technology is only used to introduce the relevant information of the present invention to help understand the technical solution of the present invention, but it does not mean that the relevant information is necessarily the prior art. If there is no evidence that the relevant information has been disclosed before the application date of the present invention, the relevant information shall not be regarded as the prior art. Summary of the invention

[0008] Therefore, the purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a multimodal balanced sleep stage classification model training method.

[0009] The objective of the present invention is achieved through the following technical solutions:

[0010] According to a first aspect of the present invention, a method for training a sleep stage classification model is provided, the method comprising: obtaining a training set, the training set comprising a plurality of samples, a category label indicating a sleep stage category corresponding to each sample, and a domain label indicating a domain to which each sample belongs, wherein the sample is a multimodal physiological timing signal, and the domain is related to a user or a user group; using the training set to perform multiple rounds of training on a preset sleep stage classification model and a domain discriminator to obtain a trained sleep stage classification model, wherein in each round of training: using a feature extractor in the classification model to extract modal features from each modal physiological timing signal, using a classifier in the classification model to classify the sleep stage according to each modal feature and a fusion feature, the fusion feature including all modal features; using the domain discriminator to classify the sleep stage according to each modal feature and the fusion feature The combined features are used for domain discrimination respectively; the classification performance index of the modality is determined by using the results of sleep stage classification according to each modality feature and the category label, and the classification loss is determined by using the results of sleep stage classification according to the fused features and the category label; the domain discrimination performance index of the modality is determined by using the results of domain discrimination according to each modality feature and the domain label, and the domain discrimination loss is determined by using the results of domain discrimination according to the fused features and the domain label; the parameters of the feature extractor are updated according to the total loss determined by the classification loss and the domain discrimination loss, the parameters related to the modality in the classifier are updated according to the gradient determined by the classification loss and the classification performance index of each modality, and the parameters related to the modality in the domain discriminator are updated according to the gradient determined by the domain discrimination loss and the domain discrimination performance index of each modality, and the parameters related to the modality refer to the parameters used to process the corresponding modality features.

[0011] In some embodiments of the present invention, the fused feature is a U×C-dimensional feature formed by sequentially splicing or stacking the modal features of U modalities, wherein U is the total number of modalities corresponding to the multimodal physiological timing signal, C is the dimension of a single modal feature, and the nth position is the modal feature of the nth modality, n∈[1,U]; when a classifier is used to classify sleep stages according to each modal feature and a domain discriminator is used to perform domain discrimination according to each modal feature, the input modal feature of the uth modality is pre-filled with zeros to construct a U×C-dimensional format of the same scale as the fused feature, wherein the uth position is the modal feature of the uth modality, and all positions except the uth position are 0, u∈[1,U].

[0012] In some embodiments of the present invention, any one of the classification performance indicators and domain discrimination performance indicators of each modality is determined in the following manner: each modality feature is input into a classifier or a domain discriminator to obtain a prediction value corresponding to each modality; the performance value corresponding to each modality is determined based on the prediction value corresponding to each modality and the corresponding label; the performance score corresponding to each modality is determined based on the performance value corresponding to each modality and the performance values ​​of all modalities; the performance indicator of each modality is determined based on the variance between the performance score corresponding to each modality and the modality average ratio.

[0013] In some embodiments of the present invention, in each round of training, 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 according to the classification loss, and parameters related to the modality in the domain discriminator are updated based on the domain discrimination performance index of each modality and the gradient determined by the domain discrimination gradient calculated according to the domain discrimination loss.

[0014] In some embodiments of the present invention, in each round of training, any modality-related parameters in the classifier and domain discriminator are updated in the following manner: the corresponding first-order moment estimates and second-order moment estimates in the current round are updated according to the performance index of each modality and the gradient determined according to the corresponding gradient calculated according to the corresponding loss, and the first-order moment estimates and second-order moment estimates related to the modality updated in the previous round, and the updated first-order moment estimates and second-order moment estimates are corrected according to the attenuation factor; the parameters related to the modality in the current round of the classifier or domain discriminator are updated based on the corrected first-order moment estimates, second-order moment estimates 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 domain discriminator is expressed as:

[0016]

[0017] Among them, a represents a classifier or a domain discriminator, represents the parameters related to the u-th mode in the t-th round a, represents the parameters related to the u-th mode updated in round t-1, represents the first-order moment estimate associated with the u-th mode after the t-th round of correction, represents the second-order moment estimate associated with the u-th mode after the t-th round of correction, ∈1 represents a constant, and η represents the learning rate.

[0018] In some embodiments of the present invention, any one of the classification loss and the domain discrimination loss is calculated in the following manner:

[0019]

[0020] Among them, G a represents a classifier or a domain discriminator, I represents the total number of training samples, and K a represents the total number of category labels or domain labels, G a (f i ) represents G a The predicted value of the fusion feature of the output i-th sample, f i represents the fusion feature of the i-th sample, represents the predicted label of the i-th sample, Represents an indicator function indicating whether the predicted label of the i-th sample is equal to the corresponding label. If The function value is 1, otherwise the function value is 0.

[0021] According to the second aspect of the present invention, a method for sleep stage classification is provided, the method comprising: obtaining a multimodal physiological timing signal to be classified; classifying the multimodal physiological timing signal to be classified using a trained sleep stage classification model obtained by the method described in the first aspect of the present invention to obtain a sleep stage classification result.

[0022] Compared with the prior art, the advantages of the present invention are:

[0023] (1) By using a feature extractor specific to each modality to extract features from the physiological time series signal of the corresponding modality, the features that perform well in the modality can be better captured, so that the classifier and domain discriminator can fully learn relevant knowledge and improve the 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 discrimination loss, the ability of the feature extractor specific to each modality can be improved, the difference between the modalities can be reduced, and the modal features extracted by the updated feature extractor can be better.

[0024] (2) The gradients corresponding to the classifier and domain discriminator are adaptively adjusted through the performance index of each modality. A larger performance index can increase the classifier or domain discriminator's attention to unbalanced modality-related parameters, while a smaller performance index can reduce the attention to well-balanced parameters. This can improve the classification ability and domain discrimination ability while also achieving a balance between multiple modalities, solving the problem that the existing technology only considers the balance between two modalities but cannot be extended to the balance between multiple modalities. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The embodiments of the present invention are further described below with reference to the accompanying drawings, in which:

[0026] Figure 1A schematic diagram of a method for training a sleep stage classification model according to an embodiment of the present invention;

[0027] Figure 2 A schematic diagram of a calculation flow of a performance indicator of each mode according to an embodiment of the present invention;

[0028] Figure 3 A schematic diagram of classification imbalance results in a comparative experiment according to an embodiment of the present invention;

[0029] Figure 4 A schematic diagram of domain discrimination imbalance results in a comparative experiment according to an embodiment of the present invention;

[0030] Figure 5 A schematic diagram of the prediction accuracy results in a comparative experiment according to an embodiment of the present invention;

[0031] Figure 6 A schematic diagram of a visualization result of FeatureNet according to an embodiment of the present invention;

[0032] Figure 7 FIG. 4 is a schematic diagram of a visualization result of SleepMG according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail by specific embodiments below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0034] As mentioned in the background technology section, although the existing modality balancing methods enhance the cross-domain generalization ability of the model, they do not take into account the modality differences, especially the inter-modality differences in domain generalization ability, which is also crucial for sleep staging. In addition, although the existing modality balancing methods compare the relative performance of the two modalities, this method is only applicable to the balance between the two modalities, not the balance between multiple modalities. At the same time, the existing methods are unable to simultaneously achieve the dual balance of the classification ability between modalities and the domain generalization ability.

[0035] In order to solve the above problems, the present invention proposes a multi-modal balanced sleep stage classification model training method, which uses the total loss to update the parameters of the feature extractor, so that the feature extractor can better capture the modal features and reduce the differences between the modalities, so that the classifier and the domain discriminator can learn relevant knowledge and improve the classification ability and domain generalization ability; using the performance indicators of each modality and the corresponding gradient to update the modality-related parameters in the classifier or domain discriminator, it is possible to strengthen the focus on modal imbalance and weaken the focus on the modal balance part, while improving the classification ability and domain generalization ability. The dual balance of classification ability and domain generalization ability between modalities is achieved, which solves the problem that the prior art only considers the balance between two modalities but 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 the embodiments and examples of the present invention, a∈{y,d} is used to represent symbols related to categories and fields, K a ∈{K y ,K d} represents the number of category labels and domain labels, k a ∈{k y ,k d} represents the index of categories and domains, represents the true label of the category and domain, represents the predicted label of category and domain, G a ∈{G y ,G d} respectively represent the classifier and domain discriminator, θ a ∈{θ y ,θ d} represents the model parameters of the classifier and domain discriminator, θ a Split into mode-related parameters θ a,u , u∈{e,o,m,c} represents the modal correlation symbol, Indicates that it comes from the same x i The predicted category labels or domain labels of different modalities, f i u represents the characteristics of each mode, θ f,u Represents a feature extractor specific to each modality The parameter θ a,u Represents G a Parameters for a specific part of the modal.

[0038] In order to better understand the present invention, the technical solution of the present invention is described in detail from four aspects: training samples, model structure, training process and application scenarios.

[0039] 1. Training Samples

[0040] Before training the model, it is necessary to organize training samples. According to one embodiment of the present invention, a data set for sleep stage classification is obtained, the data set includes multiple samples, a category label of the knowledge sleep stage category corresponding to each sample, and a domain label indicating the field to which each sample belongs, wherein the sample is a multimodal physiological timing signal, and the field is related to the user or user group. Among them, the field is divided by user, or by user group, and different fields correspond to different users or user groups. The training set, validation set and test set are respectively extracted from the data set according to a certain ratio, or the training set and test set are respectively extracted according to a predetermined ratio, and 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 signals, electrocardiogram signals, electrooculogram signals and electromyography signals; wherein each type of electrical signal corresponds to a modality. The sleep stage categories indicated by the category labels include: awake stage, rapid eye movement stage and non-eye movement stage, wherein the non-eye movement stage can be divided into: N1 stage, N2 stage and N3 stage. Therefore, two types of category labels are formed: one, awake stage, rapid eye movement stage and non-eye movement stage; two: awake stage, rapid eye movement stage, N1 stage, N2 stage and N3 stage.

[0042] According to an 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. In an illustrative manner, if multiple samples are from the same user, the domain labels corresponding to the multiple samples of the 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 the user.

[0043] According to another embodiment of the present invention, the domain can be divided according to user groups, for example: all users are divided into multiple user groups, and the domain labels corresponding to the samples of multiple users divided into the same user group are consistent, while the domain labels corresponding to the samples of users not divided into user groups are different. Schematically, assuming that there are 200 users in total, they are divided into 10 user groups, each user group includes 20 users, and the domain labels corresponding to the samples of the 20 users in the user group are the same, and the domain labels corresponding to the users in other groups are different from the domain labels corresponding to the samples of the users in the group.

[0044] According to an example of the present invention, the data set can use an existing data set, such as data set ISRUC-S3, data set MASS-SS3, etc., and divide the data set into training set D according to a predetermined ratio.train ={x i ,y i ,d i |i∈{1,2,…,I}} and the test set D test ={x j ,y j |j∈{1,2,…,J}}, where x i represents the i-th sample in the training set, I represents the number of samples in the training set, and x j represents the jth sample in the test set, J represents the number of samples in the test set, and PSG signals including synchronized EEG, EOG, EMG and ECG, i ∈{1,2,…,K y} represents the category label corresponding to the i-th sample, K y represents the number of category labels, d i ∈{1,2,…,K d} represents the domain label corresponding to the i-th sample, K d Indicates the number of domain labels.

[0045] 2. Model Structure

[0046] The present 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 according to the modal features.

[0047] According to one embodiment of the present invention, the present invention uses the existing dual-scale convolutional neural network model to construct an exclusive sub-extractor for feature extraction of each modal physiological timing signal to capture the exclusive features of each modal physiological timing signal. The modal features extracted by each exclusive sub-extractor are fused (splicing, superposition or zero filling and other fusion methods) to obtain sample features. It should be understood that in addition to using the dual-scale convolutional neural network model to construct a feature extractor to extract modal features, the existing feature extraction network model can also be used to achieve feature extraction, such as: LeNet, AlexNet, VGG, etc. The technical solution of this embodiment can at least achieve the following beneficial technical effects: using a sub-extractor specific to each modality to extract the corresponding modal features, it is possible to better capture the features with strong expressiveness in the modality, so that in the subsequent training process, the classifier and the domain discriminator can learn the knowledge corresponding to the feature.

[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 modal features and output the category confidence of the modal features in each category, and the classification prediction layer is used to determine the sleep stage category to which the modal features belong according to the category confidence. Among them, the fully connected layer can be single-layer or multi-layer. The classification prediction layer can use a Softmax function to determine the category to which the sample belongs based on the confidence. It should be understood that in addition to using the fully connected layer to build a classifier, existing models can also be used for sleep stage classification, such as: support vector machine, decision tree, KNN, SVM, etc.

[0049] According to one embodiment of the present invention, the domain discriminator includes a fully connected layer and a domain discriminant layer, the fully connected layer is used to convolve the modal features and output the domain confidence of the modal features in various fields, and the domain discriminant layer is used to determine the domain to which the modal features belong according to the domain confidence. Among them, the fully connected layer can be single-layer or multi-layer. The domain discriminant layer can use a Softmax function to determine the domain to which the sample belongs according to the domain confidence, so as to assist in the training of the sleep stage classification model.

[0050] According to an example of the present invention, the sleep stage classification may be defined as: Among them, G f represents a feature extractor, in, A dedicated sub-extractor for extracting EEG signals. A dedicated sub-extractor for extracting ECG signals. A dedicated sub-extractor for extracting eye movement signals. G is a dedicated feature extractor for extracting electromyographic signals. f The parameters are expressed as G y represents the classifier, represents the predicted category of the i-th sample, k y Represents the category index. represents the multimodal fusion feature, f i e 、f i o 、f i m 、f i c Indicates from The modal features extracted from the domain can be defined as: Among them, G d represents the domain discriminator, k d Represents a domain index.

[0051] 3. Training Process

[0052] The sleep stage classification model and the domain discriminator are trained for multiple rounds using the training set to obtain a trained sleep stage classification model.

[0053] According to one embodiment of the present invention, in each round of training: a feature extractor in a classification model is used to extract modal features from physiological timing signals of each modality, and a classifier in the classification model is used to classify sleep stages according to each modal feature and fused features, respectively, wherein the fused features include all modal features; a domain discriminator is used to perform domain discrimination according to each modal feature and fused features, respectively; a classification performance index of the modality is determined using the result of sleep stage classification according to each modal feature and the category label, and a classification loss is determined using the result of sleep stage classification according to the fused feature and the category label; The domain discrimination performance index of the modality is determined by using the result of domain discrimination based on each modal feature and the domain label, and the domain discrimination loss is determined by using the result of domain discrimination based on the fused feature and the domain label; the parameters of the feature extractor are updated according to the total loss determined by the classification loss and the domain discrimination loss, the parameters related to the modality in the classifier are updated according to the gradient determined by the classification loss and the classification performance index of each modality, and the parameters related to the modality in the domain discriminator are updated according to the gradient determined by the domain discrimination loss and the domain discrimination performance index of each modality, and the parameters related to the modality refer to the parameters used to process the corresponding modal features. The technical solution of this embodiment can at least achieve the following beneficial technical effects: using the total loss to update the parameters of the feature extractor can enable the feature extractor to better capture the modal features, thereby improving the classification ability and domain generalization ability; using the performance indicators of each modality and the corresponding gradient to update the parameters related to the modality in the classifier or domain discriminator can strengthen the focus on modal imbalance and weaken the focus on the modal balance part, while improving the classification ability and domain generalization ability, achieving a dual balance between the classification ability and the domain generalization ability between modalities.

[0054] According to one embodiment of the present invention, the parameters of the feature extractor are updated according to the total loss determined by the classification loss and the domain discrimination loss, wherein the total loss can be expressed as: in, represents the classification loss, represents the domain discrimination loss.

[0055] Schematically, the classification loss and the domain discrimination loss are both calculated using the cross entropy loss function, where any one of the losses is calculated as follows:

[0056]

[0057] Among them, G arepresents a classifier or domain discriminator, G a ∈{G y ,G d}, G y represents the classifier, G d represents the domain discriminator, I represents the total number of training samples, K a represents the total number of category labels or domain labels, G a (f i ) represents G a The predicted value of the fusion feature of the output i-th sample, f i represents the fusion feature of the i-th sample, represents the predicted label of the i-th sample, Represents an indicator function indicating whether the predicted label of the i-th sample is equal to the corresponding label. If The function value is 1, otherwise the function value is 0. Schematically, the predicted label refers to the label determined by the classifier or domain discriminator according to the category confidence or domain confidence output by the fusion feature. For example, the classifier determines the class confidence or domain confidence output by the fusion feature f. i The category label determined by the output category confidence is the awake stage, and the fusion feature f i The input category label is the rapid eye movement stage, at this time The function value is 0; for example, the domain discriminator is based on the fusion feature f i The domain label determined by the output domain confidence is 1, and the fusion feature f i The input field label is also 1. The function value is 1.

[0058] According to one embodiment of the present invention, in each round of training, 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 according to the classification loss, and the parameters related to the modality in the domain discriminator are updated based on the domain discrimination performance index of each modality and the gradient determined by the domain discrimination gradient calculated according to the domain discrimination loss. Among them, the parameters related to each modality in the classifier and the domain discriminator refer to the parameters used to process the corresponding modality features.

[0059] According to one embodiment of the present invention, the fused feature is a U×C-dimensional feature formed by sequentially splicing or stacking the modal features of U modalities, wherein U is the total number of modalities corresponding to the multimodal physiological timing signal, C is the dimension of a single modal feature, and the nth position is the modal feature of the nth modality, n∈[1,U]; when a classifier is used to classify sleep stages according to each modal feature and a domain discriminator is used to perform domain discrimination according to each modal feature, the input modal feature of the uth modality is pre-padded with zeros to construct a U×C-dimensional format of the same scale as the fused feature, wherein the uth position is the modal feature of the uth modality, and all positions except the uth position are 0, u∈[1,U]. Schematically, the fused feature When the classifier is used to classify the sleep stages according to each modal feature and the domain discriminator is used to discriminate the domain according to each modal feature, the modal feature of the first modality input can be expressed as Similarly, the modal characteristics of the second mode can be expressed as The modal characteristics of the third mode can be expressed as The modal characteristics of the fourth mode can be expressed as

[0060] According to one embodiment of the present invention, any one of the classification performance indicators and domain discrimination performance indicators of each modality is determined in the following manner: each modality feature is input into a classifier or a domain discriminator to obtain a prediction value corresponding to each modality; the performance value corresponding to each modality is determined based on the prediction value corresponding to each modality and the corresponding label; the performance score corresponding to each modality is determined based on the performance value corresponding to each modality and the performance values ​​of all modalities; the performance indicator of each modality is determined based on the variance between the performance score corresponding to each modality and the modality average ratio.

[0061] According to one embodiment of the present invention, in each round of training, any modality-related parameters in the classifier and domain discriminator are updated in the following manner: the corresponding first-order moment estimates and second-order moment estimates in the current round are updated according to the performance index of each modality and the gradient determined according to the corresponding gradient calculated according to the corresponding loss, and the first-order moment estimates and second-order moment estimates related to the modality updated in the previous round, and the updated first-order moment estimates and second-order moment estimates are corrected according to the attenuation factor; the parameters related to the modality in the current round of the classifier or domain discriminator are updated based on the corrected first-order moment estimates, second-order moment estimates and the parameters related to the modality updated in the previous round.

[0062] According to an example of the present invention, Figure 1 The complete training process is shown in Figure 1. The training set is input into the feature extractor, and each dedicated sub-extractor Extract modal features corresponding to physiological timing signals For example: To extract the EEG signal from the dedicated sub-extractor, the EEG signal is input into In the above equation, we get the corresponding modal feature f i e ;akin, To extract the EOG signal, the EOG signal is input into the dedicated sub-extractor In the above equation, we get the corresponding modal feature f i o ; To extract the EMG signal, the EMG signal is input into the dedicated sub-extractor In the above equation, we get the corresponding modal feature f i m ; To extract the ECG signal, the ECG signal is input into the dedicated sub-extractor In the above equation, we get the corresponding modal feature f i c The modal features of the four extracted physiological time series signals are fused to obtain the fusion feature f i . Input the fusion features into the classifier and the domain discriminator respectively to obtain the corresponding classification results and domain discrimination results. For example, the classifier includes parameters related to the modality. Schematically, represents the parameters related to EEG signals in the classifier, represents the parameters related to ECG signals in the classifier, represents the parameters related to eye movement signals in the classifier, Represents the parameters related to the electromyographic signal in the classifier; after the fusion feature is input into the classifier, it is convolved and the confidence of the fusion feature in each sleep stage category is output. The sleep stage category (Wake, N1, N2, N3, REM) is determined according to the confidence. The domain discriminator includes parameters related to the modality, among which, represents the parameters related to EEG signals in the domain discriminator, represents the parameters related to ECG signals in the domain discriminator, represents the parameters related to eye movement signals in the domain discriminator, Represents the parameters related to the electromyographic signal in the domain discriminator; after the fusion feature is input into the domain discriminator, it is convolved and the confidence of the fusion feature in each domain is output. The domain discrimination (1, 2, ..., K) is determined according to the size of the confidence. d -1). Calculate the classification loss based on the classification results and the corresponding category labels And the classification performance indicators corresponding to each modality According to the classification loss and the parameters of each dedicated sub-extractor Finding the Gradient Update the parameters of each dedicated sub-extractor according to the classification loss and the parameters of the classifier Computed gradients And the classification performance index of each mode updates the parameters related to the mode in the classifier 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 According to the domain discrimination loss and the parameters of each dedicated sub-extractor Finding negative gradient Update the parameters of each dedicated sub-extractor according to the domain discrimination loss and the parameters of the domain discriminator Computed gradients And the domain discrimination performance index of each modality updates the modality-related parameters in the domain discriminator The technical solution of this embodiment can at least achieve the following beneficial technical effects: through the performance index of each modality, the gradients of the classifier and the domain discriminator are adaptively adjusted, the attention to the parameters of the unbalanced modality is increased through a larger performance index, and the attention to the well-balanced parameters is reduced through a smaller performance index, so that the balance of multiple modalities can be achieved, which solves the problem that the prior art only considers the balance between two modalities but cannot be extended to the balance of multiple modalities.

[0063] According to an example of the present invention, Figure 2 As shown in the figure, the calculation process of the performance index of each modality is shown. The specific process is as follows: each modality feature is input into the classifier and the domain discriminator to obtain the corresponding classification result and domain discrimination result, and any one of the classification result and domain discrimination result is obtained in the following way:

[0064]

[0065] Among them, a represents a classifier or a domain discriminator, a∈{y,d}, y represents a classifier, d represents a domain discriminator, It represents the result corresponding to the modal feature of the u-th mode in the i-th sample output by a. represents the modal feature of the uth modality in the i-th sample. The modal feature is pre-filled with zeros to construct a modal feature of the same scale as the fusion feature. represents the sum of confidence scores of the u-th mode.

[0066] Schematically, 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. Any one of the classification performance value and the domain discrimination performance value is calculated in the following manner:

[0067]

[0068] Among them, a represents a classifier or a domain discriminator, represents the classification performance value or domain discrimination performance value of the u-th mode in the t-th round, I represents the total number of training samples, K a Indicates the total number of tags, represents an indicator function indicating whether the predicted label of the i-th sample is equal to the corresponding label, represents the sum of the confidence of the u-th mode, if The function value is 1, otherwise the function value is 0.

[0069] In schematic form, the performance score of each mode is calculated based on the performance value of each mode and the performance values ​​of all modes. The calculation method can be expressed as:

[0070]

[0071] in, represents the classification performance score or domain discrimination performance score of the u-th modality in the t-th round, and U represents the total number of modalities.

[0072] Schematically, the performance index of each mode is calculated based on the variance between the performance score of each mode and the average ratio of the modes, and the calculation method can be expressed as:

[0073]

[0074] in, represents the classification performance index or domain discrimination performance index of the uth mode in the tth round, U represents the total number of modes, and tanh is a smooth activation function. In principle, the smaller the calculated performance index, the more balanced the modes in classification or domain discrimination.

[0075] Indicatively, the classification gradient calculated based on the classification loss and the classification performance index of each modality determine the corresponding classification balance gradient, and the domain discrimination gradient calculated based on the domain discrimination loss and the domain discrimination performance index of each modality determine the corresponding domain discrimination balance gradient. Any balanced gradient is calculated as follows:

[0076]

[0077] in, represents the corresponding equilibrium gradient of the u-th mode in the t-th round, represents the classification gradient or domain discriminant gradient of the u-th mode in the t-th round.

[0078] Schematically, the first-order moment estimate and the second-order moment estimate of the corresponding gradient are initialized to zero. In each round of training, the first-order moment estimate and the second-order moment estimate corresponding to the current round are updated according to the first-order moment estimate and the second-order moment estimate updated in the previous round and the corresponding balanced gradient. Schematically, the first-order moment estimate is calculated as follows:

[0079]

[0080] in, represents the first-order moment estimate of the u-th mode in the t-th round, represents the first-order moment estimate of the u-th mode in the t-1th round, and β1 represents the attenuation factor of the first-order moment estimate.

[0081] Schematically, the second moment estimate is calculated as follows:

[0082]

[0083] in, represents the second-order moment estimate of the u-th mode in the t-th round, represents the second-order moment estimate of the u-th mode in the t-1th round, and β2 represents the attenuation factor of the first-order moment estimate.

[0084] Indicatively, in order to prevent the first-order moment estimate and the second-order moment estimate from being biased toward zero, the updated first-order moment estimate and the second-order moment estimate are corrected according to the corresponding attenuation factor, and the correction method can be expressed as:

[0085]

[0086]

[0087] in, represents the corrected first-order moment estimate, represents the corrected second moment estimate.

[0088] Indicatively, based on the corrected first-order moment estimation, second-order moment estimation and the parameters related to the mode updated in the previous round, the parameters related to the mode in the current round classifier or domain discriminator are updated. The update of any parameter related to the mode in the current round classifier or domain discriminator can be expressed as:

[0089]

[0090] Among them, a represents a classifier or a domain discriminator, represents the parameters related to the uth mode in the tth round classifier or domain discriminator, represents the updated parameters related to the u-th modality in the t-1 round classifier or domain discriminator, represents the first-order moment estimate associated with the u-th mode after the t-th round of correction, represents the second-order moment estimate associated with the u-th mode after the t-th round of correction, η represents the learning rate, and ∈1 represents a preset constant to prevent division by zero.

[0091] IV. Application Scenarios

[0092] According to one embodiment of the present invention, a sleep stage classification method is provided, the method comprising: obtaining multimodal physiological timing information to be classified; using a trained sleep stage classification model trained by the method for training a sleep stage classification model of the aforementioned embodiment to perform classification according to the multimodal physiological timing signal to be classified, to obtain a sleep stage classification result.

[0093] In order to demonstrate the technical effect of the present invention, the inventor conducted an experiment, and the data of the relevant experiment 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, the data in the datasets were deleted from motion and unknown stages, and the N3 and N4 stages were merged into one N3 stage. According to the AASM standard, five sleep stage categories were generated: awake, N1, N2, N3, and REM. Each PSG record was downsampled to 100Hz and divided into 30-second periods.

[0096] The ISRUC-S3 dataset is PSG data from 10 subjects (one male and nine females) collected within 8 hours of one night, containing 8589 sleep periods. In the experiment, 10 channels out of 12 channels were selected, and the EMG of the legs was kept away from the EEG. The 10 channels included four modalities: six EEG signal channels, two EOG signal channels, one EMG signal channel, and one ECG signal channel.

[0097] The dataset MASS-SS3 is PSG data of 62 subjects (28 males and 34 females) collected within 8 hours of one night, containing 59,304 sleep epochs. The experiment selected 10 channels similar to the dataset ISRUC-S3, with four modalities.

[0098] (2) Experimental setup

[0099] In the experiment, FeatureNet was used as a multimodal sleep staging method ( The backbone network of the proposed method (hereinafter referred to as SleepMG) and the multi-model generalizable (Multmodel generalizable, NaiveMG) was used, and the dataset was divided into five domains with different subjects using the leave-one-subject method. Five-fold cross validation was performed to divide the dataset into a training set and a test set. From the training set, 20% was further allocated as a validation set. The best model based on the validation set was saved and evaluated on the cross-domain test set, and the final reported results represent the overall evaluation of the entire dataset.

[0100] In the experiment, the Adam optimizer was used for model optimization, the learning rate was set to 0.001, the decay factor β1 was set to 0.5, and β2 was set to 0.999. The batch size of data processing was 256, the number of training rounds was set to 50, and the gradient reversal ratios used in the training of the datasets ISRUC-S3 and MASS-SS3 were set to 0.1 and 1 respectively.

[0101] (3) Evaluation indicators

[0102] Accuracy, F1score, MacroF1 and Kappa are used as evaluation indicators of this experiment, among which:

[0103] The accuracy is defined as:

[0104]

[0105] Among them, TP represents the number of samples correctly classified as the current sleep stage, FP represents the number of samples from other sleep stages that are misclassified as the current sleep stage, FN represents the number of samples from the current sleep stage that are misclassified as 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] Among them, the F1 score is defined as the harmonic mean of recall and precision (Precision measures how many samples predicted by the model as a specific stage actually belong to this specific stage, and Recall measures how many samples actually belonging to a specific stage are successfully predicted by the model).

[0109] The macro F1 value is defined as:

[0110]

[0111] Among them, r represents the specific sleep stage category, and R represents the total number of sleep stage categories.

[0112] The Kappa coefficient is defined as:

[0113]

[0114] Among them, p0 refers to the relative observation agreement between evaluators, and p e Express the probability of a hypothesis for chance agreement or probabilistic agreement.

[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, a sleep staging method based on transfer learning to improve cross-domain sleep staging and generalizable, two multimodal sleep staging methods involving modality-specific feature extractors, and a fusion and balance method designed specifically for multimodality, including:

[0117] FeatureNet: This traditional method uses a dual-scale CNN structure with different kernel sizes and channel configurations. The first set of kernels consists of sizes \{50,8,8,8\} and corresponding channels \{32,64,64,64\}, and the second set of kernels consists of sizes \{64,8,6,6,4\} and corresponding channels \{64,64,64,64\}.

[0118] DeepSleepNet: This traditional method adopts a CNN-BiLSTM model, where 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, a squeeze and excitation block for optimizing feature weights, and multi-head attention for capturing temporal information.

[0120] AttnSleep: This traditional method integrates a multi-resolution CNN model, adaptive feature recalibration for learning interdependencies between features, and multi-head attention for capturing temporal dependencies.

[0121] DAN: A generalized sleep staging method based on CNN-BiGRU and using MMD alignment to learn domain-invariant representations.

[0122] SleepPrintNet: This multimodal sleep staging method involves modality-specific feature learning based on a 1D convolutional model. In addition to learning temporal features for all PSG modalities, special attention is paid to learning spectral-spatial features for EEG modalities.

[0123] MMASleepNet: This multimodal sleep staging method combines modality-specific feature learning via a 1D convolutional model with squeeze-and-excitation, and feature fusion using a transformer encoder model.

[0124] OGM-GE: This modality balance method was originally an audio-visual bimodal balance method that improves the model by balancing the classification performance of the two modalities and modulating the gradient of the feature extractor.

[0125] (5) Comparative experimental results

[0126] In order to prove the advantages of the method proposed in the present invention in sleep staging, SleepMG was compared with the above eight methods in the 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] According to Table 1, SleepMG outperforms other methods in any indicator on both datasets. On the ISRUC-S3 dataset, the second best method in terms of Accuracy is the DAN method, while SleepMG improves the Accuracy by nearly two percentage points compared to it, and improves the Accuracy by about 3.6% compared to other methods (such as FeatureNet). On the MASS-SS3 dataset, the second best method is the OGM-GE method, but SleepMG further improves it by about 1.0%, highlighting the importance of modal balance and SleepMG's performance in balancing the two forms. The experimental results in Table 1 show that SleepMG performs excellently in balancing classification and domain discrimination modalities.

[0130] To further verify the progress of the present invention in achieving modality balance, the changes in the degree of modality imbalance during training using the dataset ISRUC-S3 are visualized. The degree of modality imbalance in classification and domain discrimination performance is expressed as the sum of squares of the mean relative differences. The lower the modal imbalance, the more balanced the modes are. The experimental results are as follows: Figure 3 and Figure 4 As shown, Figure 3 It shows the imbalance of classification. Figure 4 It shows the imbalance of domain discrimination. Figure 3 and Figure 4It can be seen that the SleepMG method shows lower modal imbalance in both classification and domain discrimination, indicating better balance. In addition, the changes in test accuracy are also visualized, such as Figure 5 As shown, it is revealed that cross-domain sleep staging on the test set is significantly improved when the modalities are more balanced.

[0131] In order to further demonstrate the contribution of each module in SleepMG, ablation experiments were conducted on two public datasets to compare the effects 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. ×), and the exclusive sub-extractor is used to extract the modal features of specific physiological timing signals, and then multiple modal features are directly fused in series. The generalizable module is the classifier and the domain discriminator. The results of the sleep stage classification experiment on two datasets show that the generalization module provides a little improvement, while the exclusive sub-extractor shows a more obvious effect than the generalization module alone. In addition, the combination of the exclusive sub-extractor and the generalizable module brings significant improvements.

[0135] In order to explore the effective feature fusion method of multimodal sleep staging, this experiment uses FeatureNet to extract single-modal features and fuses them with direct concatenation, self-attention weighting and modality balance methods respectively. The experimental results are shown in Table 3:

[0136] Table 3 Ablation experimental results of different multimodal feature fusion methods

[0137]

[0138] From the experimental results in Table 3, we can see that the performance of self-attention is worse than that of direct concatenation. On the contrary, the modality balance method performs well on both datasets, which indicates that self-attention pays more attention to the well-performing modes, exacerbating the imbalance of modes and harming the classification. In addition, in contrast to the attention-based method, the balanced method assigns a larger weight to the poorly performing modalities, which makes a positive contribution to the classification accuracy.

[0139] In order to further verify the technical effect of achieving balance in the present invention, the balance effects of different components in the sleep stage classification model and the domain discriminator in the embodiment of the present invention are compared, and the experimental results are shown in Table 4:

[0140] Table 4 Balance effect of different components in sleep stage classification model and domain discriminator

[0141]

[0142] As shown in Table 4, balancing modality-specific feature extractors (i.e., exclusive sub-extractors) has little or no effect, while fine-grained inter-modality balance of the modality-specific parts of the classifier and domain discriminator has a positive effect. In multimodal feature learning, focusing solely on achieving modality balance may significantly weaken the model's ability to extract modality-related information. In domain adversarial learning, classification ability and domain discrimination ability are usually regarded as opposing goals. However, imbalance between both modes will have a negative impact on the performance of the model. For example, if there is a significant difference in domain discrimination ability between different modalities, the model may learn irrelevant information related to the modality or modality-specific participants, which may limit the model's ability to generalize across domains. This inter-modality imbalance may hurt performance. In summary, the imbalance between the two modalities has a negative impact on model performance. Fine-grained inter-modality balance of classification and domain discrimination abilities is crucial to mitigate these negative effects and improve the overall performance of sleep staging.

[0143] In order to conduct a more visual analysis, this experiment uses t-SNE to visualize the feature embedding of 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. Figure 6 and Figure 7 The visualization results shown show that SleepMG shows clearer classification boundaries than the FeatureNet method. For example, in SleepMG, the number of clusters representing the deep sleep stage N3 is smaller and more tightly grouped, while the cluster representing the N2 stage (in green) clearly separates the blue N3 stage from the other stages. The light sleep stage N1 is the most difficult to distinguish, and in SleepMG it presents a tightly grouped yellow cluster, showing clearer boundaries.

[0144] In summary, the method for training a sleep stage classification model proposed in the present invention has the following advantages:

[0145] (1) By using a feature extractor specific to each modality to extract features from the physiological time series signal of the corresponding modality, the features that perform well in the modality can be better captured, so that the classifier and domain discriminator can fully learn relevant knowledge and improve the 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 discrimination loss, the ability of the feature extractor specific to each modality can be improved, the difference between the modalities can be reduced, and the modal features extracted by the updated feature extractor can be better.

[0146] (2) The gradients corresponding to the classifier and domain discriminator are adaptively adjusted through the performance index of each modality. A larger performance index can increase the classifier or domain discriminator's attention to unbalanced modality-related parameters, while a smaller performance index can reduce the attention to well-balanced parameters. This can improve the classification ability and domain discrimination ability while also achieving a balance between multiple modalities, solving the problem that the existing technology only considers the balance between two modalities but cannot be extended to the balance between multiple modalities.

[0147] It should be noted that although the above describes the various steps in a specific order, it does not mean that the various 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 functions can be achieved.

[0148] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0149] Computer readable storage medium can be a tangible device that holds and stores instructions used by an instruction execution device. Computer readable storage medium can include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.

[0150] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill 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 comprises: Acquire a training set, the training set comprising a plurality of samples, a category label indicating a sleep stage category corresponding to each sample, and a domain label indicating a domain to which each sample belongs, wherein the sample is a multimodal physiological timing signal, and the domain is related to a user or a user group; The training set is used to perform multiple rounds of training on a preset sleep stage classification model and a domain discriminator to obtain a trained sleep stage classification model, wherein in each round of training: a feature extractor in the classification model is used to extract modal features from each modal physiological timing signal, and a classifier in the classification model is used to classify sleep stages according to each modal feature and a fusion feature, respectively, wherein the fusion feature includes all modal features; Use the domain discriminator to perform domain discrimination based on each modality feature and fusion feature; The classification performance index of the modality is determined using the results of sleep stage classification based on each modality 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 the modality is determined by using the domain discrimination result and domain label based on each modality feature, and the domain discrimination loss is determined by using the domain discrimination result and domain label based on the fusion feature; The parameters of the feature extractor are updated according to the total loss determined by the classification loss and the domain discrimination loss. The parameters related to the modality in the classifier are updated according to 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 according to 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.

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, wherein U is the total number of modalities corresponding to the multimodal physiological time series signal, C is the dimension of a single modal feature, and the nth position is the modal feature of the nth modality, n∈[1,U]; When using the classifier to classify the sleep stages according to each modal feature and using the domain discriminator to perform domain discrimination according to each modal feature, the input modal features of the u-th modality are pre-padded with zeros to construct a U×C dimensional format with the same scale as the fusion feature, where the u-th position is the modal feature of the u-th modality, and all positions except the u-th position are 0, u∈[1,U].

3. The method according to claim 2, characterized in that Any one of the classification performance index and domain discrimination performance index of each modality is determined in the following manner: Input each modality feature into the classifier or domain discriminator to obtain the prediction value corresponding to each modality; According to the predicted value and the corresponding label of each mode, the performance value corresponding to each mode is determined; Determine the performance score corresponding to each mode according to the performance value corresponding to each mode and the performance values ​​of all modes; The performance index of each mode is determined based on the variance between the performance score corresponding to each mode and the average ratio of the modes.

4. The method according to claim 3, characterized in that In each round of training, 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 according to the classification loss. The parameters related to the modality in the domain discriminator are updated based on the domain discrimination performance index of each modality and the gradient determined by the domain discrimination gradient calculated according to the domain discrimination loss.

5. The method according to claim 4, characterized in that In each round of training, any modality-related parameters in the classifier and domain discriminator are updated as follows: According to the performance index of each mode and the gradient determined by the corresponding gradient calculated according to the corresponding loss, as well as the first-order moment estimate and the second-order moment estimate related to the mode updated in the previous round, the corresponding first-order moment estimate and the second-order moment estimate in the current round are updated, and the updated first-order moment estimate and the second-order moment estimate are corrected according to the attenuation factor; Based on the corrected first-order moment estimate, second-order moment estimate and the parameters related to the mode updated in the previous round, the parameters related to the mode in the current round classifier or domain discriminator are updated.

6. The method according to claim 5, characterized in that The update of the parameters related to the modality in the current round classifier or domain discriminator is expressed as: Among them, a represents a classifier or a domain discriminator, represents the parameters related to the u-th mode in the t-th round a, represents the parameters related to the u-th mode updated in round t-1, represents the first-order moment estimate associated with the u-th mode after the t-th round of correction, represents the second-order moment estimate associated with the u-th mode after the t-th round of correction, ∈1 represents a constant, and η represents the learning rate.

7. The method according to claim 5, characterized in that Any one of the classification loss and domain discrimination loss is calculated as follows: Among them, G a represents a classifier or a domain discriminator, I represents the total number of training samples, and K a represents the total number of category labels or domain labels, G a (f i ) represents G a The predicted value of the fusion feature of the output i-th sample, f i represents the fusion feature of the i-th sample, represents the predicted label of the i-th sample, Represents an indicator function indicating whether the predicted label of the i-th sample is equal to the corresponding label. If The function value is 1, otherwise the function value is 0.

8. A method for classifying sleep stages, characterized in that: The method comprises: Acquire multimodal physiological time series signals to be classified; The multimodal physiological timing signal to be classified is classified using the trained sleep stage classification model obtained by the method described in any one of claims 1 to 7 to obtain a sleep stage classification result.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program can be executed by a processor to implement the steps of the method according to one of claims 1 to 8.

10. An electronic device, characterized in that: include: one or more processors; as well as A 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 one of claims 1 to 8 by executing the executable instructions.

Citation Information

Patent Citations

  • Sleep staging method and device

    CN113951821A

  • Method for training sleep stage classification model

    CN116304882A

Cited By

  • Training method of child sleep staging model and child sleep staging method and device

    CN119761425A