A model training method and related device

Through the two initial models that are collaboratively learned during the model training process, the training sample set is resampled and processed to generate the target business model, which solves the problem of the impact of noise data in multi-label classification, and achieves model performance improvement and applicable scenario expansion.

CN115423031BActive Publication Date: 2024-10-25TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202211144567.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-20
Publication Date
2024-10-25
Estimated Expiration
2042-09-20

AI Technical Summary

Technical Problem

Existing co-teaching solutions are only suitable for classification and recognition tasks and cannot be applied to multi-label classification. During the training process, only samples with large losses are used as noise data, resulting in poor model performance.

Method used

The two initial models perform collaborative learning during the model training process, guide each other, resample and process the training sample set, and generate a target business model to suppress noise data, which is suitable for multi-label classification scenarios.

Benefits of technology

It effectively suppresses the impact of noisy data on model performance in multi-label classification services, expands applicable scenarios, and automatically implements label annotation of unlabeled data, saving labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115423031B_ABST
    Figure CN115423031B_ABST
Patent Text Reader

Abstract

The present application discloses a method for model training and related devices to suppress noise data and improve the performance of the model in multi-label classification business. The method can be applied to various scenarios such as cloud technology, artificial intelligence, smart transportation, and Internet of Vehicles. The model training method includes: obtaining an initial training sample set; processing each initial training sample based on a first initial model and a second initial model to obtain a first data feature and a second data feature; resampling the initial training sample set based on the first data feature and the second data feature to obtain a first training sample set and a second training sample set; updating the model parameters of the first initial model based on the second training sample set to obtain a first target model, and updating the model parameters of the second initial model based on the first training sample set to obtain a second target model; selecting a target business model, and the target business model is used to identify and process multi-label tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and specifically to a model training method and related devices. Background Art

[0002] Noisy learning is a sub-field of deep learning, which mainly studies how to identify noise data in a dataset and enable the model to obtain better performance on the noisy dataset. In the related scheme, a co-teaching training method is mainly proposed to reduce the impact of noise data on the model in classification recognition tasks. Specifically, the model performs gradient calculation and back propagation during the training process, and then discards samples with large loss in each batch, that is, filters out noise samples.

[0003] However, the existing co-teaching scheme can only be applied to classification recognition tasks, and cannot be applied to multi-label classification recognition tasks, resulting in limited application scenarios. In addition, during the training process, the co-teaching scheme only uses samples with large losses as noise data, while other noise data will also affect the recognition effect of the trained model on the classification recognition task, resulting in poor performance of the model. Summary of the invention

[0004] The embodiments of the present application provide a model training method and related devices, which enable two initial models to learn collaboratively and guide each other during the model training process, so as to suppress all noise data, solve the problem that the model is easily affected by noise data in multi-label classification business, resulting in performance degradation, and can also be applied to scenarios such as multi-label classification, expanding the applicable scenarios.

[0005] In the first aspect, an embodiment of the present application provides a method for model training. The method includes: obtaining an initial training sample set, the initial training sample set including multiple initial training samples; performing feature extraction processing on each initial training sample based on a first initial model to obtain a first data feature of each initial training sample, and performing feature extraction processing on each initial training sample based on a second initial model to obtain a second data feature of each initial training sample; resampling the initial training sample set based on the first data feature of each initial training sample to obtain a first training sample set, and resampling the initial training sample set based on the second data feature of each initial training sample to obtain a second training sample set; updating and adjusting the model parameters of the first initial model based on the second training sample set to obtain a first target model, and updating and adjusting the model parameters of the second initial model based on the first training sample set to obtain a second target model; selecting a target business model from the first target model and the second target model, and the target business model is used to perform recognition processing on multi-label tasks.

[0006] In the second aspect, an embodiment of the present application provides a method for multi-label classification. The method includes: obtaining a data set to be classified, the data set to be classified includes at least one data to be classified; performing multi-label recognition processing on each data to be classified in at least one data to be classified based on the target business model, and obtaining a label classification result for each data to be classified, and the label classification result is used to indicate the label classification status of the corresponding data to be classified; wherein the target business model is a model selected from a first target model and a second target model, the first target model is obtained by updating and adjusting the model parameters of a first initial model based on a second training sample set, the second target model is obtained by updating and adjusting the model parameters of a second initial model based on a first training sample set, the first training sample set is obtained by resampling the initial training sample set based on the first data feature of each initial training sample, and the second training sample set is obtained by resampling the initial training sample set based on the second data feature of each initial training sample.

[0007] In a third aspect, an embodiment of the present application provides a multi-label classification device. The multi-label classification device includes an acquisition unit and a processing unit. The acquisition unit is used to acquire an initial training sample set, and the initial training sample set includes multiple initial training samples. The processing unit is used to: perform feature extraction processing on each initial training sample based on the first initial model to obtain the first data feature of each initial training sample, and perform feature extraction processing on each initial training sample based on the second initial model to obtain the second data feature of each initial training sample; resample the initial training sample set based on the first data feature of each initial training sample to obtain the first training sample set, and resample the initial training sample set based on the second data feature of each initial training sample to obtain the second training sample set; update and adjust the model parameters of the first initial model based on the second training sample set to obtain the first target model, and update and adjust the model parameters of the second initial model based on the first training sample set to obtain the second target model; select a target business model from the first target model and the second target model, and the target business model is used to perform recognition processing on the multi-label task.

[0008] In some optional examples, the processing unit is used to: calculate a first sampling probability of the corresponding initial training sample based on the first data feature of each initial training sample; sample the initial training sample set based on the first sampling probability to obtain a first sample set after sampling; and perform MixUp processing on the initial training sample set and the first sample set after sampling to obtain a first training sample set.

