Semi-supervised breast cancer ai prediction method and system based on impact ranking consistency

By introducing a mechanism that influences ranking consistency, the problems of pseudo-label noise and insufficient information interaction in semi-supervised learning are solved, the robustness and stability of the breast cancer AI prediction model are improved, and efficient utilization of unlabeled data is achieved.

CN122177371APending Publication Date: 2026-06-09UNIV OF SCI & TECH BEIJING +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNIV OF SCI & TECH BEIJING
Filing Date
2026-02-05
Publication Date
2026-06-09

Smart Images

  • Figure CN122177371A_ABST
    Figure CN122177371A_ABST
Patent Text Reader

Abstract

This invention provides a semi-supervised AI prediction method and system for breast cancer based on the consistency of ranking influence. The method includes: weakly amplifying labeled samples, weakly amplifying unlabeled samples, and strongly amplifying them; inputting these three types of amplified samples into a deep model to obtain breast cancer prediction probabilities; for weakly amplified labeled samples, calculating the cross-entropy loss between the true image annotation and the predicted probability; for weakly amplified unlabeled samples, if their predicted probability in a certain category exceeds a threshold, using the predicted category label as a pseudo-label and calculating the consistency loss between it and the predicted probability of strongly amplified samples; performing relationship mining between labeled and unlabeled samples based on an influence function, dynamically selecting representative labeled samples and constructing a ranking probability distribution, and calculating the consistency loss of ranking influence; jointly optimizing the overall loss function and training the deep model; and using the trained deep model to output the AI ​​prediction result. This invention can be used for AI prediction of breast cancer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of AI prediction technology, and specifically refers to a semi-supervised AI prediction method and system for breast cancer based on the consistency of influence ranking. Background Technology

[0002] In recent years, semi-supervised learning (SSL) has made significant progress in the field of medical image analysis, and related methods have been widely applied to tasks such as breast cancer classification, cervical lesion detection, skin lesion recognition, and chest X-ray diagnosis. Its core advantage lies in the fact that it requires only a small number of expert-annotated samples, combined with a large amount of readily available unlabeled data, to effectively improve the diagnostic performance of the model and significantly reduce the dependence on expensive manual annotation.

[0003] Current mainstream SSL methods mainly include pseudo-labeling and consistency regularization. Pseudo-labeling uses a high confidence threshold to select "reliable" predictions from unlabeled data as supervision signals; consistency regularization forces the model to output similar predictions for different perturbations (such as weak and strong enhancements) on the same unlabeled image.

[0004] However, the aforementioned semi-supervised methods still have some shortcomings that hinder further performance improvements. Specifically, pseudo-labeling methods often face a quantity-quality dilemma: high thresholds lead to the discarding of a large amount of unlabeled data, while low thresholds introduce noisy labels, impairing model performance. Regarding consistency methods, existing methods typically only apply constraints within the unlabeled data branch, while there is a lack of explicit information interaction between the labeled and unlabeled data branches. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention provides a semi-supervised AI prediction method and system for breast cancer based on the influence of ranking consistency, the technical solution of which is as follows: On the one hand, a semi-supervised AI prediction method for breast cancer based on the consistency of ranking is provided, which includes: S1. Collect all labeled static ultrasound image data to construct a dataset, and divide it into training set, validation set and test set. Randomly select a part of the labeled samples in the training set as semi-supervised learning, perform weak amplification to generate weak amplified samples, and use the remaining part as unlabeled samples in semi-supervised learning, perform weak amplification and strong amplification to generate weak amplified samples and strong amplified samples respectively. Input the three types of amplified samples into the deep model and obtain the corresponding breast cancer prediction probability. S2. For weakly amplified samples with labeled samples, calculate the cross-entropy loss between the true image label and the predicted probability. S3. For weakly amplified samples of unlabeled samples, if the predicted probability of a certain category exceeds a preset threshold, the label of the predicted category is used as the pseudo-label of the unlabeled sample, and the consistency loss between the pseudo-label and the predicted probability of the strongly amplified sample is calculated. S4. Perform relationship mining between labeled and unlabeled samples based on influence function, dynamically select representative labeled samples according to influence function score, normalize influence function score and construct the ranking probability distribution of the representative labeled samples, calculate influence ranking consistency loss, use influence function score as gradient level information bridge connecting labeled and unlabeled branches, and perform deep interaction between labeled and unlabeled branches by constraining the consistency of influence function score ranking distribution under weak / strong amplification. S5. Jointly optimize the overall loss function: cross-entropy loss for labeled data, consistency loss for unlabeled data, and consistency loss affecting ranking, to obtain the trained deep model; S6. Using the trained deep model, output the AI ​​prediction result of the breast ultrasound image data to be predicted.

