Unsupervised partial adversarial adaptive method and system for different label spaces
By introducing an unsupervised partial adversarial adaptive method in the electrocardiogram diagnostic model, the feature extraction and classification process is optimized, and the performance of deep learning models deteriorates among different label space data sets is solved, achieving better cross-domain migration performance and diagnosis Effect.
Patent Information
- Application Number
- CN202411539903.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-31
AI Technical Summary
Existing deep learning models have problems in the field of electrocardiogram diagnosis, poor generalization ability and insufficient cross-domain migration performance, especially in the field of data sets in different label spaces, which are difficult to maintain high performance.
A non-supervised partially adversarial adaptive method for non-same tag space is proposed. By constructing feature extractors, feature classifiers, and fully connected feature processors, and introducing selection factors and final loss functions, the model training process is optimized to improve cross-domain migration. performance.
It effectively improves the cross-domain migration performance of deep learning models, ensuring that high diagnostic performance can be maintained when inputting data sets in brand new tag space, and is suitable for different neural network structures.
Smart Images

Figure CN119475091A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electrocardiogram analysis, and in particular to an unsupervised partial adversarial adaptive method and system for non-identical label spaces. Background Art
[0002] Timely intelligent diagnosis of arrhythmias is of great significance for the control of cardiovascular diseases. According to the World Health Organization (WHO), cardiovascular diseases are the leading cause of death worldwide, and about one-third of deaths each year are caused by cardiovascular diseases. Arrhythmias are the most common cardiovascular diseases. As a non-invasive examination method, electrocardiograms are one of the most effective tools to help doctors identify arrhythmias. In fact, most arrhythmias can be diagnosed by relying solely on electrocardiograms. However, in order to detect heart abnormalities, analyzing every heartbeat is necessary, but it is cumbersome and time-consuming. The interpretation of electrocardiogram records is also challenging and usually only cardiologists can do it. In addition, different patients may have different patterns for the same disease.
[0003] Nowadays, deep learning methods have been widely used in the diagnosis of arrhythmias. Due to the difficulty of sample annotation, the number of samples available for classification model learning is very limited. At the same time, existing deep learning models still face the following challenges in the field of ECG new number diagnosis: (i) Training a good deep network requires a large amount of labeled data. In clinical applications, collecting enough labeled ECG records is usually time-consuming and expensive; (ii) The differences between ECG signals are small, which seriously affects the generalization ability of the diagnosis model. In addition, different factors, such as age and acquisition equipment, will also affect the diagnostic performance of the model. Therefore, faced with a new scenario with only many unlabeled ECG records, the diagnostic performance without labeled data support will be significantly reduced; (iii) Recently, a common transfer learning method, deep domain adaptation, has received widespread attention in solving cross-domain problems, but these studies currently only focus on multi-center datasets with the same label space. Due to the diversity of arrhythmia diseases, in practical applications, the label spaces of different datasets are often different. Faced with different label spaces between datasets in different domains, existing cross-domain arrhythmia diagnosis methods have not been widely studied. Therefore, it is necessary to design a method to optimize model training so that the model can maintain the best performance in different label spaces. Summary of the invention
[0004] The purpose of the present invention is to solve the shortcomings of the above-mentioned prior art and to provide an unsupervised partial adversarial adaptation method and system in a non-identical label space, so as to realize the migration of the pre-trained model to a new data set and improve the diagnostic performance of the model.
[0005] On the one hand, an unsupervised partial adversarial adaptation method in a non-identical label space is provided, comprising the following steps: S1: Collect a clinical electrocardiogram dataset in a certain label space, build a deep learning diagnostic model, and build a feature extractor, feature classifier, and fully connected feature processor based on the diagnostic model; S2: Input the source domain electrocardiogram into the feature classifier to obtain the source domain classification loss, and feed the data in the unlabeled data set into the feature classifier to construct an entropy minimization loss function; S3: Calculate a selection factor based on the source data set input into the diagnostic model and the newly input data set, and adjust the weight of the source domain data in the diagnostic model training according to the selection factor; S4: Construct a final loss function in the diagnostic model training process, and optimize the feature extractor, feature classifier, and fully connected feature processor by minimizing the final loss function.
[0006] Furthermore, in step S1, constructing a feature extractor, a feature classifier and a fully connected feature processor based on the diagnostic model further includes: Select the neural network structure used by the feature extractor and the feature classifier according to the actual processing task and data characteristics; The fully connected feature processor is constructed from fully connected layers.
[0007] Preferably, the classification process based on the feature extractor and the fully connected feature processor specifically includes: S100: ECG data is input into the feature extractor, and the output features are flattened by the fully connected feature processor to convert the multi-dimensional feature vector into a one-dimensional vector; S200: The flattened features are input to the subsequent fully connected layer for nonlinear processing. The fully connected layer introduces nonlinear factors to enhance the nonlinear feature expression ability of the features. S300: The features after nonlinear processing are sent to a binary classifier, and the binary classifier selects a suitable algorithm for classification according to specific task requirements.
[0008] Preferably, a reverse layer is included between the feature extractor and the fully connected feature processor: In the forward classification process, the reverse layer does not play a role; During the back-propagation process, the reverse layer reverses the back-propagated gradient, and the feature extractor receives gradient information different from normal back-propagation, forcing it to learn feature representations that confuse the fully connected feature processor.
[0009] Furthermore, in step S2, inputting the source domain electrocardiogram into the feature classifier to obtain the source domain classification loss further includes: The source domain classification loss CL formula measures the classification loss of the source domain electrocardiogram feature in the feature classifier by calculating the sum of the logarithmic probabilities of the sample being predicted to belong to a certain class and not to belong to a certain class. The formula is as follows: in, Represents the feature classifier for the input data The processed output belongs to the label probability prediction value, The closer to the true label, the smaller the loss value.
[0010] Furthermore, in step S2, feeding the data in the unlabeled data set to the feature classifier to construct an entropy minimization loss function further includes: First, the log-likelihood value corresponding to the probability that the sample belongs to a certain category is obtained according to the source domain classification loss formula , among which, if , ,think ;like , ,think ; The entropy minimization principle is used to measure the classification effect of the feature classifier on the unlabeled data, so as to construct the entropy minimization loss function EL. The probability distribution is relatively concentrated, and the larger the loss function value is, the When the probability distribution is relatively uniform, the loss function value is small, and the formula is as follows: .
[0011] Furthermore, in step S3, calculating the selection factor according to the source data set input into the diagnostic model and the newly input data set further includes: The selection factor is used to reduce the label class in the forward classification process The corresponding contribution of the source domain data. At the same time, in the back-propagation process, the obtained contribution is in turn applied to the source domain dataset samples to reduce the label class The influence of the source domain data in the training process on data calibration, the selection factor calculation process includes the following formulas in sequence: in, Represents input data, is the feature classifier, Represents the output result after the data is input into the feature classifier, represents the source dataset, represents a new dataset, Indicates the source dataset category, Represents the new dataset category, Represents the selection factor.
[0012] Furthermore, in step S4, constructing the final loss function in the diagnosis model training process further includes: The final loss function consists of four parts, which involve different data sets, loss functions and parameters respectively. The formula is as follows: , in, , λ represents the weight coefficient, is the feature classifier, is the feature extractor, is the fully connected feature processor, represents the entropy minimization loss function of the feature classifier, represents the entropy minimization loss function of the fully connected feature processor, represents the selection factor, Represents samples taken from the source dataset , Indicates taking samples from the new dataset , Indicates the source dataset category, Represents the new dataset category, Represents the feature classifier for the input data The processed output belongs to the label probability prediction value.
[0013] On the other hand, an unsupervised partial adversarial adaptive system in a non-identical label space is provided, comprising: A model building module, used to collect a clinical electrocardiogram dataset in a certain label space, build a deep learning diagnostic model, and simultaneously build a feature extractor, feature classifier, and fully connected feature processor based on the diagnostic model; A classification loss optimization module, used for inputting the source domain electrocardiogram into the feature classifier to obtain the source domain classification loss, and feeding the data in the unlabeled data set into the feature classifier to construct an entropy minimization loss function; A selection factor calibration module, used to calculate a selection factor based on a source data set input into the diagnostic model and a newly input data set, and adjust the weight of the source domain data in the diagnostic model training according to the selection factor; The model training module is used to construct the final loss function in the diagnostic model training process, and optimize the feature extractor, feature classifier and fully connected feature processor by minimizing the final loss function.
[0014] Compared with the prior art, the present invention has the following beneficial effects: The present invention optimizes the loss of the feature extractor, feature classifier and fully connected feature processor of the diagnostic model, introduces the EL loss function, selection factor and final loss function, effectively improves the cross-domain migration performance of the deep learning model, and maintains the high performance of the diagnostic model when a data set in a completely new label space is input; The present invention selects the neural network structure adopted by the feature extractor and the feature classifier according to the tasks and data characteristics actually processed, and is flexibly applicable to the neural network models commonly used in the world. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings: Figure 1 This is a flow chart of an unsupervised partial adversarial adaptive method for non-identical label spaces of the present invention; Figure 2 This is a classification flow chart based on a feature extractor and a fully connected feature processor of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0017] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0018] The specific implementation of the present invention is described below with reference to the accompanying drawings and embodiments. like Figure 1As shown, this embodiment provides an unsupervised partial adversarial adaptive method for non-identical label spaces, and the technical solution includes the following steps: S1: Collect a clinical ECG dataset in a certain label space, build a deep learning diagnostic model, and build a feature extractor based on the diagnostic model , feature classifier and fully connected feature processor ; S2: Input the source domain electrocardiogram into the feature classifier Obtain the source domain classification loss CL and feed the data in the unlabeled dataset to the feature classifier Construct entropy minimization loss function EL; S3: Calculate a selection factor based on the source data set input into the diagnostic model and the newly input data set, and adjust the weight of the source domain data in the diagnostic model training according to the selection factor; S4: constructing a final loss function in the diagnostic model training process, and optimizing the feature extractor by minimizing the final loss function , feature classifier and fully connected feature processor .
[0019] In step S1, a feature extractor based on the diagnostic model is constructed. , feature classifier and fully connected feature processor Further including: Here and Any commonly used structure in the neural network framework (such as CNN, LSTM) can be used without restriction, and the feature extractor can be selected according to the actual processing task and data characteristics. and the feature classifier The neural network structure used; Secondly, the fully connected feature processor It is constructed from fully connected layers.
[0020] Specifically, based on the feature extractor and the fully connected feature processor The classification process is as follows Figure 2 As shown, specifically including: S100: ECG data is input into the feature extractor The output features are passed through the fully connected feature processor Perform flattening to convert the multi-dimensional feature vector into a one-dimensional vector; S200: The flattened features are input to the subsequent fully connected layer for nonlinear processing. The fully connected layer introduces nonlinear factors to enhance the nonlinear feature expression ability of the features. S300: The features after nonlinear processing are sent to a binary classifier, and the binary classifier selects a suitable algorithm for classification according to specific task requirements.
[0021] Among them, in this embodiment, the feature extractor and the fully connected feature processor Include a reverse layer in between: In the forward classification process, the reverse layer does not play a role; During the back-propagation process, the reverse layer reverses the gradient of the back-propagation, and the feature extractor Receives gradient information different from normal back propagation, forcing it to learn features that confuse the fully connected feature processor The feature representation of .
[0022] In step S2, the source domain electrocardiogram is input into the feature classifier Obtaining the source domain classification loss CL further includes: The source domain classification loss CL formula measures the classification loss of the source domain electrocardiogram feature in the feature classifier by calculating the sum of the logarithmic probabilities of the sample being predicted to belong to a certain class and not to belong to a certain class. The formula is as follows: in, Represents the feature classifier For input data The processed output belongs to the label probability prediction value, The closer to the true label, the smaller the loss value.
[0023] Next, in order to further optimize the feature classifier , so that it has better generalization ability, and feeds the data in the unlabeled dataset to , using the entropy minimization principle, Effectively separate the target domain data, making The classification is clearer. We use this to construct the entropy minimization loss function EL.
[0024] Specifically, in this embodiment, we first obtain the log-likelihood value corresponding to the probability that the sample belongs to a certain category according to the source domain classification loss formula: , among which, if , ,think ;like , ,think ; Then, the entropy minimization principle is used to measure the classification effect of the feature classifier on the unlabeled data, so as to construct the entropy minimization loss function EL. The probability distribution is relatively concentrated, and the larger the loss function value is, the When the probability distribution is relatively uniform, the loss function value is small, and the formula is as follows: .
[0025] In step S3, calculating the selection factor based on the source data set input into the diagnostic model and the newly input data set further includes: The selection factor is used to reduce the label class in the forward classification process The corresponding contribution of the source domain data. At the same time, in the back-propagation process, the obtained contribution is in turn applied to the source domain dataset samples to reduce the label class The influence of the source domain data in the training process on data calibration, the selection factor calculation process includes the following formulas in sequence: in, Represents input data, is the feature classifier, Represents the output result after the data is input into the feature classifier, represents the source dataset, represents a new dataset, Indicates the source dataset category, Represents the new dataset category, Represents the selection factor.
[0026] Finally, we construct the final loss function in S4 based on all the above steps, including: The final loss function consists of four parts, which involve different data sets, loss functions and parameters respectively. The formula is as follows: , in, , λ represents the weight coefficient, is the feature classifier, is the feature extractor, is the fully connected feature processor, represents the entropy minimization loss function of the feature classifier, represents the entropy minimization loss function of the fully connected feature processor, represents the selection factor, Represents samples taken from the source dataset , Indicates taking samples from the new dataset , Indicates the source dataset category, Represents the new dataset category, Represents the feature classifier for the input data The processed output belongs to the label probability prediction value.
[0027] This embodiment provides an unsupervised partial adversarial adaptive system in a non-identical label space, including: A model building module, used to collect a clinical electrocardiogram dataset in a certain label space, build a deep learning diagnostic model, and simultaneously build a feature extractor, feature classifier, and fully connected feature processor based on the diagnostic model; A classification loss optimization module, used for inputting the source domain electrocardiogram into the feature classifier to obtain the source domain classification loss, and feeding the data in the unlabeled data set into the feature classifier to construct an entropy minimization loss function; A selection factor calibration module, used to calculate a selection factor based on a source data set input into the diagnostic model and a newly input data set, and adjust the weight of the source domain data in the diagnostic model training according to the selection factor; The model training module is used to construct the final loss function in the diagnostic model training process, and optimize the feature extractor, feature classifier and fully connected feature processor by minimizing the final loss function.
[0028] The functional implementation of each module in the above-mentioned unsupervised partial adversarial adaptive system for non-identical label spaces corresponds to the steps of the unsupervised partial adversarial adaptive method for non-identical label spaces in Example 1, and their functions and implementation processes will not be repeated here one by one.
[0029] Finally, it should be noted that the above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
[0030] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. An unsupervised partial adversarial adaptation method in non-identical label spaces, characterized in that: The steps include: S1: Collect a clinical electrocardiogram dataset in a certain label space, build a deep learning diagnostic model, and build a feature extractor, feature classifier, and fully connected feature processor based on the diagnostic model; S2: Input the source domain electrocardiogram into the feature classifier to obtain the source domain classification loss, and feed the data in the unlabeled data set into the feature classifier to construct an entropy minimization loss function; S3: Calculate a selection factor based on the source data set input into the diagnostic model and the newly input data set, and adjust the weight of the source domain data in the diagnostic model training according to the selection factor; S4: Construct a final loss function in the diagnostic model training process, and optimize the feature extractor, feature classifier, and fully connected feature processor by minimizing the final loss function.
2. The unsupervised partial adversarial adaptive method in non-identical label spaces according to claim 1, characterized in that: In step S1, constructing a feature extractor, a feature classifier and a fully connected feature processor based on the diagnostic model further includes: Select the neural network structure used by the feature extractor and the feature classifier according to the actual processing task and data characteristics; The fully connected feature processor is constructed from fully connected layers.
3. The unsupervised partial adversarial adaptive method in non-identical label spaces according to claim 2, characterized in that: The classification process based on the feature extractor and the fully connected feature processor specifically includes: S100: ECG data is input into the feature extractor, and the output features are flattened by the fully connected feature processor to convert the multi-dimensional feature vector into a one-dimensional vector; S200: The flattened features are input to the subsequent fully connected layer for nonlinear processing. The fully connected layer introduces nonlinear factors to enhance the nonlinear feature expression ability of the features. S300: The features after nonlinear processing are sent to a binary classifier, and the binary classifier selects a suitable algorithm for classification according to specific task requirements.
4. The unsupervised partial adversarial adaptive method in non-identical label spaces according to claim 3, characterized in that: A reverse layer is included between the feature extractor and the fully connected feature processor: In the forward classification process, the reverse layer does not play a role; During the back-propagation process, the reverse layer reverses the back-propagated gradient, and the feature extractor receives gradient information different from normal back-propagation, forcing it to learn feature representations that confuse the fully connected feature processor.
5. The unsupervised partial adversarial adaptive method in non-identical label spaces according to claim 1, characterized in that: In step S2, inputting the source domain electrocardiogram into the feature classifier to obtain the source domain classification loss further includes: The source domain classification loss CL formula measures the classification loss of the source domain electrocardiogram feature in the feature classifier by calculating the sum of the logarithmic probabilities of the sample being predicted to belong to a certain class and not to belong to a certain class. The formula is as follows: in, Represents the feature classifier for the input data The processed output belongs to the label probability prediction value, The closer to the true label, the smaller the loss value.
6. The unsupervised partial adversarial adaptive method in non-identical label spaces according to claim 5, characterized in that: In step S2, feeding the data in the unlabeled data set to the feature classifier to construct an entropy minimization loss function further includes: First, the log-likelihood value corresponding to the probability that the sample belongs to a certain category is obtained according to the source domain classification loss formula , among which, if , ,think ;like , ,think ; The entropy minimization principle is used to measure the classification effect of the feature classifier on the unlabeled data, so as to construct the entropy minimization loss function EL. The probability distribution is relatively concentrated, and the larger the loss function value is, the When the probability distribution is relatively uniform, the loss function value is small, and the formula is as follows: 。 7. The unsupervised partial adversarial adaptive method in non-identical label spaces according to claim 4, characterized in that: In step S3, calculating the selection factor based on the source data set input into the diagnostic model and the newly input data set further includes: The selection factor is used to reduce the label class in the forward classification process The corresponding contribution of the source domain data. At the same time, in the back-propagation process, the obtained contribution is in turn applied to the source domain dataset samples to reduce the label class The influence of the source domain data in the training process on data calibration, the selection factor calculation process includes the following formulas in sequence: in, Represents input data, is the feature classifier, Represents the output result after the data is input into the feature classifier, represents the source dataset, represents a new dataset, Indicates the source dataset category, Represents the new dataset category, Represents the selection factor.
8. The unsupervised partial adversarial adaptive method in non-identical label spaces according to claim 1, characterized in that: In step S4, constructing the final loss function in the diagnostic model training process further includes: The final loss function consists of four parts, which involve different data sets, loss functions and parameters respectively. The formula is as follows: , in, , λ represents the weight coefficient, is the feature classifier, is the feature extractor, is the fully connected feature processor, represents the entropy minimization loss function of the feature classifier, represents the entropy minimization loss function of the fully connected feature processor, represents the selection factor, Represents samples taken from the source dataset , Indicates taking samples from the new dataset , Indicates the source dataset category, Represents the new dataset category, Represents the feature classifier for the input data The processed output belongs to the label probability prediction value.
9. An unsupervised partial adversarial adaptive system in a non-identical label space, characterized in that: include: A model building module, used to collect a clinical electrocardiogram dataset in a certain label space, build a deep learning diagnostic model, and simultaneously build a feature extractor, feature classifier, and fully connected feature processor based on the diagnostic model; A classification loss optimization module, used for inputting the source domain electrocardiogram into the feature classifier to obtain the source domain classification loss, and feeding the data in the unlabeled data set into the feature classifier to construct an entropy minimization loss function; A selection factor calibration module, used to calculate a selection factor based on a source data set input into the diagnostic model and a newly input data set, and adjust the weight of the source domain data in the diagnostic model training according to the selection factor; The model training module is used to construct the final loss function in the diagnostic model training process, and optimize the feature extractor, feature classifier and fully connected feature processor by minimizing the final loss function.
Citation Information
Patent Citations
Label-free vehicle picture classification method based on sample screening
CN111368886A
Semi-supervised mechanical fault diagnosis method based on adaptive migration neural network
CN112183581A
Unsupervised bearing fault diagnosis method based on adaptive residual adversarial network
CN115127814A
Adversarial training domain adaptive diagnosis system for condition and label drift
CN116503658A
Unsupervised domain adaptation method, device, system and storage medium of semantic segmentation based on uniform clustering
US20220383052A1