Robust and stable medical image semi-supervised classification method
By combining pseudo-label learning, fuzzy c-means, and multi-model distillation techniques, the problems of insufficient sample size and label noise in medical image classification are solved, realizing a more robust semi-supervised classification method and improving the accuracy and noise resistance of medical image classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
- Filing Date
- 2023-10-31
- Publication Date
- 2026-07-10
AI Technical Summary
Existing deep learning-based medical image classification methods face problems such as insufficient sample size and label noise, resulting in unstable classification performance. Existing semi-supervised classification algorithms cannot effectively utilize unlabeled data and have insufficient noise resistance.
A pseudo-label-based semi-supervised learning method is adopted, which combines fuzzy c-means (FCM) and convolutional neural network (CNN) to build a confidence screening model. Noisy data is filtered by calculating the weighted average of soft labels, and multi-model distillation technology is used for training, including a three-branch distillation model composed of SFCM, DenseNet121 and ResNet50, to improve the quality of pseudo-labels and the robustness of the model.
Even with insufficient sample size, it effectively improves the robustness and robustness of medical image classification, reduces the interference of noisy labels on classification results, and enhances classification accuracy and noise resistance.
Smart Images

Figure CN117475213B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of deep learning, specifically to the field of deep learning-based medical image analysis, particularly semi-supervised learning and noise label learning techniques, and especially a robust semi-supervised classification method for medical images. Background Technology
[0002] Existing deep learning-based medical image classification methods face two major bottlenecks: limited sample size and label noise in the dataset. Due to the unique nature of medical images, medical datasets typically have small sample sizes. Furthermore, the high feature similarity between similar categories in medical images easily leads to label noise when experts annotate related datasets. Individual semi-supervised classification algorithms or label noise learning methods exhibit unstable classification performance. Existing techniques, such as pseudo-label-based semi-supervised classification methods and label noise learning methods, can initially address these two issues.
[0003] Existing technologies include semi-supervised algorithms based on pseudo-labels. The main idea is to augment labeled datasets with unlabeled data. First, a classification model is trained using labeled data. Then, unlabeled data is input into the model to obtain predicted labels, which serve as pseudo-labels. The unlabeled data, with pseudo-labels added, is combined with the original labeled data, and joint training is performed on the merged data. Mainstream methods include self-training, FixMatch, FlexMatch, and FaxMatch.
[0004] In image classification tasks, the confidence of generated pseudo-labels is unreliable when label noise exists in the dataset, affecting the final training results. To address the problem of learning noisy labels in image classification, a mainstream approach is to reduce error accumulation, such as Co-teaching, Reweight, and DivideMix; another mainstream approach is to correct noisy labels, such as PENCIL. However, due to the scarcity of samples and insufficient label quality in medical images, both tasks need to be performed simultaneously to achieve good results. In medical image classification, co-correction methods can address both problems simultaneously. However, their effectiveness is uncertain when the number of labeled samples is insufficient, and this method cannot effectively learn from unlabeled data. Therefore, a semi-supervised classification method for medical images that can effectively handle label noise is needed. Summary of the Invention
[0005] Purpose of the invention: To address the shortcomings of the prior art, this invention provides a robust and effective semi-supervised classification method for medical images.
[0006] Technical solution: A robust and semi-supervised classification method for medical images, comprising the following steps:
[0007] S1. Training is performed using a semi-supervised learning method based on pseudo-labels, including using unlabeled data to expand the training samples and improve the quality of pseudo-labeled data;
[0008] S2. Construct a confidence screening model based on SFCM and CNN models. The confidence screening model filters out noisy data by calculating the weighted average of the soft labels generated by the SFCM and CNN classification models and comparing it with a set threshold.
[0009] For labeled data, data with a confidence level higher than a set threshold are added to the mixed dataset, while data with a confidence level lower than the set threshold are used as unlabeled data for training.
[0010] For unlabeled data, pseudo-labeled data with confidence scores higher than a set threshold are added to the mixed dataset;
[0011] The SFCM model described above is based on a label assignment strategy, which uses the membership degree generated by the fuzzy c-means FCM model to obtain soft labels for subsequent confidence screening.
[0012] S3. A three-branch fuzzy semi-supervised distillation model FSD-Net is formed based on three student models: SFCM, DenseNet121, and ResNet50. This enables online distillation classification using multiple models, and the weighted average soft label of the three models is used as teacher knowledge to guide student training.
[0013] Furthermore, step S2 includes preprocessing the medical image data using independent component analysis to improve the clustering effect. Specifically, this includes extracting features from the data, then performing mean-removing processing on the features of the input data to achieve standardization, and finally performing principal component analysis on the features of the input data and then whitening them.
[0014] Furthermore, the label allocation strategy described in step S2 also includes the following operations:
[0015] The number of fixed cluster centers is consistent with the total number of data categories. By setting a membership threshold, the total amount of data within the set membership threshold range for each cluster center is obtained. The data category with the largest proportion within the cluster center is calculated, and the label of the category is set as the label of the cluster center.
[0016] The label assignment strategy continuously increases the set membership threshold until the labels of each cluster are finally obtained, thereby avoiding the label duplication problem that may be caused by data class imbalance.
[0017] The specific calculation process in step S2 includes:
[0018] S21. Clustering the data features of medical image data using the FCM classification model to avoid the negative impact of label noise, the calculation is as follows:
[0019] Input X = {x1, x2, ..., x} N} Assigned to cluster centers {v1, v2, ..., v} in cluster C C The objective function of FCM is:
[0020]
[0021] Where the constraint function is: u ij Indicates sample x i The membership degree of samples belonging to class j and u ij ≥0, ||·|| represents the Euclidean distance, m is the weighted exponent and 1≤m≤∞;
[0022] The iterative equation is further derived using the Lagrange multiplier method:
[0023]
[0024]
[0025] Where C is the number of clusters, FCM will continuously update the weights, i.e. the membership degree, until they are less than the set threshold, at which point it will stop.
[0026] Step S21 improves the unsupervised clustering model FCM to obtain the soft fuzzy c-means model SFCM, and performs confidence filtering on the weighted average soft labels generated by SFCM and the classification model to initially filter out noisy data.
[0027] S22. Based on the CNN classification model, where logits is the output of the penultimate layer of the neural network, assuming the student's network input is x... i The logits are Where H is the total number of categories; the normalized classification probability is calculated using the following formula:
[0028]
[0029] Soft labels can give models stronger generalization ability and are more robust to noise.
[0030] The soft label calculation methods for the teacher and student models are as follows:
[0031]
[0032] The parameter t is a temperature parameter used to increase the relaxation level of the soft label;
[0033] S23. Combine SFCM with a CNN model, and perform data filtering by weighted averaging of the soft labels from the two models and comparing it with a set threshold. The calculation of soft labels includes:
[0034] Given input x, the corresponding soft labels are (y1, y2, ..., y3). C ), C represents the number of categories, and the soft tags of SFCM are (y'1, y'2, ..., y'). C ),
[0035] The final soft label is calculated as follows:
[0036] Y(x)=α.y c +(1-α).y' c ,
[0037] Where α is the weighting parameter.
[0038] Furthermore, step S3 specifically includes the following calculations:
[0039] S31. Collect the soft labels for all student models and summarize them by calculating a weighted average. The summarized soft labels The formula for calculating this information, used to guide student training, is as follows:
[0040]
[0041] in, It is the soft label of the m-th student, where M is the number of student models, and w m It's weight. v m It is the accuracy rate generated by each student model;
[0042] S32. Train independently in the three branches, using standard cross-entropy loss to optimize the training of the classification branches;
[0043] In the process of updating clusters, SFCM is also used as a supervised model, and its definition is as follows:
[0044]
[0045] Where Q is the total number of training samples, q is the basic true value of the q-th sample, and q is the predicted probability of each classification branch for the q-th sample.
[0046] S33, Calculation and The KL-loss method is used to enable student models to learn from and optimize the teacher model. In this method, the teacher knowledge is a weighted average of the results of the three student models.
[0047] The KL-loss calculation formula and total classification loss for the m-th student are as follows:
[0048]
[0049] in, It is the soft-label probability predicted for the h-th class sample in the m-th student model.
[0050] Beneficial effects: Compared with the prior art, the robust and robust semi-supervised classification method for medical images provided by this invention can alleviate the impact of insufficient sample quantity on classification results to a certain extent, and at the same time avoid the interference of noise labels on classification results, effectively improving the robustness and robustness of medical image classification. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of the framework flow of the method described in this invention.
[0052] Figure 2 This is a flowchart of the method described in this invention.
[0053] Figure 3 This is an overview of the dataset in the example.
[0054] Figure 4 This is a comparison chart of the accuracy of various models under different noise rates obtained from the implementation of this invention. Detailed Implementation
[0055] To illustrate the technical solutions disclosed in this invention in detail, a specific description is provided below in conjunction with the accompanying drawings.
[0056] This invention provides a robust and effective semi-supervised classification method for medical images, belonging to machine learning techniques, and applied in the field of semi-supervised classification of medical images. This method mitigates the impact of insufficient sample size on classification results to a certain extent, while avoiding interference from noisy labels, effectively improving the robustness and effectiveness of medical image classification.
[0057] Combination Figure 1 The algorithm framework shown in this invention employs a pseudo-label-based semi-supervised learning method for training. Using unlabeled data can alleviate the problem of insufficient training samples to some extent. However, the performance of the semi-supervised classification model is affected by the quality of the pseudo-labels; noisy pseudo-labels can cause the model to fit noisy data.
[0058] Then, a confidence screening model was constructed using fuzzy c-means (FCM) and a CNN model to improve the quality of pseudo-labels and filter data with label noise.
[0059] As an unsupervised clustering model, the FCM model exhibits low sensitivity to label noise due to its fuzzy c-means. Therefore, this invention designs a label assignment strategy that generates soft labels based on membership degrees. By calculating the weighted average of the soft labels generated by the FCM and CNN classification models and comparing it with a set threshold, noisy data can be filtered out.
[0060] For labeled data, data with high confidence levels are added to the mixed dataset, while data with low confidence levels are used as unlabeled data for further training. For unlabeled data, generated high-confidence pseudo-label data are added to the mixed dataset.
[0061] Finally, a multi-model distillation module, consisting of FCM, a deep CNN student model, and a lightweight CNN student model, was used to train the mixed data. The weighted average soft labels of the three models served as the teacher to guide the training of the three branches. The final classification result was obtained by calculating the weighted average of the final soft labels of the three models.
[0062] Specifically, a robust and semi-supervised classification method for medical images includes the following steps:
[0063] Step 1: A semi-supervised classification framework based on pseudo-labels
[0064] For hospital images, a semi-supervised learning approach was developed using training samples, primarily employing a pseudo-label-based semi-supervised algorithm. The main idea is to augment the labeled dataset with unlabeled data. First, a CNN classification model is trained using labeled data. Then, unlabeled data is input into the model to obtain predicted labels, which serve as pseudo-labels. The unlabeled data, now with pseudo-labels, is combined with the original labeled data, and joint training is performed on the merged dataset.
[0065] In this step, the training includes not only labeled sample data, but also training with unlabeled data, which expands the training sample and also yields high-quality pseudo-label data. High-quality pseudo-label data refers to pseudo-label data with low label noise, which is approximately equivalent to no noise.
[0066] Step 2: Confidence Filtering Model
[0067] The confidence screening model proposed in this invention is based on a CNN model and an improved SFCM model, and uses soft labels to screen the confidence of the training dataset.
[0068] First, a label assignment strategy is designed for the fuzzy c-means model (FCM), defining an improved soft fuzzy c-means (SFCM) model. This model can generate soft labels based on class membership. The label assignment strategy is as follows: the number of cluster centers is fixed to match the total number of data categories. By setting a membership threshold, the total number of data points within each cluster center that fall within the set threshold range is obtained. The data category with the highest proportion within each cluster center is calculated, and its label is set as the cluster center's label. To avoid label duplication issues that may arise from data category imbalance, the set membership threshold is continuously increased until the labels for each cluster are finally obtained. After obtaining the labels, the soft label for each data point is output based on its membership degree.
[0069] Then, labeled and unlabeled data are input into the confidence screening model. The weighted average of the soft labels generated by the SFCM and CNN models is compared with a set threshold for confidence screening. Data with confidence scores above the threshold (unlabeled data generating pseudo-labels) are added to the mixed dataset for multi-model distillation classification, while data with low confidence scores are added to the unlabeled dataset. Obtaining high-quality pseudo-labels avoids interference from noisy data during training and solves the problem of insufficient training samples. Due to the special nature of medical datasets, data features of similar categories have a certain degree of similarity. Therefore, it is necessary to preprocess the data features before clustering to ensure that clustering maximizes between-class and minimizes within-class clustering. To achieve better clustering results, Independent Component Analysis (ICA) is used to improve the effectiveness of features.
[0070] As an unsupervised clustering model, FCM can cluster data based on data features and avoid the negative impact of label noise.
[0071] The input will be X = {x1, x2, ..., x} N} Assigned to cluster centers {v1, v2, ..., v} in cluster C C First, the model is learned through an FCM classification model. The objective function of the FCM classification model can be expressed as follows:
[0072]
[0073] The constraint function is:
[0074] u ij Indicates sample x i The membership degree of samples belonging to class j, and u ij ≥0, ||·|| represents the Euclidean distance, m is the weighted exponent and 1≤m≤∞;
[0075] The iterative equation is further derived using the Lagrange multiplier method:
[0076]
[0077]
[0078] Where C is the number of clusters, FCM will continuously update the weights (membership) until they are less than the set threshold, at which point it will stop.
[0079] Then, confidence filtering is applied to the weighted average soft labels generated by the SFCM and classification model to initially filter out noisy data. Note that data with high confidence is not necessarily free of noise, but data with low confidence is very likely to be noisy.
[0080] For a CNN model, logits are the output of the penultimate layer of the neural network, assuming the student network input is x. i The logits are H is the total number of categories. The normalized classification probability is calculated using the following formula:
[0081]
[0082] Soft labels can give models stronger generalization ability and greater robustness to noise.
[0083] The soft label calculation methods for the teacher and student models are as follows:
[0084]
[0085] The parameter t is a temperature parameter used to increase the relaxation level of the soft label.
[0086] Finally, by combining SFCM with a CNN model, and by weighting the soft labels of the two models and comparing the result with a set threshold, data filtering can be performed.
[0087] Given input x, its soft labels are (y1, y2, ..., y3). C ), C represents the number of categories.
[0088] The soft tags of SFCM are (y'1, y'2, ..., y' C ),
[0089] The final soft tag can be calculated in the following way:
[0090] Y(x)=α.y c +(1-α).y' c ,
[0091] Where α is the weighting parameter.
[0092] Step 3: Fuzzy semi-supervised distillation model FSD-Net (FSD-Net)
[0093] To obtain more accurate classification results, this invention proposes a three-branch distillation model consisting of three student models with different characteristics.
[0094] First, the Soft Blurred C-Means (SFCM) model avoids interference from noisy labels, resulting in high-confidence soft labels. DenseNet121, as a relatively deep CNN model, can learn more complex features and produce soft labels containing richer semantic information. However, it may also carry the risk of overfitting. To avoid this risk, the relatively shallow ResNet50 can be used as another student model, which has better generalization ability. Models are encouraged to learn from each other, and the weighted average soft labels of the three models are used as teacher knowledge to guide student training.
[0095] First, soft labels for all student models are collected and then aggregated by calculating a weighted average. The aggregated soft labels are then... (As teacher knowledge) it is used to guide student practice, and its calculation formula is as follows:
[0096]
[0097] in, It is the soft label of the m-th student, where M is the number of student models, and w m It's weight. v m It is the accuracy rate generated for each student model.
[0098] Then, independent training is performed in the three branches, using standard cross-entropy loss to optimize the training of the classification branch. Notably, SFCM is also used as a supervised model during cluster updates. Its definition is as follows:
[0099]
[0100] Where Q is the total number of training samples, q is the basic true value of the q-th sample, and q is the predicted probability of each classification branch for the q-th sample.
[0101] Finally, calculate and The Kullback-Leibler Divergence loss (KL-loss) is used to enable student models to learn from and optimize the teacher model. In this invention, the teacher knowledge is a weighted average of the results of the three student models. The KL-loss calculation formula and the total classification loss for the m-th student are as follows:
[0102]
[0103] in, It is the soft-label probability predicted for the h-th class sample in the m-th student model.
[0104] Example
[0105] First, the method described in this invention was tested on the ISIC dataset in a semi-supervised manner to verify the effectiveness of the proposed model. The models selected for comparison were self-training, FixMatch, FlexMatch, and FaxMatch, and the evaluation metrics were accuracy (Acc), sensitivity (Sen), specificity (Spe), and F1 score (F1).
[0106] Table 1 shows the comparison results (accuracy) of the half-supervised models.
[0107]
[0108]
[0109] Experimental results show that the method proposed in this invention achieves the best performance among all pseudo-label-based semi-supervised learning methods. Although it performs worse than other models on some data, its overall performance is better than all other pseudo-label-based semi-supervised models.
[0110] Subsequently, the method described in this invention was applied to the PatchCamelyon dataset ( Figure 3 Noise resistance experiments were conducted on the ISIC dataset (Table 2) to verify the effectiveness of the proposed model. The models selected for comparison were PENCIL, DivideMix, Reweight, and Co-Correcting. The evaluation metric was accuracy. In the table, red results represent the highest value in each column, and blue results represent the second highest value.
[0111] Table 2. Comparison Results of Noise Resistance Classification Experiment
[0112]
[0113] In summary, under different noise rates, the FSD-Net method proposed in this invention, being a semi-supervised method, exhibits lower accuracy without noise annotation. As the noise ratio increases, the noise robustness of FSD-Net gradually becomes apparent. Although the accuracy of FSD-Net is lower than that of Co-Correcting methods at many noise levels, the semi-supervised FSD-Net can achieve similar noise robustness to fully supervised co-correction. Furthermore, from... Figure 4 As can be seen, while FSD-Net's accuracy may not be the highest, its variation is the smallest. In other words, FSD-Net exhibits greater stability in terms of noise resistance.
Claims
1. A robust and semi-supervised classification method for medical images, characterized in that: Includes the following steps: S1. Training is performed using a semi-supervised learning method based on pseudo-labels, including using unlabeled data to expand the training samples and improve the quality of pseudo-labeled data; S2. Construct a confidence screening model based on SFCM and CNN models. The confidence screening model filters out noisy data by calculating the weighted average of the soft labels generated by the SFCM and CNN classification models and comparing it with a set threshold. For labeled data, data with a confidence level higher than a set threshold are added to the mixed dataset, while data with a confidence level lower than the set threshold are used as unlabeled data for training. For unlabeled data, pseudo-labeled data with confidence scores higher than a set threshold are added to the mixed dataset; The SFCM model described above is based on a label assignment strategy, which uses the membership degree generated by the fuzzy c-means FCM model to obtain soft labels for subsequent confidence screening. This step includes preprocessing the medical image data using independent component analysis to improve clustering results. Specifically, it involves feature extraction, mean removal of the input data features for standardization, principal component analysis of the input data features, and whitening of the features. In step S2, the tag allocation strategy further includes the following operations: The number of fixed cluster centers is consistent with the total number of data categories. By setting a membership threshold, the total amount of data within the set membership threshold range for each cluster center is obtained. The data category with the largest proportion within the cluster center is calculated, and the label of the category is set as the label of the cluster center. The label assignment strategy continuously increases the set membership threshold until the labels of each cluster are finally obtained, thereby avoiding the label duplication problem that may be caused by data class imbalance. The specific calculation process in step S2 includes: S21. Clustering the data features of medical image data using the FCM classification model to avoid the negative impact of label noise, the calculation is as follows: enter Assigned to C Cluster Center The objective function of the FCM model is expressed as follows: Where the constraint function is: , Indicates sample belong The membership degree of the class samples, and , Represents Euclidean distance. It is a weighted index, and ; The iterative equation is further derived using the Lagrange multiplier method: in, The FCM model continuously updates the weights, i.e. the membership degree of the model, for the number of clusters, until it stops when the weights are less than the set threshold. Step S21 improves the unsupervised clustering model FCM to obtain the soft fuzzy c-means model SFCM, and performs confidence filtering on the weighted average soft labels generated by SFCM and the classification model to initially filter out noisy data. S22. Based on the CNN classification model, where logits is the output of the penultimate layer of the neural network, assuming the student's network input samples... The logits are ,in The total number of categories is used to calculate the normalized classification probability using the following formula: Soft labels can give models stronger generalization ability and are more robust to noise. The soft label calculation methods for the teacher and student models are as follows: Where parameters It is a temperature parameter used to increase the relaxation level of the soft label; S23. Combine SFCM with a CNN model, and perform data filtering by weighted averaging of the soft labels from the two models and comparing it with a set threshold. The calculation of soft labels includes: Given input sample The corresponding soft tag is , C' represents the number of categories, and the soft tag for SFCM is... , ; The final soft label is calculated as follows: in, These are weight parameters; S3. A three-branch fuzzy semi-supervised distillation model FSD-Net is formed based on three student models: SFCM, DenseNet121, and ResNet50. This enables online distillation classification using multiple models, and the weighted average soft label of the three models is used as teacher knowledge to guide student training. The specific calculations include: S31. Collect the soft labels for all student models and summarize them by calculating a weighted average. The summarized soft labels The formula for calculating this information, used to guide student training, is as follows: in, It is the first A student's soft label It is the number of student models. It's weight. , It is the accuracy rate generated by each student model; S32. Train independently in the three branches, using standard cross-entropy loss to optimize the training of the classification branches; In the process of updating clusters, SFCM is also used as a supervised model, and its definition is as follows: in, It is the total number of training samples, and it is the number of training samples. The basic true value of each sample is the sum of the values of each classification branch for the first sample. The predicted probability of each sample; S33, Calculation and The KL-loss method enables student models to learn from and optimize the teacher model. In this method, the teacher knowledge is a weighted average of the results of the three student models. No. The KL-loss calculation formula and total classification loss for each student are as follows: in, It is the first Samples of each category in the first... The soft-labeled probabilities predicted in a student model.