[0006] On the other hand, a semi-supervised AI prediction system for breast cancer based on the consistency of ranking is provided, the system comprising: The collection and amplification module is used to collect all labeled static ultrasound image data to construct a dataset and divide it into training set, validation set and test set. A portion of the labeled samples in the training set is randomly selected as semi-supervised learning and weakly amplified to generate weakly amplified samples. The remaining portion is used as unlabeled samples in semi-supervised learning and weakly amplified and strongly amplified to generate weakly amplified samples and strongly amplified samples, respectively. The three types of amplified samples are input into the deep model to obtain the corresponding breast cancer prediction probability. The first calculation module is used to calculate the cross-entropy loss between the true image annotation and the predicted probability for weakly amplified samples with labeled samples. The second calculation module is used to, for weakly amplified samples of unlabeled samples, if the predicted probability of a certain category exceeds a preset threshold, use the label of the predicted category as the pseudo-label of the unlabeled sample, and calculate the consistency loss between the pseudo-label and the predicted probability of the strongly amplified sample. The third calculation module is used to mine the relationship between labeled and unlabeled samples based on the influence function, dynamically filter representative labeled samples according to the influence function score, normalize the influence function score and construct the ranking probability distribution of the representative labeled samples, calculate the influence ranking consistency loss, use the influence function score as a gradient-level information bridge connecting labeled and unlabeled branches, and perform deep interaction between labeled and unlabeled branches by constraining the consistency of the influence function score ranking distribution under weak / strong amplification. The joint optimization module is used to jointly optimize the overall loss function: cross-entropy loss for labeled data, consistency loss for unlabeled data, and consistency loss affecting ranking, to obtain the trained deep model; The prediction output module is used to output the AI ​​prediction result of the breast ultrasound image data to be predicted using the trained deep model.

[0007] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the above-described semi-supervised breast cancer AI prediction method based on influence ranking consistency.

[0008] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, the at least one instruction being loaded and executed by a processor to implement the above-described semi-supervised breast cancer AI prediction method based on influence ranking consistency.

[0009] The beneficial effects of the technical solution provided by this invention include at least the following: (1) This invention introduces a gradient-level interaction mechanism: the influence function (IF) serves as "third type of information" and explicitly connects labeled and unlabeled branches, surpassing the traditional parameter sharing mode.

[0010] (2) The present invention alleviates pseudo-label noise: the sorting consistency does not depend on hard labels and is more robust to low-confidence medical images.

[0011] (3) This invention improves the utilization of unlabeled data: even if the confidence level is lower than the threshold, it can still participate in training through IF sorting.

[0012] (4) This invention improves training stability: by using information from labeled data, it increases further constraints on unlabeled learning branches, reduces problems that may be caused by pseudo-labels and consistency regularization methods, and makes the model learning process more reliable.

[0013] (5) This invention retains the advantages of end-to-end: no additional overhead for inference and compatibility with existing SSL frameworks. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1This is a flowchart of a semi-supervised AI prediction method for breast cancer based on the consistency of ranking provided in an embodiment of the present invention; Figure 2 This is a training flowchart of a semi-supervised AI prediction method for breast cancer based on the influence of ranking consistency, provided by an embodiment of the present invention. Figure 3 This is an overall block diagram of a semi-supervised AI prediction method for breast cancer based on the consistency of ranking provided in an embodiment of the present invention; Figure 4 This is a block diagram of a semi-supervised breast cancer AI prediction system based on the consistency of ranking effects provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0016] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0017] This invention provides a semi-supervised AI prediction method for breast cancer based on the consistency of influence ranking. This method can be implemented by an electronic device, which can be a terminal or a server. Figure 1 The flowchart of this method is shown below. Figure 2 The diagram shown is a flowchart of the training process for this method. Figure 3 The diagram shown is an overall block diagram of the method. The processing flow may include the following steps:

[0018] S1. Collect all labeled static ultrasound image data to construct a dataset, and divide it into training set, validation set and test set. Randomly select a part of the labeled samples in the training set as semi-supervised learning, perform weak amplification to generate weak amplified samples, and use the remaining part as unlabeled samples in semi-supervised learning, perform weak amplification and strong amplification to generate weak amplified samples and strong amplified samples respectively. Input the three types of amplified samples into the deep model and obtain the corresponding breast cancer prediction probability. This invention collects static ultrasound image data from patients, such as keyframes captured during ultrasound scans or static images presented in the imaging findings section of the patient's medical record. Then, data cleaning is performed, using the gold standard of pathology as the inclusion and exclusion criterion: only patient images verified for benign or malignant pathology are retained; patient image data not examined pathologically are excluded. For patients with multiple lesions in their image data, if one lesion is found to be malignant, the entire image is labeled as malignant. Conversely, if all lesions are found to be benign, the image is labeled as benign. Simultaneously, only the original ultrasound image data is retained, excluding images showing blood flow signals from lesions. The entire data collection and cleaning process aims to maintain a 1:1 ratio of benign to malignant image data. Finally, a dataset is constructed. The previously collected benign and malignant ultrasound image data is divided into training, validation, and test sets in a 6:2:2 ratio. During data partitioning, multiple image data from the same patient must be grouped into the same set. Then, for the data in the training set, a certain proportion (e.g., 20%) is randomly selected as labeled samples, and the remaining images are used as unlabeled samples. This process also needs to ensure that multiple images of the same patient are simultaneously assigned to labeled or unlabeled subsets.

[0019] Overall, the constructed dataset mainly includes a set of labeled samples. and unlabeled sample set ,in, and These represent labeled / unlabeled image data and their corresponding one-hot labels (only for labeled images, corresponding to benign or malignant categories). and These represent the number of labeled and unlabeled samples, respectively, with the number of unlabeled samples being much greater than the number of labeled samples.