[0009] In some other optional examples, the processing unit is used to: perform weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th first sample in the first sample set after sampling to obtain a first input sample, where i, j≥1, and i, j are integers; perform weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th first sample to obtain a first expected label; and generate a first training sample set based on the first input sample and the first expected label.

[0010] In other optional examples, the processing unit is used to: calculate the second sampling probability of the corresponding initial training sample based on the second data feature of each initial training sample; sample the initial training sample set based on the second sampling probability to obtain a sampled second sample set; and perform MixUp processing on the initial training sample set and the sampled second sample set to obtain a second training sample set.

[0011] In some other optional examples, the processing unit is used to: perform weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th second sample in the sampled second sample set to obtain a second input sample; perform weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th second sample to obtain a second expected label; and generate a second training sample set based on the second input sample and the second expected label.

[0012] In other optional examples, the processing unit is used to: perform label prediction on each initial training sample based on the first initial model to obtain a first predicted label for each initial training sample; and calculate a first data feature of each initial training sample based on the first predicted label of each initial training sample and the first labeled label of the corresponding initial training sample.

[0013] In some other optional examples, the processing unit is used to: calculate the average absolute value of the difference between the confidence of the first predicted label of each initial training sample and the true value of the first labeled label; and use the average absolute value as the first data feature of the corresponding initial training sample.

[0014] In some other optional examples, the processing unit is used to: calculate the maximum absolute value of the difference between the confidence of the first predicted label of each initial training sample and the true value of the first labeled label; and use the maximum value as the first data feature of the corresponding initial training sample.

[0015] In other optional examples, the processing unit is used to: perform calculations based on a preset learning rate and a second training sample set to obtain a first value; calculate the difference between an initial weight of the first initial model and the first value to obtain an updated weight of the first initial model; and update and adjust the model parameters of the first initial model based on the updated weight of the first initial model to obtain a first target model.

[0016] The fourth aspect of the embodiment of the present application provides a multi-label classification device, including: a memory, an input / output (I / O) interface and a memory. The memory is used to store program instructions. The processor is used to execute the program instructions in the memory to execute the model training method corresponding to the implementation method of the first aspect above; or execute the multi-label classification method corresponding to the implementation method of the second aspect above.

[0017] The fifth aspect of the embodiments of the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the method corresponding to the implementation method of the first aspect above; or execute the multi-label classification method corresponding to the implementation method of the second aspect above.

[0018] The sixth aspect of the embodiments of the present application provides a computer program product comprising instructions, which, when executed on a computer or a processor, enables the computer or the processor to execute the method corresponding to the implementation of the first aspect; or to execute the multi-label classification method corresponding to the implementation of the second aspect.

[0019] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0020] In an embodiment of the present application, after obtaining the initial training sample set, each initial training sample in the initial training sample set can be input into the first initial model, and the first initial model is used to extract features from each initial training sample to obtain the first data features corresponding to each initial training sample. Similarly, each initial training sample in the initial training sample set is input into the second initial model, and the second initial model is used to extract features from each initial training sample to obtain the second data features corresponding to each initial training sample. The initial training sample set is resampled by the first data feature and the second data feature of each training sample, respectively, so as to obtain the first training sample set and the second training sample set. Then, the first training sample set is used as the training data of the second initial model, and the second training sample set is used as the training data of the first initial model, so as to respectively train the corresponding second target model and the first target model, and then select the model with better performance from the first target model and the second target model as the target business model, and then the multi-label task is identified by the target business model. Through the above method, the training sample sets obtained by resampling the respective initial models are used as the training data of the other initial model, so that the two initial models can collaboratively learn and guide each other during the model training process, so as to suppress all noise data, solve the problem that the model is easily affected by noise data in the multi-label classification business, resulting in performance degradation, and can also be applied to scenarios such as multi-label classification, expanding the applicable scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A schematic diagram of the structure of the model training provided by the existing solution is shown;

[0023] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present application is shown;

[0024] Figure 3 A schematic diagram of the process framework of the model training provided in the embodiment of the present application is shown;

[0025] Figure 4 A flow chart of the model training method provided in an embodiment of the present application is shown;

[0026] Figure 5 A resampling process flow chart provided in an embodiment of the present application is shown;

[0027] Figure 6 A schematic diagram of the process of multi-label classification provided by an embodiment of the present application is shown;

[0028] Figure 7 A schematic diagram of the structure of a multi-label classification device provided in an embodiment of the present application is shown;

[0029] Figure 8 A schematic diagram of the hardware structure of a multi-label classification device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] The embodiments of the present application provide a model training method and related devices, which enable two initial models to learn collaboratively and guide each other during the model training process, so as to suppress all noise data, solve the problem that the model is easily affected by noise data in multi-label classification business, resulting in performance degradation, and can also be applied to scenarios such as multi-label classification, expanding the applicable scenarios.

[0031] It is understandable that in the specific implementation of this application, related data such as user information and user personal data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] The code processing method provided in the embodiment of the present application is implemented based on artificial intelligence (AI). Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.

[0035] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0036] In the embodiments of the present application, the artificial intelligence technologies mainly involved include the above-mentioned machine learning and other directions. For example, it may involve deep learning in machine learning (ML), including artificial neural networks and the like.

[0037] The model training method provided in this application can be applied to multi-label classification devices with data processing capabilities, such as terminal devices, servers, etc. Among them, terminal devices may include but are not limited to smart phones, desktop computers, laptops, tablet computers, smart speakers, vehicle-mounted devices, smart watches, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and cloud servers for basic cloud computing services such as big data and artificial intelligence platforms, etc., which are not specifically limited in this application. In addition, the terminal devices and servers mentioned can be directly connected or indirectly connected by wired communication or wireless communication, which are not specifically limited in this application.

