Image label noise learning method based on granular ball calculation and contrast learning
By introducing the method of pellet calculation and comparison learning in the deep neural network model, the problem of lack of universality of label noise processing in the existing technology is solved, efficient and stable image label noise learning is achieved, and the robustness of the model is improved and classification performance.
Patent Information
- Application Number
- CN202411714645.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The prior art lacks universality in dealing with label noise problems in deep neural network models, and depends on specific tasks and data distribution, making it difficult to maintain stable and high performance in different scenarios.
Using the image label noise learning method based on particle ball calculation and contrast learning, the input original sample is converted into particle ball samples by embedding the particle ball calculation layer in the middle of the feature learner and classifier, and the sample features are extracted using the contrast learning framework. Comparison loss is calculated using a contrast loss function based on the pellet improvement to improve the robustness of the model to label noise.
A universal, stable and high-performance robust feature representation method is achieved without additional data or further optimization, improving the robustness of the model to label noise and the accuracy of image classification.
Smart Images

Figure CN119478545A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence and computer vision, and in particular relates to an image label noise learning method based on granular sphere calculation and contrast learning. Background Art
[0002] In recent years, deep neural network models have achieved great success in many fields due to their powerful feature representation and learning capabilities. At the same time, the performance of deep neural network models often depends on high-quality labeled data. There is a proverb in the industry that describes artificial intelligence as "how much artificial (i.e., labeling) there is how much intelligence there is", which shows that the importance of data labeling to artificial intelligence is self-evident. There are usually two ways to label data: manual labeling and model automatic labeling. The former is restricted by many factors such as the professional knowledge level of the labeler, data quality, and even malicious data poisoning, and it is inevitable to produce a certain proportion of wrongly labeled data (label noise); the latter's labeling model is affected by its own accuracy and "mode collapse" and other factors, and it is also inevitable to produce a certain proportion of wrongly labeled data (label noise). Too much wrongly labeled data (label noise) will cause the data distribution of the training set to change or even become chaotic, thereby causing the performance of the model in related tasks to decline, and even produce specific biased discrimination.
[0003] There are currently two main solutions for label noise, namely noise accommodation and noise filtering. Noise accommodation refers to weakening the impact of label noise on the model by establishing a robust algorithm model that is less sensitive to incorrectly labeled samples; its representatives include robust loss functions, regularization, etc. For example, the robust loss function reduces the negative impact of noise samples by designing an optimization strategy that is more stable to noise in the objective function, while the regularization technique avoids overfitting due to noise data by constraining the complexity of the model. However, noise accommodation methods usually require assumptions about noise characteristics, and their performance may drop significantly when the actual situation is inconsistent with the assumptions. Noise filtering is to remove or correct the noise samples in the data through an algorithm and then return them to the model for training; its representatives include ensemble learning, adaptive learning and other technologies. For example, ensemble learning methods reduce the impact of noise samples by voting on multiple learners, while adaptive learning methods enhance the learning of clean samples by dynamically adjusting sample weights. However, noise filtering usually requires adjusting parameters or rules according to the specific data distribution, resulting in unstable results when migrating to other tasks or data sets.
[0004] In summary, the two methods are still insufficient in dealing with the label noise problem in massive data training samples represented by deep neural network models. This is mainly because the two methods have a strong dependence on task scenarios, data distribution and noise characteristics. In practical applications, they often need to be customized for specific problems and lack sufficient versatility. Therefore, a general representation learning method that is robust to label noise is urgently needed to solve this problem. Summary of the invention
[0005] In order to solve the above technical problems, the present invention proposes an image label noise learning method based on granular sphere calculation and contrast learning. The method comprises: obtaining image data and preprocessing it, inputting the preprocessed image data into a trained image label noise learning model, and obtaining the image classification result;
[0006] The training process of the image label noise learning network includes:
[0007] S1: Obtain an image training data set, and obtain two strong data enhancement sample sets and one weak data enhancement sample set through preprocessing;
[0008] S2: Use the first feature learner to enhance the first strong data sample X S1 Extract the first feature Z S1 ; Use the second feature learner to enhance the second strongest data sample X S2 Extract the second feature Z S2 ; Use the first feature learner to enhance the weak data sample X W Extract the third feature Z W ;
[0009] S3: The third feature Z W Input the particle-sphere calculation layer, perform multi-granularity division at the feature level, generate several clusters, each cluster corresponds to a particle-sphere sample, and calculate the feature matrix and label of the particle-sphere sample based on the feature matrix and label of the sample in the cluster;
[0010] S4: Input the feature matrix and label of the ball sample into the classification layer to obtain the image classification result p; calculate the cross entropy loss based on the image classification result and the label of the ball sample
[0011] S5: The first feature Z S1 Input prediction layer to get the first prediction feature Q S1 ; Based on the first prediction feature Q S1 and the second feature Z S2 , using the image classification result p as the indicator function to calculate the contrast loss between the predicted probability distribution of samples of the same category and the target representation distribution
[0012] S6: According to the contrast loss and cross entropy loss Weighted total loss The image label noise learning network is optimized by back-propagation according to the total loss.
[0013] The beneficial effects of the present invention are as follows: in the training process of the image label noise learning network, the present invention embeds a granular calculation layer between the feature learner and the classifier to convert the input original sample into a granular sample, so that the image label noise learning network can use the feature space information of the sample to improve the robustness of the network to label noise; the present invention uses a contrastive learning framework to extract sample features, and uses a contrast loss function based on a granular improvement to calculate the contrast loss, so that the network can better capture the similarities and differences between samples in the presence of label noise. Compared with the prior art, the present invention efficiently utilizes the feature space semantic information of the sample, and realizes a universal, stable and high-performance robust feature representation method without the need for additional data or further optimization. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 Schematic diagram of the training process of the image label noise learning network in an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances. This is just a way of distinguishing objects with the same attributes when describing the embodiments of this application.
[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] The present invention proposes an image label noise learning method based on particle sphere calculation and contrast learning. Figure 1 The method includes: obtaining image data and preprocessing the image data, inputting the preprocessed image data into a trained image label noise learning model, and obtaining an image classification result.
[0018] Figure 1In the embodiment of the present invention, there are two stages, namely, the training stage of the image label noise learning network and the actual application stage (using the trained image label noise learning network for prediction). In the training stage, the entire training adopts the SimSiam contrast learning framework; first, the training data is collected and preprocessed to obtain two strong data enhancement sample sets (X S1 and X S2 ) and weak data enhancement sample set (X W );Use the first feature learner to enhance the first strong data sample X S1 Extract the first feature Z S1 ; Use the second feature learner (the parameters of the first feature learner and the second feature learner are shared) to enhance the second strong data sample X S2 Extract the second feature Z S2 ; Use the first feature learner to enhance the weak data sample X W Extract the third feature Z w ; The third feature Z w Input the particle calculation layer, perform multi-granularity division at the feature level, generate several clusters, each cluster corresponds to a particle sample, calculate the feature matrix and label of the particle sample according to the feature matrix and label of the sample in the cluster; input the feature matrix and label of the particle sample into the classification layer to obtain the image classification result p; calculate the classification loss (i.e., cross entropy loss) according to the image classification result and the label of the particle sample );The first feature Z S1 Input prediction layer to get the first prediction feature Q S1 ; Based on the first prediction feature Q S1 and the second feature Z S2 , using the image classification result p as the indicator function to calculate the contrast loss between the predicted probability distribution of samples of the same category and the target representation distribution Using cross entropy loss and contrast loss Back propagation optimizes network parameters. Stopgrad means freezing, which means that during the back propagation process using the loss function, the path is frozen and no parameter optimization is performed. In the actual application stage, the target image data (i.e., input image data) is obtained and preprocessed, and then input into the trained feature learner to extract image features, and the image features are input into the trained classification layer for classification prediction and output results.
[0019] The training process of the image label noise learning network includes:
[0020] S1: Obtain an image training data set, and obtain two strong data enhancement sample sets and one weak data enhancement sample set through preprocessing.
[0021] The image training dataset is obtained by artificially randomly changing some correct labels in the clean dataset or using an existing labeled noise dataset:
[0022] D={sample:[x1,x2,x3,…x n ],label:[y1,y2,y3…y n ]}
[0023] Where D represents the image training dataset, sample represents the content information set of the image samples in D, and x n is the pixel matrix of the nth image sample, label represents the label set of the image sample in D, y n is the label of the nth image sample.
[0024] A batch of data X is randomly selected from the image training data set D for training the current batch.
[0025] X=Sampling(D,N)
[0026] Among them, X represents a batch of data randomly extracted from the image training data set D, and N represents the size of the current batch, that is, the number of image samples in the current batch.
[0027] Preprocess the samples in X:
[0028] S101: Apply strong data enhancement twice to each image sample, mainly including random flipping, random scaling and cropping, random noise addition, and random adjustment of the brightness, contrast, saturation and color of the image, to obtain two strong data enhancement version samples:
[0029] X S1 =StrongAugmentation(X)
[0030] X S2 =StrongAugmentation(X)
[0031] X S1 represents the first strong data enhancement sample set, X S2 represents the second data strongly enhanced sample set.
[0032] S102: Apply weak data enhancement once to each image sample, mainly including random flipping and random scaling and cropping operations, to obtain a weak data enhanced version sample:
[0033] X W =WeakAugmentation(X)
[0034] X W Represents a weak data augmentation sample set.
[0035] S2: Use the first feature learner to enhance the first strong data sample X S1 Extract the first feature Z S1 ; Use the second feature learner to enhance the second strongest data sample X S2 Extract the second feature Z S2 ; Use the first feature learner to enhance the weak data sample X W Extract the third feature Z W .
[0036] The contrastive learning framework SimSiam is used to extract the feature representation of the strongly data-enhanced samples to obtain the output features and prediction features.
[0037] SimSiam (Simple Siamese) is a self-supervised contrastive learning method. It uses a twin network structure, which contains two identical branches, each branch consists of a backbone network (usually a convolutional neural network, such as ResNet) and a projection head. The two branches share weights to ensure that comparable feature representations can be generated when inputting different strongly enhanced versions of the image. That is, get the first strongly enhanced sample X S1 And input it into the first feature learner to extract the first feature Z S1 ; Get the second strongest enhanced sample X S2 And input it into the second feature learner to extract the second feature Z S2 :
[0038] Z S1 =Φ1(X S1 );
[0039] Z S2 =Φ2(X S2 )
[0040] The parameters of the first feature learner Φ1 and the second feature learner Φ2 are the same. During back propagation, the parameters of Φ2 will be frozen, and only the parameters of Φ1 will be updated. After a round of training, the parameters of Φ1 will be synchronized to Φ2 to achieve parameter sharing. Finally, the shape of the feature matrix returned is [N, dim size ], dim size It is the sample feature dimension size output by the backbone network.
[0041] A convolutional neural network is used to extract features from the input weak data enhancement sample, that is, to obtain the weak enhancement sample X W And input it into the first feature learner to extract the third feature Z W :
[0042] Z W=Φ1(X W )
[0043] Among them, Z W The shape of [N, dim size ], dim size Represents the sample feature dimension size output by the first feature learner (i.e., convolutional neural network).
[0044] S3: The third feature Z W Input the particle-sphere calculation layer, perform multi-granularity division at the feature level, generate several clusters, each cluster corresponds to a particle-sphere sample, and calculate the feature matrix and label of the particle-sphere sample based on the feature matrix and label of the sample in the cluster.
[0045] A particle-sphere calculation layer is designed between the first feature learner and the classifier to divide the input batch image samples into multiple granularities to obtain particle-sphere samples gb i Each ball sample corresponds to multiple image samples of varying numbers. The ball sample is used instead of a single sample point as the input of the classifier. The sample label with the largest proportion of balls is defined as the ball sample gb i Tags
[0046]
[0047] Among them, c j represents the i-th particle sample gb i The sample categories contained in each category c j The number of samples in the pellet sample is expressed by Number(c j ) indicates that the spherical sample gb i The number of samples contained in Number(gb i )express.
[0048] Granular sample gb i The purity is defined as
[0049]
[0050] in, Indicates the purity of the i-th ball sample, Number(y j ) represents the i-th particle sample gb i The label is y j The number of samples, Number(gb i ) represents the i-th particle sample gb i The number of samples contained in .
[0051] The generation of spheres is based on the efficient M-means (m is the number of labels in a sphere) to ensure the efficiency of the overall sphere generation process.
[0052] The third feature Z W Input the granular sphere calculation layer, perform multi-granularity division at the feature level, and generate several clusters. The process is as follows:
[0053] The sample feature matrix Z W As the initial ball sample, calculate whether the proportion of the most samples in the current ball reaches the purity threshold τ. If not, perform M-means clustering (i.e., k-means where k is the number of label types m in the ball sample) on the ball sample to generate a new batch of ball samples, and then judge whether the new batch of ball samples meets the purity requirement. This process is repeated until all balls meet the required purity requirements.
[0054] Each cluster represents a spherical sample gb i , and each ball sample corresponds to a different number of image samples. By taking the arithmetic average of the image sample features in the ball sample, we get the ball sample gb i Features
[0055] In some preferred embodiments, the pellet sample gb i Features Specifically:
[0056]
[0057] in, represents the characteristics of the i-th particle sample, gb i represents the i-th particle sample, v j Indicates the spherical sample gb i The feature vector of the jth image sample in Number (gb i ) represents the i-th particle sample gb i The number of image samples in .
[0058] Therefore, the purpose of the grain-ball computation layer (GBC) is to map the sample feature Z to the grain-ball sample feature GB. The grain-ball computation layer maps the sample feature Z to the grain-ball sample feature GB. At the same time, the construction of the grain-ball sample needs to meet the following constraints: (1) Each grain-ball sample should cover as many samples as possible, and its number should be as small as possible; (2) Each grain-ball sample meets the purity requirements.
[0059] In some preferred embodiments, the general description of the granular ball computing layer GBC is:
[0060] GBC:Z→GB
[0061] Constraints:
[0062] Constraints:
[0063] Among them, Z represents the image sample feature, → represents the mapping, GB represents the particle-ball sample feature, N represents the number of image samples, M represents the number of particle-ball samples, represents the i-th particle sample gb i purity, τ represents the set purity threshold.
[0064] S4: Input the feature matrix and labels of the ball sample into the classification layer to obtain the image classification result; calculate the cross entropy loss based on the image classification result and the label of the ball sample
[0065] In deep learning, classifiers are usually implemented using fully connected layers, which accept feature vectors as input and output the predicted probability of each category; in image classification tasks, cross-entropy loss is a commonly used loss function. It is used to measure the difference between the predicted probability distribution and the true label distribution, and is a common loss function in supervised learning:
[0066]
[0067] Among them, C represents the total number of categories, y i represents an indicator variable in the true distribution (usually "1" or "0"), y i Indicates whether the sample belongs to category i, Represents the predicted probability of the model, that is, the probability that the sample is predicted to be category i.
[0068] S5: The first feature Z S1 Input prediction layer to get the first prediction feature Q S1 ; Based on the first prediction feature Q S1 and the second feature Z S2 , using the image classification result p as the indicator function to calculate the contrast loss between the predicted probability distribution of samples of the same category and the target representation distribution
[0069] The purpose of the contrastive learning framework SimSiam is to bring features of the same category closer together and features of different categories farther apart, so that the prediction vectors output by the feature learner and prediction layer of the same category of input image samples can match the feature vectors output by the feature learner.
[0070] Specifically, the first feature Z S1After the prediction layer, the first prediction feature Q is obtained S1 , and then the first prediction feature and the second output feature Z S2 Cross-prediction is performed on samples of the same category (i.e., positive samples) in the features output by the second feature learner.
[0071] Cross prediction is for positive samples in a batch, that is, for samples x of the same class i and sample x j , they will each have a predicted feature vector (from the first predicted feature) and a feature vector (from the second feature), and then cross-calculate their cosine similarity.
[0072] In some preferred embodiments, the first feature Z S1 Input prediction layer to get the first prediction feature Q S1 , calculate the cosine similarity of the prediction results, and define the sample pair (x i ,x j ) is the initial contrastive loss function.
[0073] The calculation formula of the cosine similarity is:
[0074]
[0075] Where D(q,z) represents the cosine similarity between q and z, q represents the first predicted feature vector obtained by the input sample through the feature learner and the prediction layer, z represents the second feature vector obtained by the input sample through the second feature learner, and ‖.‖2 represents the calculation of the L2 norm.
[0076] The sample pair (x i ,x j ) is:
[0077]
[0078] in, Represents a sample pair (x i ,x j )’s initial contrast loss function, q i Represents the i-th input sample x i The first predicted feature vector obtained by the feature learner and prediction layer is q i Belong to Q S1 , z j Represents the jth input sample x j The feature vector obtained by the second feature learner, i.e. z j Belong to Z S2 ,q j Represents the jth input sample xj The first predicted feature vector obtained by the feature learner and prediction layer is q j Belong to Q S1 , z i Represents the i-th input sample x i The feature vector obtained by the second feature learner, i.e. z i Belong to Z S2 ,stopgrad(z j ) means to stop processing tensor z in the computation graph j Gradient tracking and calculation, stopgrad(z i ) means to stop processing tensor z in the computation graph i Gradient tracking and calculation of Represents an indicator function, which is used to indicate whether a specific condition is met.
[0079] This means that only when the labels of two samples are the same (i.e., y i =y j ), the two samples are represented by:
[0080]
[0081] The loss obtained will be calculated into the total loss. This design allows the network to focus on enhancing the similarity between samples of the same type during training, while ignoring samples of different types.
[0082] Only when the indicator function When it is established, that is, sample x i The labels and samples x j The labels of the two images are the same, and the two are considered as positive sample pairs and the comparison loss of the two is accumulated to the total loss. However, in reality, there will be more or less label noise in the real data set, so it is impossible to obtain the true situation of each image. As an indicator function, it causes features of different categories to be drawn closer.
[0083] In order to alleviate the above problems, a contrast loss function based on particle sphere improvement is designed:
[0084] The content and feature space of the sample are inherent attributes, while the label is generated through human judgment or machine judgment. Since human cognitive ability and professional level are limited, samples are often mislabeled, but the content of the sample, such as its feature space, will not change due to the influence of the label. Based on content similarity, after the sample is divided into multiple granularities in the feature dimension, the label of the spherical sample is determined by the majority sample label within it. This means that multiple samples can share the same label, thereby significantly reducing the impact of a single sample label noise on the model. At the same time, the label noise ratio of the spherical sample will also be greatly reduced, so the label of the spherical ball to which the sample belongs can be used to replace the original label of the sample, thereby alleviating the problem of different categories of features being pulled in under the background of label noise.
[0085] In some preferred embodiments, improving the sample pair (x i ,x j ), which is specifically:
[0086]
[0087]
[0088] in, Represents the improved sample pair (x i ,x j )’s contrast loss function, gb m Represents the i-th input sample x i Belong to the ball, gb n Represents the jth input sample x j Belonging ball, y gbm Indicates the mth sphere sample gb m Tags, Indicates the nth sphere sample gb n Tags, Represents an indicator function, which is used to indicate whether a specific condition is met.
[0089] During the training process of the image label noise learning network, the network adjusts the weights through the back-propagation algorithm to minimize the loss function. In the initial stage, when there are incorrectly labeled data in the data set, the network tends to learn the basic characteristics of the data first, that is, it usually focuses on learning the correctly labeled samples first, because when the network calculates the loss, the correctly labeled samples can provide more effective and reliable gradient information, guiding the network to update the parameters in the direction of reducing the loss. Therefore, the output probability of the sphere sample obtained in the early stage of network training is less affected by the label noise and has a higher credibility.
[0090] Consider two samples of the same category. Since they have the same label, the output probabilities predicted by the network should also be similar, so the vector product of the two probabilities is relatively large. On the contrary, considering samples from two different categories, the output probabilities predicted by the network may be relatively dispersed, so the vector product of the two probabilities is relatively small. Therefore, the predicted probabilities of samples of the same category tend to be closer, which makes their vector products tend to be larger; while the predictions of samples of different categories usually affect each other, resulting in a smaller vector product.
[0091] In some preferred embodiments, the sample pair (x i ,x j ), which is specifically:
[0092]
[0093] in, It means that after further improvement, the sample pair (x i ,x j ), Indicates the mth sphere sample gb m Purity, Indicates the nth sphere sample gb n purity, T represents vector transpose, which is used to calculate vector inner product or similarity, ε is the confidence threshold, and when the vector product of the classification output of the spheres to which the two samples belong is greater than ε, the two samples are considered to belong to the same class.
[0094] Since the particle-sphere calculation relies on high-quality data features for multi-granularity division, as the training progresses, the model's feature extraction ability continues to improve, thereby further reducing the label noise ratio of the particle-sphere samples. Even if the model starts to fit the wrong particle-sphere samples in the later stage, the wrong labels are unlikely to dominate the model training. This improvement further enhances the robustness of the contrast loss to label noise.
[0095] S6: According to the contrast loss and cross entropy loss Weighted to get the total loss The image label noise learning network is optimized by back-propagation according to the total loss.
[0096] The cross entropy loss function and the contrast loss function are fused in a specific ratio to obtain the total loss function of the model. The calculation formula of the total loss L is:
[0097]
[0098] In the formula, represents the cross entropy loss function, α represents the first weight parameter, β represents the second weight parameter, represents the further improved contrast loss function, that is, for all sample pairs {(x i ,x j )} to find the average of the contrastive losses.
[0099] In the training process of the image label noise learning network: an image training data set is obtained; the training samples are preprocessed to obtain strong data enhanced version sample pairs and weak data enhanced version samples; a feature learner is used to extract feature representations of the weak data enhanced version samples to obtain a feature matrix; according to the particle sphere purity threshold, a particle sphere calculation layer is used to perform multi-granularity division on the weak data enhanced samples of the same batch at the feature level (using spheres to divide the metric space clusters), thereby generating a number of cluster clusters; each cluster cluster corresponds to a particle sphere sample, and the feature matrix and its label of the particle sphere sample are calculated based on the feature matrix and label of the sample in the cluster; the feature matrix of the particle sphere sample is input into the classifier for processing to obtain an image classification result; the cross entropy loss is calculated based on the image classification result and the label of the particle sphere sample; the contrast learning framework SimSiam is used to extract the feature representation of the strong data enhanced version sample pair to obtain output features and prediction features; a contrast loss function based on the particle sphere improvement is designed to process the feature representation of the sample pair to obtain the contrast loss; the total model loss is calculated based on the contrast loss and the cross entropy loss, and the model parameters are adjusted to obtain a trained image label noise learning network.
[0100] The inference prediction (practical application) process of the image label noise learning network includes: obtaining test data (image to be detected) and preprocessing it; inputting the preprocessed test data into the trained feature learner to obtain feature representation, and each test sample will be considered as an independent particle sample, so it does not need to be processed by the particle calculation layer; inputting the feature representation into the trained classifier to obtain the image classification result.
[0101] Compared with the prior art, the present invention efficiently utilizes the feature space semantic information of samples and realizes a universal, stable and high-performance image label noise learning method without the need for additional data or further optimization.
[0102] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which can include: ROM, RAM, disk or CD, etc.
[0103] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for learning image label noise based on granular sphere calculation and contrastive learning, characterized in that: include: Obtain image data and preprocess it, input the preprocessed image data into the trained image label noise learning network to obtain the image classification result; The training process of the image label noise learning network includes: S1: Obtain an image training data set, and obtain two strong data enhancement sample sets and one weak data enhancement sample set through preprocessing; S2: Use the first feature learner to enhance the first strong data sample X S1 Extract the first feature Z S1 ; Use the second feature learner to enhance the second strongest data sample X S2 Extract the second feature Z S2 ; Use the first feature learner to enhance the weak data sample X W Extract the third feature Z W . S3: The third feature Z W Input the particle-sphere calculation layer, perform multi-granularity division at the feature level, generate several clusters, each cluster corresponds to a particle-sphere sample, and calculate the feature matrix and label of the particle-sphere sample based on the feature matrix and label of the sample in the cluster; S4: Input the feature matrix and label of the ball sample into the classification layer to obtain the image classification result p; calculate the cross entropy loss based on the image classification result and the label of the ball sample S5: The first feature Z S1 Input prediction layer to get the first prediction feature Q S1 ; Based on the first prediction feature Q S1 and the second feature Z S1 , using the image classification result p as the indicator function to calculate the contrast loss between the predicted probability distribution of samples of the same category and the target representation distribution S6: According to the contrast loss and cross entropy loss Weighted to get the total loss The image label noise learning network is optimized by back-propagation according to the total loss.
2. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 1, characterized in that: The general description of the granular sphere computing layer is: GBC:Z→gb Constraints: Constraints: Among them, Z represents the image sample feature, → represents the mapping, GB represents the particle-ball sample feature, N represents the number of image samples, M represents the number of particle-ball samples, represents the i-th particle sample gb i purity, τ represents the set purity threshold.
3. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 1, characterized in that: Characteristics of the pellet samples Specifically: in, represents the characteristics of the i-th particle sample, gb i represents the i-th particle sample, v j Indicates the spherical sample gb i The feature vector of the jth image sample in Number (gb i ) represents the i-th particle sample gb i The number of image samples in .
4. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 1, characterized in that: The first feature Z S1 Input prediction layer to get the first prediction feature Q S1 ; Based on the first prediction feature Q S1 and the second feature Z S2 , calculate the cosine similarity of the first prediction feature vector and the second feature of the same sample, and define the sample pair (x i ,x j ), where x i represents the i-th input sample, x j represents the jth input sample, and i≠j.
5. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 4, characterized in that: The calculation formula of the cosine similarity is: Where D(q,z) represents the cosine similarity between the predicted feature vector q and the feature vector z, q represents the first predicted feature vector obtained by the input sample through the feature learner and the prediction layer, z represents the second feature vector obtained by the input sample through the second feature learner, and ‖.‖2 represents the calculation of the L2 norm.
6. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 5, characterized in that: The sample pair (x i ,x j ) is: in, Represents a sample pair (x i ,x j )’s initial contrast loss function, q i Represents the input sample x i The first predicted feature vector obtained by the feature learner and prediction layer, z j Represents the input sample x j The feature vector obtained by the second feature learner, q j Represents the input sample x j The first predicted feature vector obtained by the feature learner and prediction layer, z i Represents the input sample x i The feature vector obtained by the second feature learner, stopgrad(z j ) means to stop processing tensor z in the computation graph j Gradient tracking and calculation of stopgrad(z i ) means to stop processing tensor z in the computation graph i Gradient tracking and calculation of Represents an indicator function, which is used to indicate whether a specific condition is met. If so, the initial contrast loss of the sample pair is added to the total contrast loss. If not, the initial contrast loss of the sample pair will not be included in the total loss.
7. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 6, characterized in that: Improve the sample pair (x i ,x j ), which is specifically: in, Represents the improved sample pair (x i ,x j )’s contrast loss function, gb m Represents the i-th input sample x i Belong to the ball, gb n Represents the jth input sample x j The ball belongs to Indicates the mth sphere sample gb m Tags, Indicates the nth sphere sample gb n Tags, Represents the indicator function.
8. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 7, characterized in that: Further improve the sample pair (x i ,x j ), which is specifically: in, It means that after further improvement, the sample pair (x i ,x j ), Indicates the mth sphere sample gb m The purity, p gbn Indicates the nth sphere sample gb n purity, T represents vector transposition, which is used to calculate vector inner product or similarity, ε is the confidence threshold, Represents the indicator function.
9. The image label noise learning method based on granular sphere calculation and contrastive learning according to claim 1, characterized in that: include: According to the contrast loss and cross entropy loss Weighted to get the total loss The total loss The calculation formula is: In the formula, represents the cross entropy loss function, α represents the first weight parameter, β represents the second weight parameter, represents the further improved total contrast loss function, that is, for all sample pairs {(x i ,x j )} to find the average of the contrastive losses.
Citation Information
Patent Citations
Fast K-nearest neighbor classifier method for large-scale data
CN116363420A
Robust image classification method on label noisy data
CN116468938A
Label noise correction image classification method based on reinforcement learning
CN117237720A
Remote supervision named entity recognition method based on granular ball calculation
CN117709342A
Systems and methods for noise-robust contrastive learning
US20210374553A1
Cited By
Multi-granularity financial text noise open classification method based on large model
CN120123518A
Deep multi-granularity particle ball contrast clustering method for melanoma diagnosis
CN120431352A
A deep multi-granularity granule contrast clustering method for melanoma diagnosis
CN120431352B
Image noise mark feature selection method and system, storage medium and computer
CN120894642A
Image noise marker feature selection methods, systems, storage media, and computers
CN120894642B