[0020] S2. For weakly amplified samples with labeled samples, calculate the cross-entropy loss between the true image label and the predicted probability. Optionally, S2 specifically includes: For each labeled sample The result of weak amplification (such as horizontal flipping) is obtained. Input depth model Obtain the corresponding prediction probability ,in, Represents model parameters; The learning process for labeled samples is constrained by the cross-entropy loss between the true image label and the predicted probability. Therefore, the loss function for labeled samples... The calculation formula is as follows: , in, The loss represents a single sample. Represents distribution and Cross-entropy loss between Indicates the true label, This indicates the number of labeled samples.

[0021] S3. For weakly amplified samples of unlabeled samples, if the predicted probability of a certain category exceeds a preset threshold, the label of the predicted category is used as the pseudo-label of the unlabeled sample, and the consistency loss between the pseudo-label and the predicted probability of the strongly amplified sample is calculated. Optionally, S3 specifically includes: For each unlabeled sample Two types of enhanced samples were obtained by performing weak amplification and strong amplification (such as RandAugment) on them respectively. and Input depth model respectively Among them, for weakly amplified samples Obtain the class probability distribution of its output: , And based on the category probability distribution and the preset confidence threshold (Generally set to 0.9) Calculate pseudo-labels : The above equation shows that if the model is effective for weakly amplified samples... Predicted probability in a certain category Exceeded the threshold Then the label of its predicted category is used as the pseudo-label of the unlabeled sample. For unlabeled samples with pseudo-labels, in the pseudo-labels and strongly amplified samples A consistency constraint is imposed between the predicted probabilities; therefore, the prediction consistency loss for unlabeled samples... Calculated by the following formula: in, The loss represents a single sample. Represents distribution and Cross-entropy loss between This represents the set of unlabeled samples with pseudo-labels.

[0022] S4. Perform relationship mining between labeled and unlabeled samples based on influence function, dynamically select representative labeled samples according to influence function score, normalize influence function score and construct the ranking probability distribution of the representative labeled samples, calculate influence ranking consistency loss, use influence function score as gradient level information bridge connecting labeled and unlabeled branches, and perform deep interaction between labeled and unlabeled branches by constraining the consistency of influence function score ranking distribution under weak / strong amplification. The aforementioned semi-supervised learning framework establishes loss constraints on both labeled and unlabeled data, and achieves information interaction between labeled and unlabeled learning branches through model parameter sharing. However, it neglects to measure the relationship between labeled and unlabeled samples. Unlike the common method of using cosine distance to measure the relationship between samples, this embodiment of the invention characterizes the relationship between different data at the gradient level through influence function scores. Specifically, this embodiment of the invention uses the influence function calculation method TracIn, which accumulates the dot product of the loss gradient of a certain sample and the loss gradient of the target sample on multiple model snapshots (i.e., model parameters of a certain training step) during training, thereby approximating the influence of that sample on the target sample.

[0023] This process typically requires target samples to have true labels to calculate the loss gradient. However, in semi-supervised medical image analysis, unlabeled samples lack pathological gold standard labels, making it impossible to directly apply the standard TracIn. To address this, this invention proposes a soft label approximation strategy suitable for unlabeled data. Specifically, it uses the Exponential Moving Average (EMA) method to combine the model's predicted probability of the unlabeled sample in the current epoch with the prediction results from previous epochs, using this as the soft label for the sample and replacing the true label in gradient calculation.