[0038] The multi-label classification device mentioned above can have machine learning capabilities. Machine learning is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include technologies such as neural networks.

[0039] See also Figure 1 , which shows a schematic diagram of the structure of the model training provided by the existing solution. Figure 1 As shown in the figure, in the co-teaching scheme proposed, in the process of training each batch of training data in the training data set through two models (such as model A and model B), both models need to rely on the training samples selected by the other model in the previous batch for gradient calculation and back propagation, and directly regard the samples with larger loss in each batch as potential noise samples. However, the existing co-teaching scheme can only be applied to classification and recognition tasks, and cannot be directly applied to multi-label classification and recognition tasks. Moreover, during the training process, the co-teaching only regards samples with larger loss as noise data, and filters out the noise data with larger loss, while other noise data will also affect the recognition effect of the trained model in the classification and recognition task, resulting in poor performance of the model.

[0040] Therefore, the embodiment of the present application provides a model training method and a multi-label classification method. The model training method and the multi-label classification method can be applied Figure 2 In the business scenario shown. Figure 2 The following is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 2 As shown, for the newly added label classification requirements, unlabeled business data can be collected first, and then manually labeled through the DCF system to obtain manually labeled label data. At this time, after the manually labeled label data is trained through the model, the unlabeled business data can be subjected to multi-label classification and recognition processing based on the trained model, thereby automatically realizing machine-based labeling of unlabeled business data, thereby replacing manual labeling, thereby saving corresponding labor costs. Exemplarily, the model training method provided in the embodiment of the present application is mainly used in Figure 2 In the model training process, it can not only effectively improve the recognition results of multi-label classification trained on noisy data sets and improve model performance, but also can be applied to scenarios such as multi-label classification, expanding the usage scenarios.

[0041] For example, for Figure 2 The model training process provided by the embodiment of the present application is shown in FIG. Figure 3 The process framework schematic diagram is shown for understanding. Figure 3 The schematic diagram of the process structure of the model training provided in the embodiment of the present application is shown. Figure 3 As shown, after obtaining the training data set, the training data set can be divided into at least two batches of training sample sets. For each batch of training sample sets, the training sample set can be input into the first initial model, and the first initial model is used to extract features of each training sample in the training sample set to obtain the first data features corresponding to each training sample. Then, the corresponding probability distribution is calculated based on the first data features of each training sample, and then the training sample set is resampled based on the probability distribution to obtain the sampled first sample set. Furthermore, the sampled first sample set and the training sample set are mixed-up to obtain the final training data set, that is, the first training sample set.

[0042] Similarly, for each batch of training sample sets, the training sample sets can also be input into the second initial model, and the second initial model is used to extract features from each training sample in the training sample set to obtain the second data features corresponding to each training sample. Then, the corresponding probability distribution is calculated through the second data features of each training sample, and then resampled from the training sample set through the probability distribution to obtain the sampled second sample set. Furthermore, the sampled second sample set and the training sample set are mixed-up to obtain the final training data set, that is, the second training sample set.

[0043] In this way, the first training sample set is used as the training data of the second initial model, and the second training sample set is used as the training data of the first initial model, so as to respectively train the corresponding second target model and the first target model. A model with better performance is selected from the first target model and the second target model as the target business model, and then the multi-label task is identified and processed by the target business model. In the above manner, the training sample sets obtained by resampling the respective initial models are used as the training data of the other party's initial model, so that the two initial models can learn collaboratively and guide each other during the model training process, so as to achieve the suppression of noise data, solve the problem that the model is easily affected by noise data in the multi-label classification business, resulting in performance degradation, and can also be applied to scenarios such as multi-label classification, expanding the applicable scenarios. Moreover, the labeling of unlabeled business data based on machines is automatically realized, so as to replace manual labeling, thereby saving corresponding labor costs.

[0044] It should be noted that the model structure of the first initial model and the model structure of the second initial model described may be the same or different, and no specific limitation is given in the embodiments of the present application. In addition, when the model structure of the first initial model and the model structure of the second initial model are the same, different weights may be set for initializing the first initial model and the second initial model.

[0045] In addition, the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, Internet of Vehicles, assisted driving and other fields. The execution subject of the method for executing model training described may include but is not limited to servers, terminal devices, etc. Terminal devices may include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, aircraft, etc.

[0046] In order to facilitate understanding of the technical solution of the present application, the following describes the solution of the present application starting from the model training method. Figure 4 A flow chart of the model training method provided in the embodiment of the present application is shown. Figure 4 As shown, the model training method may include the following steps:

[0047] 401. Obtain an initial training sample set, where the initial training sample set includes multiple initial training samples.

[0048] In this example, before performing model training, a training data set can be obtained first. Then, the training data set is randomly divided into at least two batches of initial training sample sets, and each batch of initial training sample sets includes multiple initial training samples. Exemplarily, the initial training sample set may also include an annotation label for each initial training sample. The described annotation labels may include, but are not limited to, "sad", "touching", "funny", "inspirational", "sweet", etc. in the video application scenario, which are not limited in the embodiments of the present application.

[0049] 402. Perform feature extraction processing on each initial training sample based on the first initial model to obtain a first data feature of each initial training sample, and perform feature extraction processing on each initial training sample based on the second initial model to obtain a second data feature of each initial training sample.

[0050] In this example, the model structure of the first initial model and the model structure of the second initial model described may be the same or different, and no specific limitation is given in the embodiments of the present application. In addition, when the model structure of the first initial model and the model structure of the second initial model are the same, different weights may be set for initializing the first initial model and the second initial model.

