Model training method, apparatus and device, and storage medium and computer program product
Noise label samples are modeled through a deep learning network to generate a noise label detection model, which solves the problem of poor noise label detection effect in existing technologies and achieves more efficient noise label recognition and improved model robustness.
Patent Information
- Application Number
- PCT/CN2025/083444
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-25
- Filing Date
- 2025-03-19
- Publication Date
- 2025-10-02
AI Technical Summary
When processing noisy labels, existing technologies are unable to effectively detect and filter out noisy labels, resulting in a decrease in model prediction accuracy. In addition, robust training schemes fail to directly model noisy labels, resulting in poor detection results.
Noise label samples are modeled through a deep learning network, and a noise label detection model is trained separately. The noise label detection model is generated by using simulated data and label type sequences related to the classification model. The characteristics of the noise label samples in the classification model training process are learned to improve the detection robustness.
The effect of noise label detection has been improved, which can better identify and filter out noise labels, prevent model overfitting, and improve model robustness and prediction accuracy.
Smart Images

Figure CN2025083444_02102025_PF_FP_ABST
Abstract
Description
Model training method, device, equipment, storage medium and computer program product
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application is based on the Chinese patent application with application number 202410346106.0 and application date of March 25, 2024, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application in its entirety. Technical Field
[0003] The present application relates to the field of artificial intelligence technology, and in particular to a model training method, apparatus, device, storage medium, and computer program product. Background Art
[0004] The success of artificial intelligence (AI) relies heavily on large-scale, reliably labeled training data. Therefore, high-quality training data is crucial for model training. However, in practical applications, noisy labels (NL) are inevitable. NL refers to incorrect or abnormal labels in training data. NL can cause the model to learn incorrect patterns or regularities during training, reducing the accuracy of model predictions.
[0005] In order to reduce the impact of NL on the model, solutions in related technologies usually use robustness training to improve the model's tolerance to NL. However, the goal of these solutions is only to reduce the impact of NL and prevent model overfitting. They do not care whether NL can be screened out, or even cannot detect NL, that is, the NL detection effect is poor. Summary of the Invention
[0006] In order to solve the technical problems existing in the related art, the embodiments of the present application provide a model training method, device, equipment, storage medium and computer program product.
[0007] To achieve the above objectives, the technical solution of the embodiment of the present application is implemented as follows:
[0008] In a first aspect, an embodiment of the present application provides a model training method, the method comprising:
[0009] Acquire target training data, and train a classification model based on the target training data to obtain simulation data related to the classification model;
[0010] Get the tag type sequence;
[0011] Determining a first loss function based on the label type sequence and simulated data associated with the classification model;
[0012] The first loss function is used to update parameters of the first encoder network and parameters of the second encoder network until the loss value of the first loss function converges, thereby generating a noise label detection model.
[0013] In a second aspect, an embodiment of the present application further provides a model training device, the device comprising:
[0014] a first acquiring unit, configured to acquire target training data;
[0015] a first determining unit configured to train a classification model based on the target training data to obtain simulation data related to the classification model;
[0016] a second acquiring unit, configured to acquire a tag type sequence;
[0017] a second determining unit configured to determine a first loss function based on the label type sequence and simulated data related to the classification model;
[0018] The first generating unit is configured to update parameters of the first encoder network and parameters of the second encoder network using the first loss function until the loss value of the first loss function converges, thereby generating a noise label detection model.
[0019] In a third aspect, an embodiment of the present application further provides a model training device, comprising: a processor and a memory for storing a computer program that can be run on the processor;
[0020] In which, when the processor is used to run the computer program, it executes the steps of the model training method described in the embodiment of the present application.
[0021] In a fourth aspect, an embodiment of the present application further provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the model training method described in the embodiment of the present application are implemented.
[0022] In a fifth aspect, an embodiment of the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the model training method described in the embodiment of the present application.
[0023] The model training method, apparatus, device, storage medium and computer program product provided in the embodiment of the present application obtain target training data and train the classification model based on the target training data to obtain simulation data related to the classification model; obtain a label type sequence; determine a first loss function based on the label type sequence and the simulation data related to the classification model; use the first loss function to update the parameters of the first encoder network and the parameters of the second encoder network until the loss value of the first loss function converges to generate a noise label detection model. The model training method of the embodiment of the present application is adopted, and the noise label sample, that is, the target training data itself, is modeled by a deep learning network, and a noise label detection (NLD, Noisy Label Detection) model for noise label detection is trained separately. In the training process of the noise label detection model, the input data or loss value of the classification network is not used as training data, but the simulation data related to the classification model obtained by training the classification model based on the training sample containing the noise label is used as training data. In this way, the characteristics of the noise label sample and the clean label (CL, Clean Label) sample output during the classification model training process can be learned, and the robustness of the noise label detection model is improved, thereby greatly improving the detection effect of the noise label. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] FIG1 is a flow chart of a model training method according to an embodiment of the present application;
[0025] FIG2 is a second flow chart of the model training method according to an embodiment of the present application;
[0026] FIG3 is a third flow chart of the model training method according to an embodiment of the present application;
[0027] FIG4 is a flow chart of the data preparation phase according to an embodiment of the present application;
[0028] FIG5 is a flow chart of the noise label detection model training phase according to an embodiment of the present application;
[0029] FIG6 is a flow chart illustrating the practical application of the noise label detection model according to an embodiment of the present application;
[0030] FIG7 is a schematic diagram of the structure of a model training device according to an embodiment of the present application;
[0031] FIG8 is a schematic diagram of the hardware composition structure of the model training device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] The present application will be further described in detail below with reference to the accompanying drawings and embodiments.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application.
[0034] The success of artificial intelligence (AI) relies heavily on large-scale, reliably labeled training data. Therefore, high-quality training data is crucial for model training. However, in real-world applications, non-labeled data (NL) is unavoidable. NL refers to the presence of incorrect or anomalous labels in training data. For example, a photo of a dog may be incorrectly labeled as a wolf. This can be due to human error, data collection issues, or other reasons. Therefore, NL has a significant impact on models and can lead to bias. This means that the model learns incorrect patterns or regularities during training, significantly reducing the accuracy of its predictions.
[0035] For NL, the existing solution is generally to conduct robustness training, and reduce the impact of NL on the model through various means to make the model more tolerant to NL. The specific methods can be roughly divided into four categories: 1. Constructing a robust network architecture, such as adding a noise adaptive layer to learn the label transfer matrix, and co-teaching (a new deep learning paradigm used to resist label noise), that is, training two deep neural networks at the same time and cross-updating parameters to reduce model overfitting; 2. Regularization, including explicit regularization such as random inactivation (dropout) regularization, implicit regularization such as data augmentation, can improve the generalization ability of the model and reduce the overfitting of the model; 3. Designing a robust loss function, such as Sub-center ArcFace (Sub-center ArcFace ArcFace) is an improved ArcFace that allows multiple subcenters for each category by introducing additional subcenters. By relaxing the intra-class constraints through the subcenters, it can effectively improve the robustness of noisy labels. Among them, ArcFace is a face recognition loss function based on angular cosine. It maximizes the angular cosine value of samples in the same category and infers the angular cosine values of samples in different categories to a fixed interval to achieve optimization in face recognition tasks; 4. Sample selection, such as co-teaching, only selects a certain proportion of samples with small loss values to update the network. These samples are usually clean label samples.
[0036] For example, the meta-learning-based label noise monitoring method proposed in the related art uses a meta-network to screen noisy labels, where the input of the meta-network is the loss value and sample feature vector of the current classification network, and the output of the meta-network is the weight value for determining whether it is a noise label. The meta-network parameters are updated with the help of a small number of clean sample sets.
[0037] This shows that the related art solutions that use robustness training to improve the model's tolerance to NL do not directly detect NL, that is, they do not model NL, and therefore their NL detection capabilities are not strong enough. This is because these solutions only aim to reduce the impact of NL and prevent model overfitting, without paying attention to whether NL can be screened out, or even fail to detect NL (such as regularization methods), resulting in poor NL detection results.
[0038] Based on this, an embodiment of the present application proposes a model training method. In various embodiments of the present application, the noise label sample, that is, the target training data itself, is modeled through a deep learning network, and a noise label detection model for noise label detection is trained separately. In the training process of the noise label detection model, the input data or loss value of the classification network is not used as training data. Instead, the simulated data related to the classification model obtained by training the classification model based on the training samples containing noise labels is used as training data. In this way, the characteristics of the noise label samples and clean label samples output during the classification model training process can be learned, thereby improving the robustness of the noise label detection model and greatly improving the detection effect of the noise label.
[0039] The present application embodiment provides a model training method, which is applied to a model training device. FIG1 is a flow chart of the model training method according to the present application embodiment. As shown in FIG1 , the model training method includes:
[0040] Step 101: Obtain target training data, and train a classification model based on the target training data to obtain simulation data related to the classification model.
[0041] In an embodiment of the present application, the target training data is a training sample containing a certain proportion of noise labels, and the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; and the output result of the classification layer of the classification model.
[0042] In actual applications, the model training device uses clean label data to generate data with noisy labels, namely the target training data.
[0043] Based on this, in one embodiment, obtaining target training data includes: obtaining original training data; the original training data includes clean label samples, and the clean label samples represent training samples that do not contain noise labels; performing label noise processing on the original training data to obtain the target training data; the target training data represents training samples containing noise labels.
[0044] Here, by performing label noise addition in the clean label sample data, a training sample containing a noise label, i.e., the target training data, can be obtained. Specifically, the corresponding noise label is added to the clean label sample data according to the set noise addition ratio to obtain the target training data containing the noise label. The noise addition ratio can be understood as the proportion of the noise label in the target training data. It should be noted that the noise addition ratio can be pre-set according to actual needs. For example, the noise addition ratio can be set to 30%, which is not limited in the embodiment of the present application.
[0045] Here, the type of noise labels contained in the target training data is symmetric noise, for example, random noise labels or intra-class noise labels. The clean label sample data can be selected from public datasets for classification tasks, such as image recognition datasets or speech recognition datasets, which are not limited in this embodiment of the present application.
[0046] In actual application, the classification model is trained using training samples containing noise labels, namely target training data, to obtain the training features of the noise label detection model, namely simulated data related to the classification model. In this way, the model training device can use the simulated data related to the classification model as prior knowledge, combined with the label type sequence, and input it into the deep learning network to realize the training of the noise label detection model.
[0047] Based on this, in one embodiment, the classification model is trained based on the target training data to obtain simulation data related to the classification model, including: extracting features from the target training data to obtain a feature vector of the target training data; based on the feature vector of the target training data, using a second loss function to update the parameters of the classification model until the loss value of the second loss function converges to obtain simulation data related to the classification model; wherein the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; and the output result of the classification layer of the classification model.
[0048] Here, the classification model may include an input layer, an encoding layer and a fully connected layer, wherein the model training device inputs the target training data as input data into the classification model through the input layer, and then performs feature extraction on the target training data through the encoding layer, that is, the feature vector of the target training data is obtained by feature encoding the target training data, and then the feature vector of the target training data is classified through the fully connected layer to finally obtain a classification result, which is the classification result obtained by classifying the above-mentioned training samples containing noise labels.
[0049] Here, the error value is determined based on the training results, the training samples containing noise labels (i.e., the feature vectors of the target training data) and the preset loss function (i.e., the second loss function). When the error value is within the preset threshold range, the classification model is determined to converge, that is, the loss value of the second loss function converges; when the error value is not within the preset threshold range, the model parameters in the classification model are adjusted or updated until the error value reaches the preset threshold range, and the classification model is determined to converge, that is, the loss value of the second loss function converges, thereby obtaining simulation data related to the classification model.
[0050] In an embodiment of the present application, the classification layer output result of the classification model may be a classification result obtained by classifying the feature vector of the target training data through a fully connected layer, wherein the fully connected layer is the classification layer, specifically the softmax layer.
[0051] It should be noted that there are multiple options for the network framework of the classification model, as long as it is a model with classification function, such as the residual neural network (ResNet)34, the more mainstream deep neural network model for voiceprint recognition (ECAPA-TDNN, Emphasized Channel Attention Propagation and Aggregation-Time Delay Neural Network), etc., are all included in the scope of protection of this application.
[0052] Step 102: Obtain a tag type sequence.
[0053] In actual application, the model training device can obtain a label type sequence by converting the label type of each target training sample.
[0054] Based on this, in one embodiment, obtaining the label type sequence includes: determining the label type of the target training data; the target training data is obtained by performing label noise processing on the original training data, and the original training data includes clean label samples; performing sequence conversion on the label type of the target training data to obtain the label type sequence.
[0055] Here, the label type of the target training data includes one of the following: noise label type; clean label type; wherein, a clean label means that the label of the sample is correct. In practical applications, the noise label type can be represented by 1, the clean label type can be represented by 0, and the label type of the target training data can be represented by 1. The value of can be expressed by the following formula (1):
[0056] Where i represents the number of the target training sample; Indicates the sample’s label; y i Represents the true classification label of the sample.
[0057] It should be noted that the label type sequence is a sequence with a value of 0 or 1. The label type of the target training data can be calculated by the following formula (2): Perform sequence conversion to obtain label type sequence
[0058] Among them, the tag type sequence The length is E, e represents the current training round number (epoch), m represents the number of iterations of the current iteration, i represents the i-th sample, and the label type sequence It includes multiple elements, express The e-th element of the sequence is simply understood as the clean label sample The elements of the sequence are all 0, and the noise label samples If the previous element in the sequence If it is 1, all subsequent elements are 1, otherwise it is determined by the sequence function R The sequence is either 0 or 1.
[0059] Here, the probability of the sequence function R is determined by the accuracy (Acc) of the classification model of the current iteration, where the value of the sequence function R can be 0 or 1. The probability of the sequence function R can be calculated by the following formulas (3) and (4):
[0060] in, It represents the probability that the sequence function R takes the value of 1 when the i-th sample is iterated for the m-th time; It represents the probability that the sequence function R takes the value of 0 when the i-th sample is iterated for the m-th time; It represents the accuracy of the classification model corresponding to the mth iteration of the i-th sample; m represents the number of iterations of the current iteration.
[0061] Step 103: Determine a first loss function based on the label type sequence and the simulated data related to the classification model.
[0062] In actual application, the model training device inputs the label type sequence and simulated data related to the classification model into a deep learning network (wherein the deep learning network includes a first encoder network and a second encoder network) to obtain corresponding feature information, namely label features and data features, and then determines a first loss function based on the obtained label features and data features. In this way, considering that the features of noise labels are multidimensional, and even some dimensional features are implicit, using deep learning to determine whether it is a noise label can better explore the implicit features of noise labels.
[0063] Based on this, in one embodiment, determining the first loss function based on the label type sequence and the simulated data related to the classification model includes: inputting the label type sequence into the first encoder network to obtain corresponding label features; inputting the simulated data related to the classification model into the second encoder network to obtain corresponding data features; and determining the first loss function based on the label features and the data features.
[0064] In an embodiment of the present application, the first encoder network can be a label encoder network, and the second encoder network can be a feature encoder network. Specifically, after obtaining the label type of each target training sample, the model training device first converts the label type of each target training sample to obtain a label type sequence, and then uses the label type sequence as input data to input into the label encoder network, and performs feature extraction (i.e., feature encoding) on the label type sequence through the encoding layer of the label encoder network to obtain label features corresponding to the label type sequence; similarly, after obtaining simulation data related to the classification model, such as the number of iterations of each iteration of the classification model, the accuracy of the classification model, and the output result of the classification layer of the classification model, the model training device first splices the number of iterations of each iteration of the classification model, the accuracy of the classification model, and the output result of the classification layer of the classification model to obtain spliced simulation data, and then uses the spliced simulation data as input data to input into the feature encoder network, and performs feature extraction on the spliced simulation data through the encoding layer of the feature encoder network to obtain data features corresponding to the spliced simulation data.
[0065] In practical applications, for the number of iterations of the classification model in each iteration of the input data of the feature encoder network, it is usually necessary to positionally encode the number of iterations of the classification model in each iteration, and then fuse the position features obtained by position encoding with the accuracy of the classification model and the output results of the classification layer of the classification model, that is, splicing, to obtain the spliced simulated data.
[0066] Based on this, in one embodiment, the simulation data related to the classification model is input into the second encoder network to obtain corresponding data features, including: when the simulation data related to the classification model includes the number of iterations of each iteration of the classification model, the number of iterations of each iteration of the classification model is positionally encoded to obtain corresponding position features; the position features, the accuracy of the classification model and the output result of the classification layer of the classification model are spliced to obtain spliced simulation data; and the spliced simulation data is input into the second encoder network to obtain corresponding data features.
[0067] It should be noted that the first encoder network and the second encoder network can be a deep learning model (transformer model) based on the attention mechanism, or a recurrent neural network (RNN), which is not limited in this embodiment of the present application. Here, the output of the first encoder network is associated with the historical label, and the output of the second encoder network is associated with the current data features and the historical data features.
[0068] In one embodiment, determining the first loss function based on the label features and the data features includes: inputting the label features and the data features into a joint network to obtain a first prediction result output by the joint network; the first prediction result represents a fusion feature of the label features and the data features; and determining the first loss function based on the first prediction result and the label type sequence.
[0069] Here, the joint network is used to perform feature fusion on the label features and data features. In actual application, after obtaining the output results of the first encoder network and the output results of the second encoder network, namely the label features and the data features, the model training device fuses these two features through the joint network to obtain a fused feature. The fused feature is input into an activation function, such as a Sigmoid function, to obtain a correct probability calculated by using the activation function for the fused feature. The correct probability is then combined with the label type sequence to determine a corresponding loss function, namely the first loss function.
[0070] Step 104: Use the first loss function to update the parameters of the first encoder network and the parameters of the second encoder network until the loss value of the first loss function converges, thereby generating a noise label detection model.
[0071] Here, the network framework of the noise label detection model can adopt a transformer-transducer structure or a recurrent neural network transformer (RNN-T, Recurrent Neural Network-Transducer) structure, which is not limited in the embodiments of the present application.
[0072] In actual application, the data used by the noise label detection model in modeling is the output result of the classification layer of the classification model, the number of iterations of each iteration of the classification model and the accuracy of the classification model, rather than the classification task data itself. It can be seen that the noise label detection model learns the common characteristics of noise labels in the classification model training process through a deep learning network, and does not rely on a single threshold. Therefore, the solution of obtaining a noise label detection model using the model training method of this application has cross-task, cross-model and cross-data universality.
[0073] In the actual application stage, real data containing noise labels can be used to train the classification model, and noise label detection can be performed during the classification model training process. That is, the trained noise label detection model can be used for streaming detection to screen out noise label samples.
[0074] Based on this, in one embodiment, after the noise label detection model is generated, the method further includes: obtaining classification task data to be detected; the classification task data to be detected includes one or more category label samples; training the classification model based on the classification task data to be detected, and generating simulation data related to the classification model corresponding to each training round; inputting the simulation data related to the classification model corresponding to each training round into the noise label detection model to obtain a second prediction result; the second prediction result represents the probability of each category label sample being judged as a noise label in the corresponding training round; based on the second prediction result, detecting the noise label from the classification task data to be detected.
[0075] In the embodiment of the present application, the classification task data includes image classification data, audio classification data, text classification data, etc., which are not limited here. The encoder of the noise label detection model can adopt a network framework such as a transformer, RNN or a long short-term memory unit (LSTM) model, and the decoder of the noise label detection model can adopt a transducer, streaming decoding, and the output result depends on historical information, making full use of the information in the entire training process and reducing the dependence on the threshold. Specifically, the classification task data to be detected containing noise labels is input into the classification model. During the training process of the classification model, the simulation data related to the classification model generated in each training round (epoch), such as the number of iterations of the classification model, the accuracy of the classification model, and the output result of the classification layer (softmax layer) of the classification model, are used as the input data of the noise label detection model to obtain the probability of the category label sample being judged as a noise label in each epoch, that is, the second prediction result. Moreover, the probability of the noise label of each epoch also depends on the probability of the noise label of the historical epoch. In this way, the noise label detection method of streaming decoding is adopted, considering the characteristics of multiple nodes and multiple dimensions, that is, the probability of the noise labels of all historical epochs, and making full use of the information in the entire training process to improve the accuracy of noise label detection.
[0076] In one embodiment, based on the second prediction result, detecting a noise label from the classification task data to be detected includes: comparing the second prediction result with a probability threshold to obtain a comparison result; when the comparison result indicates that the second prediction result is greater than the probability threshold, determining that the category label sample corresponding to the second prediction result greater than the probability threshold is a noise label.
[0077] Since the noise label may be judged as a clean label in the subsequent epoch and the model is updated. In actual tests, it can be found that the range of variation of the loss value of the noise label in different epochs may be very large. In some epochs, the loss value can even be comparable to that of the clean label (i.e., the loss value is very small). If the noise label is not screened out in time, the loss of the noise label sample will fluctuate to a smaller value, and it will be treated as a clean label to update the model parameters, causing the model to overfit the noise label, making it more difficult to distinguish it from the noise label, and falling into a vicious cycle. Therefore, it is extremely important to screen out the noise label as early as possible and prevent it from updating the model parameters. However, the related art fails to screen out possible noise labels as early as possible. For this reason, in the model training method of the present application, once a category label sample is judged as a noise label in a certain training round, the noise label is immediately screened out, that is, the noise label is moved from the update data set to the screened data set. After that, only the data in the update data set is used to update the model parameters during the training process, and the data in the screened data set does not participate in the process of updating the model parameters.
[0078] Based on this, in one embodiment, the method further includes: determining whether the probability of the category label sample being judged as a noise label in the target training round is greater than a probability threshold; if the probability of the category label sample being judged as a noise label in the target training round is greater than the probability threshold, screening out the category label sample trained in the target training round.
[0079] Here, the probability threshold can be pre-set according to actual needs, such as setting the probability threshold to 0.8, which is not limited in the embodiment of the present application.
[0080] For example, assuming the probability threshold is 0.8, when it is determined that the probability of a category label sample being judged as a noise label in a certain training round, that is, the target training round, is greater than 0.8, then the category label sample can be determined to be a noise label sample. Then, the noise label sample is screened out, and in subsequent training rounds, the noise label sample will no longer be used to update the model parameters, thereby achieving the purpose of real-time screening of noise labels.
[0081] The present application also provides another model training method, which is applied to a model training device. FIG2 is a second flow chart of the model training method of the present application embodiment. As shown in FIG2 , the model training method includes:
[0082] Step 201: Obtain target training data.
[0083] In an embodiment of the present application, the target training data is used to characterize training samples containing noise labels.
[0084] In one embodiment, obtaining target training data includes: obtaining original training data; the original training data includes clean label samples, and the clean label samples represent training samples that do not contain noise labels; and performing label noise processing on the original training data to obtain the target training data.
[0085] Step 202: Train the classification model based on the target training data to obtain simulation data related to the classification model.
[0086] In one embodiment, the classification model is trained based on the target training data to obtain simulation data related to the classification model, including: extracting features from the target training data to obtain a feature vector of the target training data; based on the feature vector of the target training data, updating the parameters of the classification model using a second loss function until the loss value of the second loss function converges to obtain simulation data related to the classification model; wherein the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; and the output result of the classification layer of the classification model.
[0087] Step 203: Obtain a tag type sequence.
[0088] In one embodiment, obtaining the label type sequence includes: determining the label type of the target training data; the target training data is obtained by performing label noise processing on the original training data, and the original training data includes clean label samples; performing sequence conversion on the label type of the target training data to obtain the label type sequence.
[0089] Step 204: Input the label type sequence into the first encoder network to obtain corresponding label features.
[0090] In an embodiment of the present application, the first encoder network may be a label encoder network, the first encoder network may be a transformer model, or may be an RNN, which is not limited here.
[0091] Step 205: Input the simulated data related to the classification model into the second encoder network to obtain corresponding data features.
[0092] In an embodiment of the present application, the second encoder network may be a feature encoder network, the second encoder network may be a transformer model, or may be an RNN, which is not limited here.
[0093] In one embodiment, the analog data related to the classification model is input into a second encoder network to obtain corresponding data features, including: when the analog data related to the classification model includes the number of iterations of each iteration of the classification model, position encoding the number of iterations of each iteration of the classification model to obtain corresponding position features; splicing the position features, the accuracy of the classification model and the classification layer output result of the classification model to obtain spliced analog data; and inputting the spliced analog data into the second encoder network to obtain corresponding data features.
[0094] Step 206: Input the label features and the data features into the joint network to obtain a first prediction result output by the joint network.
[0095] In an embodiment of the present application, the first prediction result represents a fusion feature of the label feature and the data feature.
[0096] Step 207: Determine a first loss function based on the first prediction result and the label type sequence.
[0097] Step 208: Use the first loss function to update the parameters of the first encoder network and the parameters of the second encoder network until the loss value of the first loss function converges, thereby generating a noise label detection model.
[0098] The present application also provides another model training method, which is applied to a model training device. FIG3 is a flow chart of the model training method according to the present application. As shown in FIG3 , the model training method includes:
[0099] Step 301: Obtain target training data.
[0100] In an embodiment of the present application, the target training data is used to characterize training samples containing noise labels.
[0101] In one embodiment, obtaining target training data includes: obtaining original training data; the original training data includes clean label samples, and the clean label samples represent training samples that do not contain noise labels; and performing label noise processing on the original training data to obtain the target training data.
[0102] Step 302: Train the classification model based on the target training data to obtain simulation data related to the classification model.
[0103] In one embodiment, the classification model is trained based on the target training data to obtain simulation data related to the classification model, including: extracting features from the target training data to obtain a feature vector of the target training data; based on the feature vector of the target training data, updating the parameters of the classification model using a second loss function until the loss value of the second loss function converges to obtain simulation data related to the classification model; wherein the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; and the output result of the classification layer of the classification model.
[0104] Step 303: Obtain a tag type sequence.
[0105] In one embodiment, obtaining the label type sequence includes: determining the label type of the target training data; the target training data is obtained by performing label noise processing on the original training data, and the original training data includes clean label samples; performing sequence conversion on the label type of the target training data to obtain the label type sequence.
[0106] Step 304: Input the label type sequence into the first encoder network to obtain corresponding label features.
[0107] In an embodiment of the present application, the first encoder network may be a label encoder network, the first encoder network may be a transformer model, or may be an RNN, which is not limited here.
[0108] Step 305: Input the simulated data related to the classification model into the second encoder network to obtain corresponding data features.
[0109] In an embodiment of the present application, the second encoder network may be a feature encoder network, the second encoder network may be a transformer model, or may be an RNN, which is not limited here.
[0110] In one embodiment, the analog data related to the classification model is input into a second encoder network to obtain corresponding data features, including: when the analog data related to the classification model includes the number of iterations of each iteration of the classification model, position encoding the number of iterations of each iteration of the classification model to obtain corresponding position features; splicing the position features, the accuracy of the classification model and the classification layer output result of the classification model to obtain spliced analog data; and inputting the spliced analog data into the second encoder network to obtain corresponding data features.
[0111] Step 306: Input the label features and the data features into the joint network to obtain a first prediction result output by the joint network.
[0112] In an embodiment of the present application, the first prediction result represents a fusion feature of the label feature and the data feature.
[0113] Step 307: Determine a first loss function based on the first prediction result and the label type sequence.
[0114] Step 308: Use the first loss function to update the parameters of the first encoder network and the parameters of the second encoder network until the loss value of the first loss function converges, thereby generating a noise label detection model.
[0115] Step 309: Acquire the classification task data to be detected, and train the classification model based on the classification task data to be detected, and generate simulation data related to the classification model corresponding to each training round.
[0116] In an embodiment of the present application, the classification task data to be detected includes one or more category label samples, and the classification task data includes image classification data, audio classification data, text classification data, etc., which are not limited here.
[0117] Step 310: Input the simulation data related to the classification model corresponding to each training round into the noise label detection model to obtain a second prediction result, and based on the second prediction result, detect the noise label from the classification task data to be detected.
[0118] In an embodiment of the present application, the second prediction result represents the probability that each category label sample is determined to be a noise label in the corresponding training round.
[0119] In one embodiment, based on the second prediction result, detecting a noise label from the classification task data to be detected includes: comparing the second prediction result with a probability threshold to obtain a comparison result; when the comparison result indicates that the second prediction result is greater than the probability threshold, determining that the category label sample corresponding to the second prediction result greater than the probability threshold is a noise label.
[0120] By adopting the technical solution of the embodiment of the present application, the noise label sample, that is, the target training data itself, is modeled through a deep learning network, and a noise label detection model for noise label detection is trained separately. In the training process of the noise label detection model, the input data or loss value of the classification network is not used as training data. Instead, the classification model is trained based on the training samples containing noise labels. The simulated data related to the classification model is used as training data. In this way, the characteristics of the noise label samples and the clean label samples output during the classification model training process can be learned, the robustness of the noise label detection model is improved, and the detection effect of the noise label is greatly improved.
[0121] The present application is described below in conjunction with application examples.
[0122] Most solutions in related technologies improve the model's tolerance to NL through robustness training, but most of them have the following disadvantages:
[0123] 1. They do not directly detect or model NL, so their NL detection capabilities are insufficient. Most solutions simply aim to reduce the impact of NL and prevent model overfitting, without worrying about whether they can screen out NL, or even fail to detect NL.
[0124] 2. Most solutions screen NL using a single-node, single-dimensional threshold. For example, based on the loss value of the current epoch, some data with small loss values is retained to update the model. Since the current epoch is a single node, the results of previous nodes (epochs) are not considered. However, throughout the entire training process, NL samples have distinct characteristics. For example, the model typically prioritizes fitting CL samples, as evidenced by a significant decrease in the loss of CL samples in the early stages of training, while the loss of NL samples only gradually decreases in the later stages of training after the model overfits. Therefore, it is also important to consider the multi-node (epoch) characteristics of the entire training process. Judging NL solely by the size of the loss is a single dimension, but in fact, NL characteristics are multidimensional. For example, in addition to the loss value itself, the range of variation across different epochs is also an important feature, and the range of variation of NL is generally larger than that of CL. In addition, single-dimensional thresholds are difficult to determine and are highly sensitive. If the training data does not match, the effect is often poor.
[0125] 3. Determining NL only by explicit features. Similar to the discussion of a single dimension in the second point above, the characteristics of NL are multi-dimensional, and even some dimensional features are implicit and difficult to summarize manually.
[0126] 4. Failure to promptly screen out potential NLs. NLs may be misclassified as CLs in subsequent epochs, leading to model parameter updates. Actual testing has shown that the range of NL loss values can vary significantly across epochs, even reaching comparable values in some epochs. If NLs are not promptly screened out, the loss of NL samples will fluctuate to smaller values, leading to misclassification as CLs and model parameter updates. This can cause the model to overfit to NLs, making it increasingly difficult to distinguish them from NLs, creating a vicious cycle. Therefore, it is crucial to promptly screen out NLs and prevent them from updating model parameters.
[0127] 5. Low versatility. Most solutions have low versatility. Changing the data or applying it to a different classification task often results in poor results. This is especially true for threshold-sensitive solutions. Changing the data or application scenario requires resetting the threshold, and finding the right threshold is often difficult. Furthermore, different classification tasks, such as image and speech, have different training features. Therefore, the threshold for image classification is not suitable for speech classification.
[0128] In response to the above technical problems, this application proposes the following solutions:
[0129] 1. From the fundamental point of view, with the goal of detecting and filtering out NL, a separate NLD model is trained. When training the classification model, the trained NLD model is used to filter out NL.
[0130] 2. Multi-node (all historical epochs) and multi-dimensionality reduce threshold dependency. The NLD model's encoder uses a network framework such as transformer, RNN, or LSTM. The NLD model's decoder uses a transducer for streaming decoding. The output relies on historical information, fully utilizing information from the entire training process and reducing reliance on thresholds.
[0131] 3. Support implicit features. Using deep learning to determine whether it is NL can better discover the implicit features of NL.
[0132] 4. Screen out NL as early as possible. Using streaming decoding, once a sample is judged to be NL in a certain epoch, the sample data is immediately moved from the update set to the filter set. After that, only the data in the update set is used to update the model parameters, and the data in the filter set is not involved in the update of the model parameters.
[0133] 5. High versatility. The data used in NL modeling is the softmax layer output of the classification task, not the classification task data itself. The NLD model uses deep learning to learn the common features of NL in the classification model training process. It does not rely on a single threshold and is therefore versatile across tasks, models, and data.
[0134] The technical solution process of this application can be mainly divided into three stages: the first stage is the data preparation stage, that is, obtaining the training data containing NL (corresponding to the aforementioned target training data) and the training features of the NLD model (corresponding to the aforementioned simulation data related to the classification model); the second stage is the NLD model training stage, that is, using simulation data to train the NLD model; the third stage is the actual application stage, that is, using real NL data (corresponding to the aforementioned classification task data to be detected) to train the classification model, and using the trained NLD model for flow detection to screen out NL samples. The processes of these three stages are described in detail below.
[0135] Phase 1: Data Preparation
[0136] FIG4 is a flow chart of the data preparation stage of an embodiment of the present application. As shown in FIG4 , in this stage, CL data is first acquired, and then label noise processing is performed on the CL data to generate data containing a certain proportion of NL, that is, data containing NL is generated, and the label type of each sample is obtained. Next, we use the data containing NL to train the classification model and obtain simulation data related to the classification model, such as the number of iterations m of each iteration of the classification model, the accuracy of the classification model Acc, and the output result of the softmax layer of the classification model. The simulation data related to these classification models are saved as input to the NLD model.
[0137] Here, the NL types in the generated data containing NL are symmetric noise (such as random NL and intra-class NL), that is, the probability of the sample being converted to other labels is equal, and its conversion probability P can be expressed by the following formula (5):
[0138] Where i and j represent the sample numbers, i and j are two different samples; η represents the proportion of NL in the generated data containing NL, which can usually be 1% to 30%; c represents the number of categories; Indicates the sample’s label; y i and y j Represent the true classification labels corresponding to sample i and sample j respectively.
[0139] In classification model training, E and e represent the total number of training rounds (epochs) and the current epoch number, respectively, while M and m represent the total number of training iterations and the current iteration number, respectively, and N is the total number of samples. Each training run with the number of data samples (batch size) captured during training is considered an iteration, and an epoch contains multiple iterations. The relationship between M and E can be expressed by the following formula (6):
[0140] in, Round down, that is, the number of iterations for each epoch. Rounding down is because the remaining samples are less than batchsize and are discarded.
[0141] This data preparation phase is repeated multiple times to generate large batches of data. Parameters such as the classification dataset, classification model, and the non-learning (NL) ratio η can be varied. Even without these parameters, the generated NL samples are random. The classification dataset can be selected from publicly available datasets for classification tasks, such as image recognition datasets like VGG-Face, MS-Celeb-1M, and MNIST, or speech datasets like VoxCeleb and CN-Celeb. There are also a variety of classification model frameworks to choose from, such as Resnet34 and ECAPA-TDNN. Using a variety of data, classification tasks, classification models, and NL ratios to generate target training data can improve the robustness of the NLD model.
[0142] Phase 2: NLD model training phase
[0143] This stage uses the data generated in the first stage, that is, the simulated data related to the label type sequence and the classification model to train the NLD model. FIG5 is a flow chart of the noise label detection model training stage of the embodiment of the present application. As shown in FIG5, first, the label type needs to be Convert to a tag type sequence Is a sequence of length E and value 0 or 1. Its conversion method is shown in the above formula (2), where e and m are the current epoch number and iteration number, i represents the i-th sample, represent The e-th element of the sequence. Simply put, the CL sample The sequence is all 0, NL sample If the previous element in the sequence is 1, all subsequent elements are 1, otherwise it is determined by the sequence function R The sequence is 0 or 1, and the value of R is affected by the Acc of the current iteration. The probability of the specific value of R can be calculated using the above formulas (3) and (4).
[0144] Next, the simulated data related to the classification model saved in the first stage: m, Acc and Spliced into feature X, as the input of the feature encoder, the output of the feature encoder is obtained h FE , where m can also be position-encoded to obtain the corresponding position features, and then the position features are combined with Acc and Concatenate to form feature X, the position encoding is the same as that in transformer, see formula (7). As the input of the label encoder, the output of the label encoder h is obtained LE . Among them, the feature encoder and label encoder can be transformer or RNN. Then, the output of the label encoder and the output of the feature encoder are combined to generate J through the joint network, as shown in formula (8). Among them, the output of the feature encoder is combined with the current feature (X e ) and historical characteristics (X 1 ,X 2 ,...X e-1 ), and the label encoder output is related to the historical label Related.
[0145] Here, formulas (7) and (8) can be expressed as:
[0146] in, represents the position encoding of sample i when the number of iterations is m; d represents the dimension of the hidden layer of the model; k represents the dimension index of the position encoding.
[0147] in, Represents the fusion features of label features and data features generated by the joint network; Indicates the current feature; Respectively represent historical characteristics; Represent historical labels respectively; Linear represents linear operation.
[0148] The output of the NLD model is a binary classification (i.e., yes / no is NL), so the Sigmoid function is selected, see formula (9), where, represents the correct probability of the e-th element in the prediction sequence of sample i. In formula (10), P(z i x i ) represents the accuracy of the entire sequence prediction for sample i, which is equal to the cumulative accuracy of each element. The loss function loss (corresponding to the first loss function mentioned above) can be obtained by formula (11). Specifically, it is obtained by summing the negative logarithms of the prediction accuracy of all sample sequences in the batch of data (n samples).
[0149] Here, formulas (9), (10) and (11) can be expressed as:
[0150] It should be noted that the meaning of each parameter in formulas (9), (10) and (11) can be understood by referring to the meaning of the same parameters above, and will not be repeated here.
[0151] The third stage: practical application of NLD model
[0152] This stage uses the NLD model trained in the second stage to detect NL samples in the actual training data (corresponding to the aforementioned classification task data to be detected). The detection process is streaming and is performed during the classification model training process. Figure 6 is a flow chart of the actual application stage of the noise label detection model of the embodiment of the present application. As shown in Figure 6, the data containing NL is input into the classification model. During the training process of the classification model, the softmax layer output result of the classification model generated by each epoch is The NLD model uses the number of iterations (m) and the classification model's accuracy (Acc) as inputs to determine the probability y of a sample being classified as NL in that epoch. The y value for each epoch also depends on the y value in previous epochs. If y for a sample in a particular epoch is greater than 0.8, there is sufficient evidence to identify it as NL. In subsequent epochs, this sample is no longer used to update model parameters, thereby eliminating NL samples.
[0153] Compared with the solutions of the related art, the solution of this application has the following beneficial effects:
[0154] 1. NL is directly modeled through a deep learning network. The training data is not the input data of the classification network, nor the loss value, but the output softmax layer data, the number of iterations of each model iteration, and the accuracy of the classification model. This can learn the output characteristics of NL and CL samples during the classification network training process, and the NLD effect is better.
[0155] 2. The network architecture of the NLD model uses transformer-transducer or RNN-T. The judgment of whether each epoch is NL also depends on the historical value, which can make full use of the information in the entire training process.
[0156] 3. Deep learning can learn more implicit features and can determine NL through multi-dimensional features with minimal dependence on thresholds.
[0157] 4. In actual applications, streaming decoding is used. There is no need to wait until training is completed to determine NL. NL can be detected in real time during classification training, and NL can be screened out as early as possible to prevent NL overfitting.
[0158] 5. High versatility. The training data for the simulated NLD model itself comes from multiple tasks, multiple models, and multiple datasets. The NLD model itself also has the universal characteristics of the learned NL and CL samples in classification training, so the NLD model is universal.
[0159] In order to implement the model training method of the embodiment of the present application, the embodiment of the present application further provides a model training device. FIG7 is a schematic diagram of the structure of the model training device of the embodiment of the present application. As shown in FIG7 , the model training device includes:
[0160] A first acquiring unit 71 is configured to acquire target training data;
[0161] A first determining unit 72 is configured to train the classification model based on the target training data to obtain simulation data related to the classification model;
[0162] A second acquiring unit 73 is configured to acquire a tag type sequence;
[0163] A second determining unit 74 is configured to determine a first loss function based on the label type sequence and the simulated data related to the classification model;
[0164] The first generating unit 75 is configured to update the parameters of the first encoder network and the parameters of the second encoder network using the first loss function until the loss value of the first loss function converges, thereby generating a noise label detection model.
[0165] In one embodiment, the first acquiring unit 71 is configured to:
[0166] Obtain original training data; the original training data includes clean label samples, and the clean label samples represent training samples without noise labels; perform label noise processing on the original training data to obtain the target training data; the target training data represents training samples containing noise labels.
[0167] In one embodiment, the first determining unit 72 is configured to:
[0168] Feature extraction is performed on the target training data to obtain a feature vector of the target training data; based on the feature vector of the target training data, the parameters of the classification model are updated using a second loss function until the loss value of the second loss function converges, thereby obtaining simulation data related to the classification model; wherein the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; and the output result of the classification layer of the classification model.
[0169] In one embodiment, the second obtaining unit 73 is configured to:
[0170] Determine the label type of the target training data; the target training data is obtained by performing label noise processing on the original training data, and the original training data includes clean label samples; perform sequence conversion on the label type of the target training data to obtain the label type sequence.
[0171] In one embodiment, the second determining unit 74 includes: a first determining subunit, a second determining subunit and a third determining subunit; wherein,
[0172] The first determining subunit is configured to input the label type sequence into the first encoder network to obtain corresponding label features;
[0173] The second determining subunit is configured to input the simulated data related to the classification model into the second encoder network to obtain corresponding data features;
[0174] The third determining subunit is configured to determine the first loss function based on the label feature and the data feature.
[0175] In one embodiment, the third determining subunit is configured as follows:
[0176] The label features and the data features are input into a joint network to obtain a first prediction result output by the joint network; the first prediction result represents a fusion feature of the label features and the data features; and the first loss function is determined based on the first prediction result and the label type sequence.
[0177] In one embodiment, the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; the output result of the classification layer of the classification model;
[0178] The second determining subunit is configured as follows:
[0179] When the simulation data related to the classification model includes the number of iterations of each iteration of the classification model, the number of iterations of each iteration of the classification model is positionally encoded to obtain corresponding position features; the position features, the accuracy of the classification model and the classification layer output results of the classification model are spliced to obtain spliced simulation data; the spliced simulation data is input into the second encoder network to obtain corresponding data features.
[0180] In one embodiment, the model training device further includes: a third acquisition unit, a second generation unit, a third determination unit and a detection unit; wherein,
[0181] The third acquisition unit is configured to acquire classification task data to be detected after the first generation unit 75 generates the noise label detection model; the classification task data to be detected includes one or more category label samples;
[0182] The second generating unit is configured to train the classification model based on the classification task data to be detected, and generate simulation data related to the classification model corresponding to each training round;
[0183] The third determination unit is configured to input the simulated data related to the classification model corresponding to each training round into the noise label detection model to obtain a second prediction result; the second prediction result represents the probability that each class label sample is determined to be a noise label in the corresponding training round;
[0184] The detection unit is configured to detect a noise label from the classification task data to be detected based on the second prediction result.
[0185] In one embodiment, the model training device further includes: a fourth determination unit and a screening unit; wherein,
[0186] The fourth determining unit is configured to determine whether the probability of the class label sample being determined as a noise label in the target training round is greater than a probability threshold;
[0187] The screening unit is configured to screen out the category label samples trained in the target training round if the probability that the category label samples are determined to be noise labels in the target training round is greater than the probability threshold.
[0188] In one embodiment, the detection unit is configured as follows:
[0189] The second prediction result is compared with the probability threshold to obtain a comparison result; when the comparison result indicates that the second prediction result is greater than the probability threshold, the category label sample corresponding to the second prediction result greater than the probability threshold is determined to be a noise label.
[0190] In actual application, the first acquisition unit 71 and the second acquisition unit 73 can be implemented by the communication interface in the model training device; the first determination unit 72, the second determination unit 74 and the first generation unit 75 can be implemented by the processor in the model training device.
[0191] It should be noted that the model training device provided in the above embodiment only uses the division of the above program modules as an example when performing model training. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the model training device provided in the above embodiment and the model training method embodiment are of the same concept. The specific implementation process is detailed in the model training method embodiment and will not be repeated here.
[0192] Based on the hardware implementation of the above program modules, and in order to implement the model training method of the embodiment of the present application, the embodiment of the present application further provides a model training device. FIG8 is a schematic diagram of the hardware composition structure of the model training device of the embodiment of the present application. As shown in FIG8 , the model training device 80 includes:
[0193] Communication interface 81, capable of exchanging information with other devices;
[0194] The processor 82 is connected to the communication interface 81 to realize information interaction with other devices, and is used to execute the model training method provided above when running a computer program, and the computer program is stored in the memory 83.
[0195] Specifically, the communication interface 81 is configured to obtain target training data;
[0196] The processor 82 is configured to train the classification model based on the target training data to obtain simulation data related to the classification model;
[0197] The communication interface 81 is further configured to obtain a tag type sequence;
[0198] The processor 82 is further configured to determine a first loss function based on the label type sequence and the simulated data related to the classification model; use the first loss function to update the parameters of the first encoder network and the parameters of the second encoder network until the loss value of the first loss function converges, thereby generating a noise label detection model.
[0199] In one embodiment, the communication interface 81 is configured as follows:
[0200] Obtain original training data; the original training data includes clean label samples, and the clean label samples represent training samples without noise labels; perform label noise processing on the original training data to obtain the target training data; the target training data represents training samples containing noise labels.
[0201] In one embodiment, the processor 82 is configured to:
[0202] Feature extraction is performed on the target training data to obtain a feature vector of the target training data; based on the feature vector of the target training data, the parameters of the classification model are updated using a second loss function until the loss value of the second loss function converges, thereby obtaining simulation data related to the classification model; wherein the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; and the output result of the classification layer of the classification model.
[0203] In another embodiment, the communication interface 81 is configured as follows:
[0204] Determine the label type of the target training data; the target training data is obtained by performing label noise processing on the original training data, and the original training data includes clean label samples; perform sequence conversion on the label type of the target training data to obtain the label type sequence.
[0205] In another embodiment, the processor 82 is configured to:
[0206] Inputting the label type sequence into the first encoder network to obtain corresponding label features; inputting the simulated data related to the classification model into the second encoder network to obtain corresponding data features; and determining the first loss function based on the label features and the data features.
[0207] In another embodiment, the processor 82 is configured to:
[0208] The label features and the data features are input into a joint network to obtain a first prediction result output by the joint network; the first prediction result represents a fusion feature of the label features and the data features; and the first loss function is determined based on the first prediction result and the label type sequence.
[0209] In another embodiment, the simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; the classification layer output result of the classification model; the processor 82 is configured to:
[0210] When the simulation data related to the classification model includes the number of iterations of each iteration of the classification model, the number of iterations of each iteration of the classification model is positionally encoded to obtain corresponding position features; the position features, the accuracy of the classification model and the classification layer output results of the classification model are spliced to obtain spliced simulation data; the spliced simulation data is input into the second encoder network to obtain corresponding data features.
[0211] In one embodiment, the communication interface 81 is further configured to obtain classification task data to be detected after the processor 82 generates the noise label detection model; the classification task data to be detected includes one or more category label samples;
[0212] The processor 82 is further configured to train the classification model based on the classification task data to be detected, and generate simulation data related to the classification model corresponding to each training round; input the simulation data related to the classification model corresponding to each training round into the noise label detection model to obtain a second prediction result; the second prediction result represents the probability of each category label sample being judged as a noise label in the corresponding training round; based on the second prediction result, the noise label is detected from the classification task data to be detected.
[0213] In one embodiment, the processor 82 is further configured to:
[0214] Determine whether the probability of the class label sample being determined as a noise label in the target training round is greater than a probability threshold; if the probability of the class label sample being determined as a noise label in the target training round is greater than the probability threshold, screen out the class label sample trained in the target training round.
[0215] In one embodiment, the processor 82 is configured to:
[0216] The second prediction result is compared with the probability threshold to obtain a comparison result; when the comparison result indicates that the second prediction result is greater than the probability threshold, the category label sample corresponding to the second prediction result greater than the probability threshold is determined to be a noise label.
[0217] It should be noted that the specific processing process of the communication interface 81 and the processor 82 can be understood by referring to the above-mentioned model training method.
[0218] Of course, in actual application, the various components in the model training device 80 are coupled together via a bus system 84. It will be appreciated that the bus system 84 is used to enable communication between these components. In addition to the data bus, the bus system 84 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in FIG8 , all of these buses are labeled as the bus system 84.
[0219] The memory 83 in the embodiment of the present application is used to store various types of data to support the operation of the model training device 80. Examples of such data include: any computer program used to operate on the model training device 80.
[0220] The model training method disclosed in the above-mentioned embodiment of the present application can be applied to the processor 82 or implemented by the processor 82. The processor 82 may be an integrated circuit chip with signal processing capabilities. During the implementation process, the various steps of the above-mentioned model training method can be completed by the hardware integrated logic circuit or software instructions in the processor 82. The above-mentioned processor 82 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 82 can implement or execute the various model training methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the model training method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor for execution, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 83. The processor 82 reads the information in the memory 83 and completes the steps of the above-mentioned model training method in combination with its hardware.
[0221] In an exemplary embodiment, the model training device 80 can be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned model training method.
[0222] It can be understood that the memory 83 of the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a magnetic disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 83 described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
[0223] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 83 storing a computer program. The computer program can be executed by a processor 82 in a model training device 80 to complete the steps of the model training method described in the embodiment of the present application. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.
[0224] In an exemplary embodiment, the present application also provides a computer program product, including a computer program, which can be executed by the processor 82 in the model training device 80 to complete the steps of the model training method described in the aforementioned embodiment of the present application.
[0225] It should be noted that: "first", "second", "third", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0226] In addition, the technical solutions described in the embodiments of the present application can be arbitrarily combined without conflict.
[0227] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A model training method, comprising: Acquire target training data, and train a classification model based on the target training data to obtain simulation data related to the classification model; Get the tag type sequence; Determining a first loss function based on the label type sequence and simulated data associated with the classification model; The first loss function is used to update parameters of the first encoder network and parameters of the second encoder network until the loss value of the first loss function converges, thereby generating a noise label detection model.
2. The method according to claim 1, wherein The acquiring target training data includes: Obtaining original training data; the original training data includes clean label samples, and the clean label samples represent training samples without noise labels; The original training data is subjected to label noise processing to obtain the target training data; the target training data represents the training samples containing noise labels.
3. The method according to claim 1, wherein The training of the classification model based on the target training data to obtain simulation data related to the classification model includes: Performing feature extraction on the target training data to obtain a feature vector of the target training data; Based on the feature vector of the target training data, using a second loss function to update the parameters of the classification model until the loss value of the second loss function converges, thereby obtaining simulation data related to the classification model; The simulation data related to the classification model includes one or more of the following parameters: The number of iterations of each iteration of the classification model; the accuracy of the classification model; and the output result of the classification layer of the classification model.
4. The method according to claim 1, wherein The step of obtaining a tag type sequence includes: Determining a label type of the target training data; the target training data is obtained by performing label noise processing on original training data, and the original training data includes clean label samples; Perform sequence conversion on the label types of the target training data to obtain the label type sequence.
5. The method according to claim 1, wherein The determining of a first loss function based on the simulated data related to the label type sequence and the classification model includes: Inputting the label type sequence into the first encoder network to obtain corresponding label features; Inputting simulated data related to the classification model into the second encoder network to obtain corresponding data features; The first loss function is determined based on the label feature and the data feature.
6. The method according to claim 5, wherein: The determining the first loss function based on the label feature and the data feature includes: Inputting the label feature and the data feature into a joint network to obtain a first prediction result output by the joint network; the first prediction result represents a fusion feature of the label feature and the data feature; Determine the first loss function based on the first prediction result and the label type sequence.
7. The method according to claim 5, wherein: The simulation data related to the classification model includes one or more of the following parameters: the number of iterations of each iteration of the classification model; the accuracy of the classification model; The classification layer output result of the classification model; The step of inputting the simulated data related to the classification model into the second encoder network to obtain corresponding data features includes: In a case where the simulation data related to the classification model includes the number of iterations of each iteration of the classification model, position encoding the number of iterations of each iteration of the classification model is performed to obtain corresponding position features; splicing the position features, the accuracy of the classification model, and the classification layer output result of the classification model to obtain spliced simulation data; The spliced analog data is input into the second encoder network to obtain corresponding data features.
8. The method according to claim 1, wherein After generating the noise label detection model, the method further includes: Acquire classification task data to be detected; the classification task data to be detected includes one or more category label samples; Training the classification model based on the classification task data to be detected, and generating simulation data related to the classification model corresponding to each training round; Inputting the simulated data related to the classification model corresponding to each training round into the noise label detection model to obtain a second prediction result; the second prediction result represents the probability that each class label sample is determined to be a noise label in the corresponding training round; Based on the second prediction result, a noise label is detected from the classification task data to be detected.
9. The method according to claim 8, wherein The method further comprises: Determine whether the probability of a class label sample being judged as a noise label under the target training round is greater than a probability threshold; When the probability that the class label sample is determined to be a noise label in the target training round is greater than the probability threshold, the class label sample trained in the target training round is screened out.
10. The method according to claim 8, wherein The detecting a noise label from the classification task data to be detected based on the second prediction result includes: Comparing the second prediction result with a probability threshold to obtain a comparison result; When the comparison result indicates that the second prediction result is greater than the probability threshold, it is determined that the category label sample corresponding to the second prediction result greater than the probability threshold is a noise label.
11. A model training device, comprising: a first acquiring unit, configured to acquire target training data; a first determining unit configured to train a classification model based on the target training data to obtain simulation data related to the classification model; a second acquiring unit, configured to acquire a tag type sequence; a second determining unit configured to determine a first loss function based on the label type sequence and simulated data related to the classification model; The first generating unit is configured to update parameters of the first encoder network and parameters of the second encoder network using the first loss function until the loss value of the first loss function converges, thereby generating a noise label detection model.
12. A model training device comprising: a processor and a memory for storing a computer program capable of running on said processor; Wherein, when the processor is used to run the computer program, it executes the steps of the method according to any one of claims 1 to 10.
13. A storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.
14. A computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Feature extraction model processing method and device, sample retrieval method and device and computer equipment
CN114358188A
Model training method and device, storage medium and electronic equipment
CN114424253A
Noise sample identification method and device
CN116229196A
Model training method and device, equipment, storage medium and computer program product
CN118797432A
Method and apparatus with label noise processing
US20230252771A1
Cited By
Image classification model training method and device and image classification method and device
CN120953735A
Physical guidance enhanced multiple unknown dynamic load positioning method, equipment and product
CN121744059A