Dynamic label distribution threshold robust classification method and device based on category self-adaption
By adopting a robust classification method based on category adaptation of dynamic label distribution threshold in image classification task, the problem of overfitting and pseudo-label generation in image classification task under noisy label conditions is solved, and the classification and generalization performance of the model is improved.
Patent Information
- Application Number
- CN202411825988.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-12
AI Technical Summary
When handling image classification tasks under noisy label conditions, the prior art has problems such as overfitting, insufficient utilization of noise data and unstable pseudo label generation, making it difficult to effectively detect noise labels and improve the classification and generalization performance of the model.
Using a robust classification method based on dynamic label distribution threshold of category adaptation, the data is divided into clean data subsets, purified data subsets and noise data subsets by training classification models, calculating label distributions of noise training data, and adaptively adjusting the label distribution thresholds at the category level, and different regularization strategies and loss functions are applied.
It improves the accuracy of noise label detection, enhances the classification and generalization performance of the model, avoids the problem of uneven category distribution, and provides more reliable pseudo-label generation.
Smart Images

Figure CN119904670A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image classification in a label noise environment, and in particular relates to a robust classification method and device based on a category-adaptive dynamic label distribution threshold. Background Art
[0002] In the past few years, deep neural networks (DNNs) have been widely used in computer vision tasks such as image classification, object detection, semantic segmentation, and behavior recognition. Among them, a large amount of correctly annotated training data plays an indispensable role. However, the method of manually annotating datasets not only takes a lot of time, but also consumes a lot of human resources, especially for the task of training ultra-large-scale models. At present, web crawling and crowdsourcing are two common ways to obtain a large amount of annotated data, which can effectively replace manual annotation. However, due to non-professional annotations and mismatches between keywords and search content, these methods will inevitably introduce mislabeled data. Previous studies have shown that the model is sensitive to noisy labels, so the model is easy to overfit the noisy data, which ultimately affects the classification and generalization performance of the model. Therefore, it is of great significance to develop a noise-robust noisy label detection and robust classification method and system.
[0003] At present, the solutions to image classification tasks under noisy label conditions can be divided into the following three main solutions: regularization-based methods, sample selection-based methods, and label update-based methods. The first type of methods is committed to designing noise-robust loss functions or training strategies to reduce the overfitting of the model to noisy labels. Representative methods include GCE, Mixup, and ELR. This type of method faces the problem of a sharp decline in regularization effect under high noise rates; the second type of method aims to use distinguishable statistics generated by the training process, such as loss functions or category confidence, to distinguish clean samples from noisy samples. Some representative methods of this type of solution include Co-teaching, JoCoR, and DISC. This type of method faces the problem of insufficient utilization of noisy data leading to unsatisfactory classification accuracy; the third type of method attempts to generate pseudo labels for noisy samples through the feature representation ability of the model to replace the noisy labels as supervisory signals for model training. Representative methods include DivideMix, M-correction, and F-correction. This type of method has the problem of over-reliance on model predictions, resulting in unstable and inaccurate pseudo-label generation. Therefore, how to accurately detect noisy labels, how to generate reliable pseudo labels, and how to effectively reduce the negative impact of noisy labels on model training are still difficult problems faced by image classification tasks under noisy label conditions. Summary of the invention
[0004] The purpose of the present invention is to provide a robust classification method and device based on category-adaptive dynamic label distribution threshold, which can be applied to a variety of image data sets, a variety of noise types and different degrees of label noise, improve the accuracy of noise label detection, and improve the classification and generalization performance of the model.
[0005] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a robust classification method based on a class-adaptive dynamic label distribution threshold, comprising:
[0007] Train a classification model;
[0008] Make category predictions based on the trained classification model;
[0009] The training classification model comprises:
[0010] Preheating training is performed on the CNN model based on the noise training data set and the trusted data queue is initialized, and features of all noise training data are extracted based on the CNN model and category prediction results are output; the noise training data set consists of image and label category pairs, wherein the label category refers to the labeling of the category to which the object in the image belongs, and the noise training data set includes labels that are inconsistent with the category to which the image belongs, which are called noise labels;
[0011] The data in the trusted data queue are grouped according to the label category, and the label distribution of each noise training data is calculated based on the characteristics of the noise training data and the trusted data guidance in the trusted data queue;
[0012] Adaptively adjust the label distribution threshold at the category level based on the label distribution of the noisy training data;
[0013] Based on the label distribution of the noisy training data and the label distribution threshold at the category level, the noisy training data is divided into clean data subsets, purified data subsets and noisy data subsets, and different regularization strategies and loss functions are applied;
[0014] The model parameters of the CNN model are updated based on the total loss function, and the trusted data in the trusted data queue is updated; after iterative training is completed, a trained classification model is obtained.
[0015] Preferably, the preheating training of the CNN model based on the noise training data set and initializing the trusted data queue includes:
[0016] A large number of noisy data sets are obtained by web crawling and crowdsourcing to form a noisy training data set; the noisy training data set includes data with label categories consistent with the category to which the image belongs and data with label categories inconsistent with the category to which the image belongs;
[0017] The noisy training data is fed into the CNN model in batches for feature extraction, and the category probability distribution is predicted based on the learned feature vectors;
[0018] Convert the given potential noise label into a one-hot vector form and calculate the cross entropy loss between the noise label in the one-hot vector form and the predicted category probability distribution;
[0019] Back-propagate the cross entropy loss and use the stochastic gradient descent algorithm to update the parameters of the CNN model;
[0020] In the last round of training in the warm-up phase, the data with the smallest training loss is selected as the trusted data according to the small loss selection criterion, initialized and stored in the trusted data queue;
[0021] The CNN model includes:
[0022] A CNN encoder for feature extraction of the input;
[0023] A fully connected layer to compress high-dimensional features into low-dimensional features;
[0024] A Softmax classifier is used to predict the category of the input data based on the output features.
[0025] Preferably, the step of grouping the data in the trusted data queue according to the label category and respectively calculating the label distribution of each noise training data based on the characteristics of the noise training data and the trusted data in the trusted data queue includes:
[0026] According to the label category, the trusted data in the trusted data queue is grouped, and the data in each group shares the same label category. The grouping result is: ,in Indicates the total number of categories;
[0027] The distance between the noise training data and each group of credible data in the feature space is calculated to obtain the label distribution of the noise training data, which is expressed as follows:
[0028] ,
[0029] ,
[0030] in, For grouping Trusted data in Features, Noisy training data Features, Represents noisy training data and grouping The distance between the reliable data in the feature space, Representing Noisy Training Data Label distribution of In category The weight on For the group in the trusted data queue The total amount of data;
[0031] Will Perform normalization.
[0032] Preferably, the adaptive adjustment of the label distribution threshold at the category level based on the label distribution of the noise training data includes:
[0033] Counting the number of noise training data whose category corresponding to the maximum component in the label distribution of the noise training data is the same as the actual labeled label category and whose maximum component exceeds a preset threshold,
[0034] Based on the statistical noise training data that meets the conditions in each category, the label distribution threshold corresponding to each category is adaptively and dynamically adjusted as follows:
[0035] ,
[0036] in, Indicates the previous round The maximum number of noise training samples that meet the threshold condition, Indicates the previous round category The number of noise training samples that meet the threshold condition, For the current round category The label distribution threshold, is the preset threshold;
[0037] Will Perform normalization.
[0038] Preferably, the step of dividing the noise training data into a clean data subset, a purified data subset and a noise data subset based on the label distribution of the noise training data and the label distribution threshold at the category level includes:
[0039] If the category and label of the maximum component in the label distribution of the noisy training data are consistent, and the maximum component of the label distribution is greater than the label distribution threshold of the corresponding category, then the data is assigned to the clean data subset middle;
[0040] If the category and label of the maximum component in the label distribution of the noisy training data are inconsistent, but the maximum component of the label distribution is greater than the label distribution threshold of the corresponding category, then the data is assigned to the clean data subset middle;
[0041] Remove the subset and subset The noise training data outside is assigned to the noise data subset middle.
[0042] Preferably, the method further comprises:
[0043] For the clean data subset, the cross entropy loss function is used;
[0044] For the purified data subset, the generalized cross entropy loss function is used;
[0045] For the noise data subset, the loss function is obtained by data mixing, as follows:
[0046] The data in the clean data subset, the purified data subset, and the noisy data subset are mixed to obtain a mixed data set, and the data label pairs in the mixed data set are subtracted from another randomly sampled data label pair to generate new data label pairs. The cross entropy loss function of the mixed data set is calculated based on the new data label pairs.
[0047] Preferably, updating the model parameters of the CNN model based on the total loss function and updating the trusted data in the trusted data queue includes:
[0048] The total loss function is obtained based on the loss functions on the three subsets, and the model parameters of the CNN model are updated through back propagation;
[0049] According to the small loss screening criterion, a new batch of trusted data with the minimum loss function is selected from the clean data subset and stored in the trusted data queue, while the old trusted data in the queue is dequeued.
[0050] In a second aspect, the present invention provides a robust classification device based on a class-adaptive dynamic label distribution threshold, which is used to implement the above-mentioned robust classification method based on a class-adaptive dynamic label distribution threshold, and the device includes:
[0051] Classification model training module, used to train classification models;
[0052] Prediction output module, used to make category predictions based on the trained classification model;
[0053] The classification model training module includes:
[0054] A preheating and initialization module, used to preheat the CNN model and initialize the trusted data queue based on the noise training data set, and extract the features of all the noise training data based on the CNN model and output the category prediction results; the noise training data set consists of an image and a label category pair, wherein the label category refers to the labeling of the category to which the object in the image belongs, and the noise training data set includes a label that is inconsistent with the category to which the image belongs, which is called a noise label;
[0055] A label distribution calculation module is used to group the data in the trusted data queue according to the label category, and calculate the label distribution of each noise training data based on the characteristics of the noise training data and the trusted data guidance in the trusted data queue;
[0056] A label distribution threshold adaptive adjustment module is used to adaptively adjust the label distribution threshold at the category level based on the label distribution of the noisy training data;
[0057] A noise label detection module is used to divide the noise training data into a clean data subset, a purified data subset and a noise data subset based on the label distribution of the noise training data and the label distribution threshold at the category level;
[0058] An adaptive regularization learning module, used for applying different regularization strategies and loss functions to three data subsets; updating model parameters of the CNN model based on the total loss function, and updating the trusted data in the trusted data queue;
[0059] The loop control module is used to cyclically call the label distribution calculation module, the label distribution threshold adaptive adjustment module, the noise label detection model and the adaptive regularization learning module until the termination condition is met to obtain a trained classification model.
[0060] In a third aspect, the present invention provides a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any of the methods described above.
[0061] In a fourth aspect, the present invention provides a computing device comprising one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods described above.
[0062] The beneficial effects of the present invention are:
[0063] The present invention provides a robust classification method based on a dynamic label distribution threshold with adaptive categories, which has the following innovations: First, a trusted data queue is used to store trusted data to ensure that the trusted data feature density in the feature space far exceeds the density of the feature space based on the general training batch, thereby ensuring that the calculation of the label distribution is more accurate and stable. Trusted data is grouped according to label categories, and the label distribution threshold at the category level is dynamically and adaptively adjusted. Compared with the general global fixed threshold strategy, the threshold size can be flexibly adjusted according to the learning state of the model for semantic information of different categories, thereby avoiding the problem of uneven category distribution of the screened data and promoting more accurate noise label detection. Compared with the screening method based on prediction confidence, the sample screening strategy based on label distribution is realized by using the relative distance of the data in the feature space, and at the same time, more accurate noise sample filtering and clean sample screening can be achieved by using the richer semantic information in the label distribution, while providing more reliable pseudo-labels for the noise data. Using loss functions with different regularization effects to process data subsets in different label noise environments can improve the learning efficiency of the model while ensuring the noise robustness of the model. Therefore, the present invention further enhances the detection performance of noise labels, as well as the classification and generalization capabilities of the training model, and improves the problems existing in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic flow chart of a robust classification method based on category-adaptive dynamic label distribution threshold provided in an embodiment of the present invention;
[0065] Figure 2 It is a schematic diagram of a label distribution calculation process based on a trusted data queue guidance in an embodiment of the present invention;
[0066] Figure 3 Schematic diagram of the adaptive adjustment process of the label distribution threshold at the category level in an embodiment of the present invention;
[0067] Figure 4 This is a CNN model framework diagram in an embodiment of the present invention. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0069] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0070] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0071] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0072] It should be emphasized here that the step marks mentioned below are not intended to limit the order of the steps, but it should be understood that the steps can be executed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be executed simultaneously.
[0073] like Figure 1 As shown, an embodiment of the present invention discloses a robust classification method based on a class-adaptive dynamic label distribution threshold, which mainly includes the following steps:
[0074] Step S1: Obtain a large amount of noisy training data sets through web crawling and crowdsourcing techniques. The noisy training data set consists of image and label category pairs, where the label category refers to the category of the object in the image, such as cat, dog, car, airplane, etc. Some labels, due to the interference of noise, show semantic information inconsistent with the image, namely noisy labels. Then, use all the noisy training data to preheat the CNN model and initialize the trusted data queue.
[0075] Due to the memory effect, the model will first fit the clean data patterns that are easy to learn in the initial stage of training, and then fit the more complex noise data patterns. Therefore, the training in the warm-up stage enables the model to have certain classification and generalization performance. Apply the small loss selection criterion to select some trusted data with the minimum loss value for initialization and store them in the trusted data queue;
[0076] Step S2: Group the data in the trusted data queue according to the label category, and then calculate the label distribution vector of each noise training data under the guidance of the trusted data.
[0077] The label distribution of the noisy training data is guided by the trusted data queue, in which the distance between the stored trusted data and the noisy training data in the feature space can be used to measure the confidence that the noise data belongs to each category, that is, the component value of the label distribution in the corresponding category. In fact, the length of the queue is much larger than the amount of data involved in each round of iteration training, which avoids the problem of inaccurate label distribution caused by excessive sparseness of the feature space.
[0078] Step S3: In order to calculate the class-adaptive label distribution threshold, the number of maximum components in the label distribution exceeding the preset threshold is counted, and the adaptive label distribution threshold adjustment is implemented accordingly.
[0079] Considering the differences in model learning effects between categories, different label distribution thresholds are assigned to each category and dynamically updated with training iterations. This can effectively strengthen the learning of category data with poor learning effects and reduce category bias.
[0080] Step S4: Based on the label distribution threshold at the category level of the current training round, the training data is divided into a clean data subset, a purified data subset, and a noisy data subset.
[0081] The clean data subset contains data with correct labels and the lowest noise rate; the purified data subset mainly contains data with incorrect labels but the predicted label distribution is correct; the noisy data subset contains data with incorrect labels and unreliable label distribution, and the noise rate of this subset is the highest;
[0082] Step S5: By applying different regularization strategies and loss functions to the three types of data subsets obtained, robust training of the model is achieved, which improves the model's learning effect on useful information while enhancing the model's ability to resist label noise.
[0083] At the same time, based on the small loss selection criterion, a batch of data with the smallest loss value is selected from the clean data subset to update the trusted data queue and guide the next round of label distribution calculation and model training.
[0084] Step S6: Apply the trained robust model and data with correct label distribution to downstream tasks of the system, or predict the true category label on the test data.
[0085] In step 1 of the embodiment of the present invention, the CNN model is preheated and trained and the trusted data queue is initialized, as follows:
[0086] Step S11: Send the noise training data into the CNN model in batches for feature extraction, and then predict the category probability distribution based on the learned feature vectors;
[0087] Step S12: Convert the given potential noise label into a one-hot vector form, and calculate the cross entropy loss between the noise label in the one-hot vector form and the predicted category probability distribution;
[0088] Step S13: back-propagate the cross entropy loss and use the stochastic gradient descent algorithm to update the parameters of the CNN model;
[0089] Step S14: In the last round of training in the warm-up phase, a portion of data with the smallest training loss is selected as trusted data according to the small loss selection criterion, initialized and stored in the trusted data queue.
[0090] See also Figure 2 In step 2 of the embodiment of the present invention, the data in the trusted data queue are grouped according to the label category, and then the label distribution vector of each noise training data is calculated under the guidance of the trusted data, as follows:
[0091] Step S21: group the trusted data in the trusted data queue according to the label category, for example, cat, dog, car, airplane, etc. The data in each group share the same label category. The grouping result is: ,in Indicates the total number of categories;
[0092] Step S22: Input the noise training data into the CNN model for feature extraction. For example, the noise training data The characteristic representation is , the category prediction is Then, by measuring the distance between the noisy training data and the credible data of each category in the feature space, the value of each category component of the label distribution can be obtained. The formula is as follows:
[0093] ,
[0094] ,
[0095] in, Representing Noisy Training Data Label distribution of In category The weight on For the group in the trusted data queue The total amount of data.
[0096] After normalization, the value range of any component in the label distribution is [0,1], and .
[0097] See also Figure 3 In step 3 of the embodiment of the present invention, the process of adaptively adjusting the label distribution threshold at the category level is as follows:
[0098] Step S31: The category corresponding to the maximum component in the statistical label distribution is the same as the actual labeled label category, and the maximum component exceeds the preset threshold The number of noisy training data is as follows:
[0099] ,
[0100] in, represents the total amount of noisy training data, It is an indicator function. When the condition is met, the indicator function outputs 1, otherwise it outputs 0.
[0101] Step S32: Based on the statistical noise training data that meets the conditions in each category, the label distribution threshold corresponding to each category is adaptively and dynamically adjusted. The formula is as follows:
[0102] ,
[0103] in, For the current round category The label distribution threshold, Indicates the previous round The maximum number of noise training samples that meet the threshold condition, Indicates the previous round category The number of noise training samples that meet the threshold condition, It should be noted that the initial value of the label distribution threshold is an initialization setting.
[0104] After normalization, the threshold corresponding to each category is kept between 0 and 1, which is naturally suitable for the data screening process based on label distribution.
[0105] In step 4 of the embodiment of the present invention, based on the label distribution threshold at the category level of the current training round, the training data is divided into a clean data subset, a purified data subset, and a noisy data subset, as follows:
[0106] Step S41: For the clean data with correct labels in the noisy training data, the following scheme is used to extract this part of data: when the category and label of the maximum component in the label distribution are consistent, and the maximum component of the label distribution is greater than the label distribution threshold of the corresponding category, this part of the data is assigned to the clean data subset In, collection is defined as follows:
[0107] ,
[0108] in , and Respectively Data, The potential noise labels of the data and the noise labels in the form of one-hot vectors, due to The labels of the data are likely to be correct, so the unique hot label is used as the supervision signal;
[0109] Step S42: For the noise data with wrong labels in the training data, since there is a part of the data with correct label distribution prediction in this part of the data, and it contains a lot of useful information that is conducive to model fitting, it is necessary to extract this part of the data from the noise data. The specific extraction scheme is as follows: When the category and label of the maximum component in the label distribution are inconsistent, but the maximum component of the label distribution is greater than the label distribution threshold of the corresponding category, the data is assigned to the purified data subset In, collection is defined as follows:
[0110] ,
[0111] in is the generated purified data pair. There is a large amount of mislabeled data in the dataset, but the predicted label distribution is reliable, so the generated label distribution replaces the original noise label as the supervisory signal.
[0112] Step S43: For the noise data with wrong labels in the training data, remove the set and collection In addition to the data in the noise data set, the remaining noise data is often mislabeled and the label distribution is also unreliable, so these data are assigned to the noise data subset middle:
[0113] ,
[0114] Compared with noisy labels, label distribution based on feature metrics is less affected by label noise and can therefore provide more semantic information. Therefore, label distribution replaces label as a supervisory signal.
[0115] In step 5 of the embodiment of the present invention, different regularization strategies and loss functions are applied to the three types of data subsets obtained to perform robust training of the model. The specific process is as follows:
[0116] See also Figure 4 ,The model consists of a CNN encoder, such as Resnet-18, a fully connected layer, which is used to compress high-dimensional features into low-dimensional features, and a Softmax classifier, which predicts the category of the input data based on the output features of the encoder.
[0117] The training process is as follows:
[0118] Feed the untrustworthy noise training data into the model to obtain features and category prediction ;
[0119] feature The label distribution is obtained by calculating the features of the trusted data stored in the trusted data queue. ;
[0120] Compare the maximum component in the label distribution with the preset threshold, and obtain the category adaptive threshold corresponding to each category in the current training round through statistics and conversion. , , …, ;
[0121] Then, we use category prediction, label distribution, and category adaptive threshold to divide the noisy training data into clean data subsets. , purify the data subset and the noisy data subset , and calculate the loss functions on the three subsets respectively;
[0122] Back-propagate the total loss function to update the model parameters and update the trusted data stored in the trusted data queue;
[0123] Iterate the training until the set training rounds are reached or the model reaches convergence conditions, and finally obtain the classification model.
[0124] In the embodiment of the present invention, strategies and loss functions with different degrees of regularization effects are applied to different degrees of noise conditions to promote the learning of semantic information while combating noisy labels, specifically including:
[0125] Step S51: For a subset We compute the cross entropy loss between the labels and the class distribution predicted by the model. This is because the subset There are very few wrongly labeled data. The cross entropy loss helps improve the model's learning effect on the valuable semantic information in this part of the data. The loss function is as follows:
[0126] ,
[0127] The above formula represents the inner product between the true label one-hot distribution and the predicted category distribution after logarithmic operation, where Representation Subset The amount of data, Representation data The category distribution of The corresponding amount, is the true label in the form of a one-hot vector. This loss function can be used to effectively optimize the model under the supervision of the true clean label.
[0128] Step S52: For the subset The data in the calculation is the generalized cross entropy loss function between the generated label distribution and the category distribution predicted by the model. The specific function formula is as follows:
[0129] ,
[0130] The above formula represents the generalized cross entropy loss under the constraint of parameter s, where Representation Subset Middle The maximum component of the label distribution of samples, Representation Subset Middle The maximum category prediction confidence of samples, , The generalized cross entropy loss function is considered to be effective against the interference of noise labels, but in the case of low noise rate, its learning efficiency is not as good as the traditional cross entropy loss function. In the case of extremely high noise rate, the regularization effect will be greatly weakened. Considering the subset The noise rate in mainly comes from the incorrectly predicted label distribution, so the noise rate in this set is moderate and more suitable for using the generalized cross entropy loss function.
[0131] Step S53: For the subset For the data in , a data mixing enhancement strategy is used to reduce the impact of noisy labels and mispredicted label distribution in the set on CNN model training.
[0132] Specifically, first mix the subsets , subset and subset The data in the mixed data set , then subset The data label pairs in and from the collection Another data label pair randomly sampled from Perform difference processing to generate new data label pairs ,
[0133] The processing process is formulated as:
[0134] , ,
[0135] in ( , ), express The index of the randomly sampled data, and Represents the supervisory signal, in the subset The corresponding one is the hot label. and represents the predicted label distribution.
[0136] Then calculate the mixed subset The cross entropy loss function is as follows:
[0137] ,
[0138] in It is mixed data The data mixing enhancement regularization strategy reduces the adverse effects of noise labels during training by mixing clean data with noise data, thereby suppressing the overfitting of the model to noise labels.
[0139] In the embodiment of the present invention, the total loss function is back-propagated to update the model parameters, and the trusted data stored in the trusted data queue is updated, specifically:
[0140] After calculating the loss functions on the three data subsets according to steps S51-S53, the loss functions are added together to obtain the total loss function , and then update the parameters of the CNN model through back propagation. The total loss function is as follows:
[0141] ,
[0142] According to the small loss screening criterion, from the subset A new batch of trusted data with the minimum loss function is selected and stored in the trusted data queue, and the old trusted data in the queue is dequeued to guide the calculation of label distribution and model training in the next round of iteration.
[0143] In the present invention, when the number of training rounds exceeds the set total number of training rounds or the model reaches the convergence condition, the training phase ends. Finally, a robust classification model and clean data with noise data removed can be obtained, and the generated model and data can be used to guide the downstream tasks of the system. For example, on the test data, the model can be used to predict the real category distribution; the clean data can be used for the new stage of model training.
[0144] Based on the same inventive concept, a second embodiment of the present invention provides a robust classification device based on a class-adaptive dynamic label distribution threshold, comprising:
[0145] Classification model training module, used to train classification models;
[0146] Prediction output module, used to make category predictions based on the trained classification model;
[0147] In this embodiment, the classification model training module includes:
[0148] The warm-up and initialization module is used to warm-up the CNN model based on the noise training data set to ensure that the model has certain classification and generalization capabilities before the formal training stage; the data with the minimum loss function is selected as the trusted data to initialize the trusted data queue; it should be noted that the noise training data set consists of an image and a label category pair, where the label category refers to the labeling of the category to which the object in the image belongs, and the noise training data set includes labels that are inconsistent with the category to which the image belongs, which are called noise labels;
[0149] The label distribution calculation module is used to group the trusted data according to the label category under the guidance of the trusted data queue, and then calculate the distance between the untrusted noise data and the data in the trusted data queue in the feature space one by one, and obtain the label distribution in the form of probability distribution through normalization processing;
[0150] The label distribution threshold adaptive adjustment module is used to count the amount of data exceeding the preset threshold in the label distribution of data of different label categories, and then obtain the category-adaptive label distribution threshold under the current training round through normalization processing;
[0151] The noise label detection module is used to filter the data with correct labels, the data with correct label distribution, and the remaining noise data based on the category-adaptive label distribution threshold filtering strategy, and divide the noise training data into clean data subsets, purified data subsets, and noise data subsets; the screening criteria are to measure the consistency between the given label category and the label distribution category, as well as the size relationship between the label distribution and the label distribution threshold at the category level;
[0152] The adaptive regularization learning module is used to apply different loss functions on the divided clean data subsets, purified data subsets, and noisy data subsets, and optimize the model parameters through back propagation. Then, the trusted data with the minimum loss function is selected from the clean data subset and sent to the trusted data queue, and the old data is dequeued;
[0153] The unseen data inference module is used to use the trained robust CNN model to predict the true category of unseen data and guide downstream tasks in the classification system.
[0154] The loop control module is used to cyclically call the label distribution calculation module, the category-level label distribution threshold adaptive adjustment module, the noise label detection model, and the adaptive regularization learning module to continuously improve the system's noise label detection accuracy and the model's classification and generalization capabilities until the termination condition is met.
[0155] The specific working process of each module described above can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here. The module division is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system.
[0156] Based on the same inventive concept, the present invention provides a computer system, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, the steps of the robust classification method based on category-adaptive dynamic label distribution threshold are implemented.
[0157] Based on the same inventive concept, the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the robust classification method based on category-adaptive dynamic label distribution threshold.
[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A robust classification method based on class-adaptive dynamic label distribution threshold, characterized in that: include: Train a classification model; Make category predictions based on the trained classification model; The training classification model comprises: Preheating training is performed on the CNN model based on the noise training data set and the trusted data queue is initialized, and features of all noise training data are extracted based on the CNN model and category prediction results are output; the noise training data set consists of image and label category pairs, wherein the label category refers to the labeling of the category to which the object in the image belongs, and the noise training data set includes labels that are inconsistent with the category to which the image belongs, which are called noise labels; The data in the trusted data queue are grouped according to the label category, and the label distribution of each noise training data is calculated based on the characteristics of the noise training data and the trusted data guidance in the trusted data queue; Adaptively adjust the label distribution threshold at the category level based on the label distribution of the noisy training data; Based on the label distribution of the noisy training data and the label distribution threshold at the category level, the noisy training data is divided into clean data subsets, purified data subsets and noisy data subsets, and different regularization strategies and loss functions are applied; The model parameters of the CNN model are updated based on the total loss function, and the trusted data in the trusted data queue is updated; after iterative training is completed, a trained classification model is obtained.
2. According to claim 1, a robust classification method based on class-adaptive dynamic label distribution threshold is characterized in that: The preheating training of the CNN model based on the noise training data set and initializing the trusted data queue includes: A large number of noisy data sets are obtained by web crawling and crowdsourcing to form a noisy training data set; the noisy training data set includes data with label categories consistent with the category to which the image belongs and data with label categories inconsistent with the category to which the image belongs; The noisy training data is fed into the CNN model in batches for feature extraction, and the category probability distribution is predicted based on the learned feature vectors; Convert the given potential noise label into a one-hot vector form and calculate the cross entropy loss between the noise label in the one-hot vector form and the predicted category probability distribution; Back-propagate the cross entropy loss and use the stochastic gradient descent algorithm to update the parameters of the CNN model; In the last round of training in the warm-up phase, the data with the smallest training loss is selected as the trusted data according to the small loss selection criterion, initialized and stored in the trusted data queue; The CNN model includes: A CNN encoder for feature extraction of the input; A fully connected layer to compress high-dimensional features into low-dimensional features; A Softmax classifier is used to predict the category of the input data based on the output features.
3. According to claim 2, a robust classification method based on class-adaptive dynamic label distribution threshold is characterized in that: The method of grouping the data in the trusted data queue according to the label category and respectively calculating the label distribution of each noise training data based on the characteristics of the noise training data and the trusted data in the trusted data queue includes: According to the label category, the trusted data in the trusted data queue is grouped, and the data in each group shares the same label category. The grouping result is: ,in Indicates the total number of categories; The distance between the noise training data and each group of credible data in the feature space is calculated to obtain the label distribution of the noise training data, which is expressed as follows: , , in, For grouping Trusted data in Features, Noisy training data Features, Represents noisy training data and grouping The distance between the reliable data in the feature space, Representing Noisy Training Data Label distribution of In category The weight on For the group in the trusted data queue The total amount of data; Will Perform normalization.
4. The robust classification method based on class-adaptive dynamic label distribution threshold according to claim 3 is characterized in that: The adaptively adjusting the label distribution threshold at the category level based on the label distribution of the noisy training data includes: Counting the number of noise training data whose category corresponding to the maximum component in the label distribution of the noise training data is the same as the actual labeled label category and whose maximum component exceeds a preset threshold, Based on the statistical noise training data that meets the conditions in each category, the label distribution threshold corresponding to each category is adaptively and dynamically adjusted as follows: , in, Indicates the previous round The maximum number of noise training samples that meet the threshold condition, Indicates the previous round category The number of noise training samples that meet the threshold condition, For the current round category The label distribution threshold, is the preset threshold; Will Perform normalization.
5. The robust classification method based on class-adaptive dynamic label distribution threshold according to claim 4 is characterized in that: The method of dividing the noisy training data into a clean data subset, a purified data subset and a noisy data subset based on the label distribution of the noisy training data and the label distribution threshold at the category level includes: If the category and label of the maximum component in the label distribution of the noisy training data are consistent, and the maximum component of the label distribution is greater than the label distribution threshold of the corresponding category, then the data is assigned to the clean data subset middle; If the category and label of the maximum component in the label distribution of the noisy training data are inconsistent, but the maximum component of the label distribution is greater than the label distribution threshold of the corresponding category, then the data is assigned to the clean data subset middle; Remove the subset and subset The noise training data outside is assigned to the noise data subset middle.
6. The robust classification method based on class-adaptive dynamic label distribution threshold according to claim 5, characterized in that: The method further comprises: For the clean data subset, the cross entropy loss function is used; For the purified data subset, the generalized cross entropy loss function is used; For the noise data subset, the loss function is obtained by data mixing, as follows: The data in the clean data subset, the purified data subset, and the noisy data subset are mixed to obtain a mixed data set, and the data label pairs in the mixed data set are subtracted from another randomly sampled data label pair to generate new data label pairs. The cross entropy loss function of the mixed data set is calculated based on the new data label pairs.
7. The robust classification method based on class-adaptive dynamic label distribution threshold according to claim 6 is characterized in that: The updating of the model parameters of the CNN model based on the total loss function and the updating of the trusted data in the trusted data queue include: The total loss function is obtained based on the loss functions on the three subsets, and the model parameters of the CNN model are updated through back propagation; According to the small loss screening criterion, a new batch of trusted data with the minimum loss function is selected from the clean data subset and stored in the trusted data queue, while the old trusted data in the queue is dequeued.
8. A robust classification device based on class-adaptive dynamic label distribution threshold, characterized in that: A robust classification method for implementing a dynamic label distribution threshold based on category adaptation as described in any one of claims 1 to 7, the device comprising: Classification model training module, used to train classification models; Prediction output module, used to make category predictions based on the trained classification model; The classification model training module includes: A preheating and initialization module, used to preheat the CNN model and initialize the trusted data queue based on the noise training data set, and extract the features of all the noise training data based on the CNN model and output the category prediction results; the noise training data set consists of an image and a label category pair, wherein the label category refers to the labeling of the category to which the object in the image belongs, and the noise training data set includes a label that is inconsistent with the category to which the image belongs, which is called a noise label; A label distribution calculation module is used to group the data in the trusted data queue according to the label category, and calculate the label distribution of each noise training data based on the characteristics of the noise training data and the trusted data guidance in the trusted data queue; A label distribution threshold adaptive adjustment module is used to adaptively adjust the label distribution threshold at the category level based on the label distribution of the noisy training data; A noise label detection module is used to divide the noise training data into a clean data subset, a purified data subset and a noise data subset based on the label distribution of the noise training data and the label distribution threshold at the category level; An adaptive regularization learning module, used for applying different regularization strategies and loss functions to three data subsets; updating model parameters of the CNN model based on the total loss function, and updating the trusted data in the trusted data queue; The loop control module is used to cyclically call the label distribution calculation module, the label distribution threshold adaptive adjustment module, the noise label detection model and the adaptive regularization learning module until the termination condition is met to obtain a trained classification model.
9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions which, when executed by a computing device, cause the computing device to perform any one of the methods according to claims 1 to 7.
10. A computing device, characterized in that include, One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods according to claims 1 to 7.
Citation Information
Patent Citations
Robust training in presence of tag noise
CN114424210A
Weak supervision multi-label distribution external sample classification detection method
CN116452876A
Robust image classification method on label noisy data
CN116468938A
Method and device for learning noisy labels through efficient transition matrix estimation
WO2023080509A1
Cited By
Data set detection method and device, electronic equipment, storage medium and program product
CN121188610A