[0051] The first initial model described may include but is not limited to resnet and mobilenet in convolutional neural networks (CNN), and may also include vision transformer, swintransformer, etc., which are not limited in the embodiments of the present application. The second initial model described may also include but is not limited to resnet and mobilenet in CNN, and may also include vision transformer, swintransformer, etc.

[0052] In some examples, feature extraction processing is performed on each initial training sample based on the first initial model to obtain the first data feature of each initial training sample, which can be achieved in the following manner, namely: first, label prediction is performed on each initial training sample based on the first initial model to obtain the first predicted label of each initial training sample; then, the first data feature of each initial training sample is calculated based on the first predicted label of each initial training sample and the first annotated label of the corresponding initial training sample. Exemplarily, in the process of calculating the first data feature of each initial training sample based on the first predicted label of each initial training sample and the first annotated label of the corresponding initial training sample, it can be calculated by a variety of methods, such as the following two calculation methods:

[0053] Method 1: First calculate the average absolute value of the difference between the confidence of the first predicted label of each initial training sample and the true value of the first labeled label. The specific formula used is as follows: Among them, i represents the initial training sample set The i-th initial training sample in , k means that each initial training sample has k labels, r means the r-th label among these k labels, q r represents the confidence of the rth first predicted label, l r Represents the true value of the rth first annotation label. Then, after calculating the average absolute value, the average absolute value is used as the first data feature of the corresponding initial training sample. It should be noted that i, r, k ≥ 1, and i, r, k are all integers.

[0054] Method 2: First calculate the maximum absolute value of the difference between the confidence of the first predicted label of each initial training sample and the true value of the first labeled label. The specific formula used is as follows: Among them, i represents the initial training sample set The i-th initial training sample in , k means that each initial training sample has k labels, r means the r-th label among these k labels, q r represents the confidence of the rth first predicted label, l r Represents the true value of the rth first annotation label. Then, after calculating the maximum value, the maximum value is directly used as the first data feature of the corresponding initial training sample.

[0055] It should be noted that the first data feature described above can indicate the difference between the predicted label and the labeled label of the corresponding initial training sample. In addition to using the two methods described above to calculate the first data feature of the initial training sample, other methods can also be used in actual applications, which are not limited in the embodiments of the present application.

[0056] In addition, the process of performing feature extraction processing on each initial training sample based on the second initial model to obtain the second data feature of each initial training sample can also be understood with reference to the aforementioned process of determining the first data feature. Exemplarily, the process of performing feature extraction processing on each initial training sample based on the second initial model to obtain the second data feature of each initial training sample can be implemented in the following manner, namely: first, label prediction is performed on each initial training sample based on the second initial model to obtain the second predicted label of each initial training sample; then, the second data feature of each initial training sample is calculated based on the second predicted label of each initial training sample and the second annotated label of the corresponding initial training sample. Exemplarily, in the process of calculating the second data feature of each initial training sample based on the second predicted label of each initial training sample and the second annotated label of the corresponding initial training sample, it can be calculated by a variety of methods, such as the following two calculation methods:

[0057] Method ①: First calculate the average absolute value of the difference between the confidence of the second predicted label of each initial training sample and the true value of the second labeled label. The specific formula used is as follows: Among them, i represents the initial training sample set The i-th initial training sample in , k means that each initial training sample has k labels, r means the r-th label among these k labels, q r represents the confidence of the rth second predicted label, l r Represents the true value of the rth second annotation label. Then, after the average absolute value is calculated, the average absolute value is used as the second data feature of the corresponding initial training sample.

[0058] Method ②: First calculate the maximum absolute value of the difference between the confidence of the second predicted label of each initial training sample and the true value of the second labeled label. The specific formula used is as follows: Among them, i represents the initial training sample set The i-th initial training sample in , k means that each initial training sample has k labels, r means the r-th label among these k labels, q r represents the confidence of the rth second predicted label, l r Represents the true value of the rth second annotation label. Then, after calculating the maximum value, the maximum value is directly used as the second data feature of the corresponding initial training sample.

[0059] It should be noted that the second data feature described above can indicate the difference between the predicted label and the labeled label of the corresponding initial training sample. In addition to using the two methods described above to calculate the second data feature of the initial training sample, other methods can also be used in actual applications, which are not limited in the embodiments of the present application.

[0060] 403. Resample the initial training sample set based on the first data feature of each initial training sample to obtain a first training sample set, and resample the initial training sample set based on the second data feature of each initial training sample to obtain a second training sample set.

[0061] In this example, after extracting the first data feature of each initial training sample, the initial training sample set can be resampled according to the first data feature of each initial training sample to obtain the first training sample set.

[0062] For example, the specific process of resampling the initial training sample set according to the first data feature in step 403 can be referred to as follows: Figure 5 The processing flow diagram shown in the figure can be understood. Figure 5 As shown, the processing flow includes at least the following steps:

[0063] S501: Calculate a first sampling probability of a corresponding initial training sample based on a first data feature of each initial training sample.

[0064] In this example, after the first data feature of each initial training sample is calculated in step 402, the first data features of all initial training samples can be summed, and the ratio of the first data feature of each initial training sample to the total can be calculated, so as to calculate the first sampling probability of each initial training sample, that is, Among them, p i It represents the sampling probability of the i-th initial training sample in the initial training sample set. It should be noted that in the initial training sample set, the sum of the sampling probabilities of all initial training samples is 1.

[0065] S502: Sample the initial training sample set based on a first sampling probability to obtain a sampled first sample set.

[0066] In this example, after calculating the first sampling probability of each initial training sample, the first sampling probability can be multiplied by the total number of initial training samples in the initial training sample set to sample the first data set after sampling. It should be noted that if the number of samples in the first data set after sampling is k, the first data set after sampling can be sampled independently k times, and the number of training samples in the first sample set obtained by the final sampling is consistent with the number of initial training samples in the initial training sample set.