[0024] Optionally, in step S4, relationship mining between labeled and unlabeled samples is performed based on the influence function, and representative labeled samples are dynamically selected according to the influence function score, specifically including: The TracIn method, used to calculate the influence function, accumulates the dot product of the loss gradient of a labeled sample and the loss gradient of the target unlabeled sample to approximate the influence of the labeled sample on the target unlabeled sample. The target unlabeled sample uses a soft-label approximation strategy: the EMA method is used to update the training parameters of the current model, and the predicted probability of the current unlabeled sample is obtained based on the updated model parameters. This predicted probability serves as the soft label for the target unlabeled sample and replaces the true label in the loss gradient calculation. This includes: Updating model parameters using the EMA method, its first t The parameter update method for each iteration is as follows: in, These are the model parameters at the current iteration step. The dynamic momentum coefficient is defined as: in, For the final momentum value, The hyperparameter representing the rate of EMA warmup (typically set to 100) is used in each iteration step for unlabeled samples. Its weakly amplified samples and strongly amplified samples The pseudo-labels are obtained by inputting the model parameters into the EMA: in Temperature coefficient; Then, the weakly amplified samples and strongly amplified samples Combining the EMA prediction probability with the corresponding EMA, we obtain two probabilistic instances: weakly amplified sample instances. Strongly amplified sample examples ; For each unlabeled sample instance and all labeled sample instances in the current training batch The influence function score was calculated using the TracIn method: in, The loss represents a single sample. and Representing the first The learning rate and model parameters for each iteration step (to reduce computational cost, In actual calculations, it is simplified to the training parameters of the last layer of the model. The TracIn score represents the gradient operation on the model parameters. The score can be positive or negative. A positive value means that the labeled sample supports the target unlabeled sample by classifying it as a certain category, while a negative value means it opposes it. The larger the absolute value, the stronger the support / opposition. In each batch, from the labeled sample set Dynamic selection A representative reference sample is selected as an anchor point for measuring the relationship between samples. The selection strategy is based on the influence function score of all labeled sample instances in the current batch on unlabeled weakly / strongly augmented sample instances. A labeled sample that appears frequently under both weak and strong amplification and significantly supports or inhibits the amplification, and that also has characteristic orthogonality, is selected as a representative labeled sample to ensure that the selected sample has both information diversity and decision representativeness.

[0025] Optionally, in step S4, the influence function score is normalized and the ranking probability distribution of the representative labeled samples is constructed. The influence ranking consistency loss is calculated, and the influence function score is used as a gradient-level information bridge connecting the labeled and unlabeled branches. By constraining the consistency of the influence function score ranking distribution under weak / strong amplification, deep interaction between labeled and unlabeled branches is performed. Specifically, this includes: Based on the selected Representative labeled samples, with a construction size of [size missing]. Influence function score matrix Let be the number of unlabeled samples in the current batch, and be the number of samples in the matrix at the th position. Line number The value in the column represents the first... The labeled sample pairs The influence function scores of each unlabeled sample are calculated. Since the scores can be positive or negative, softmax is used to normalize the column-wise scores of all influence function scores for each unlabeled sample. The normalization process uses a temperature coefficient to enhance the differences between different scores, highlighting the relative importance of high-influence samples. The normalization formula is as follows: in, General and , Temperature coefficient; Then, the normalized score This is considered as the strength of the influence relationship between representative labeled samples and unlabeled samples; Ideally, for two augmented samples generated from the same unlabeled sample, the labeled samples that have a high influence function score (high support or strong opposition) should be consistent, i.e. The ranking of influence function scores generated by labeled samples should be consistent. However, considering that when calculating the influence function scores, unlabeled sample instances use the probability distribution output by the classification model rather than their true labels, simply using a single constraint for consistency in influence function score ranking is too stringent. Therefore, this embodiment of the invention calculates the probability of all possible rankings (i.e., all permutations and combinations of labeled samples in the influence relationship) and obtains the complete ranking probability distribution.

[0026] Calculate the probability of all labeled samples appearing in the influence relationship, and obtain the complete ranking probability distribution: The probability of a certain sorting method is calculated as follows: in, It is a specific sorting method. This indicates an arrangement. The Middle The index of labeled samples; For example, if That is, three labeled reference samples were selected, denoted as... , and For a given unlabeled image, its normalized score vector is denoted as... ,in Representative reference sample The influence weight of the unlabeled sample. At this point, for the permutation... Its meaning is " The most influential, followed by ,at last The probability of this arrangement can be calculated using the above formula as follows:

[0027] because There are a total of possible rankings for each score. The probabilities of other different sorts can also be calculated using the above formula, thus forming a complete sort probability distribution that covers all representative labeled samples. For a certain unlabeled sample Weakly amplified samples and strongly amplified samples Construct two sorted distributions and Furthermore, by minimizing the KL divergence between the two distributions, a loss affecting ranking consistency is constructed, as shown in the following formula: in Represents the set of all possible permutations; The aforementioned influence ranking consistency loss, by introducing ranking consistency regularization, ensures that the model maintains a consistent ranking of the influence of representative labeled samples under both weakly and strongly augmented views, thereby enhancing the robustness of modeling the relationship between samples.

[0028] The proposed loss term based on influence ranking consistency in this invention retains the advantages of existing semi-supervised frameworks while explicitly introducing gradient-level influence relationships as a third type of supervision signal, enabling deep interaction between labeled and unlabeled branches. This module is plug-and-play and can be applied to all semi-supervised learning frameworks.

[0029] S5. Jointly optimize the overall loss function: cross-entropy loss for labeled data, consistency loss for unlabeled data, and consistency loss affecting ranking, to obtain the trained deep model; The total loss function is as follows: , in, and These represent the consistency loss weight for unlabeled data and the consistency loss weight affecting ranking, respectively, and can be adjusted according to the task (generally both are set to 1).

[0030] S6. Using the trained deep model, output the AI ​​prediction result of the breast ultrasound image data to be predicted.

[0031] like Figure 4 As shown, this embodiment of the invention also provides a semi-supervised AI prediction system for breast cancer based on the consistency of ranking, the system comprising: The collection and amplification module 410 is used to collect all labeled static ultrasound image data to construct a dataset and divide it into training set, validation set and test set. A portion of the training set is randomly selected as labeled samples for semi-supervised learning and weak amplification is performed to generate weak amplified samples. The remaining portion is used as unlabeled samples for semi-supervised learning and weak amplification and strong amplification are performed to generate weak amplified samples and strong amplified samples respectively. The three types of amplified samples are input into the deep model to obtain the corresponding breast cancer prediction probability. The first calculation module 420 is used to calculate the cross-entropy loss between the true image annotation and the predicted probability for weakly amplified samples with labeled samples. The second calculation module 430 is used to, for weakly amplified samples of unlabeled samples, if the predicted probability of a certain category exceeds a preset threshold, use the label of the predicted category as the pseudo label of the unlabeled sample, and calculate the consistency loss between the pseudo label and the predicted probability of the strongly amplified sample. The third calculation module 440 is used to mine the relationship between labeled and unlabeled samples based on the influence function, dynamically filter representative labeled samples according to the influence function score, normalize the influence function score and construct the ranking probability distribution of the representative labeled samples, calculate the influence ranking consistency loss, use the influence function score as a gradient-level information bridge connecting labeled and unlabeled branches, and perform deep interaction between labeled and unlabeled branches by constraining the consistency of the influence function score ranking distribution under weak / strong amplification. The joint optimization module 450 is used to jointly optimize the overall loss function: cross-entropy loss of labeled data, consistency loss of unlabeled data, and consistency loss affecting ranking, to obtain the trained deep model; The prediction output module 460 is used to output the AI ​​prediction result of the breast ultrasound image data to be predicted using the trained deep model.

[0032] Optionally, the first calculation module is specifically used for: For each labeled sample The weak amplification obtained by performing it Input depth model Obtain the corresponding prediction probability ,in, Represents model parameters; The learning process for labeled samples is constrained by the cross-entropy loss between the true image label and the predicted probability. Therefore, the loss function for labeled samples... The calculation formula is as follows: , in, The loss represents a single sample. Represents distribution and Cross-entropy loss between Indicates the true label, This indicates the number of labeled samples.

[0033] Optionally, the second calculation module is specifically used for: For each unlabeled sample Two types of enhanced samples were obtained by performing weak amplification and strong amplification on them respectively. and Input depth model respectively Among them, for weakly amplified samples Obtain the class probability distribution of its output: , And based on the category probability distribution and the preset confidence threshold Calculate pseudo-labels : The above equation shows that if the model is effective for weakly amplified samples... Predicted probability in a certain category Exceeded the threshold Then the label of its predicted category is used as the pseudo-label of the unlabeled sample. For unlabeled samples with pseudo-labels, in the pseudo-labels and strongly amplified samples A consistency constraint is imposed between the predicted probabilities; therefore, the prediction consistency loss for unlabeled samples... Calculated by the following formula: in, The loss represents a single sample. Represents distribution and Cross-entropy loss between This represents the set of unlabeled samples with pseudo-labels.

[0034] Optionally, the step of mining the relationship between labeled and unlabeled samples based on the influence function, and dynamically selecting representative labeled samples according to the influence function score, specifically includes: The TracIn method, used to calculate the influence function, accumulates the dot product of the loss gradient of a labeled sample and the loss gradient of the target unlabeled sample to approximate the influence of the labeled sample on the target unlabeled sample. The target unlabeled sample uses a soft-label approximation strategy: the training parameters of the current model are updated using the exponential moving average (EMA) method, and the predicted probability of the current unlabeled sample is obtained based on the updated model parameters. This predicted probability serves as the soft label for the target unlabeled sample and replaces the true label in the loss gradient calculation. This includes: Updating model parameters using the EMA method, its first t The parameter update method for each iteration step is as follows: in, These are the model parameters at the current iteration step. The dynamic momentum coefficient is defined as: in, For the final momentum value, The hyperparameter representing the rate of EMA preheating is used in each iteration step for unlabeled samples. Its weakly amplified samples and strongly amplified samples The pseudo-labels are obtained by inputting the model parameters into the EMA: in Temperature coefficient; Then, the weakly amplified samples and strongly amplified samples Combining the EMA prediction probability with the corresponding EMA, we obtain two probabilistic instances: weakly amplified sample instances. Strongly amplified sample examples ; For each unlabeled sample instance and all labeled sample instances in the current training batch The influence function score was calculated using the TracIn method: in, The loss represents a single sample. and Representing the first The learning rate and model parameters for each iteration step. The TracIn score represents the gradient operation on the model parameters. The score can be positive or negative. A positive value means that the labeled sample supports the target unlabeled sample by classifying it as a certain category, while a negative value means it opposes it. The larger the absolute value, the stronger the support / opposition. In each batch, from the labeled sample set Dynamic selection A representative reference sample is selected as an anchor point for measuring the relationship between samples. The selection strategy is based on the influence function score of all labeled sample instances in the current batch on unlabeled weakly / strongly augmented sample instances. A number of labeled samples that appear frequently under both weak and strong amplification and show significant support / inhibition, and that also exhibit characteristic orthogonality, are selected as representative labeled samples to ensure that the selected samples have both information diversity and decision representativeness.

[0035] Optionally, the normalized influence function score is used to construct the ranking probability distribution of the representative labeled samples, and the influence ranking consistency loss is calculated. The influence function score is used as a gradient-level information bridge connecting the labeled and unlabeled branches. By constraining the consistency of the influence function score ranking distribution under weak / strong amplification, deep interaction between labeled and unlabeled branches is performed, specifically including: Based on the selected Representative labeled samples, with a construction size of [size missing]. Influence function score matrix Let be the number of unlabeled samples in the current batch, and be the number of samples in the matrix at the th position. Line number The value in the column represents the first... The labeled sample pairs The influence function scores of each unlabeled sample are calculated. Since the scores can be positive or negative, softmax is used to normalize the column-wise scores of all influence function scores for each unlabeled sample. The normalization process uses a temperature coefficient to enhance the differences between different scores, highlighting the relative importance of high-influence samples. The normalization formula is as follows: in, General and , Temperature coefficient; Then, the normalized score This is considered as the strength of the influence relationship between representative labeled samples and unlabeled samples; Calculate the probability of all labeled samples appearing in the influence relationship, and obtain the complete ranking probability distribution: The probability of a certain sorting method is calculated as follows: in, It is a specific sorting method. This indicates an arrangement. The Middle The index of labeled samples; because There are a total of possible rankings for each score. The probabilities of other different sorts can also be calculated using the above formula, thus forming a complete sort probability distribution that covers all representative labeled samples. For a certain unlabeled sample Weakly amplified samples and strongly amplified samples Construct two sorted distributions and Furthermore, by minimizing the KL divergence between the two distributions, a loss affecting ranking consistency is constructed, as shown in the following formula: in Represents the set of all possible permutations; The aforementioned influence ranking consistency loss, by introducing ranking consistency regularization, ensures that the model maintains a consistent ranking of the influence of representative labeled samples under both weakly and strongly augmented views, thereby enhancing the robustness of modeling the relationship between samples.

[0036] The semi-supervised breast cancer AI prediction system based on the consistency of influence ranking provided in this embodiment of the invention has a functional structure that corresponds to the semi-supervised breast cancer AI prediction method based on the consistency of influence ranking provided in this embodiment of the invention, and will not be described again here.

[0037] Figure 5 This is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present invention. The electronic device 500 may vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 501 and one or more memories 502. The memory 502 stores at least one instruction, which is loaded and executed by the processor 501 to implement the steps of the above-mentioned semi-supervised breast cancer AI prediction method based on the consistency of influence ranking.

[0038] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to complete the aforementioned semi-supervised breast cancer AI prediction method based on influence ranking consistency. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.

[0039] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0040] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. 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 semi-supervised AI prediction method for breast cancer based on the consistency of ranking effects, characterized in that, The method includes: S1. Collect all labeled static ultrasound image data to construct a dataset, and divide it into training set, validation set and test set. Randomly select a part of the labeled samples in the training set as semi-supervised learning, perform weak amplification to generate weak amplified samples, and use the remaining part as unlabeled samples in semi-supervised learning, perform weak amplification and strong amplification to generate weak amplified samples and strong amplified samples respectively. Input the three types of amplified samples into the deep model and obtain the corresponding breast cancer prediction probability. S2. For weakly amplified samples with labeled samples, calculate the cross-entropy loss between the true image label and the predicted probability. S3. For weakly amplified samples of unlabeled samples, if the predicted probability of a certain category exceeds a preset threshold, the label of the predicted category is used as the pseudo-label of the unlabeled sample, and the consistency loss between the pseudo-label and the predicted probability of the strongly amplified sample is calculated. S4. Perform relationship mining between labeled and unlabeled samples based on influence function, dynamically select representative labeled samples according to influence function score, normalize influence function score and construct the ranking probability distribution of the representative labeled samples, calculate influence ranking consistency loss, use influence function score as gradient level information bridge connecting labeled and unlabeled branches, and perform deep interaction between labeled and unlabeled branches by constraining the consistency of influence function score ranking distribution under weak / strong amplification. S5. Jointly optimize the overall loss function: cross-entropy loss for labeled data, consistency loss for unlabeled data, and consistency loss affecting ranking, to obtain the trained deep model; S6. Using the trained deep model, output the AI ​​prediction result of the breast ultrasound image data to be predicted.

