A robust classification method and device based on dynamic label distribution threshold of category adaptation
By using a category-adaptive dynamic label distribution thresholding method, the problem of unsatisfactory model accuracy in image classification methods under high noise rates is solved, achieving more accurate noise label detection and higher model robustness and generalization ability.
Patent Information
- Application Number
- CN202411825988.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-12-12
AI Technical Summary
Existing image classification methods under noisy label conditions suffer from degraded regularization performance, insufficient utilization of noisy data, and unstable pseudo-label generation when faced with high noise rates. This results in unsatisfactory model classification accuracy, making it difficult to accurately detect noisy labels and generate reliable pseudo-labels.
A robust classification method based on category-adaptive dynamic label distribution threshold is adopted. By training the classification model, the reliable data queue and label distribution are adaptively adjusted to divide the data into clean, purified, and noisy subsets. Different regularization strategies and loss functions are applied to improve the accuracy of noisy label detection and the classification and generalization performance of the model.
It achieves accurate noise label detection under various noise types and different levels of label noise, improving the robustness and learning efficiency of the model, and enhancing the model's classification and generalization capabilities.
Smart Images

Figure CN119904670B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of image classification in a label noise environment, and particularly relates to a robust classification method and device based on a dynamic label distribution threshold of class self-adaptation. BACKGROUND
[0002] In the past few years, deep neural networks (DNN) have been widely applied to computer vision tasks, such as image classification, object detection, semantic segmentation, and behavior recognition. Among them, a large number of correctly labeled training data plays an indispensable role. However, the method of manually labeling the data set not only needs a lot of time, but also consumes a lot of human resources, especially for the task of training super large scale models. At present, web crawling and crowdsourcing are two common ways to obtain a large amount of labeled data, which can effectively replace manual labeling. However, due to non-professional labeling and incorrect matching between keywords and search content, these methods will inevitably introduce mislabeled data. Previous studies have shown that models are sensitive to noise labels, so the model is easy to overfit the noise data and ultimately affect the classification and generalization performance of the model. Therefore, it is of great significance to develop a noise-robust noise label detection and robust classification method and system.
[0003] At present, the solutions to the image classification task under the condition of noise labels can be divided into the following three main schemes: regularization-based methods, sample selection-based methods, and label updating-based methods. The first type of method is committed to designing a noise-robust loss function or training strategy to reduce the overfitting of the model to the noise label, and the representative methods are GCE, Mixup, and ELR. This type of method faces the problem of rapid decline of regularization effect under high noise rate; the second type of method aims to use the distinguishable statistics generated during the training process, such as the loss function or class confidence, to distinguish between clean samples and noise samples. Some representative methods of this type of scheme include Co-teaching, JoCoR, and DISC. This type of method faces the problem of insufficient use of noise data, resulting in unsatisfactory classification accuracy; the third type of method tries to generate pseudo-labels for noise samples through the feature representation ability of the model to replace noise labels as a supervision signal for model training, and the representative methods are DivideMix, M-correction, and F-correction. This type of method has the problem of excessive dependence on model prediction, resulting in unstable and inaccurate pseudo-label generation. Therefore, how to accurately detect noise labels, how to generate reliable pseudo-labels, and how to effectively reduce the negative impact of noise labels on model training are still difficult problems faced by the image classification task under the condition of noise labels. SUMMARY
[0004] The application aims to provide a robust classification method and device based on category adaptive dynamic label distribution threshold, which can be applied to various image data sets, various 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-mentioned purpose, the technical scheme adopted by the application is as follows:
[0006] In the first aspect, the application provides a robust classification method based on category adaptive dynamic label distribution threshold, comprising:
[0007] training a classification model;
[0008] performing category prediction based on the trained classification model;
[0009] The training of the classification model comprises:
[0010] pre-warming training the CNN model based on the noise training data set and initializing the trusted data queue, and extracting features of all noise training data based on the CNN model and outputting category prediction results; the noise training data set is composed of images and label category pairs, wherein the label category refers to labeling the category to which the object in the image belongs, and the noise training data set includes labels inconsistent with the category to which the image belongs, which are called noise labels;
[0011] grouping the data in the trusted data queue according to the label category, and guiding the calculation of the label distribution of each noise training data based on the features of the noise training data and the trusted data in the trusted data queue;
[0012] adapting the label distribution threshold at the category level based on the label distribution of the noise training data;
[0013] based on the label distribution of the noise training data and the label distribution threshold at the category level, dividing the noise training data into a clean data subset, a purified data subset and a noise data subset, and applying different regularization strategies and loss functions;
[0014] updating the model parameters of the CNN model based on the total loss function, and updating the trusted data in the trusted data queue; after the iterative training is completed, a trained classification model is obtained.
[0015] Preferably, the pre-warming training of the CNN model based on the noise training data set and the initialization of the trusted data queue comprise:
[0016] A large amount of noisy datasets were obtained through web crawling and crowdsourcing to form a noisy training dataset; the noisy training dataset includes data whose label category matches the category to which the image belongs and data whose label category does not match the category to which the image belongs.
[0017] Noisy training data is fed into the CNN model in batches for feature extraction, and the class probability distribution is predicted based on the learned feature vectors.
[0018] Convert the given latent noise label into one-hot vector form, and calculate the cross-entropy loss between the one-hot vector form noise label and the predicted class probability distribution;
[0019] The cross-entropy loss is backpropagated, and the parameters of the CNN model are updated using the stochastic gradient descent algorithm.
[0020] In the final round of training during the warm-up phase, data with the minimum training loss is selected as reliable data according to the small loss selection criterion, initialized, and stored in the reliable data queue.
[0021] The CNN model includes:
[0022] A CNN encoder is used to extract features from the input;
[0023] A fully connected layer is used to compress high-dimensional features into low-dimensional features;
[0024] A softmax classifier for predicting the class of input data based on output features.
[0025] Preferably, the step of grouping the data in the trusted data queue according to the label category, and calculating the label distribution of each noisy training data based on the features of the noisy training data and the trusted data guidance in the trusted data queue, includes:
[0026] Based on the tag category, the trusted data in the trusted data queue is grouped, with each group sharing the same tag category. The grouping result is as follows: ,in Indicates the total number of categories;
[0027] Calculate the distance between the noisy training data and the reliable data of each group in the feature space to obtain the label distribution of the noisy training data, as shown below:
[0028] ,
[0029] ,
[0030] in, Grouping Trusted data in characteristics of the noise training data, characteristics of the noise training data characteristics of the noise training data, characteristics of the noise training data and the distance between the trusted data in the group in the feature space, characteristics of the noise training data label distribution of the noise training data component on the class , total amount of data in the trusted data queue belonging to the group ;
[0031] normalization processing is performed on .
[0032] Preferably, the label distribution threshold of the class level is adaptively adjusted based on the label distribution of the noise training data, comprising:
[0033] statistically counting the number of noise training data whose maximum component in the label distribution is the same as the true label class and whose maximum component exceeds a preset threshold,
[0034] based on the counted noise training data satisfying the condition in each class, the label distribution threshold of each class is adaptively and dynamically adjusted in the following way:
[0035] ,
[0036] wherein, denotes the number of maximum noise training samples satisfying the threshold condition in the previous round , denotes the number of noise training samples satisfying the threshold condition in the class in the previous round, denotes the label distribution threshold of the class in the current round, denotes the label distribution threshold of the class in the current round, denotes a preset threshold;
[0037] normalization processing is performed on .
[0038] Preferably, the label distribution of the noise training data and the label distribution threshold of the class level divide the noise training data into a clean data subset, a purified data subset and a noise data subset, comprising:
[0039] if the class of the maximum component in the label distribution of the noise training data and the label remain consistent, and the maximum component of the label distribution is greater than the label distribution threshold of the corresponding class, the data is allocated to the clean data subset .
[0040] If the class of the maximum component in the label distribution of the noise training data is inconsistent with the label, but the maximum component of the label distribution is greater than the label distribution threshold of the corresponding class, the data is assigned to the purified data subset ;
[0041] The noise training data other than the subset and the subset is assigned to the noise data subset .
[0042] Preferably, the method further comprises:
[0043] For the clean data subset, a cross-entropy loss function is used;
[0044] For the purified data subset, a generalized cross-entropy loss function is used;
[0045] For the noise data subset, a data mixed way is used to obtain the loss function, specifically as follows:
[0046] Mixing the data in the clean data subset, the purified data subset and the noise data subset, obtaining a mixed data set, performing difference processing on the data label pairs in the mixed data set and another randomly sampled data label pair to generate new data label pairs, and calculating the cross-entropy loss function of the mixed data set based on the new data label pairs.
[0047] Preferably, the method further comprises:
[0048] Based on the loss functions on the three subsets, a total loss function is obtained, 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 smallest loss function is selected from the clean data subset and stored in the trusted data queue, and the old trusted data in the queue is removed.
[0050] In a second aspect, the present application provides a robust classification device based on a dynamic label distribution threshold adaptive to categories, which is used to realize the above-mentioned robust classification method based on a dynamic label distribution threshold adaptive to categories, and the device comprises:
[0051] A classification model training module for training a classification model;
[0052] A prediction output module for performing category prediction based on the trained classification model;
[0053] The classification model training module comprises:
[0054] The preheating and initialization module is configured to preheat and initialize a CNN model based on a noisy training data set and a trusted data queue, and extract features of all noisy training data based on the CNN model and output a category prediction result; the noisy training data set is composed of images and label category pairs, wherein the label category refers to labeling a category to which an object in the image belongs, and the noisy training data set includes labels inconsistent with the category to which the image belongs, referred to as noisy labels;
[0055] The label distribution calculation module is configured to group data in the trusted data queue according to the label category, and calculate a label distribution of each noisy training data based on features of the noisy training data and trusted data in the trusted data queue.
[0056] The label distribution threshold adaptive adjustment module is configured to adaptively adjust a label distribution threshold at a category level based on the label distribution of the noisy training data.
[0057] The noisy label detection module is configured to divide 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.
[0058] The adaptive regularization learning module is configured to apply different regularization strategies and loss functions to the three data subsets; update model parameters of the CNN model based on a total loss function, and update trusted data in the trusted data queue.
[0059] The cycle control module is configured to cyclically call the label distribution calculation module, the label distribution threshold adaptive adjustment module, the noisy label detection model and the adaptive regularization learning module until a termination condition is met, and obtain a trained classification model.
[0060] In a third aspect, the present application provides a computer-readable storage medium storing one or more programs, the one or more programs comprising 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 application 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 comprise instructions for performing any of the methods described above.
[0062] The present application has the following beneficial effects:
[0063] The application provides a robust classification method based on a category adaptive dynamic label distribution threshold, which has the following innovations: first, the trusted data queue is used to store trusted data, so that the density of the trusted data features in the feature space is much higher than the density of the general training batch-based feature space, thereby ensuring that the calculation of the label distribution is more accurate and stable. The trusted data is grouped according to the label category, and the label distribution threshold at the category level is adaptively and dynamically 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 the semantic information of different categories, thereby avoiding the problem of uneven class distribution of the screened data and promoting more accurate noise label detection. Compared with the screening method based on the prediction confidence, the sample screening strategy based on the label distribution is realized by using the relative distance of the data in the feature space, and the more abundant semantic information in the label distribution can achieve more accurate noise sample filtering and clean sample screening, and provide more reliable pseudo-labels for the noise data. The loss function with different regularization effects is used to process the data subsets in different label noise environments, which can improve the learning efficiency of the model while ensuring the noise robustness of the model. Therefore, the application further enhances the detection performance of the noise label and the classification and generalization ability of the trained model, and improves the problems existing in the prior art. BRIEF DESCRIPTION OF DRAWINGS
[0064] Figure 1 A robust classification method based on a category adaptive dynamic label distribution threshold is provided for the embodiment of the application, and a flowchart is shown in the figure;
[0065] Figure 2 A label distribution calculation flowchart guided by a trusted data queue is provided for the embodiment of the application;
[0066] Figure 3 An adaptive adjustment flowchart of the label distribution threshold at the category level is provided for the embodiment of the application;
[0067] Figure 4 A CNN model framework diagram is provided for the embodiment of the application. DETAILED DESCRIPTION
[0068] To make the purpose, technical scheme and advantages of the application clearer, the application is further described in detail below in combination with the embodiments and the drawings. Herein, the illustrative embodiments of the application and the descriptions thereof are used to explain the application, but are not used as a limitation of the application.
[0069] Herein, it also needs to be explained that, in order to avoid the unnecessary details from obscuring the application, only the structures and / or processing steps closely related to the scheme according to the application are shown in the drawings, and other details not closely related to the application are omitted.
[0070] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0071] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0072] It should be emphasized here that the step markers mentioned below are not a limitation on the order of the steps, but should be understood as meaning that the steps can be executed in the order mentioned in the embodiments, or in a different order than in the embodiments, or several steps can be executed simultaneously.
[0073] like Figure 1 As shown, one embodiment of the present invention discloses a robust classification method based on a category-adaptive dynamic label distribution threshold, which mainly includes the following steps:
[0074] Step S1: Obtain a large amount of noisy training dataset through web crawling and crowdsourcing techniques. The noisy training dataset consists of images and label category pairs. The label category refers to the category to which the object in the image belongs, such as cat, dog, car, airplane, etc. Some labels, due to noise interference, exhibit semantic information inconsistent with the image, i.e., noisy labels. Next, use all the noisy training data to warm up and train the CNN model and initialize the trusted data queue.
[0075] Due to the memory effect, the model prioritizes fitting easily learnable clean data patterns during the initial training phase, and then fits more complex noisy data patterns. Therefore, the warm-up training phase gives the model a certain level of classification and generalization performance. A small loss selection criterion is applied to select a subset of reliable data with the minimum loss value for initialization and storage in a reliable 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 for each noisy training data point under the guidance of the trusted data.
[0077] The label distribution of the noisy training data is guided by a queue of reliable data. The distance between the reliable data and the noisy training data in the feature space can be used to measure the confidence level of the noisy data belonging 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 participating in training in each iteration, which avoids the problem of inaccurate label distribution caused by excessive sparsity of the feature space.
[0078] Step S3: In order to calculate the category adaptive label distribution threshold, the number of the largest components in the label distribution exceeding the preset threshold is counted, and the adaptive label distribution threshold adjustment is realized accordingly,
[0079] Considering the difference in model learning effect between categories, different label distribution thresholds are allocated to each category, and are dynamically updated with training iterations, which can effectively enhance the learning of category data with poor learning effect and reduce category bias;
[0080] Step S4: Based on the label distribution threshold of the current training round at the category level, the training data is divided into a clean data subset, a purified data subset and a noise 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 correct predicted label distribution; the noise data subset contains data with incorrect labels and unreliable label distribution, and the noise rate of the subset is the highest;
[0082] Step S5: By applying different regularization strategies and loss functions to the obtained three types of data subsets, the robust training of the model is realized, which improves the learning effect of the model on useful information and enhances the ability of the model 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, guiding the label distribution calculation and model training in the next round.
[0084] Step S6: Apply the robust model obtained by training and the data with correct label distribution to the downstream task of the system, or predict the real category label on the test data.
[0085] In step 1 of the embodiment of the application, the CNN model is preheated and trained and the trusted data queue is initialized, as follows:
[0086] Step S11: The noise training data is sent into the CNN model in batches for feature extraction, and then the category probability distribution is predicted according to the learned feature vector;
[0087] Step S12: The given potential noise label is converted into a one-hot vector form, and the cross-entropy loss between the one-hot vector form of the noise label and the predicted category probability distribution is calculated;
[0088] Step S13: The cross-entropy loss is back-propagated, and the parameters of the CNN model are updated using the stochastic gradient descent algorithm;
[0089] Step S14: In the last round of training in the preheating stage, a part of data with the minimum training loss is screened as trusted data according to the small-loss selection criterion, and the trusted data is initialized and stored in the trusted data queue.
[0090] Referring to Figure 2 , in step 2 of the embodiment of the present application, the data in the trusted data queue is grouped according to the label category, and then the label distribution vector of each noisy training data is calculated respectively under the guidance of the trusted data, as follows:
[0091] Step S21: According to the label category, such as cat, dog, car, airplane, etc., 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: wherein represents the total number of categories;
[0092] Step S22: The noisy training data is input into the CNN model for feature extraction. For example, the feature representation of the noisy training data is , and the category prediction is . Then, the distance between the noisy training data and the trusted data of each category in the feature space is measured, and the value of each category component of the label distribution can be obtained. The formula is as follows:
[0093] ,
[0094] ,
[0095] wherein represents the component of the label distribution of the noisy training data on the category , is the total amount of data in the trusted data queue belonging to the group .
[0096] After normalization processing, the value range of any component on the label distribution is [0, 1], and .
[0097] Referring to Figure 3 , in step 3 of the embodiment of the present application, the process of adaptive adjustment of the label distribution threshold at the category level is as follows:
[0098] Step S31: The number of noisy training data whose maximum component in the label distribution is the same as the real label category and whose maximum component exceeds the preset threshold is counted, and the formula is as follows:
[0099] ,
[0100] in, This represents the total amount of noisy training data. This is an indicator function that outputs 1 when the condition is met and 0 otherwise.
[0101] Step S32: Based on the statistically analyzed noisy training data that meets the conditions for each category, adaptively and dynamically adjust the label distribution threshold corresponding to each category, as shown in the following formula:
[0102] ,
[0103] in, For the current round category The label distribution threshold, Indicates the previous round The maximum number of noisy training samples that meet the threshold condition. Indicates the previous round category The number of noisy training samples that meet the threshold condition. This is a preset threshold. It should be noted that the initial value of the label distribution threshold is the initial setting.
[0104] After normalization, the threshold for each category remains between 0 and 1, which is naturally suitable for data filtering processes based on label distribution.
[0105] In step 4 of this embodiment of the 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 the data: When the class of the largest component in the label distribution is consistent with the label, and the largest component of the label distribution is greater than the label distribution threshold of the corresponding class, this part of the data is assigned to the clean data subset. In, set The definition is as follows:
[0107] ,
[0108] in , and The first The first data point, the first The latent noise labels of each data point and the noise labels in one-hot vector form, due to The labels in the data are very likely correct, so one-hot labels are used as monitoring signals;
[0109] Step S42: For the noise data with label errors in the training data, it is necessary to extract the data with correct label distribution prediction from the noise data, because the data contains a large amount of useful information for model fitting. The specific extraction scheme is as follows: when the class of the maximum component of the label distribution is inconsistent with the label, but the maximum component of the label distribution is greater than the label distribution threshold of the corresponding class, the data is assigned to the purified data subset The definition of set is as follows:
[0110] ,
[0111] wherein is the generated purified data pair. Since there is a large amount of data that is incorrectly labeled, but the predicted label distribution is reliable, the generated label distribution is used to replace the original noise label as a supervision signal.
[0112] Step S43: For the noise data with label errors in the training data, in addition to the data in set and set , the remaining noise data is often labeled incorrectly and the label distribution is also unreliable, so these data are assigned to the noise data subset :
[0113] ,
[0114] Compared with the noise label, the label distribution based on the feature metric is less affected by the label noise, so it can provide more semantic information, and therefore the label distribution is used to replace the label as a supervision signal.
[0115] In step 5 of the embodiment of the application, different regularization strategies and loss functions are applied to the obtained three types of data subsets for robust training of the model, and the specific process is as follows:
[0116] Referring to Figure 4 , the model comprises a CNN encoder, for example, Resnet-18, a fully connected layer for compressing high-dimensional features to low-dimensional features, and a Softmax classifier for classifying the input data based on the output features of the encoder.
[0117] The training process is as follows:
[0118] The untrusted noise training data is input into the model to obtain features and class prediction ;
[0119] features The label distribution is calculated according to the features of the trusted data stored in the trusted data queue ;
[0120] The maximum component in the label distribution is compared with a preset threshold value, and a class adaptive threshold value corresponding to each class of the current training round is obtained through statistics and conversion 、 、…、 ;
[0121] Then, the class prediction, the label distribution and the class adaptive threshold value are used to divide the noise training data to obtain a clean data subset , a purified data subset and a noise data subset , and loss functions on the three subsets are respectively calculated
[0122] The total loss function is back-propagated to update the model parameters, and the trusted data stored in the trusted data queue is updated
[0123] Iterative training is performed until a set training round is reached or the model reaches a convergence condition, and finally a classification model is obtained.
[0124] In the embodiment of the application, strategies and loss functions with different degrees of regularization effect are applied to different degrees of noise conditions, which promotes the learning of semantic information while resisting noise labels, and specifically includes:
[0125] Step S51: For the data in the subset , the cross-entropy loss between the label and the class distribution predicted by the model is calculated. This is because the subset contains very few mislabeled data, and the cross-entropy loss helps to improve the learning effect of the model on the valuable semantic information in this part of data, and the loss function is as follows:
[0126] ,
[0127] The above formula represents the inner product between the real label one-hot distribution and the predicted class distribution after logarithmic operation, wherein represents the data amount of the subset , represents the component corresponding to the class in the class distribution of the data , and the real label is in the form of one-hot vector. Through the loss function, the model can be effectively optimized under the supervision of the real clean label.
[0128] Step S52: For the subset the generalization cross-entropy loss function between the generated label distribution and the model predicted class distribution, and the specific formula is as follows:
[0129] ,
[0130] The above formula represents the generalization cross-entropy loss under the constraint of the parameter s, where represents the maximum component of the label distribution of the i-th sample in the subset , represents the maximum class prediction confidence of the i-th sample in the subset , , The generalization cross-entropy loss function is considered to be effective in resisting the interference of noisy labels, but in the case of low noise rate, its learning efficiency is not as good as that of the traditional cross-entropy loss function, and in the case of extremely high noise rate, the regularization effect will be greatly weakened. Considering that the noise rate in the subset mainly comes from the mispredicted label distribution, the noise rate in this set is moderate, and it is more suitable to use the generalization cross-entropy loss function.
[0131] Step S53: For the data in the subset , a data mixing augmentation strategy is used to reduce the influence of noisy labels and mispredicted label distributions in the set on the training of the CNN model.
[0132] Specifically, first, mix the data in the subset , the subset and the subset to obtain the mixed data set , then difference process the data label pair in the subset and another data label pair randomly sampled from the set to generate a new data label pair ,
[0133] The formulaic representation of the processing process is as follows:
[0134] , ,
[0135] where ( , ), represents the index of the randomly sampled data of , and represent the supervision signal, and in the subset Corresponding to the one-hot label in the set and represent the predicted label distribution.
[0136] Then the cross-entropy loss function of the mixed subset is calculated, and the function formula is as follows:
[0137] ,
[0138] where is the class probability distribution of the mixed data . The data mixing augmentation regularization strategy reduces the adverse effects of noisy labels on the training process by mixing clean data and noisy data, thereby suppressing the overfitting of the model to noisy labels.
[0139] In the embodiment of the application, 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 the loss functions on the three data subsets are calculated according to steps S51-S53, the loss functions are added to obtain the total loss function , and then the parameters of the CNN model are updated by back-propagation. The total loss function is as follows:
[0141] ,
[0142] According to the small loss screening criterion, a new batch of trusted data with the smallest loss function is selected from the subset and stored in the trusted data queue, and the old trusted data in the queue is removed, which is used to guide the calculation of the label distribution and the model training in the next round of iteration.
[0143] In the application, when the training round exceeds the set total training round or the model reaches the convergence condition, the training phase ends. Finally, a robust classification model and clean data excluding noisy data 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 class distribution; the clean data can be used for model training in the next phase.
[0144] Based on the same inventive concept, a second embodiment of the application provides a robust classification device based on a dynamic label distribution threshold of category adaptation, comprising:
[0145] A classification model training module for training a classification model;
[0146] A prediction output module for performing category prediction based on the trained classification model;
[0147] In this embodiment, the classification model training module comprises:
[0148] A preheating and initialization module is configured to perform preheating training of the CNN model based on the noise training dataset, so as to ensure that the model has certain classification ability and generalization ability before the formal training stage; and filter data with the minimum loss function as trusted data to initialize the trusted data queue. It should be noted that the noise training dataset is composed of images and label category pairs, wherein the label category refers to labeling the category to which the object in the image belongs, and the noise training dataset includes labels inconsistent with the category to which the image belongs, which are referred to as noise labels;
[0149] A label distribution calculation module is configured to group the trusted data according to the label category under the guidance of the trusted data queue, then calculate the distance between the untrusted noise data and the data in the trusted data queue in the feature space, and obtain the label distribution in the form of probability distribution through normalization processing;
[0150] A label distribution threshold adaptive adjustment module is configured to count the amount of data exceeding the preset threshold in the label distribution of data of different label categories, and then obtain the label distribution threshold adaptive to the category in the current training round through normalization processing;
[0151] A noise label detection module is configured to filter data with correct labels, data with correct label distributions, and remaining noise data based on the category-adaptive label distribution threshold filtering strategy, divide the noise training data into a clean data subset, a purified data subset and a noise data subset, and the filtering standard is to measure the consistency between the given label category and the label distribution category, and the size relationship between the label distribution and the label distribution threshold at the category level;
[0152] An adaptive regularization learning module is configured to apply different loss functions to the divided clean data subset, purified data subset and noise data subset, 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] An unseen data inference module is configured to use the robust CNN model obtained by training to predict the real category of unseen data, and guide the downstream tasks in the classification system.
[0154] A loop control module is configured 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, so as to continuously improve the noise label detection accuracy of the system and the classification and generalization ability of the model until the termination condition is met.
[0155] The specific working process of each module described above can refer to the corresponding process in the foregoing method embodiment, and will not be described here. The division of the modules is only a logical functional division, and another division mode can be used in actual implementation, for example, multiple modules can be combined or integrated into another system.
[0156] Based on the same inventive concept, the present application provides a computer system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the robust classification method based on the category-adaptive dynamic label distribution threshold when loaded into the processor.
[0157] Based on the same inventive concept, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program implements the steps of the robust classification method based on the category-adaptive dynamic label distribution threshold when executed by a processor.
[0158] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0159] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the computer or other programmable data processing apparatus produce a device implemented in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in the flow(s) or block(s).
[0160] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction apparatus, which implements the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that performs the functions specified in the flow(s) or block(s).
[0161] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide operational steps for implementing the functions of the flow Figure 1 One flow or multiple flows and / or the functions specified in the block Figure 1 One block or multiple blocks.
[0162] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, but not to limit it, although the above embodiments of the present application have been described in detail, those skilled in the art should understand: the specific embodiments of the present application can be modified or replaced by the same, without departing from the spirit and scope of the present application, any modification or equivalent replacement, which should be covered within the scope of protection of the claims of the present application.
Claims
1. A robust classification method based on a category-adaptive dynamic label distribution threshold, characterized in that, include: Training the classification model; Predict the category based on the trained classification model; The training classification model includes: The CNN model is preheated and a reliable data queue is initialized based on a noisy training dataset. Features of all noisy training data are extracted based on the CNN model and the category prediction results are output. The noisy training dataset consists of images and label category pairs. The label category refers to the category to which the object in the image belongs. The noisy training dataset 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 label category. Based on the features of the noisy training data and the trusted data guidance in the trusted data queue, the label distribution of each noisy training data is calculated, including: Based on the tag category, the trusted data in the trusted data queue is grouped, with each group sharing the same tag category. The grouping result is as follows: ,in Indicates the total number of categories; Calculate the distance between the noisy training data and the reliable data of each group in the feature space to obtain the label distribution of the noisy training data, as shown below: , , in, Grouping Trusted data in Features Training data for noise Features Representing noise training data and grouping The distance between reliable data in the feature space Describing Noise Training Data Label distribution In category The amount on, For trusted data queues belonging to groups Total amount of data; Will Perform normalization processing; The label distribution threshold at the category level is adaptively adjusted based on the label distribution of noisy training data, including: The number of noisy training data whose maximum component corresponds to the same category as the actual labeled category and whose maximum component exceeds a preset threshold is counted. Based on the statistically valid noisy training data for each category, the label distribution threshold for each category is adaptively and dynamically adjusted as follows: , in, Indicates the previous round The maximum number of noisy training samples that meet the threshold condition. Indicates the previous round category The number of noisy training samples that meet the threshold condition. For the current round category The label distribution threshold, The preset threshold; Will Perform normalization processing; Based on the label distribution of noisy training data and the label distribution threshold at the category level, the noisy training data is divided into clean data subset, purified data subset and noisy data subset, 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 reliable data in the reliable data queue is updated; after iterative training, a trained classification model is obtained.
2. The robust classification method based on a category-adaptive dynamic label distribution threshold according to claim 1, characterized in that, The preheating training of the CNN model based on the noisy training dataset and the initialization of the trusted data queue include: A large amount of noisy dataset was obtained through web crawling and crowdsourcing to form a noisy training dataset; the noisy training dataset includes data whose label category matches the category to which the image belongs and data whose label category does not match the category to which the image belongs. Noisy training data is fed into the CNN model in batches for feature extraction, and the class probability distribution is predicted based on the learned feature vectors. Convert the given latent noise label into one-hot vector form, and calculate the cross-entropy loss between the one-hot vector form noise label and the predicted class probability distribution; The cross-entropy loss is backpropagated, and the parameters of the CNN model are updated using the stochastic gradient descent algorithm. In the final round of training during the warm-up phase, data with the minimum training loss is selected as reliable data according to the small loss selection criterion, initialized, and stored in the reliable data queue. The CNN model includes: A CNN encoder is used to extract features from the input; A fully connected layer is used to compress high-dimensional features into low-dimensional features; A softmax classifier for predicting the class of input data based on output features.
3. A robust classification method based on a category-adaptive dynamic label distribution threshold according to claim 2, characterized in that, The label distribution based on the noisy training data and the label distribution threshold at the category level divides the noisy training data into a clean data subset, a purified data subset, and a noisy data subset, including: If the class and label of the largest component in the label distribution of noisy training data are consistent, and the largest component in the label distribution is greater than the label distribution threshold of the corresponding class, then this data is assigned to the clean data subset. middle; If the class and label of the largest component in the label distribution of noisy training data are inconsistent, but the largest component in the label distribution is greater than the label distribution threshold of the corresponding class, then this data will be assigned to the cleaned data subset. middle; Remove subset and subsets The training data outside the noise data set was allocated to the noise data subset. middle.
4. A robust classification method based on a category-adaptive dynamic label distribution threshold according to claim 3, characterized in that, The method further includes: For clean subsets of data, the cross-entropy loss function is used; For the cleaned data subset, a generalized cross-entropy loss function is used; For the noisy subset of data, a data mixing approach is used to obtain the loss function, as follows: The data from the clean data subset, the purified data subset, and the noisy data subset are mixed to obtain a mixed dataset. The data label pairs in the mixed dataset are interpolated with another randomly sampled data label pair to generate new data label pairs. The cross-entropy loss function of the mixed dataset is calculated based on the new data label pairs.
5. A robust classification method based on a category-adaptive dynamic label distribution threshold according to claim 4, characterized in that, The step of updating the model parameters of the CNN model based on the total loss function and updating the reliable data in the reliable data queue includes: 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 backpropagation. According to the small loss screening criterion, a new batch of reliable data with the minimum loss function is selected from the clean data subset and stored in the reliable data queue, while the old reliable data in the queue is removed.
6. A robust classification device based on a category-adaptive dynamic label distribution threshold, characterized in that, The apparatus for implementing the robust classification method based on a category-adaptive dynamic label distribution threshold as described in any one of claims 1 to 5 includes: The classification model training module is used to train classification models; The prediction output module is used to predict the category based on the trained classification model. The classification model training module includes: The warm-up and initialization module is used to warm up and train the CNN model based on the noisy training dataset and initialize the reliable data queue, as well as extract features from all noisy training data based on the CNN model and output the category prediction results; the noisy training dataset consists of images and label category pairs, where the label category refers to the category to which the object in the image belongs. The noisy training dataset includes labels that are inconsistent with the category to which the image belongs, which are called noise labels; The 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 noisy training data based on the features of the noisy training data and the trusted data guidance in the trusted data queue. The 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 noisy training data; The noise label detection module is used to divide the noise training data into clean data subsets, purified data subsets, and noisy data subsets based on the label distribution of the noise training data and the label distribution threshold at the category level. An adaptive regularization learning module is used to apply different regularization strategies and loss functions to three data subsets; update the model parameters of the CNN model based on the total loss function, and update the reliable data in the reliable data queue; The loop control module is used to repeatedly 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, and a trained classification model is obtained.
7. A computer-readable storage medium for storing one or more programs, characterized in that, The one or more programs include instructions that, when executed by a computing device, cause the computing device to perform any of the methods according to claims 1 to 5.
8. 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, the one or more programs including instructions for performing any of the methods according to claims 1 to 5.