[0067] S503: MixUp the initial training sample set and the first sample set after sampling to obtain the first training sample set.

[0068] In this example, since the MixUp technology can avoid the fitting of the first initial model and the second initial model during the training process, which may cause deviation in the sampling results, after obtaining the first sample set after sampling, the first training sample set can be obtained by performing MixUp processing on the initial training sample set and the first sample set after sampling.

[0069] Exemplarily, the process of MixUp processing the initial training sample set and the first sample set after sampling can be implemented in the following manner, namely: firstly, weighted sum processing is performed on the i-th initial training sample in the initial training sample set and the j-th sample in the first sample set after sampling to obtain the first input sample Right now Among them, x i represents the i-th initial training sample in the initial training sample set, x j represents the jth sample in the first sample set after sampling, λ is an adjustable value, and 0≤λ≤1.

[0070] Similarly, the label corresponding to the i-th initial training sample and the label of the j-th first sample are weighted and summed to obtain the first expected label Right now Among them, y i represents the label corresponding to the i-th initial training sample, y j represents the label of the jth first sample.

[0071] In this way, after the first input sample and the first expected label are calculated, the first training sample set can be generated according to the first input sample and the first expected label.

[0072] Similarly, after extracting the second data feature of each initial training sample, the initial training sample set is resampled according to the second data feature of each initial training sample to obtain the second training sample set. Exemplarily, the resampling of the initial training sample set based on the second data feature of each initial training sample to obtain the second training sample set includes: calculating the second sampling probability of the corresponding initial training sample based on the second data feature of each initial training sample; sampling the initial training sample set based on the second sampling probability to obtain the sampled second sample set; MixUp processing the initial training sample set and the sampled second sample set to obtain the second training sample set. In addition, the process of MixUp processing the initial training sample set and the sampled second sample set to obtain the second training sample set can also be implemented in the following manner, namely: weighted summing the i-th initial training sample in the initial training sample set and the j-th second sample in the sampled second sample set to obtain the second input sample; weighted summing the label corresponding to the i-th initial training sample and the label of the j-th second sample to obtain the second expected label; generating the second training sample set based on the second input sample and the second expected label.

[0073] It should be noted that how to sample and obtain the second training sample set in the embodiment of the present application can be specifically referred to the aforementioned Figure 5 The process of sampling the first training sample set shown in FIG. 1 can be understood for reference only and will not be described in detail here.

[0074] 404. Update and adjust the model parameters of the first initial model based on the second training sample set to obtain a first target model, and update and adjust the model parameters of the second initial model based on the first training sample set to obtain a second target model.

[0075] In this example, after resampling to obtain the second training sample set, the first initial model can be trained by the second training sample set, so as to update and adjust the model parameters of the first initial model. Exemplarily, the first value can be obtained by calculating and processing according to the preset learning rate and the second training sample set, that is, represents the second training sample set, η is the learning rate, f1 is the first initial model, Then, the difference between the initial weight of the first initial model and the first value is calculated to obtain the updated weight of the first initial model, that is: Among them, w″ 1 is the update weight of the first initial model, w 1is the initial weight of the first initial model. In this way, after the update weight of the first initial model is obtained, the model parameters of the first initial model can be updated and adjusted according to the update weight of the first initial model to obtain the first target model.

[0076] Similarly, after resampling to obtain the first training sample set, the second initial model can be trained by the first training sample set, so as to update and adjust the model parameters of the second initial model. Exemplarily, the second value can be obtained by calculating and processing according to the preset learning rate and the first training sample set, that is, represents the first training sample set, η is the learning rate, f2 is the second initial model, is the gradient value. Then, the difference between the initial weight of the second initial model and the second value is calculated to obtain the updated weight of the second initial model, that is; Among them, w″ 2 is the update weight of the second initial model, w 1 is the initial weight of the second initial model. In this way, after the update weight of the second initial model is obtained, the model parameters of the second initial model can be updated and adjusted according to the update weight of the second initial model to obtain the second target model.

[0077] 405. Select a target business model from the first target model and the second target model, where the target business model is used to perform recognition processing on the multi-label task.

[0078] In this example, after the first target model and the second target model are trained, the target business model can be selected from the first target model and the second model. Exemplarily, the model performance of the first target model is calculated by obtaining a test sample set and performing multi-label classification processing on the test sample set through the first target model. Similarly, the model performance of the second target model is calculated by performing multi-label classification processing on the test sample set through the second target model. Further, based on the model performance of the first target model and the model performance of the second target model, the target business model is selected from the first target model and the second target model. For example, if the model performance of the first target model is better than the model performance of the second target model, the first target model is selected as the target business model; conversely, if the model performance of the second target model is better than the model performance of the first target model, the second target model is selected as the target business model.

[0079] In this way, after determining the target business model, the multi-label classification task processing can be performed through the target business model. The multi-label classification task processing described includes but is not limited to application in video scenarios, image classification scenarios, text classification scenarios, speech classification scenarios, etc., and is not specifically limited in the embodiments of this application.