2. The method according to claim 1, characterized in that, S2 specifically includes: For each labeled sample The weak amplification obtained by performing it Input depth model To obtain the corresponding prediction probability ,in, Represents model parameters; The learning process for labeled samples is constrained by the cross-entropy loss between the true image label and the predicted probability. Therefore, the loss function for labeled samples... The calculation formula is as follows: , in, The loss represents a single sample. Represents distribution and Cross-entropy loss between Indicates the true label, This indicates the number of labeled samples.

3. The method according to claim 1, characterized in that, S3 specifically includes: For each unlabeled sample Two types of enhanced samples were obtained by performing weak amplification and strong amplification on them respectively. and Input depth model respectively Among them, for weakly amplified samples Obtain the class probability distribution of its output: , And based on the category probability distribution and the preset confidence threshold Calculate pseudo-labels : The above equation shows that if the model is effective for weakly amplified samples... Predicted probability in a certain category Exceeded the threshold Then the label of its predicted category is used as the pseudo-label of the unlabeled sample. For unlabeled samples with pseudo-labels, in the pseudo-labels and strongly amplified samples A consistency constraint is imposed between the predicted probabilities; therefore, the prediction consistency loss for unlabeled samples... Calculated by the following formula: in, The loss represents a single sample. Represents distribution and Cross-entropy loss between This represents the set of unlabeled samples with pseudo-labels.

