A contrastive self-paced semi-supervised learning method, system and electronic device
By comparing with autosynchronous semi-supervised learning methods, and using contrastive learning and autosynchronous semi-supervised methods to dynamically optimize the balance between supervised and unsupervised signals, the model instability caused by label noise and data scarcity in the diagnosis of Parkinson's disease prodromal phase is solved, achieving higher classification accuracy and stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUBEI UNIV OF TECH
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-02
AI Technical Summary
Existing deep learning methods suffer from label noise and model decision boundary instability in the diagnosis of Parkinson's disease prodromal phase. In particular, the scarcity of medical imaging data leads to difficulties in generating pseudo-labels and data distribution bias, which affects the stability of model optimization.
We employ a contrastive self-stepping semi-supervised learning method to extract spatial embeddings through contrastive learning, providing preliminary discrimination capabilities. We also combine self-stepping semi-supervised methods to dynamically optimize the balance between supervised and unsupervised signals, and use memory caching mechanisms and class penalty weights to improve pseudo-label quality and model stability.
The model improved classification accuracy and stability in the diagnosis of Parkinson's disease prodromal phase, alleviated class imbalance, and enhanced the classification performance of medical imaging data.
Smart Images

Figure CN122135094A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image data mining technology, and more specifically, to a comparative self-synchronized semi-supervised learning method, system, and electronic device. Background Technology
[0002] Parkinson's disease (PD), a neurodegenerative disease, has a profound and lasting impact on individuals. Currently, there is no known cure. With the advancement of deep learning, neural networks such as ResNet have demonstrated powerful capabilities in identifying PD by effectively capturing spatial features, thereby processing magnetic resonance imaging (MRI) data and facilitating early intervention. These supervised learning methods, trained on fully labeled datasets, have achieved satisfactory classification performance. However, the clinical definition of its prodromal phase remains ambiguous. Its phenotypic features are neither clearly distinguishable from typical PD patients nor entirely consistent with healthy individuals. Treating prodromal PD as a standard supervised category may introduce label noise and impair the stability of the model's decision boundary. Therefore, utilizing semi-supervised algorithms to treat fuzzily labeled data as unlabeled samples is a promising strategy for mining potential information. This can better approximate the decision boundary and improve model performance. Traditional methods such as Fix-Match, combining consistency regularization and pseudo-labels, have achieved significant results on various benchmarks. However, semi-supervised algorithms still face some challenges in this scenario, especially in the early stages of training, where the following issues remain: 1) The scarcity of medical imaging data makes it difficult to generate high-confidence pseudo-labels in the early stages of training, which in turn introduces unreliable signals into the unsupervised loss. 2) The model may be susceptible to distribution bias, such as class imbalance or uneven distribution of easy and difficult samples, which may lead to unstable optimization.
[0003] To address these issues, existing deep learning methods, such as neural networks, may introduce label noise by treating the prodromal phase of Parkinson's disease as a standard supervised category, thus compromising the stability of the model's decision boundaries. Furthermore, semi-supervised algorithms, limited by the scarcity of medical imaging data, struggle to generate high-confidence pseudo-labels in the early stages of training. This also makes the model susceptible to distributional biases, leading to optimization instability. Chen et al. employed contrastive learning as a pre-training strategy to generate discriminative embeddings, thereby improving the reliability of pseudo-labels by providing preliminary decision-making capabilities. However, the potential for dynamically adjusting the balance between supervised and unsupervised signals and stabilizing the optimization process remains to be fully explored.
[0004] Based on the above considerations, this invention provides a comparative self-guided semi-supervised learning method that dynamically optimizes the training process of the semi-supervised algorithm while alleviating the class imbalance problem. Summary of the Invention
[0005] To address the technical problems existing in the prior art, this invention provides a contrastive self-stepping semi-supervised learning method, system, and electronic device. It utilizes contrastive learning to extract spatial embeddings to provide preliminary discrimination ability and improve the reliability of the model; it uses a self-stepping semi-supervised method to improve the quality of pseudo-labels, dynamically optimize the balance between supervised and unsupervised signals, and alleviate class imbalance.
[0006] According to a first aspect of the present invention, a contrastive self-synchronized semi-supervised learning method is provided, comprising the following steps: A three-dimensional Perkins medical image dataset is input, and the medical image dataset is preprocessed to obtain brain images of structural images, gray matter probability images, and white matter probability images. The brain images are combined into a three-channel image input to an image classification model. The medical image dataset includes labeled data and unlabeled data. Initialize the image classification model and perform contrastive learning pre-training on unlabeled data to obtain the basic pre-trained classification model weights; Based on the pre-trained classification model weights, auto-automatic semi-supervised learning is performed on labeled and unlabeled data to obtain discriminative classification model weights. Based on the discriminative classification model weights, an image classification model is fine-tuned in the target task to automatically classify diseases from newly input 3D medical images.
[0007] Based on the above technical solution, the present invention can also be improved as follows.
[0008] Optionally, the input 3D Perkins medical image dataset, and the preprocessing of the medical image dataset, include: Inputting 3D medical MRI images, the 3D MRI volume data undergoes preprocessing using the SPM toolkit, including bias field correction, skull dissection, and registration with the MNI152 template. Size resampling and max-min normalization are performed, and the processed data is divided into a labeled dataset L. t And an unlabeled data U t The labeled data L t Includes images and their corresponding true category labels, but no labeled data U. t It contains only image data.
[0009] Optionally, the pre-training of the unlabeled data for contrastive learning to obtain the basic pre-trained classification model weights includes: Perform two randomized data augmentation operations on each medical image from unlabeled data to generate two associated augmented views of the medical image; The associated augmented views are fed into a shared-weight image encoder to extract high-dimensional feature representation vectors; The feature representation vector is input into a nonlinear mapping head network to map the features to the latent space, resulting in a low-dimensional projection vector. The normalized temperature-scaling cross-entropy loss is calculated based on the projection vector, and the parameters of the image encoder and the nonlinear mapping head network are updated through the backpropagation algorithm. Finally, the parameters of the image encoder are obtained as the weights of the pre-trained classification model.
[0010] Optionally, the step of updating the parameters of the image encoder and the nonlinear mapping head network through the backpropagation algorithm to finally obtain the parameters of the image encoder as the weights of the pre-trained classification model includes: Parameter updates and model preservation are achieved by minimizing the average loss of all positive sample pairs within a batch, using the Adam optimizer to update the parameters of the image encoder and mapping head, discarding the nonlinear mapping head network, and retaining only the parameters of the image encoder as the weights of the pre-trained classification model for the self-automatic semi-supervised learning.
[0011] Optionally, the random combination of data augmentation operations includes a random sequence combination of the following transformations: random cropping and resizing, random flipping, and Gaussian blur; the image encoder adopts a 3D convolutional neural network architecture to map the input image into a high-dimensional feature representation vector, and the two views share the same encoder network weights.
[0012] Optionally, the step of performing self-guided semi-supervised learning on labeled and unlabeled data to obtain discriminative classification model weights includes: The training process is divided into multiple training steps, and the following operations are performed in each training step: For labeled data, the supervised loss of the samples is calculated, and a specific quantile of the supervised loss of all currently labeled samples is calculated as a dynamic threshold. Samples with supervised loss less than the dynamic threshold are classified as simple samples, forming a subset of simple samples. Based on a simple sample subset, the memory cache is updated to obtain representative samples, and the loss of the samples in the memory cache is calculated as the memory cache loss. Based on the simple sample subset to which they belong, the category penalty weight is calculated to evaluate the difficulty of each category. For unlabeled data, weak augmentation and prediction are performed on the samples. Only when the prediction confidence is higher than a preset threshold are the samples and their generated pseudo-labels retained and used to participate in the calculation of unsupervised loss. We construct a joint objective function that includes supervised loss, memory cache loss, and unsupervised loss. We use class penalty weights to weight the supervised loss and memory cache loss, and update the parameters of the image classification model by minimizing the joint objective function. Before proceeding to the next training step, a subset of simple samples is removed from the labeled data, and samples from the memory cache are added to the labeled data, while a subset of simple samples is added to the unlabeled data, in order to dynamically adjust the distribution of the training data. Repeat the above steps until training is complete, and use the parameters of the image classification model as the discriminative classification model weights.
[0013] Optionally, the self-guided semi-supervised learning of labeled and unlabeled data can be represented by the following function:
[0014] In the formula, w represents the model parameters. For the purpose of monitoring losses, L t This indicates that there is labeled data, v i t This indicates that under training step t, the labeled sample i ∈ L t Whether it is selected by the self-stepping learning strategy, ω i To monitor the penalty weighting for losses; This indicates a loss in memory caching mechanisms, M t-1 This represents the set of memory buffers containing representative samples retained from the previous round of selection. This is represented as a regularization term, used to dynamically adjust the number of selected labeled samples; U represents unsupervised loss, α represents the relative importance of scalar control in the overall objective, and has a value of 0-1; t This is represented as pseudo-labels being assigned to the unlabeled sample set; S t This represents the set of samples selected as simple samples through the self-stepping strategy; the update rule L is set. t =(L t \S t ) ∪ M t-1 and U t =U t ∪ S t Dynamically update labeled and unlabeled data.
[0015] Optionally, updating the memory cache to obtain representative samples based on a simple subset of samples includes: Introducing a memory caching mechanism to extract simple sample subsets using the current model's encoder. Feature vectors of all samples Clustering algorithms are performed in the feature space to divide the samples into groups. There are several clusters, and the centroid of each cluster is determined. Within each cluster, select several samples closest to the centroid and combine them to form a memory buffer. .
[0016] According to a second aspect of the present invention, a contrast-driven semi-supervised learning system is provided, comprising: The data preprocessing module is used to input a 3D Perkins medical image dataset, preprocess the medical image dataset to obtain structural images, gray matter probability images, and white matter probability images of brain images, and combine the brain images into a three-channel image input to an image classification model; the medical image dataset includes labeled data and unlabeled data; The contrastive learning pre-training module is used to initialize the image classification model, perform contrastive learning pre-training on unlabeled data, and obtain the basic pre-trained classification model weights. The self-walking semi-supervised learning module is used to perform self-walking semi-supervised learning on labeled and unlabeled data based on the weights of the pre-trained classification model, so as to obtain the discriminative classification model weights. The model optimization and fine-tuning module is used to fine-tune the image classification model in the target task based on the discriminative classification model weights, and is used for automatic disease classification of new input 3D medical images.
[0017] According to a third aspect of the present invention, an electronic device is provided, including a memory and a processor, the processor being configured to implement a comparative self-stepping semi-supervised learning method when executing a computer program stored in the memory.
[0018] The technical effects and advantages of this invention are as follows: This invention provides a contrastive self-stepping semi-supervised learning method, system, and electronic device. Addressing the challenges of the scarcity of medical image data, which makes it difficult for semi-supervised algorithms to generate high-confidence pseudo-labels, and the bias in data distribution such as class imbalance, this invention utilizes contrastive learning to extract spatial embeddings to provide preliminary discriminative ability and improve model reliability. Then, a self-stepping semi-supervised method is used to improve the quality of pseudo-labels. In this method, a memory caching mechanism is used to stabilize the optimization process, and class-specific penalty weights based on sample difficulty and class distribution are used to dynamically optimize the balance between supervised and unsupervised signals and alleviate class imbalance. Attached Figure Description
[0019] Figure 1 A flowchart illustrating the steps of a comparative self-stepping semi-supervised learning method provided in this embodiment of the invention; Figure 2 This is a schematic diagram of a comparative self-stepping semi-supervised learning system provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Understandably, given the deficiencies in the background technology, this invention proposes a comparative self-paced semi-supervised learning method, specifically as follows: Figure 1 As shown, it includes the following steps: Step S1: Input a 3D Perkins medical image dataset, preprocess the medical image dataset to obtain structural images, gray matter probability images, and white matter probability images of brain images, and combine the brain images into a three-channel image input to the image classification model; the medical image dataset includes labeled data and unlabeled data; In this embodiment, raw 3D medical magnetic resonance imaging (MRI) images are acquired and processed into a deep learning-friendly image format. Specifically, the input 3D medical MRI images are preprocessed using the Cat12 toolkit, including bias field correction, skull dissection, and registration with the MNI152 template. T1 structural images, gray matter probability images, and white matter probability images of the brain are obtained. These three images are combined into a three-channel image for input into the image classification model. The image size is resampled to 128×128×128, normalized with max-min, and the processed data is divided into a labeled dataset L. t And an unlabeled data U t There is labeled data L t Includes images and their corresponding true category labels, but no labeled data U. t It contains only image data. In this embodiment, the image classification model is the ResNet18 model.
[0022] Step S2: Initialize the image classification model by performing contrastive learning pre-training on unlabeled data to obtain the basic pre-trained classification model weights. In this embodiment, the SimCLR framework is used as the basic architecture for the pre-training of contrastive learning. Since labeled data is scarce in the medical images acquired in step S1, directly performing supervised learning can easily lead to overfitting. Therefore, the pre-training is first performed on unlabeled data U... t Unsupervised pre-training was conducted on it.
[0023] The pre-training process of comparative learning on unlabeled data yields basic pre-trained classification model weights, including: Perform two randomized data augmentation operations on each medical image from unlabeled data. Generate two associated enhanced views of the medical image; The associated augmented views are fed into a shared-weight image encoder to extract high-dimensional feature representation vectors; The feature representation vector is input into a nonlinear mapping head network to map the features to the latent space, resulting in a low-dimensional projection vector. The normalized temperature-scaling cross-entropy loss is calculated based on the projection vector, and the parameters of the image encoder and the nonlinear mapping head network are updated through the backpropagation algorithm. Finally, the parameters of the image encoder are obtained as the weights of the pre-trained classification model.
[0024] Specifically, the pre-training process for comparative learning on unlabeled data is broken down into the following sub-steps: Step S2.1: Constructing positive sample pairs and data augmentation; from unlabeled data Randomly selected from Each medical image sample constitutes a training batch. For any input image in this batch... Two different random data augmentation operations are performed to generate two related augmented views, denoted as follows: and These two views are positive sample pairs, while the others in this batch... Each view is considered a negative sample. The random data augmentation operation includes a random sequence combination of the following transformations: random cropping and resizing, random flipping, and Gaussian blur.
[0025] Step S2.2: Feature Extraction; The enhanced views generated above are input into the image encoder. The image encoder adopts a 3D convolutional neural network-based architecture (e.g., 3D ResNet-18) to adapt to the spatial characteristics of 3D MRI data. The two views share the same encoder network weights. The encoder maps the input image into a high-dimensional feature representation vector: (1) in, It is the feature vector output by the Global Average Pooling layer.
[0026] Step S2.3: Feature Mapping; To prevent contrastive loss from causing excessive information loss in the feature representation, a non-linear mapping head network is connected after the encoder. The mapping head consists of a multilayer perceptron (MLP) with hidden layers, specifically structured as "linear layer - ReLU activation function - linear layer". This module maps the feature vectors... Mapping to the latent space yields a low-dimensional projection vector. The formula is expressed as: (2) in, It is the ReLU activation function. This is the final vector used to calculate the contrastive loss.
[0027] Step S2.4: Calculate the normalized temperature-scaled cross-entropy loss based on the projection vectors. First, calculate the cosine similarity between the two projection vectors: (3) For a pair of positive samples Its loss function is: (4) In the formula, This is a temperature coefficient (set to 0.5), used to adjust the model's attention to difficult negative samples; The indicator function is a loss function designed to maximize the consistency of positive sample pairs while minimizing the similarity with negative samples. Parameter updates and model preservation are performed by updating the parameters of the image encoder and map head using the backpropagation algorithm (using the Adam optimizer) by minimizing the average loss of all positive sample pairs within the aforementioned batch.
[0028] After pre-training, the nonlinear mapping head network is discarded, and only the parameters of the image encoder are retained as the weights of the pre-trained classification model for the self-automatic semi-supervised learning in the subsequent step S3. This initialization method enables the model to distinguish different anatomical structures and pathological features before it comes into contact with labeled data.
[0029] Step S3: Based on the pre-trained classification model weights, perform self-guided semi-supervised learning on labeled and unlabeled data to obtain discriminative classification model weights. It should be noted that self-stepping semi-supervised learning applies the difficulty-aware mechanism of self-stepping learning to a semi-supervised self-training framework. By dynamically and progressively selecting pseudo-labeled samples and starting learning from "simple" samples, it effectively avoids error propagation and significantly improves the stability and final performance of semi-supervised learning.
[0030] The self-guided semi-supervised learning process for labeled and unlabeled data to obtain discriminative classification model weights includes: The training process is divided into multiple training steps, and the following operations are performed in each training step: For labeled data, the supervised loss of the samples is calculated, and a specific quantile of the supervised loss of all currently labeled samples is calculated as a dynamic threshold. Samples with supervised loss less than the dynamic threshold are classified as simple samples, forming a subset of simple samples. Based on a simple subset of samples, the memory cache is updated to obtain representative samples, and the loss of the samples in the memory cache is calculated as the memory cache loss. Based on the simple subset of samples, class penalty weights are calculated to evaluate the difficulty of each class. For unlabeled data, weak augmentation and prediction are performed on the samples. Only when the prediction confidence is higher than a preset threshold, the sample and its generated pseudo-label are retained and used to participate in the calculation of unsupervised loss. A joint objective function is constructed, which includes supervised loss, memory cache loss, and unsupervised loss; the supervised loss and memory cache loss are weighted using the class penalty weights, and the parameters of the image classification model are updated by minimizing the joint objective function; Before proceeding to the next training step, a subset of simple samples is removed from the labeled data, and the samples in the memory cache are added to the labeled data. At the same time, the subset of simple samples is added to the unlabeled data to dynamically adjust the distribution of the training data. Repeat the above steps until training is complete, and use the parameters of the image classification model as the weights of the discriminative classification model.
[0031] It should be noted that this invention employs a self-paced learning strategy, dividing the training process into... A discrete training step, denoted as In each step In this process, the model not only updates its parameters but also dynamically adjusts the set of samples used for training. The specific implementation process of the self-tracking learning strategy includes the following sub-steps: Step S3.1: For labeled data, in the current training step Calculate labeled data Each sample The supervised loss (cross-entropy loss in this example) To achieve a learning pace that progresses from easy to difficult, a dynamic threshold is introduced. Calculate the current The specific quantile of the loss values of all samples in the dataset is denoted as . ,in A proportion coefficient is retained for the current step's samples, gradually increasing as training progresses. A binary selection variable is generated based on this threshold. (5) It should be noted that all The samples constitute the current simple sample subset. This portion of the samples is considered "easy to learn" by the model and will serve as the basis for subsequent calculations.
[0032] Step S3.2: Construction and Update of the Memory Buffer To prevent the model from forgetting due to the removal of simple samples in subsequent steps, this invention introduces a memory caching mechanism. A subset of simple samples is extracted using the encoder of the current model. Feature vectors of all samples Perform a clustering algorithm (K-Means clustering in this example) in the feature space to divide the samples into groups. There are several clusters, and the centroid of each cluster is determined. Within each cluster, select several samples closest to the centroid and combine them to form a memory buffer. Technical principle: Samples closer to the centroid rather than at the decision boundary are chosen because in medical image analysis (especially early Parkinson's disease diagnosis), boundary samples often contain a lot of noise or fuzzy features, while centroid samples have better representativeness and class robustness.
[0033] Step S3.3: Calculation of Class Penalty Weights To alleviate the common class imbalance problem in medical data, a simple sample subset is used. Dynamically calculate the penalty weights for each category For each category c ∈ {1, ..., C}, compute its value in the simple sample subset S. t Average supervised loss across all samples: (6) Among them, S t (c) indicates S t The subset of samples belonging to class c. Calculate the score Hn, representing the ease (confidence) of class identification, based on the average loss and the number of samples in that class: (7) This score combines the number of samples (frequency) and the difficulty (loss) of the model in identifying the class. A higher Hn value indicates greater confidence in the class and lower relative difficulty. Combined with the misclassification cost matrix C, where matrix C satisfies the following constraints: (1) For all i, C ii =0 indicates that classification incurs no cost.
[0034] (2) For i ≠ j, we have 1 ≤ C ij ≤a, where a is the preset maximum classification error cost. Here we set it to 2.
[0035] (3) There exists at least one class (i,j) such that C ij =1, there exists a minimum classification error cost.
[0036] If H a ≥H b This means that category a is simpler than category b, so C a ≤C b Calculate the penalty weight for each category c: (8) Let H be the total cost of misclassifying category i as another category. The core idea is: for a category, if it is difficult for the model to identify (low H... n And misclassification costs are high (C) i If the value is large, then it should be given a higher weight in the loss function. The obtained ω i It is added to the cross-entropy loss of the labeled branch to form a weighted cross-entropy loss, thereby guiding the model to learn more difficult or minority class samples.
[0037] The following example further illustrates this step: Define categories A and B, with category A having a quantity SA=50 and category B having a quantity SB=10. The average loss is L1=0.2 and L2=0.8.
[0038] Calculation of simplicity: H1=50 / exp(0.2)=40.9, H2=10 / exp(0.8)=4.49.
[0039] Define the cost matrix as: C = [[0, 1], [2, 0]]. Then C1 = C11 + C12 = 1, and C2 = C21 + C22 = 2.
[0040] but =H1+H2=45.39 simultaneously =C1*H1+C2*H2=49.88.
[0041] =1*45.93 / 86.29=0.53. =2*45.39 / 86.29=1.06.
[0042] Assign weights to the two categories separately. =[0.53,1.06].
[0043] Step S3.4: Filtering pseudo-labels for unlabeled data; for unlabeled data Samples in A consistent regularization strategy is adopted, including: Weak enhancement and prediction: for Perform weak enhancement (slight translation and flipping in this example), input the model to obtain the predicted probability distribution. And take the category with the highest probability as the pseudo-label. .
[0044] Confidence level filtering: Set a preset threshold (This example uses 0.95), only when
[0045] At that time, the sample is considered a "confidence sample" and participates in the training.
[0046] Strong Enhancement and Loss Calculation: Strong enhancement (Gaussian blur and masking in this example) is applied to the confidence sample, and the model output is calculated. With pseudo-tags Cross-entropy loss between them, as unsupervised loss .
[0047] Step S3.5: Jointly optimize and update model parameters. Construct a joint objective function that includes supervised loss, memory caching loss, and unsupervised loss: (9) Where w represents the model parameters. For the purpose of monitoring losses, L t This indicates that there is labeled data, v i t This indicates that under training step t, the labeled sample i ∈ L t Whether it is selected by the self-stepping learning strategy, ω i To monitor the penalty weighting for losses; This indicates a loss in memory caching mechanisms, M t-1 This represents the set of memory buffers containing representative samples retained from the previous round of selection. This is represented as a regularization term, used to dynamically adjust the number of selected labeled samples; U represents unsupervised loss, α represents the relative importance of scalar control in the overall objective, and has a value of 0-1; t This is represented as pseudo-labels being assigned to the unlabeled sample set; S t This represents the set of samples selected as simple samples through the self-stepping strategy; the update rule L is set. t =(L t \S t ) ∪ M t-1 and U t =U t ∪ S t Dynamically update labeled and unlabeled data.
[0048] Step S3.6: Dynamic Iterative Update of the Dataset After the parameter update is completed, the dataset is re-partitioned for the next training step. Preparation can be divided into: Tag data updates: That is: to use the simple samples already learned in this round. Remove from the labeled pool (to avoid redundant training), and simultaneously use representative in-memory samples. Put it back in the pool (to ensure continued review of key features).
[0049] And unlabeled data updates: That is, the removed simple samples are temporarily assigned to the unlabeled pool (or as part of the pseudo-labeled sample library).
[0050] Repeat steps S3.1 to S3.6 until the preset total number of training rounds is reached. The model parameters at this point are the discriminative classification model weights, which have undergone thorough feature mining and alignment.
[0051] Step S4: Based on the discriminative classification model weights, the image classification model is fine-tuned in the target task to automatically classify new input 3D medical images for diseases.
[0052] In this embodiment, after the self-guided semi-supervised training is completed, the obtained model is used as initialization and fine-tuned end-to-end on the complete labeled training set of the target task. Finally, the fine-tuned model is saved and deployed for automatic disease classification of newly input 3D medical images.
[0053] The effects of the embodiments of the present invention will be further explained below with reference to specific example data.
[0054] All experiments were conducted using Python 3.12, PyTorch 2.5, and CUDA 12.4 on an RTX 4090D GPU. The ADMA optimizer was used with a learning rate of 1 × 10⁻⁶. 5. Batch size is 8. Experiments were conducted on the publicly available PPMI and ADNI datasets. The PPMI dataset uses baseline data, containing 749 subjects and a total of 1536 images, including 185 Parkinson's disease (PD) patients (613 images), 341 prodromal patients (595 images), and 223 normal control (NC) subjects (328 images). MRI data may have been collected from the same subject at different time points; this data was retained in the same training or test set to ensure the validity of the experiment. It is important to note that this example uses the general features learned on the PPMI dataset to perform transfer learning on the ADNI dataset, with a ResNet18 encoder. The generalization performance of the invention is evaluated using the model parameters trained on the PPMI dataset. The ADNI-1 dataset contains 567 subjects and a total of 567 images, including 198 Alzheimer's disease (AD) patients (198 images), 233 patients in the prodromal stage (233 images), and 106 normal control (NC) subjects (106 images). Classification performance was evaluated using accuracy (ACC), balanced accuracy (BA), specificity (SPEC), F1 score (F1), and Kappa.
[0055] The comparison methods fall into two categories. One category consists of semi-supervised algorithms SSL (FixMatch, DefixMatch, RefixMatch, SeqenceMatch). Due to the limited dataset, algorithms with too few labels cannot learn effectively. Therefore, the label ratio for all semi-supervised algorithms is p=0.4. All semi-supervised algorithms use the same pre-training method as this invention to verify the effectiveness of the self-tracking semi-supervised algorithm. The other category is the 3D deep learning network No SSL, used to compare the performance of this invention with that of the fully labeled algorithm (p=0.4).
[0056] Table 1. Classification performance of the PPMI dataset
[0057] Table 2 Classification performance of the ADNI dataset
[0058] Based on the results shown in Table 1, the comparative self-stepping semi-supervised learning method proposed in this invention achieves a significant improvement in overall classification performance compared to the traditional SSL semi-supervised algorithm. The comparative self-stepping semi-supervised learning method described in this invention can achieve the best classification results.
[0059] Based on the performance of transfer learning on the ADNI dataset as shown in Table 2, the contrastive auto-stepping semi-supervised learning method described in this invention has the potential for cross-disease learning. When faced with imbalanced data, it can effectively learn minority classes (SPEC index), mitigating the impact of data distribution. Using the contrastive auto-stepping semi-supervised learning method described in this invention to classify medical image data greatly improves the work efficiency of relevant medical workers.
[0060] According to a second aspect of the present invention, a comparative self-synchronizing semi-supervised learning system is provided, specifically as follows: Figure 2 As shown, it includes: The data preprocessing module is used to input a 3D Perkins medical image dataset, preprocess the medical image dataset to obtain structural images, gray matter probability images, and white matter probability images of brain images, and combine the brain images into a three-channel image input to an image classification model; the medical image dataset includes labeled data and unlabeled data; The contrastive learning pre-training module is used to initialize the image classification model, perform contrastive learning pre-training on unlabeled data, and obtain the basic pre-trained classification model weights. The self-walking semi-supervised learning module is used to perform self-walking semi-supervised learning on labeled and unlabeled data based on the weights of the pre-trained classification model, so as to obtain the discriminative classification model weights. The model optimization and fine-tuning module is used to fine-tune the image classification model in the target task based on the discriminative classification model weights, and is used for automatic disease classification of new input 3D medical images.
[0061] It is understood that the comparative self-stepping semi-supervised learning system provided by the present invention corresponds to the comparative self-stepping semi-supervised learning method provided in the foregoing embodiments. The relevant technical features of the comparative self-stepping semi-supervised learning system can be referred to the relevant technical features of the comparative self-stepping semi-supervised learning method, and will not be repeated here.
[0062] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a communications interface, a memory, and a communication bus, wherein the processor, the communications interface, and the memory communicate with each other via the communication bus. The processor can invoke logical instructions in the memory to execute the implementation steps of the comparative self-synchronizing semi-supervised learning method described above.
[0063] Furthermore, the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0064] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0065] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0066] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
[0067] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A comparative self-paced semi-supervised learning method, characterized in that, Includes the following steps: A 3D Perkins medical image dataset is input, and the dataset is preprocessed to obtain structural images, gray matter probability images, and white matter probability images of brain images. The brain images are then combined into a three-channel image input to an image classification model. The medical image dataset includes labeled and unlabeled data. Initialize the image classification model and perform contrastive learning pre-training on unlabeled data to obtain the basic pre-trained classification model weights; Based on the pre-trained classification model weights, auto-automatic semi-supervised learning is performed on labeled and unlabeled data to obtain discriminative classification model weights. Based on the discriminative classification model weights, an image classification model is fine-tuned in the target task to automatically classify diseases from newly input 3D medical images.
2. The comparative self-synchronized semi-supervised learning method according to claim 1, characterized in that, The input 3D Perkins medical image dataset, and the preprocessing of the medical image dataset include: Inputting 3D medical MRI images, the 3D MRI volume data undergoes preprocessing using the SPM toolkit, including bias field correction, skull dissection, and registration with the MNI152 template. Size resampling and max-min normalization are performed, and the processed data is divided into a labeled dataset L. t And an unlabeled data U t The labeled data L t Includes images and their corresponding true category labels, but no labeled data U. t It contains only image data.
3. The comparative self-synchronized semi-supervised learning method according to claim 1, characterized in that, The pre-training of the unlabeled data for comparative learning yields the following basic pre-trained classification model weights: Perform two randomized data augmentation operations on each medical image from unlabeled data. Generate two associated enhanced views of the medical image; The associated augmented views are fed into a shared-weight image encoder to extract high-dimensional feature representation vectors; The feature representation vector is input into a nonlinear mapping head network to map the features to the latent space, resulting in a low-dimensional projection vector. The normalized temperature-scaling cross-entropy loss is calculated based on the projection vector, and the parameters of the image encoder and the nonlinear mapping head network are updated through the backpropagation algorithm. Finally, the parameters of the image encoder are obtained as the weights of the pre-trained classification model.
4. The comparative self-synchronized semi-supervised learning method according to claim 3, characterized in that, The process of updating the parameters of the image encoder and the nonlinear mapping head network through backpropagation, ultimately obtaining the parameters of the image encoder as the weights of the pre-trained classification model, includes: Parameter updates and model preservation are achieved by minimizing the average loss of all positive sample pairs within a batch, using the Adam optimizer to update the parameters of the image encoder and mapping head, discarding the nonlinear mapping head network, and retaining only the parameters of the image encoder as the weights of the pre-trained classification model for the self-automatic semi-supervised learning.
5. The comparative self-synchronized semi-supervised learning method according to claim 3, characterized in that, The random combination of data augmentation operations includes random sequence combinations of the following transformations: random cropping and resizing, random flipping, and Gaussian blur; the image encoder adopts a 3D convolutional neural network architecture to map the input image into a high-dimensional feature representation vector, and the two views share the same encoder network weights.
6. The comparative self-synchronized semi-supervised learning method according to claim 1, characterized in that, The self-guided semi-supervised learning process for labeled and unlabeled data to obtain discriminative classification model weights includes: The training process is divided into multiple training steps, and the following operations are performed in each training step: For labeled data, the supervised loss of the samples is calculated, and a specific quantile of the supervised loss of all currently labeled samples is calculated as a dynamic threshold. Samples with supervised loss less than the dynamic threshold are classified as simple samples, forming a subset of simple samples. Based on a simple sample subset, the memory cache is updated to obtain representative samples, and the loss of the samples in the memory cache is calculated as the memory cache loss. Based on the simple sample subset to which they belong, the category penalty weight is calculated to evaluate the difficulty of each category. For unlabeled data, weak augmentation and prediction are performed on the samples. Only when the prediction confidence is higher than a preset threshold are the samples and their generated pseudo-labels retained and used to participate in the calculation of unsupervised loss. We construct a joint objective function that includes supervised loss, memory cache loss, and unsupervised loss. We use class penalty weights to weight the supervised loss and memory cache loss, and update the parameters of the image classification model by minimizing the joint objective function. Before proceeding to the next training step, a subset of simple samples is removed from the labeled data, and samples from the memory cache are added to the labeled data, while a subset of simple samples is added to the unlabeled data, in order to dynamically adjust the distribution of the training data. Repeat the above steps until training is complete, and use the parameters of the image classification model as the discriminative classification model weights.
7. The comparative self-synchronized semi-supervised learning method according to claim 6, characterized in that, The self-guided semi-supervised learning process for labeled and unlabeled data can be represented by the following function: In the formula, w represents the model parameters. For the purpose of monitoring losses, L t This indicates that there is labeled data, v i t This indicates that under training step t, the labeled sample i ∈ L t Whether it is selected by the self-stepping learning strategy, ω i To monitor the penalty weighting for losses; This indicates a loss in memory caching mechanisms, M t-1 This represents the set of memory buffers containing representative samples retained from the previous round of selection. This is represented as a regularization term, used to dynamically adjust the number of selected labeled samples; U represents unsupervised loss, α represents the relative importance of scalar control in the overall objective, and has a value of 0-1; t This is represented as pseudo-labels being assigned to the unlabeled sample set; S t This represents the set of samples selected as simple samples through the self-stepping strategy; the update rule L is set. t =(L t \S t ) ∪ M t-1 and U t = U t ∪S t Dynamically update labeled and unlabeled data.
8. The comparative self-synchronized semi-supervised learning method according to claim 1, characterized in that, The process of updating the memory cache to obtain representative samples based on a simple subset of samples includes: Introducing a memory caching mechanism to extract simple sample subsets using the current model's encoder. Feature vectors of all samples Clustering algorithms are performed in the feature space to divide the samples into groups. There are several clusters, and the centroid of each cluster is determined. Within each cluster, select several samples closest to the centroid and combine them to form a memory buffer. .
9. A comparative self-synchronized semi-supervised learning system, characterized in that, include: The data preprocessing module is used to input a 3D Perkins medical image dataset, preprocess the medical image dataset to obtain structural images, gray matter probability images, and white matter probability images of brain images, and combine the brain images into a three-channel image input to an image classification model; the medical image dataset includes labeled data and unlabeled data; The contrastive learning pre-training module is used to initialize the image classification model, perform contrastive learning pre-training on unlabeled data, and obtain the basic pre-trained classification model weights. The self-walking semi-supervised learning module is used to perform self-walking semi-supervised learning on labeled and unlabeled data based on the weights of the pre-trained classification model, so as to obtain the discriminative classification model weights. The model optimization and fine-tuning module is used to fine-tune the image classification model in the target task based on the discriminative classification model weights, and is used for automatic disease classification of new input 3D medical images.
10. An electronic device, characterized in that, It includes a memory and a processor, wherein the processor is used to implement a comparative self-stepping semi-supervised learning method as described in any one of claims 1 to 8 when executing a computer program stored in the memory.