[0080] In an embodiment of the present application, after obtaining the initial training sample set, each initial training sample in the initial training sample set can be input into the first initial model, and the first initial model is used to extract features from each initial training sample to obtain the first data features corresponding to each initial training sample. Similarly, each initial training sample in the initial training sample set is input into the second initial model, and the second initial model is used to extract features from each initial training sample to obtain the second data features corresponding to each initial training sample. The initial training sample set is resampled by the first data feature and the second data feature of each training sample, respectively, so as to obtain the first training sample set and the second training sample set. Then, the first training sample set is used as the training data of the second initial model, and the second training sample set is used as the training data of the first initial model, so as to respectively train the corresponding second target model and the first target model, and then select the model with better performance from the first target model and the second target model as the target business model, and then the multi-label task is identified by the target business model. Through the above method, the training sample sets obtained by resampling the initial models of each other are used as the training data of the other initial model, so that the two initial models can learn collaboratively and guide each other during the model training process, so as to suppress the noise data, solve the problem that the model is easily affected by noise data in the multi-label classification business, resulting in performance degradation, and can also be applied to scenarios such as multi-label classification, expanding the applicable scenarios. Moreover, the labeling of unlabeled business data based on machines is automatically realized, replacing manual labeling, thereby saving the corresponding labor costs.

[0081] Above Figure 4 This paper mainly introduces the model training method provided by the embodiment of the present application. Figure 4 After the target business model is obtained by training the model training method, the target business model can be applied in the multi-label task classification scenario. For example, Figure 6 FIG. 2 shows a schematic diagram of a multi-label classification process provided by an embodiment of the present application. Figure 6 As shown, the multi-label classification process may include the following steps:

[0082] 601. Obtain a data set to be classified, where the data set to be classified includes at least one data to be classified.

[0083] In this example, after the above Figure 4 After the target business model is obtained through the processing process, the target business model can be sent to downstream applications. At this time, by obtaining the data set to be classified, each data to be classified in the data set to be classified is subjected to multi-label recognition processing through the target business model.

[0084] 602. Perform multi-label recognition processing on each data to be classified in at least one data to be classified based on the target business model to obtain a label classification result of each data to be classified, where the label classification result is used to indicate a label classification status of the corresponding data to be classified.

[0085] In this example, after each data to be classified is obtained, multi-label recognition processing can be performed on each data to be classified through the target business model, so as to obtain a label classification result for each data to be classified.

[0086] It should be noted that the target business model described is a model selected from the first target model and the second target model. The first target model is obtained by updating and adjusting the model parameters of the first initial model based on the second training sample set, and the second target model is obtained by updating and adjusting the model parameters of the second initial model based on the first training sample set. The first training sample set is obtained by resampling the initial training sample set based on the first data feature of each initial training sample, and the second training sample set is obtained by resampling the initial training sample set based on the second data feature of each initial training sample. For details on how to train the target business model, please refer to the aforementioned Figure 4 You can understand the contents described in the article, and will not go into details here.

[0087] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the method. It can be understood that in order to realize the above functions, the hardware structure and / or software module corresponding to the execution of each function are included. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiment disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0088] The embodiment of the present application can divide the functional modules of the device according to the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0089] The following is a detailed description of the multi-label classification device in the embodiment of the present application. Figure 7FIG. 1 is a schematic diagram of an embodiment of a multi-label classification device provided in an embodiment of the present application. Figure 7 As shown, the multi-label classification device may include an acquisition unit 701 and a processing unit 702 .

[0090] The acquisition unit 701 is used to acquire an initial training sample set, which includes multiple initial training samples. The processing unit 702 is used to: perform feature extraction processing on each initial training sample based on the first initial model to obtain a first data feature of each initial training sample, and perform feature extraction processing on each initial training sample based on the second initial model to obtain a second data feature of each initial training sample; resample the initial training sample set based on the first data feature of each initial training sample to obtain a first training sample set, and resample the initial training sample set based on the second data feature of each initial training sample to obtain a second training sample set; update and adjust the model parameters of the first initial model based on the second training sample set to obtain a first target model, and update and adjust the model parameters of the second initial model based on the first training sample set to obtain a second target model; select a target business model from the first target model and the second target model, and the target business model is used to perform recognition processing on multi-label tasks.

[0091] In some optional examples, the processing unit 702 is used to: calculate the first sampling probability of the corresponding initial training sample based on the first data feature of each initial training sample; sample the initial training sample set based on the first sampling probability to obtain a first sample set after sampling; and perform MixUp processing on the initial training sample set and the first sample set after sampling to obtain a first training sample set.

[0092] In some other optional examples, the processing unit 702 is used to: perform weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th first sample in the first sample set after sampling to obtain a first input sample, where i, j≥1, and i, j are integers; perform weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th first sample to obtain a first expected label; and generate a first training sample set based on the first input sample and the first expected label.

[0093] In other optional examples, the processing unit 702 is used to: calculate the second sampling probability of the corresponding initial training sample based on the second data feature of each initial training sample; sample the initial training sample set based on the second sampling probability to obtain a sampled second sample set; and perform MixUp processing on the initial training sample set and the sampled second sample set to obtain a second training sample set.

[0094] In other optional examples, the processing unit 702 is used to: perform weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th second sample in the sampled second sample set to obtain a second input sample; perform weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th second sample to obtain a second expected label; and generate a second training sample set based on the second input sample and the second expected label.

[0095] In other optional examples, the processing unit 702 is used to: perform label prediction on each initial training sample based on the first initial model to obtain a first predicted label for each initial training sample; and calculate a first data feature of each initial training sample based on the first predicted label of each initial training sample and the first annotated label of the corresponding initial training sample.

[0096] In some other optional examples, the processing unit 702 is used to: calculate the average absolute value of the difference between the confidence of the first predicted label of each initial training sample and the true value of the first labeled label; and use the average absolute value as the first data feature of the corresponding initial training sample.

[0097] In some other optional examples, the processing unit 702 is used to: calculate the maximum absolute value of the difference between the confidence of the first predicted label of each initial training sample and the true value of the first labeled label; and use the maximum value as the first data feature of the corresponding initial training sample.