4. The method according to claim 1, characterized in that, In step S4, relationship mining between labeled and unlabeled samples is performed based on the influence function, and representative labeled samples are dynamically selected according to the influence function score. Specifically, this includes: The TracIn method, used to calculate the influence function, accumulates the dot product of the loss gradient of a labeled sample and the loss gradient of the target unlabeled sample to approximate the influence of the labeled sample on the target unlabeled sample. The target unlabeled sample uses a soft-label approximation strategy: the training parameters of the current model are updated using the exponential moving average (EMA) method, and the predicted probability of the current unlabeled sample is obtained based on the updated model parameters. This predicted probability serves as the soft label for the target unlabeled sample and replaces the true label in the loss gradient calculation. This includes: Updating model parameters using the EMA method, its first t The parameter update method for each iteration step is as follows: in, These are the model parameters at the current iteration step. The dynamic momentum coefficient is defined as: in, For the final momentum value, The hyperparameter representing the rate of EMA preheating is used in each iteration step for unlabeled samples. Its weakly amplified samples and strongly amplified samples The pseudo-labels are obtained by inputting the model parameters into the EMA: in Temperature coefficient; Then, the weakly amplified samples and strongly amplified samples Combining the EMA prediction probability with the corresponding EMA, we obtain two probabilistic instances: weakly amplified sample instances. Strongly amplified sample examples ; For each unlabeled sample instance and all labeled sample instances in the current training batch The influence function score was calculated using the TracIn method: in, The loss represents a single sample. and Representing the first The learning rate and model parameters for each iteration step. The TracIn score represents the gradient operation on the model parameters. The score can be positive or negative. A positive value means that the labeled sample supports the target unlabeled sample by classifying it as a certain category, while a negative value means it opposes it. The larger the absolute value, the stronger the support / opposition. In each batch, from the labeled sample set Dynamic selection A representative reference sample is selected as an anchor point for measuring the relationship between samples. The selection strategy is based on the influence function score of all labeled sample instances in the current batch on unlabeled weakly / strongly augmented sample instances. A number of labeled samples that appear frequently under both weak and strong amplification and show significant support / inhibition, and that also exhibit characteristic orthogonality, are selected as representative labeled samples to ensure that the selected samples have both information diversity and decision representativeness.

