Breast cancer abnormal data detection method based on semi-supervised contrast learning
By constructing a dynamic feature dictionary through semi-supervised contrastive learning and combining it with a reconstruction-separation-classification stage, the decision boundary is optimized. Progressive momentum updates are adopted to solve the problem that unsupervised deep learning cannot detect outliers, thus achieving efficient detection of abnormal breast cancer data.
Patent Information
- Application Number
- CN202511174582.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-11-14
AI Technical Summary
Unsupervised deep learning detection algorithms cannot effectively detect outlier clusters, especially when there are many outliers in an outlier cluster, they are easily classified as normal clusters, which affects the detection accuracy.
A semi-supervised contrastive learning approach is adopted. By constructing a dynamic feature dictionary, a three-stage model update of reconstruction-separation-classification is used. The decision boundary is optimized by combining the KL divergence loss function and the weighted negative sample loss function. An incremental momentum update mechanism is used to iterate the encoder parameters and output the outlier probability and normal probability of breast cancer data points for classification.
It significantly improves the robustness of breast cancer abnormal data detection, effectively detects outlier clusters and outliers, outperforms baseline algorithms, and performs particularly well on high-dimensional datasets.
Smart Images

Figure CN120954681A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data detection technology, and in particular relates to a method for detecting abnormal breast cancer data based on semi-supervised contrastive learning. Background Technology
[0002] In unsupervised outlier detection tasks based on deep learning, the model is trained by learning the overall distribution characteristics of the data, and outlier detection is performed based on the training results. This type of method has an inherent drawback: it cannot detect outlier clusters. Outlier clusters are groups of multiple outliers that are far from normal points. Examples of outlier clusters include... Figure 1 As shown, outlier clusters are clusters formed by the aggregation of outliers. These clusters resemble normal clusters, and unsupervised detection algorithms lack data labels, preventing the model from obtaining information about the relationship between outlier and normal clusters. If there are many outliers in an outlier cluster, the model can easily classify it as a normal cluster, thus affecting detection accuracy. Therefore, unsupervised deep learning detection algorithms cannot detect outlier clusters. Summary of the Invention
[0003] To address the aforementioned technical problems, this invention proposes a breast cancer anomaly data detection method based on semi-supervised contrastive learning, which identifies outlier clusters similar to the normal distribution, thereby improving the robustness of the identification system.
[0004] To achieve the above objectives, this invention provides a method for detecting abnormal breast cancer data based on semi-supervised contrastive learning, comprising:
[0005] Construct a dynamic feature dictionary to store feature vectors of abnormal breast cancer data;
[0006] The model is updated through a three-stage process of reconstruction, separation, and classification:
[0007] The feature dictionary is reconstructed using a contrastive learning loss function;
[0008] We introduced breast cancer data with known outlier labels and used the KL divergence loss function to separate outlier cluster features.
[0009] Based on the labels of normal points and outliers in breast cancer data, combined with uniformly distributed potential outliers, the decision boundary is optimized through a weighted negative sample loss function.
[0010] An iterative momentum update mechanism is used to update the encoder parameters;
[0011] Output the outlier probability and normal probability of breast cancer data points to complete the classification.
[0012] Optionally, the process of reconstructing the feature dictionary includes:
[0013] Select sample batches from the breast cancer dataset and generate perturbation samples for each data point;
[0014] The perturbation sample and the original sample are considered as positive sample pairs, and the remaining breast cancer data are considered as negative samples;
[0015] Minimize the contrastive learning loss function InfoNCE:
[0016]
[0017] Where τ is the temperature hyperparameter; q is the feature vector of a sample; k + These are positive samples generated based on q.
[0018] Optionally, the process of separating outlier cluster features includes:
[0019] Input the labels of known outliers randomly sampled from the breast cancer data;
[0020] Minimize the KL divergence loss function:
[0021]
[0022] Where P(x) is a pseudo-label that follows a probability distribution, set as P(x) = [0.5, 0.5]; Q(x) is the predicted result of the data x after passing through the model and following a probability distribution.
[0023] Optionally, the weighted negative sample loss function is WNLoss:
[0024]
[0025] Where n is the number of data points; l + It is the loss function of the positive sample discriminator; - It is the loss function of the negative sample discriminator;
[0026] Optionally, asymptotic momentum updates satisfy:
[0027] θ q ←mθ q +(1-m)θ q-1 ;
[0028] Where, θ q-1 The parameters updated by the previous loss function; θ q The parameters updated for the current loss function; m∈(0,1] is a momentum coefficient.
[0029] Optionally, the encoder consists of three residual core unit blocks, wherein the processing of the core unit blocks includes: splitting the input features into two parts; the first part undergoes grouped convolution processing, and the second part retains the original features; and concatenating the processed features with the original features.
[0030] Optionally, the classification is determined as follows: when the outlier probability S(x) of a breast cancer data point is greater than or equal to N(x), it is considered an outlier.
[0031] Technical Effects of this Invention: This invention discloses a method for detecting abnormal breast cancer data based on semi-supervised contrastive learning. The features extracted using contrastive learning are richer, laying the groundwork for the separation and classification stages. This research focuses on a three-stage model of reconstruction-separation-classification and a progressive momentum update method, validating the detection performance of outliers on both low-dimensional and high-dimensional datasets. This embodiment not only effectively detects outliers but also outlier points, significantly outperforming baseline algorithms on various datasets. In the field of breast cancer detection, identifying outlier samples similar to the normal distribution can improve the robustness of the identification system. Attached Figure Description
[0032] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0033] Figure 1 This is an example of an outlier cluster in an embodiment of the present invention;
[0034] Figure 2 This is a diagram of the grouped convolution structure in an embodiment of the present invention;
[0035] Figure 3 This is a ReNet residual block according to an embodiment of the present invention;
[0036] Figure 4 This is a comparative learning space feature representation diagram according to an embodiment of the present invention;
[0037] Figure 5 This is a flowchart illustrating the comparative learning process of embodiments of the present invention;
[0038] Figure 6 This is a framework diagram of the SSCL model according to an embodiment of the present invention;
[0039] Figure 7 This is a structural diagram of the SSCL core unit block according to an embodiment of the present invention;
[0040] Figure 8 This is a representation of the data space features in an embodiment of the present invention. Detailed Implementation
[0041] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0042] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0043] Grouped convolutional structures, such as Figure 2 As shown. Within the same layer, there are multiple groups, each performing feature processing, with no interaction between groups. The residual blocks of ResNet are shown below. Figure 3 As shown.
[0044] Figure 4 As shown, using contrastive learning first requires selecting a batch of samples from the dataset. Within each batch, one positive example is chosen, and the remaining samples are negative examples. Data augmentation is then used to generate multiple samples that are similar to, but not identical to, the positive example. These generated samples form positive sample pairs with the positive examples in the dataset. These sample pairs are then input into a neural network or other feature extraction model to obtain feature representations of the samples, which are typically represented in a high-dimensional space.
[0045] For each positive sample, its corresponding negative sample needs to be found. The similarity between positive and negative samples is evaluated by calculating the distance or similarity metric between them. Samples that are similar are grouped closer together, such as... Figure 4 As shown on the left; if the samples are not similar, they are pushed away, such as... Figure 4 As shown on the right side of the image. Comparing the similarities and differences between positive and negative examples is the core of contrastive learning, thereby achieving effective feature learning.
[0046] The key to contrastive learning also includes the optimization of contrastive loss functions, which learn rich feature representations by maximizing the similarity between similar samples. The specific optimization goal is to cluster similar samples closely together in the feature space, while dissimilar samples are kept far apart. Commonly used contrastive loss functions include cosine similarity loss and triplet loss. The cosine similarity loss function is shown in equation (1).
[0047]
[0048] In equation (1), ConsineDistance(u i ,v i y is the cosine distance, and the specific formula is shown in equation (2). i Represents sample pairs (u i ,v i The labels are 1 for positive sample pairs and 0 for negative sample pairs. m is an interval used to push apart negative sample pairs, making the cosine distance between them larger.
[0049]
[0050] The triplet loss function is shown in equation (3).
[0051]
[0052] In equation (3), x + It is a positive sample, x - It is a negative sample. It is a hyperparameter representing the desired minimum interval.
[0053] Since the number of normal points in the original data is much greater than the number of outliers, the model can easily learn the feature information of normal points in low-dimensional space. However, in high-dimensional space, the feature information is more complex, and the model has difficulty clearly defining the decision boundary between normal clusters and outlier clusters, resulting in poor outlier cluster detection performance.
[0054] like Figure 5 As shown, this embodiment provides a method for detecting abnormal breast cancer data based on semi-supervised contrastive learning, including:
[0055] Construct a dynamic feature dictionary to store feature vectors of abnormal breast cancer data;
[0056] The model is updated through a three-stage process of reconstruction, separation, and classification:
[0057] The feature dictionary is reconstructed using a contrastive learning loss function;
[0058] We introduced semi-supervised breast cancer data with known outlier labels and used the KL divergence loss function to separate outlier cluster features.
[0059] Based on the labels of normal points and outliers in breast cancer data, combined with uniformly distributed potential outliers, the decision boundary is optimized through a weighted negative sample loss function.
[0060] An iterative momentum update mechanism is used to update the encoder parameters;
[0061] Output the outlier probability and normal probability of breast cancer data points to complete the classification.
[0062] The cross-entropy loss function is improved by splitting it into two parts: a negative sample loss function for input potential outliers (labeled negative) and a positive sample loss function for input original data (labeled positive). This split allows the model to handle loss information for normal points and potential outliers separately. Furthermore, a weighted negative loss function (WNLoss) is proposed, increasing the weight of the negative sample loss function for input potential outliers. This design enhances the model's ability to handle high-dimensional data, particularly in detecting outliers and outlier clusters. By increasing the emphasis on negative samples, the model can more effectively find the decision boundaries of outlier clusters in high-dimensional space.
[0063] Definition 1: The weighted negative sample loss function WNLoss is the input positive sample discriminator loss function l. + and input negative sample discriminator loss number l - The weighted sum is shown in equation (4).
[0064]
[0065] In equation (4), n is the number of data points; l + It is the loss function of the positive sample discriminator; - It is the loss function of the negative sample discriminator.
[0066] Definition 2: Loss function of positive sample discriminator l + It is the cross-entropy loss function after the potential outliers are processed by the Softmax activation function, as shown in Equation (5).
[0067]
[0068] In equation (5), It is the probability of a normal point calculated after the i-th original input data passes through the discriminator. It is the outlier probability calculated after the i-th original input data passes through the discriminator.
[0069] Define the loss function of the negative sample discriminator l. - It is the cross-entropy loss function after the original data is processed by the Softmax activation function, as shown in Equation (6).
[0070]
[0071] In equation (6), The probability of a normal point calculated after the i-th potential outlier point passes through the discriminator. It is the outlier probability calculated after the i-th potential outlier passes through the discriminator.
[0072] Definition 4: The dynamic penalty factor F is a penalty term that is dynamically adjusted based on the ratio of the square root of the feature dimension to the feature dimension, and is used to handle the constraint conditions, as shown in Equation (7).
[0073]
[0074] In equation (7), d is the feature dimension of the data and d≥2. The penalty factor increases with the increase in data dimension, thereby enhancing the discriminator. Dividing the penalty factor by the square root of the dimension causes it to increase gradually at a decreasing rate, preventing gradient vanishing.
[0075] The reason why discriminators with different intensities improve performance can be explained by backpropagation of gradients. We will use WNLoss as an example. The loss function for the negative sample discriminator is shown in Equation (6). The differential of the loss function of the negative sample discriminator can be calculated using the chain rule. The differential function is defined as shown in Equation (8).
[0076]
[0077] The differential of the loss function of the negative sample discriminator is calculated as shown in equation (9).
[0078]
[0079] As can be seen from the chain rule, the gradient is affected by the penalty factor F. As F increases, the derivative increases, the loss function increases, and the model will minimize the loss function and pay more attention to negative sample features. By amplifying the gradient, it affects most of the prediction region of outliers, which is beneficial for optimization and producing more discriminative predictions.
[0080] Definition 5: Outlier score is obtained by minimizing WNLoss to update the model, and then comparing the probabilities S(x) and N(x) of a data point being an outlier with the probability of S(x) being a normal point, as shown in Equation (10).
[0081]
[0082] In equation (10), when the probability of an outlier calculated by forward propagation through the network is higher than the probability of its normal point, i.e., the outlier score is 1, it will be regarded as an outlier. Otherwise, the outlier score is 0.
[0083] A method for detecting abnormal breast cancer data based on semi-supervised contrastive learning, such as... Figure 6As shown, SSCL uses an encoder *r* with progressive momentum updates. The input data undergoes a three-stage process of feature reconstruction, separation, and classification, sequentially processed through a contrastive learning loss function, a KL divergence loss function, and a weighted negative sample loss function. First, the input data features are stored as a dictionary, constructing a feature dictionary for each data point. After updating the model using the contrastive learning loss function in the first stage and the KL divergence loss function in the second stage, the feature dictionary is updated, but the feature dimensions remain unchanged. In the third stage, when minimizing the weighted negative sample loss function to update the model, a multilayer perceptron (MLP) classification head is connected to perform data detection.
[0084] The encoder *r* in the SSCL algorithm is constructed using a core unit block structure with residuals (SSCL Block, outlier detection algorithm based on semi-supervised contrastive learning block). The core unit block primarily employs grouped convolutional methods with different convolutional kernels. Grouped convolutions can better capture the spatial features of the data through convolution. Furthermore, residual connections are used to add multiple layers of convolutional neural networks within the residual blocks to further learn the model's state features. Figure 7 The SSCL encoder r shown is composed of 3 consecutive SSCLs.
[0085] The data enters the SSCL (Specialized Feature Classification), where feature dimensions are evenly divided into two parts through feature splitting. One part is input into a grouped convolution for feature learning, while the other part is left unprocessed and concatenated with the features from the first part after grouped convolution. This ensures consistency of features from input to output, enabling residual connections. Grouped convolution reduces the computation of convolution parameters, thus lowering resource consumption.
[0086] SSCL updates the model's gradient in three stages, each corresponding to a loss function. First, a feature dictionary is constructed, storing the feature vectors of each data point. The input data to the network first selects a feature vector q from a chosen data point, along with a set of encoded samples {k1, k2, k3, ...}, which are the feature vectors from the dictionary excluding q.
[0087] Suppose there is a single key in the dictionary, denoted as k, that is close to the eigenvector of q. + This forms a positive sample pair with the feature vector of the input data q. SSCL constructs sample pairs q and k by adding perturbations to the data. + k+ The calculation method is shown in equation (11).
[0088] k + =q+β (11);
[0089] In equation (11), β∈N(0,σ) 2 ), where σ equals the minimum value of the q feature vector, aiming to keep the data variation moderate and close to the q feature vector, avoiding introducing excessive disturbances. Then q and k + Learn by accessing the internet.
[0090] The first stage is the reconstruction stage. The feature dictionary is reconstructed using the contrastive learning loss function InfoNCE (information noise contrastive estimation). The calculation method of InfoNCE is shown in Equation (12).
[0091]
[0092] In equation (12), τ is a temperature hyperparameter used to adjust the smoothness of the output. The dot product is used to measure the similarity between vectors; the larger the dot product, the more similar the two vectors. When q and key k... + When the keys are similar but dissimilar to all other keys, the InfoNCE value is low. Therefore, by minimizing the InfoNCE loss function, q and k + The vectors in the feature dictionary will become increasingly similar. By learning each input data q... i Its corresponding k + This process prompts the model to map similar samples to nearby locations and dissimilar samples to distant locations. Overall, this stage attempts to group the input feature vector q and vectors with similar features into one category, and to delineate the boundaries between dissimilar feature vectors, thereby reconstructing the data feature dictionary.
[0093] The second stage is the separation stage. After updating the model using the contrastive learning loss function, semi-supervised learning is performed on the model using the known outlier label information, which is obtained by randomly sampling from the original data. The input data consists of outlier data with the obtained labels. The KL divergence loss function is used to separate the outlier clusters from the normal data in the data feature dictionary. The calculation method of the KL divergence loss function is shown in Equation (13).
[0094]
[0095] In equation (13), P(x) represents the pseudo-label that follows a probability distribution. Since it is a binary classification task, P(x) = [0.5, 0.5] is set as the probability that a data point is a normal point or an outlier. Q(x) represents the predicted result of the data x after passing through the model and following a probability distribution. The more similar the two probabilities are, the smaller the function value. By minimizing the KL divergence loss function, the predicted result after the outlier data is input into the network tends to be discrete, thereby separating the data features in the feature dictionary that are similar to the outlier features from the normal data.
[0096] After updating the model using the KL divergence loss function, outliers are detected by minimizing the classification loss function to characterize the boundary between outliers and normal points. The input data consists of outliers and normal points with their labels obtained.
[0097] The third stage is the classification stage. Potential outliers following a uniform distribution are used to enhance the model's detection performance. The reason SSCL uses potential outliers following a uniform distribution is that in the first and second stages, SSCL has already separated outlier clusters and outlier features from normal data in the feature dictionary, making it easier for the model to characterize the decision boundary and detect outliers. Furthermore, the model is updated using the weighted negative sample loss function WNLoss, and the model infers the probability S(x) of each data point being an outlier and the probability N(x) of it being a normal point.
[0098] The three stages described above reconstruct, separate, and classify the input data feature dictionary. The spatial representation of the data features in the feature dictionary after each stage is visualized as follows: Figure 8 As shown in the figure, light-colored circles “” represent normal points, and dark-colored diamonds “◆” represent outliers.
[0099] The feature dictionary is dynamic and evolves continuously during encoder training. After minimizing the contrastive learning loss function in the first stage, the spatial feature representations of the data are divided into two categories: data with similar features are spatially close, while data with dissimilar features are spatially far apart. After minimizing the KL divergence loss function in the second stage, outlier clusters among similar features are separated. In the third stage, after minimizing the weighted negative sample loss function, the model learns the distribution of outliers and normal points to characterize the decision boundary, thereby detecting outliers.
[0100] The reconstruction-separation-classification three-stage approach updates all data features by placing them in a feature dictionary. While this feature dictionary facilitates feature updates, it also makes updating the encoder via backpropagation difficult, as gradients should propagate to all data in the dictionary. Maintaining a feature dictionary presents two challenges: rapid encoder changes lead to decreased consistency in feature representations, and using multiple loss functions for updates results in large discrepancies between feature representations across different loss function intervals, thus reducing detection accuracy. To address these issues, a progressive momentum update method is proposed.
[0101] In asymptotic momentum update, the parameters updated by the previous loss function are denoted as θ. q-1 Let θ be the parameter updated by the current loss function. q The encoder r is updated in the following way, θ q The calculation method is shown in equation (14).
[0102] θ q ←mθ q +(1-m)θ q-1 (14);
[0103] In equation (14), m∈(0,1] is a momentum coefficient. The core of a slow encoder evolution is to use relatively small momentum for slow updates. The update process involves keeping the parameters in each neuron of the encoder r of the previous loss function unchanged with a probability of 1-m, so that the encoder r partially retains the parameters of the previous stage during iterative updates, and only updates some parameters in the current stage. The gradual momentum update makes θ q The evolution is smoother. The features in the dictionary are encoded by encoders in three stages with different loss functions. Momentum updates can reduce the differences between encoders r at different loss function update intervals, allowing the third-stage encoder to obtain feature dictionary information updated in the second stage, as well as feature dictionary information updated in the first stage.
[0104] After the three-stage asymptotic momentum update model is completed, the network calculates the probability S(x) that each data point is an outlier and the probability N(x) that it is a normal point. A data point is considered an outlier if the outlier probability calculated by the network through forward propagation is higher than its normal point probability, and vice versa.
[0105] Based on contrastive learning algorithms, this invention proposes a semi-supervised contrastive learning-based method for detecting abnormal breast cancer data. First, a feature dictionary is constructed using the original data. A contrastive learning loss function is used to learn the representational information of each data point, reconstructing the feature dictionary. Then, a semi-supervised learning method is used, employing known outlier labels and a KL divergence loss function to update the model parameters, separating outlier clusters from normal data in the feature dictionary. Finally, WNLoss is used to characterize the decision boundary based on known outlier and normal point labels, detecting outliers. To eliminate the differences in encoders among the three loss functions, a progressive momentum update method is proposed. By slowly updating the encoder, information exchange between encoders of different loss functions is achieved, thereby improving the model's detection capability. The outlier probability and normal point probability for each data point are calculated. The process is described in Algorithm 1.
[0106] Algorithm 1: Breast Cancer Anomaly Data Detection Algorithm Based on Semi-Supervised Comparative Learning
[0107] Input: Define dataset X, temperature hyperparameter τ, momentum m, batch size c, and n potential outliers already generated and following a uniform distribution. z The number of iterations is e, the data set dimension is d, and the initial discriminator is D;
[0108] Output: The probability N(x) that a data point is a normal point and the probability S(x) that a data point is an outlier.
[0109]
[0110]
[0111] Obtain the position of the model output index 0, that is, the probability S(x) that each data point is an outlier among all data points;
[0112] Obtain the position of index 1 in the model output, that is, the probability N(x) that each data point is a normal point among all data points;
[0113] Output S(x) and N(x).
[0114] The time complexity of the SSCL algorithm mainly lies in the training of the neural network. In steps 6) to 12) of Algorithm 1, i.e., iterating e times, the number of neurons in each layer of the neural network is m. neural Because grouped convolutions are used, each neuron in the forward propagation is divided into multiple groups. SSCL defaults to 3 groups. The network model has c layers and d data dimensions. The time complexity of training the network is O(n log n). The time complexity of generating random uniform potential outliers is O(n'), where n' is the number of data points. Therefore, the time complexity of the breast cancer anomaly detection algorithm SSCL based on semi-supervised contrastive learning is O(n').
[0115] In this invention, three performance evaluation metrics are selected for the experiment of algorithm effectiveness: accuracy (ACC), calculated as shown in Equation (15); area under the curve (AUC), calculated as shown in Equation (16); and F1 score (F1), calculated as shown in Equation (17).
[0116]
[0117] In equation (15), TP represents the number of outliers accurately identified by the algorithm, TN represents the number of positive samples accurately identified by the algorithm, FP represents the number of outliers incorrectly identified by the algorithm, and FN represents the number of normal samples incorrectly identified by the algorithm. The higher the accuracy value, the better the performance of the algorithm.
[0118]
[0119] In equation (16), out is the set of outliers, in is the set of normal points, and p i p represents the outlier score at the normal point. j The outlier score represents the outlier point, score(p) i ,p j ) is a conditional function, when p i >p j When p, the function value is 1; when p i =p j When p, the function value is 0.5; when p i <p j When the time is right, the function value is 0;
[0120]
[0121] This invention discloses a method for detecting outlier data in breast cancer based on semi-supervised contrastive learning. The contrastive learning method extracts richer features, laying the groundwork for the separation and classification stages. This research focuses on a three-stage model of reconstruction-separation-classification and a progressive momentum update method, validating the outlier cluster detection performance on both low-dimensional and high-dimensional datasets. This embodiment not only effectively detects outlier clusters but also outlier points, significantly outperforming baseline algorithms on various datasets. In the field of breast cancer detection, identifying outlier cluster samples similar to the normal distribution can improve the robustness of the identification system.
[0122] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting abnormal breast cancer data based on semi-supervised contrastive learning, characterized in that, include: Construct a dynamic feature dictionary to store feature vectors of abnormal breast cancer data; The model is updated through a three-stage process of reconstruction, separation, and classification: The feature dictionary is reconstructed using a contrastive learning loss function; We introduced semi-supervised breast cancer data with known outlier labels and used the KL divergence loss function to separate outlier cluster features. Based on the labels of normal points and outliers in breast cancer data, combined with uniformly distributed potential outliers, the decision boundary is optimized through a weighted negative sample loss function. An iterative momentum update mechanism is used to update the encoder parameters; Output the outlier probability and normal probability of breast cancer data points to complete the classification.
2. The method for detecting abnormal breast cancer data based on semi-supervised contrastive learning as described in claim 1, characterized in that, The process of reconstructing the feature dictionary includes: Select sample batches from the breast cancer dataset and generate perturbed positive sample pairs for each data point; The perturbation sample and the original sample are considered as positive sample pairs, and the remaining breast cancer data are considered as negative samples; Minimize the contrastive learning loss function InfoNCE: Where τ is the temperature hyperparameter; q is the feature vector of a sample; k + It is a positive sample generated based on q.
3. The method for detecting abnormal breast cancer data based on semi-supervised contrastive learning as described in claim 1, characterized in that, The process of separating outlier cluster features includes: Input the labels of known outliers randomly sampled from the breast cancer data; Minimize the KL divergence loss function: Where P(x) is a pseudo-label that follows a probability distribution, set as P(x) = [0.5, 0.5]; Q(x) is the predicted result of the data x after passing through the model and following a probability distribution.
4. The method for detecting abnormal breast cancer data based on semi-supervised contrastive learning as described in claim 1, characterized in that, The weighted negative sample loss function is WNLoss: Where n is the number of data points; l + It is the loss function of the positive sample discriminator; - It is the loss function of the negative sample discriminator.
5. The method for detecting abnormal breast cancer data based on semi-supervised contrastive learning as described in claim 1, characterized in that, Asymptotic momentum update satisfies: i q ←mθ q +(1-m)θ q-1 ; Where, θ q-1 The parameters updated by the previous loss function; θ q The parameters updated for the current loss function; m∈(0,1] is a momentum coefficient.
6. The method for detecting abnormal breast cancer data based on semi-supervised contrastive learning as described in claim 1, characterized in that, The encoder consists of three residual core unit blocks, wherein the processing of the core unit blocks includes: splitting the input features into two parts; the first part is processed by grouped convolution, and the second part retains the original features; and the processed features are concatenated with the original features.
7. The method for detecting abnormal breast cancer data based on semi-supervised contrastive learning as described in claim 1, characterized in that, The classification criteria are as follows: when the outlier probability S(x) of a breast cancer data point is greater than or equal to N(x), it is considered an outlier.