[0098] In other optional examples, the processing unit 702 is used to: perform calculations based on a preset learning rate and a second training sample set to obtain a first value; calculate the difference between the initial weight of the first initial model and the first value to obtain an updated weight of the first initial model; and update and adjust the model parameters of the first initial model based on the updated weight of the first initial model to obtain a first target model.

[0099] In some other optional examples, the acquisition unit 701 is used to: acquire a test sample set. The processing unit 702 is used to: perform multi-label classification processing on the test sample set based on the first target model to calculate the model performance of the first target model, and perform multi-label classification processing on the test sample set based on the second target model to calculate the model performance of the second target model; and select a target business model from the first target model and the second target model according to the model performance of the first target model and the model performance of the second target model.

[0100] In some other optional examples, the acquisition unit 701 is used to acquire a data set to be classified, and the data set to be classified includes at least one data to be classified. The processing unit 702 is used to: perform multi-label recognition processing on each data to be classified in at least one data to be classified based on the target business model, and obtain a label classification result of each data to be classified, and the label classification result is used to indicate the label classification of the corresponding data to be classified; wherein the target business model is a model selected from the first target model and the second target model, the first target model is obtained by updating and adjusting the model parameters of the first initial model based on the second training sample set, the second target model is obtained by updating and adjusting the model parameters of the second initial model based on the first training sample set, the first training sample set is obtained by resampling the initial training sample set based on the first data feature of each initial training sample, and the second training sample set is obtained by resampling the initial training sample set based on the second data feature of each initial training sample.

[0101] The multi-label classification device in the embodiment of the present application is described above from the perspective of modular functional entities. The multi-label classification device in the embodiment of the present application is described below from the perspective of hardware processing. Figure 8 801, a communication line 807, a memory 803, and at least one communication interface 804.

[0102] The processor 801 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (server IC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0103] The communication link 807 may include a pathway to transmit information between the above-mentioned components.

[0104] The communication interface 804 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0105] The memory 803 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, and the memory may exist independently and be connected to the processor via a communication line 807. The memory may also be integrated with the processor.

[0106] The memory 803 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 801. The processor 801 is used to execute the computer-executable instructions stored in the memory 803, thereby implementing the method provided by the above embodiment of the present application.

[0107] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.

[0108] In a specific implementation, as an embodiment, the multi-label classification device may include multiple processors, such as Figure 8 801 and processor 802 in the embodiment of the present invention. Each of these processors may be a single-CPU processor or a multi-CPU processor. The processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0109] In a specific implementation, as an embodiment, the multi-label classification device may further include an output device 805 and an input device 806. The output device 805 communicates with the processor 801 and may display information in a variety of ways. The input device 806 communicates with the processor 801 and may receive input of a target object in a variety of ways. For example, the input device 806 may be a mouse, a touch screen device, or a sensor device.

[0110] The multi-label classification device can be a general device or a dedicated device. In a specific implementation, the multi-label classification device can be a server, a terminal device, or a Figure 8 The embodiment of the present application does not limit the type of the multi-label classification device.

[0111] Need to explain, Figure 8 The processor 801 in the embodiment can call the computer execution instruction stored in the memory 803 to make the multi-label classification device perform the following steps: Figures 4 to 6 The method in the corresponding method embodiment.

[0112] Specifically, Figure 7The function / implementation process of the processing unit 702 in Figure 8 The processor 801 in the embodiment calls the computer execution instructions stored in the memory 803 to implement. Figure 7 The function / implementation process of the acquisition unit 701 in can be Figure 8 It is implemented by the communication interface 804 in.

[0113] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the model training methods and multi-label classification methods recorded in the above method embodiments.

[0114] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the model training methods and multi-label classification methods recorded in the above method embodiments.

[0115] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0117] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0119] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0120] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.

[0121] The above embodiments may be implemented in whole or in part through software, hardware, firmware or any combination thereof. When implemented by software, they may be implemented in whole or in part in the form of a computer program product.

[0122] The computer program product includes one or more computer instructions. When loading and executing the computer execution instruction on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instruction can be stored in a computer-readable storage medium, or transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, a computer, a server or a data center by wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, a data center, etc. that includes one or more available media integration. Available media can be magnetic media, (for example, floppy disk, hard disk, tape), optical media (for example, DVD), or semiconductor media (such as SSD)) and the like.

[0123] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A model training method, characterized in that: include: Acquire an initial training sample set, wherein the initial training sample set includes a plurality of initial training samples; Performing feature extraction processing on each of the initial training samples based on the first initial model to obtain a first data feature of each of the initial training samples, and performing feature extraction processing on each of the initial training samples based on the second initial model to obtain a second data feature of each of the initial training samples; Calculating a first sampling probability of the corresponding initial training sample based on the first data feature of each of the initial training samples; sampling the initial training sample set based on the first sampling probability to obtain a first sample set after sampling; Performing MixUp processing on the initial training sample set and the first sample set after sampling to obtain a first training sample set; Calculate a second sampling probability of the corresponding initial training sample based on the second data feature of each of the initial training samples; Sampling the initial training sample set based on the second sampling probability to obtain a sampled second sample set; performing MixUp processing on the initial training sample set and the sampled second sample set to obtain a second training sample set; updating and adjusting the model parameters of the first initial model based on the second training sample set to obtain a first target model, and updating and adjusting the model parameters of the second initial model based on the first training sample set to obtain a second target model; A target business model is selected from the first target model and the second target model, and the target business model is used to perform recognition processing on the multi-label task.

2. The method according to claim 1, characterized in that: The step of performing MixUp processing on the initial training sample set and the first sample set after sampling to obtain the first training sample set includes: Performing weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th first sample in the first sample set after sampling to obtain a first input sample, where i, j≥1, and i, j are integers; Performing weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th first sample to obtain a first expected label; The first training sample set is generated based on the first input sample and the first expected label.