5. The method according to claim 4, characterized in that, In step S4, the influence function score is normalized and the ranking probability distribution of the representative labeled samples is constructed. The influence ranking consistency loss is calculated, and the influence function score is used as a gradient-level information bridge connecting the labeled and unlabeled branches. By constraining the consistency of the influence function score ranking distribution under weak / strong amplification, deep interaction between labeled and unlabeled branches is performed, specifically including: Based on the selected Representative labeled samples, with a construction size of [size missing]. Influence function score matrix Let be the number of unlabeled samples in the current batch, and be the number of samples in the matrix at the th position. Line number The value in the column represents the first... The labeled sample pairs The influence function scores of each unlabeled sample are calculated. Since the scores can be positive or negative, softmax is used to normalize the column-wise scores of all influence function scores for each unlabeled sample. The normalization process uses a temperature coefficient to enhance the differences between different scores, highlighting the relative importance of high-influence samples. The normalization formula is as follows: in, General and , Temperature coefficient; Then, the normalized score This is considered as the strength of the influence relationship between representative labeled samples and unlabeled samples; Calculate the probability of all labeled samples appearing in the influence relationship, and obtain the complete ranking probability distribution: The probability of a certain sorting method is calculated as follows: in, It is a specific sorting method. This indicates an arrangement. The Middle The index of labeled samples; because There are a total of possible rankings for each score. The probabilities of other different sorts can also be calculated using the above formula, thus forming a complete sort probability distribution that covers all representative labeled samples. For a certain unlabeled sample Weakly amplified samples and strongly amplified samples Construct two sorted distributions and Furthermore, by minimizing the KL divergence between the two distributions, a loss affecting ranking consistency is constructed, as shown in the following formula: in Represents the set of all possible permutations; The aforementioned influence ranking consistency loss, by introducing ranking consistency regularization, ensures that the model maintains a consistent ranking of the influence of representative labeled samples under both weakly and strongly augmented views, thereby enhancing the robustness of modeling the relationship between samples.

6. A semi-supervised AI prediction system for breast cancer based on the consistency of ranking effects, characterized in that, The system includes: The collection and amplification module is used to collect all labeled static ultrasound image data to construct a dataset and divide it into training set, validation set and test set. A portion of the labeled samples in the training set is randomly selected as semi-supervised learning and weakly amplified to generate weakly amplified samples. The remaining portion is used as unlabeled samples in semi-supervised learning and weakly amplified and strongly amplified to generate weakly amplified samples and strongly amplified samples, respectively. The three types of amplified samples are input into the deep model to obtain the corresponding breast cancer prediction probability. The first calculation module is used to calculate the cross-entropy loss between the true image annotation and the predicted probability for weakly amplified samples with labeled samples. The second calculation module is used to, for weakly amplified samples of unlabeled samples, if the predicted probability of a certain category exceeds a preset threshold, use the label of the predicted category as the pseudo-label of the unlabeled sample, and calculate the consistency loss between the pseudo-label and the predicted probability of the strongly amplified sample. The third calculation module is used to mine the relationship between labeled and unlabeled samples based on the influence function, dynamically filter representative labeled samples according to the influence function score, normalize the influence function score and construct the ranking probability distribution of the representative labeled samples, calculate the influence ranking consistency loss, use the influence function score as a gradient-level information bridge connecting labeled and unlabeled branches, and perform deep interaction between labeled and unlabeled branches by constraining the consistency of the influence function score ranking distribution under weak / strong amplification. The joint optimization module is used to jointly optimize the overall loss function: cross-entropy loss for labeled data, consistency loss for unlabeled data, and consistency loss affecting ranking, to obtain the trained deep model; The prediction output module is used to output the AI ​​prediction result of the breast ultrasound image data to be predicted using the trained deep model.

7. The system according to claim 6, characterized in that, The first calculation module is specifically used for: For each labeled sample The weak amplification obtained by performing it Input depth model To obtain the corresponding prediction probability ,in, Represents model parameters; The learning process for labeled samples is constrained by the cross-entropy loss between the true image label and the predicted probability. Therefore, the loss function for labeled samples... The calculation formula is as follows: , in, The loss represents a single sample. Represents distribution and Cross-entropy loss between Indicates the true label, This indicates the number of labeled samples.

8. The system according to claim 6, characterized in that, The second calculation module is specifically used for: For each unlabeled sample Two types of enhanced samples were obtained by performing weak amplification and strong amplification on them respectively. and Input depth model respectively Among them, for weakly amplified samples Obtain the class probability distribution of its output: , And based on the category probability distribution and the preset confidence threshold Calculate pseudo-labels : The above equation shows that if the model is effective for weakly amplified samples... Predicted probability in a certain category Exceeded the threshold Then the label of its predicted category is used as the pseudo-label of the unlabeled sample. For unlabeled samples with pseudo-labels, in the pseudo-labels and strongly amplified samples A consistency constraint is imposed between the predicted probabilities; therefore, the prediction consistency loss for unlabeled samples... Calculated by the following formula: in, The loss represents a single sample. Represents distribution and Cross-entropy loss between This represents the set of unlabeled samples with pseudo-labels.

9. The system according to claim 6, characterized in that, The process of mining relationships between labeled and unlabeled samples based on influence functions, and dynamically selecting representative labeled samples according to influence function scores, specifically includes: The TracIn method, used to calculate the influence function, accumulates the dot product of the loss gradient of a labeled sample and the loss gradient of the target unlabeled sample to approximate the influence of the labeled sample on the target unlabeled sample. The target unlabeled sample uses a soft-label approximation strategy: the training parameters of the current model are updated using the exponential moving average (EMA) method, and the predicted probability of the current unlabeled sample is obtained based on the updated model parameters. This predicted probability serves as the soft label for the target unlabeled sample and replaces the true label in the loss gradient calculation. This includes: Updating model parameters using the EMA method, its first t The parameter update method for each iteration step is as follows: in, These are the model parameters at the current iteration step. The dynamic momentum coefficient is defined as: in, For the final momentum value, The hyperparameter representing the rate of EMA preheating is used in each iteration step for unlabeled samples. Its weakly amplified samples and strongly amplified samples The pseudo-labels are obtained by inputting the model parameters into the EMA: in Temperature coefficient; Then, the weakly amplified samples and strongly amplified samples Combining the EMA prediction probability with the corresponding EMA, we obtain two probabilistic instances: weakly amplified sample instances. Strongly amplified sample examples ; For each unlabeled sample instance and all labeled sample instances in the current training batch The influence function score was calculated using the TracIn method: in, The loss represents a single sample. and Representing the first The learning rate and model parameters for each iteration step. The TracIn score represents the gradient operation on the model parameters. The score can be positive or negative. A positive value means that the labeled sample supports the target unlabeled sample by classifying it as a certain category, while a negative value means it opposes it. The larger the absolute value, the stronger the support / opposition. In each batch, from the labeled sample set Dynamic selection A representative reference sample is selected as an anchor point for measuring the relationship between samples. The selection strategy is based on the influence function score of all labeled sample instances in the current batch on unlabeled weakly / strongly augmented sample instances. A number of labeled samples that appear frequently under both weak and strong amplification and show significant support / inhibition, and that also exhibit characteristic orthogonality, are selected as representative labeled samples to ensure that the selected samples have both information diversity and decision representativeness.

10. The system according to claim 9, characterized in that, The normalized influence function score is used to construct the ranking probability distribution of the representative labeled samples. The influence ranking consistency loss is calculated, and the influence function score is used as a gradient-level information bridge connecting the labeled and unlabeled branches. By constraining the consistency of the influence function score ranking distribution under weak / strong amplification, deep interaction between labeled and unlabeled branches is performed, specifically including: Based on the selected Representative labeled samples, with a construction size of [size missing]. Influence function score matrix Let be the number of unlabeled samples in the current batch, and be the number of samples in the matrix at the th position. Line number The value in the column represents the first... The labeled sample pairs The influence function scores of each unlabeled sample are calculated. Since the scores can be positive or negative, softmax is used to normalize the column-wise scores of all influence function scores for each unlabeled sample. The normalization process uses a temperature coefficient to enhance the differences between different scores, highlighting the relative importance of high-influence samples. The normalization formula is as follows: in, General and , Temperature coefficient; Then, the normalized score This is considered as the strength of the influence relationship between representative labeled samples and unlabeled samples; Calculate the probability of all labeled samples appearing in the influence relationship, and obtain the complete ranking probability distribution: The probability of a certain sorting method is calculated as follows: in, It is a specific sorting method. This indicates an arrangement. The Middle The index of labeled samples; because There are a total of possible rankings for each score. The probabilities of other different sorts can also be calculated using the above formula, thus forming a complete sort probability distribution that covers all representative labeled samples. For a certain unlabeled sample Weakly amplified samples and strongly amplified samples Construct two sorted distributions and Furthermore, by minimizing the KL divergence between the two distributions, a loss affecting ranking consistency is constructed, as shown in the following formula: in Represents the set of all possible permutations; The aforementioned influence ranking consistency loss, by introducing ranking consistency regularization, ensures that the model maintains a consistent ranking of the influence of representative labeled samples under both weakly and strongly augmented views, thereby enhancing the robustness of modeling the relationship between samples.