3. The method according to claim 1, characterized in that The step of performing MixUp processing on the initial training sample set and the sampled second sample set to obtain the second training sample set includes: Performing weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th second sample in the sampled second sample set to obtain a second input sample; Performing weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th second sample to obtain a second expected label; Based on the second input sample and the second expected label, the second training sample set is generated.

4. The method according to any one of claims 1 to 3, characterized in that The step of performing feature extraction processing on each of the initial training samples based on the first initial model to obtain a first data feature of each of the initial training samples includes: Performing label prediction on each of the initial training samples based on the first initial model to obtain a first predicted label for each of the initial training samples; The first data feature of each of the initial training samples is calculated according to the first predicted label of each of the initial training samples and the first annotated label corresponding to the initial training sample.

5. The method according to claim 4, characterized in that The step of calculating the first data feature of each of the initial training samples according to the first predicted label of each of the initial training samples and the first labeled label corresponding to the initial training sample includes: Calculating the average absolute value of the difference between the confidence of the first predicted label of each of the initial training samples and the true value of the first labeled label; The average absolute value is used as the first data feature of the corresponding initial training sample.

6. The method according to claim 4, characterized in that The step of calculating the first data feature of each of the initial training samples according to the first predicted label of each of the initial training samples and the first labeled label corresponding to the initial training sample includes: Calculating the maximum absolute value of the difference between the confidence of the first predicted label of each of the initial training samples and the true value of the first labeled label; The maximum value is used as the first data feature of the corresponding initial training sample.

7. The method according to any one of claims 1 to 3, characterized in that The updating and adjusting the model parameters of the first initial model based on the second training sample set to obtain a first target model includes: Performing calculation based on a preset learning rate and the second training sample set to obtain a first value; Calculating a difference between an initial weight of the first initial model and the first value to obtain an updated weight of the first initial model; The model parameters of the first initial model are updated and adjusted based on the update weights of the first initial model to obtain a first target model.

8. A multi-label classification device, characterized in that: include: An acquisition unit, configured to acquire an initial training sample set, wherein the initial training sample set includes a plurality of initial training samples; A processing unit, configured to perform feature extraction processing on each of the initial training samples based on the first initial model to obtain a first data feature of each of the initial training samples, and perform feature extraction processing on each of the initial training samples based on the second initial model to obtain a second data feature of each of the initial training samples; The processing unit is configured to calculate a first sampling probability of the corresponding initial training sample based on the first data feature of each initial training sample; and sample the initial training sample set based on the first sampling probability to obtain a first sample set after sampling; MixUp the initial training sample set and the first sample set after sampling to obtain a first training sample set; calculate the second sampling probability of the corresponding initial training sample based on the second data feature of each initial training sample; sample the initial training sample set based on the second sampling probability to obtain a second sample set after sampling; MixUp the initial training sample set and the second sample set after sampling to obtain a second training sample set; The processing unit is configured to update and adjust the model parameters of the first initial model based on the second training sample set to obtain a first target model, and update and adjust the model parameters of the second initial model based on the first training sample set to obtain a second target model; The processing unit is used to select a target business model from the first target model and the second target model, and the target business model is used to perform recognition processing on the multi-label task.

9. The device according to claim 8, characterized in that The processing unit is used for: Performing weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th first sample in the first sample set after sampling to obtain a first input sample, where i, j≥1, and i, j are integers; Performing weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th first sample to obtain a first expected label; The first training sample set is generated based on the first input sample and the first expected label.

10. The device according to claim 8, characterized in that The processing unit is used for: Performing weighted sum processing on the i-th initial training sample in the initial training sample set and the j-th second sample in the sampled second sample set to obtain a second input sample; Performing weighted sum processing on the label corresponding to the i-th initial training sample and the label of the j-th second sample to obtain a second expected label; Based on the second input sample and the second expected label, the second training sample set is generated.

11. The device according to any one of claims 8 to 10, characterized in that The processing unit is used for: Performing label prediction on each of the initial training samples based on the first initial model to obtain a first predicted label for each of the initial training samples; The first data feature of each of the initial training samples is calculated according to the first predicted label of each of the initial training samples and the first annotated label corresponding to the initial training sample.

12. The device according to claim 11, characterized in that The processing unit is used for: Calculating the average absolute value of the difference between the confidence of the first predicted label of each of the initial training samples and the true value of the first labeled label; The average absolute value is used as the first data feature of the corresponding initial training sample.

13. The device according to claim 11, characterized in that The processing unit is used for: Calculating the maximum absolute value of the difference between the confidence of the first predicted label of each of the initial training samples and the true value of the first labeled label; The maximum value is used as the first data feature of the corresponding initial training sample.

14. The device according to any one of claims 8 to 10, characterized in that The processing unit is used for: Performing calculation based on a preset learning rate and the second training sample set to obtain a first value; Calculating a difference between an initial weight of the first initial model and the first value to obtain an updated weight of the first initial model; The model parameters of the first initial model are updated and adjusted based on the update weights of the first initial model to obtain a first target model.

15. A multi-label classification device, characterized in that: The multi-label classification device includes: an input / output (I / O) interface, a processor and a memory, wherein program instructions are stored in the memory; The processor is used to execute program instructions stored in the memory to perform the method according to any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 7.

17. A computer program product comprising instructions, characterized in that When the method is executed on a computer or a processor, the computer or the processor is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Human body action recognition method based on online transfer learning

    CN110705599A

  • Data classification method and device, multi-classification model training method and device, equipment and medium

    CN113537270A

  • Long-tail noise learning method based on cross enhancement matching

    CN113869463A

  • Method of training deep neural network and such network

    CN114091665A

  • Training data processing method and device and storage medium

    CN114332984A