Model training method, device, electronic device and readable storage medium

Through the teacher-student model architecture and dynamic confidence threshold method, the problem of insufficient training data is solved, efficient model training is achieved and the adaptability and robustness of the model in different environments is improved.

CN119378709BActive Publication Date: 2025-08-22NINGXIA ELECTRIC POWER ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411270444.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-08-22
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

The amount of available training data in the prior art is limited, resulting in a lack of sufficient diversity and representation of the model, which in turn leads to poor model training results and reduces the accuracy and robustness of model recognition.

Method used

Using the teacher-student model architecture, a pre-trained teacher model is used to generate pseudo-labels. By dynamically adjusting the category confidence threshold, the noise speech data is divided into high confidence and low confidence sample sets, positive and negative learning is performed, data preparation and labeling costs are reduced, and the model is adaptable and robust in a real environment.

Benefits of technology

It significantly reduces data preparation and processing costs, improves the applicability and robustness of the model in different environments, and enhances the performance of the model in real environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378709B_ABST
    Figure CN119378709B_ABST
Patent Text Reader

Abstract

The present application discloses a model training method, device, electronic device and readable storage medium. The method of the present application sequentially inputs multiple sample data of each batch into the teacher model to generate a pseudo label corresponding to each sample data; determines the first confidence threshold of each preset category in each batch based on the pseudo label; generates a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model based on the multiple sample data, pseudo labels, prediction results and the first confidence threshold; determines positive loss values ​​and negative loss values ​​based on the first high-confidence sample data set, the second high-confidence sample data set, pseudo labels and prediction results; updates the parameters of the student model based on the positive loss values ​​and negative loss values; and updates the parameters of the teacher model based on the updated parameters of the student model. The idea of ​​the teacher-student model and dynamic threshold is adopted to obtain high-quality pseudo labels and complete the adaptation during speech recognition testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a model training method, device, electronic device and readable storage medium. Background Art

[0002] Natural language recognition aims to use machine learning techniques to process human speech into readable text. During model training, large amounts of data must be collected and annotated. However, in real-world applications, the distribution of data is constantly changing. For example, people in different locations have different accents. Accurately annotating large amounts of data requires significant human resources and time. Furthermore, in some fields, due to privacy concerns, raw data may be unavailable or severely restricted. These factors limit the amount of available training data, resulting in a lack of sufficient diversity and representativeness in the model. This, in turn, leads to poor model training results, reducing the model's recognition accuracy and robustness, and causing the model to perform poorly in real-world applications. Summary of the Invention

[0003] In view of this, the present application provides a model training method, device, electronic device and readable storage medium, the main purpose of which is to solve the technical problem in the prior art that the amount of available training data is limited, resulting in the model lacking sufficient diversity and representativeness, and thus leading to poor model training results.

[0004] According to the first aspect of the present application, a model training method is provided, the method comprising:

[0005] Obtain a teacher model, a student model, multiple batches of sample data in the target domain, multiple preset categories, and a preset number of training rounds;

[0006] For any training round, multiple sample data from each batch are sequentially input into the teacher model to generate pseudo labels corresponding to each sample data, where the pseudo labels are the confidence distribution of each sample data predicted by the teacher model to belong to multiple preset categories;

[0007] The multiple sample data of each batch are sequentially input into the student model to generate a prediction result corresponding to each sample data, wherein the prediction result is the confidence distribution of each sample data predicted by the student model belonging to multiple preset categories;

[0008] Determine a first confidence threshold for each preset category in each batch based on the pseudo labels;

[0009] Generate a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model according to the multiple sample data, pseudo labels, prediction results and the first confidence threshold;

[0010] Determine a positive loss value and a negative loss value based on the first high confidence sample data set, the second high confidence sample data set, the pseudo label, and the prediction result;

[0011] Update the parameters of the student model based on the positive and negative loss values;

[0012] Update the parameters of the teacher model based on the updated parameters of the student model.

[0013] Optionally, the step of determining a first confidence threshold for each preset category in each batch based on the pseudo-labels specifically includes:

[0014] Calculate the second confidence threshold for each batch based on the pseudo label of each sample data;

[0015] Calculate the target confidence of each preset category based on the pseudo label of each sample data;

[0016] The first confidence threshold of each preset category in each batch is obtained by multiplying the target confidence of each preset category by the second confidence threshold of each batch.

[0017] Optionally, the step of calculating the second confidence threshold for each batch according to the pseudo label of each sample data specifically includes:

[0018] Importing multiple pseudo labels of multiple sample data of each batch into the first preset mapping relationship, and calculating a second confidence threshold for each batch;

[0019] The first preset mapping relationship is:

[0020]

[0021] Among them, the above Ω t,j is the second confidence threshold of the jth batch in the tth training round; the above α is the moving average parameter; the above Ω t,j-1 is the second confidence threshold of the j-1th batch in the tth training round; the above N is the number of sample data in the jth batch; the above is the maximum confidence in the pseudo label of the i-th sample data in the j-th batch in the t-th training round.

[0022] Optionally, the step of calculating the target confidence of each preset category based on the pseudo label of each sample data specifically includes:

[0023] Importing the pseudo label of each sample data into the second preset mapping relationship, and calculating the average confidence of each preset category;

[0024] Determine the maximum confidence level of this training round based on multiple pseudo labels of multiple sample data;

[0025] The target confidence of each preset category is obtained by dividing the average confidence of each preset category by the maximum confidence of this round of training;

[0026] The second preset mapping relationship is:

[0027]

[0028] Among them, the above ∈ c is the average confidence of the c-th preset category; is the pseudo label of the i-th sample data in the t-th training round; In the t-th training round, the category corresponding to the maximum confidence in the pseudo label of the i-th sample data is the number of the c-th preset category.

[0029] Optionally, the step of generating a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model based on the multiple sample data, pseudo labels, prediction results, and the first confidence threshold specifically includes:

[0030] For any sample data, according to the pseudo-label of the sample data, determine the maximum confidence in the pseudo-label as the first target confidence of the sample data;

[0031] The preset category corresponding to the first target confidence is used as the first target category of the sample data;

[0032] Obtaining a first target confidence threshold for a first target category of a batch of sample data;

[0033] If the first target confidence of the sample data is greater than or equal to the first target confidence threshold, determining the sample data as a first high-confidence sample;

[0034] generating a first high-confidence sample data set based on the plurality of first high-confidence samples;

[0035] According to the prediction results of the sample data, determining the maximum confidence level in the prediction results as the second target confidence level of the sample data;

[0036] The preset category corresponding to the second target confidence is used as the second target category of the sample data;

[0037] Obtaining a second target confidence threshold of a second target category of the batch where the sample data resides;

[0038] If the second target confidence of the sample data is greater than or equal to the second target confidence threshold, determining the sample data as a second high confidence sample;

[0039] A second high-confidence sample data set is generated based on the plurality of second high-confidence samples.

[0040] Optionally, the step of determining positive loss values ​​and negative loss values ​​based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo labels, and the prediction results specifically includes:

[0041] Performing positive learning based on the first high-confidence sample data set and the second high-confidence sample data set to obtain a positive loss value;

[0042] Generate a complementary sample data set based on the pseudo labels of the sample data and the preset threshold vector;

[0043] Negative learning is performed based on the pseudo labels of the sample data in the complementary sample data set and multiple prediction results of multiple sample data to obtain a negative loss value.

[0044] Optionally, the step of performing positive learning based on the first high-confidence sample data set and the second high-confidence sample data set to obtain a positive loss value specifically includes:

[0045] Importing the pseudo labels of the first high-confidence samples included in the first high-confidence sample data set and the prediction results of the second high-confidence samples included in the second high-confidence sample data set into the loss function for positive learning to obtain a positive loss value;

[0046] The loss function is:

[0047]

[0048] Among them, the above is a positive loss value; the above c is the preset category, the above C is the number of preset categories; the above is the pseudo label of the first high confidence sample with the preset category c in the first high confidence sample data set; is the prediction result of the second highest confidence sample with the preset category c in the second highest confidence sample data set.

[0049] According to a second aspect of the present application, a model training device is provided, comprising:

[0050] An acquisition module is used to obtain a teacher model, a student model, multiple batches of sample data in the target domain, multiple preset categories, and preset training rounds;

[0051] A first generation module is configured to input, for any training round, multiple sample data of each batch into the teacher model in sequence, and generate pseudo labels corresponding to each sample data, wherein the pseudo labels are the confidence distribution of each sample data predicted by the teacher model to belong to multiple preset categories;

[0052] The second generation module is used to sequentially input the multiple sample data of each batch into the student model to generate a prediction result corresponding to each sample data, wherein the prediction result is a confidence distribution of each sample data predicted by the student model to belong to multiple preset categories;

[0053] The first determination module is configured to determine a first confidence threshold for each preset category in each batch based on the pseudo-label.

[0054] A third generation module is used to generate a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model according to the multiple sample data, pseudo labels, prediction results and the first confidence threshold;

[0055] A second determination module is used to determine a positive loss value and a negative loss value based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo label and the prediction result;

[0056] A first updating module is used to update the parameters of the student model based on the positive loss value and the negative loss value;

[0057] A second updating module is used to update the parameters of the teacher model based on the parameters of the updated student model;

[0058] According to a third aspect of the present application, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.

[0059] According to a fourth aspect of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods in the first aspect are implemented.

[0060] By means of the above technical solution, the present application provides a model training method, device, electronic device and readable storage medium. Specifically, a pre-trained teacher model is used to generate pseudo labels, and based on the pseudo labels, a first confidence threshold of the category that changes with the training round is calculated. A dynamic first confidence threshold is used to divide the noisy speech into two groups of data: a high-confidence sample set and a low-confidence sample set. Subsequently, positive learning and negative learning are performed on the two groups of data to complete the adaptation during the speech recognition test. Compared with the related art, the use of a large amount of sample data from a normal environment and a fixed confidence threshold for model training has the problem that it takes a lot of time and resources to collect and label high-quality data, and the fixed threshold may ignore the diversity of the data set, fail to fully utilize the complementarity of different types of data, and weaken the applicability and robustness of the model in different environments or conditions. This application uses unlabeled noisy speech in the target domain as sample data, and adopts the teacher-student model and the idea of ​​dynamic threshold to obtain high-quality pseudo-labels. It does not require denoised original data, and there is no need to denoise and label the sample data, which can significantly reduce the cost and time of data preparation and processing. The model training is combined with the dynamic confidence threshold of the category that changes over time, so that the model can learn how to deal with noise conditions in actual applications. At the same time, as the training progresses, the dynamic threshold can provide feedback on the model's learning status in each category, helping the model to continuously adjust and improve the learning strategy to adapt it to the real characteristics and changes of the target domain, thereby improving the model's robustness and performance in real environments.

[0061] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0063] Figure 1 A schematic diagram of a model training method provided in an embodiment of the present application is shown;

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

[0065] Figure 3 A schematic structural diagram of a model training device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0066] The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0067] The present application embodiment provides a model training method, such as Figure 1 As shown, the method includes:

[0068] S101. Obtain a teacher model, a student model, multiple batches of sample data in a target domain, multiple preset categories, and preset training rounds.

[0069] The model training method provided in the embodiment of the present application is mainly used in natural language recognition model training scenarios under specific scenarios. The execution subject of the embodiment of the present application is a device or equipment capable of model training, which can be specifically set on the server side. The server uses the target domain data in a specific environment or condition as a sample, and adjusts the model through domain adaptive adjustment so that the model can work better in the target domain.

[0070] Specifically, a pre-trained teacher model is selected, and a student model with the same network structure as the teacher model is constructed to obtain a pre-trained teacher model and a pre-trained student model.

[0071] To ensure the model can adapt to the characteristics and data distribution of specific application scenarios, a target domain is selected based on specific environments or conditions. A large amount of noisy speech data (such as speech containing rain sounds) within the target domain is obtained and used as sample data. Furthermore, due to the large amount of sample data, during the training process, samples are usually fed into the model in batches for training. The model makes predictions in each batch. Therefore, an appropriate batch size is selected. This batch size determines the number of samples included in each input to the model. The large amount of collected sample data is divided into multiple batches according to the batch size, with each batch containing the same number of sample data, to achieve batch processing of sample data.

[0072] The preset categories can be category labels, category descriptions, or other related features. Based on the characteristics of the target domain, multiple categories are defined to ensure that multiple preset categories can fully cover the data distribution of the target domain.

[0073] The training rounds are set in advance, and the teacher model and student model are updated according to the training rounds. Through continuous iteration and adjustment, the model can be continuously improved during the training process to improve the performance and robustness of the model.

[0074] In practical application scenarios, based on the natural language processing task, an appropriate model architecture is selected. A labeled dataset under normal conditions is prepared and used to train the teacher model. After training, the teacher model's parameters are obtained, and a learning model with the same network structure as the teacher model is constructed. The student model is initialized using the teacher model's parameters. A specific environment (such as rain or noisy environments) is selected as the target domain. A large amount of speech data is extracted from the target domain and preprocessed, including data cleaning, to generate multiple batches of sample datasets, depending on the batch size.

[0075] S102. For any training round, multiple sample data of each batch are input into the teacher model in sequence to generate pseudo labels corresponding to each sample data, wherein the pseudo labels are the confidence distribution of each sample data predicted by the teacher model to belong to multiple preset categories.

[0076] In this step, in the current training round, for any batch, multiple sample data of the current batch are input into the teacher model, and through the forward propagation of the teacher model, the confidence distribution of each sample data belonging to all preset categories is obtained as a pseudo label.

[0077] S103. Input multiple sample data of each batch into the student model in sequence to generate a prediction result corresponding to each sample data, wherein the prediction result is a confidence distribution of each sample data predicted by the student model belonging to multiple preset categories.

[0078] In this step, for any batch, multiple sample data of the current batch are input into the student model, and prediction is performed through the forward propagation process of the student model. The student model will output the confidence distribution (i.e., prediction result) that each sample data belongs to each preset category.

[0079] S104: Determine a first confidence threshold for each preset category in each batch based on the pseudo-labels.

[0080] In this step, the confidence threshold of the category is a set threshold value. Only when the confidence of the model prediction is higher than this threshold, the sample will be classified into this category. In the related art, the confidence threshold of each category is usually pre-set. During the model training process, a fixed confidence threshold is used to determine whether the sample confidence is high enough. However, the fixed threshold cannot adapt to changes in data distribution. If the data distribution changes, the fixed threshold may cause the model's prediction effect on certain categories to decline, affecting the overall performance of the model. Based on the above problems, the present application proposes that as the training process progresses, in each training round, the teacher model outputs the confidence distribution of the sample belonging to all categories, and calculates the first confidence threshold of each preset category in each batch, so as to achieve dynamic adjustment of the category confidence threshold as the training round changes, which can better adapt to the characteristics of the current batch, better adapt to data changes in real scenarios, and ensure that the model learns each category more accurately.

[0081] S105. Generate a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model based on multiple sample data, pseudo labels, prediction results and a first confidence threshold.

[0082] In this step, for any sample data, the maximum confidence predicted by the teacher model and its corresponding category are determined based on the confidence distribution of the sample data in the pseudo-label. The category is the category to which the sample data predicted by the teacher model belongs. Obtain the first confidence threshold corresponding to the category to which the sample belongs in the batch where the sample data is located, compare the maximum confidence of the sample with the first confidence threshold, and if the maximum confidence is greater than or equal to the first confidence threshold, divide the sample data into the first high-confidence sample data set; otherwise, divide the sample data into the low-confidence sample data set. In the above manner, each sample data is divided by the pseudo-label generated by the teacher model and the first confidence threshold of the preset category in each batch to generate a first high-confidence sample data set.

[0083] Furthermore, for any sample data, based on the confidence distribution of the sample data in the prediction results, the maximum confidence predicted by the student model and its corresponding category are determined. The category is the category to which the sample data predicted by the student model belongs. The first confidence threshold corresponding to the category in the batch where the sample data is located is obtained, and the maximum confidence is compared with the first confidence threshold. If the maximum confidence is greater than or equal to the first confidence threshold, the sample data is divided into the second high-confidence sample data set; otherwise, the sample data is divided into the low-confidence sample data set. In the above manner, each sample data is divided according to the prediction result generated by the student model and the first confidence threshold of the preset category to generate a second high-confidence sample data set.

[0084] Through the above method, based on the pseudo labels generated by the teacher model, the prediction results generated by the student model and the first confidence threshold of the preset category, the samples are divided to obtain high-confidence sample data sets corresponding to the teacher model and the student model respectively. This can effectively improve data quality, optimize training effects and efficiency, enhance the generalization ability of the model, and support data analysis and model improvement.

[0085] S106. Determine a positive loss value and a negative loss value based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo labels, and the prediction results.

[0086] In this step, positive learning is performed using the first and second high-confidence sample datasets to calculate the positive loss value. Subsequently, the pseudo-label and the preset threshold vector are used to determine the complementary sample dataset, and the complementary sample dataset and the prediction results of the student model are used to perform negative learning to calculate the negative loss value.

[0087] S107. Update the parameters of the student model based on the positive loss value and the negative loss value.

[0088] S108. Update the parameters of the teacher model based on the updated parameters of the student model.

[0089] In steps S107 and S108, the positive loss value and the negative loss value are used to define the total loss function, and an optimization algorithm (such as SGD, Adam, etc.) is used to minimize the total loss function to update the parameters of the student model. During the training process, a gradient descent algorithm can be applied to calculate the gradient of the parameters, and these gradients are used to adjust the parameters of the student model. After the student model is trained and its parameters are updated, the latest weights of the student model are obtained. Finally, the parameters of the updated student model are used to update the parameters of the teacher model.

[0090] Optionally, after completing the parameter update of the teacher model and the student model, the current round of training is completed, and a new round of training is started according to the above steps until the preset training rounds are reached, and the training of the teacher model and the student model is completed.

[0091] Through the above method, mutual promotion and improvement between the teacher model and the student model can be achieved, which helps to improve the overall performance and robustness of the model.

[0092] The model training method provided in the embodiment of the present application uses a pre-trained teacher model to generate pseudo labels, and based on the pseudo labels, calculates the first confidence threshold of the category that changes with the training round. The dynamic first confidence threshold is used to divide the noisy speech into two groups of data: a high-confidence sample set and a low-confidence sample set. The two groups of data are then subjected to positive learning and negative learning to complete the adaptation during the speech recognition test. Compared with the related art, the use of a large amount of sample data from a normal environment and a fixed confidence threshold for model training has the problem that it takes a lot of time and resources to collect and label high-quality data, and the fixed threshold may ignore the diversity of the data set, fail to fully utilize the complementarity of different types of data, and weaken the applicability and robustness of the model in different environments or conditions. This application uses unlabeled noisy speech in the target domain as sample data, and adopts the teacher-student model and the idea of ​​dynamic threshold to obtain high-quality pseudo-labels. It does not require denoised original data, and there is no need to denoise and label the sample data, which can significantly reduce the cost and time of data preparation and processing. The model training is combined with the dynamic confidence threshold of the category that changes over time, so that the model can learn how to deal with noise conditions in actual applications. At the same time, as the training progresses, the dynamic threshold can provide feedback on the model's learning status in each category, helping the model to continuously adjust and improve the learning strategy to adapt it to the real characteristics and changes of the target domain, thereby improving the model's robustness and performance in real environments.

[0093] This application further refines and expands the specific implementation of the above embodiment. In order to fully illustrate the specific implementation process of this embodiment, this application embodiment provides another model training method, such as Figure 2 As shown, the method includes:

[0094] S201: Obtain a teacher model, a student model, multiple batches of sample data in a target domain, multiple preset categories, and preset training rounds.

[0095] This step and Figure 1 The method of step S101 shown is the same and will not be repeated here.

[0096] Optionally, before model training, parameters such as multiple batches, preset training rounds, and preset threshold vectors of the model are pre-set.

[0097] S202. For any training round, multiple sample data of each batch are input into the teacher model in sequence to generate pseudo labels corresponding to each sample data, wherein the pseudo labels are the confidence distribution of each sample data predicted by the teacher model to belong to multiple preset categories.

[0098] This step and Figure 1 The method of step S102 shown is the same and will not be repeated here.

[0099] S203. Input multiple sample data of each batch into the student model in sequence to generate a prediction result corresponding to each sample data, wherein the prediction result is a confidence distribution of each sample data predicted by the student model belonging to multiple preset categories.

[0100] This step and Figure 1 The method of step S103 shown is the same and will not be repeated here.

[0101] S204: Calculate a second confidence threshold for each batch based on the pseudo label of each sample data.

[0102] In this step, during the training process, the data distribution in each batch may be different. By calculating the second confidence threshold of each batch, the sample characteristics of the current batch can be used as the basis for calculating the threshold of subsequent categories, so that the calculated category threshold can adapt to changes in data distribution.

[0103] In the embodiment of the present application, optionally, in order to accurately calculate the second confidence threshold of each batch, step S204, based on the pseudo-label of each sample data, calculates the second confidence threshold of each batch, specifically including: importing multiple pseudo-labels of multiple sample data of each batch into the first preset mapping relationship, and calculating the second confidence threshold of each batch;

[0104] The first preset mapping relationship is:

[0105]

[0106] Among them, the above Ω t,j is the second confidence threshold of the jth batch in the tth training round; the above α is the moving average parameter; the above Ω t,j-1 is the second confidence threshold of the j-1th batch in the tth training round; the above N is the number of sample data in the jth batch; the above is the maximum confidence in the pseudo label of the i-th sample data in the j-th batch in the t-th training round.

[0107] Optionally, Ω 0,0 =1 / C, where C is the number of preset categories.

[0108] In this embodiment, the first preset mapping relationship includes the correspondence between the confidence threshold of each batch and the pseudo label of each sample data. The pseudo label of each sample data of the jth batch is imported into the first preset mapping relationship, and the confidence threshold of each batch is calculated.

[0109] S205: Calculate the target confidence of each preset category based on the pseudo label of each sample data.

[0110] In this step, the pseudo labels are used to calculate the average confidence of each preset category, and then the target confidence of each preset category is calculated to achieve standardization of the confidence of each preset category.

[0111] In an embodiment of the present application, optionally, in order to accurately calculate the target confidence of each preset category, step S205 calculates the target confidence of each preset category based on the pseudo-label of each sample data, specifically including: importing the pseudo-label of each sample data into a second preset mapping relationship, and calculating the average confidence of each preset category; determining the maximum confidence of this round of training based on multiple pseudo-labels of multiple sample data; and obtaining the target confidence of each preset category by dividing the average confidence of each preset category by the maximum confidence of this round of training.

[0112] The second preset mapping relationship is:

[0113]

[0114] Among them, the above ∈ c is the average confidence of the c-th preset category; is the pseudo label of the i-th sample data in the t-th training round; In the t-th training round, the category corresponding to the maximum confidence in the pseudo label of the i-th sample data is the number of the c-th preset category.

[0115] In this embodiment, the pseudo-labels for each sample data item in each batch are imported into the second preset mapping relationship, and the average confidence level for each preset category is calculated. Subsequently, in the current training round, the maximum confidence level among the sample data items is screened out, and the target confidence level for each preset category is obtained by dividing the average confidence level for each preset category by the maximum confidence level in the current training round.

[0116] In actual application scenarios, Calculate the target confidence for each preset category;

[0117] Among them, the above η t,c is the target confidence of the cth preset category in the tth training round; the above ∈ t,c is the average confidence of the cth preset category in the tth training round; the above max∈ t is the maximum confidence in the tth training round.

[0118] S206 : Multiply the target confidence of each preset category by the second confidence threshold of each batch to obtain the first confidence threshold of each preset category in each batch.

[0119] In this step, the target confidence of each preset category is multiplied by the second confidence threshold of each batch to obtain the first confidence threshold of each preset category in each batch.

[0120] In actual application scenarios, through Ω t,j,c =η t,c Ω t,j Calculate the first confidence threshold of each preset category in each batch; where the above Ω t,j,c is the first confidence threshold of the cth preset category in the jth batch in the tth training round; η t,c is the target confidence of the cth preset category in the tth training round; the above Ω t,j is the second confidence threshold of the j-th batch in the t-th training round.

[0121] S207. Generate a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model based on the multiple sample data, pseudo labels, prediction results and the first confidence threshold.

[0122] This step and Figure 1 The method of step S105 shown is the same and will not be repeated here.

[0123] In an embodiment of the present application, optionally, in order to accurately generate a first high-confidence sample data set and a second high-confidence sample data set, step S207, based on multiple sample data, pseudo-labels, prediction results and a first confidence threshold, generates a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model, specifically including: for any sample data, based on the pseudo-label of the sample data, determining the maximum confidence in the pseudo-label as the first target confidence of the sample data; using the preset category corresponding to the first target confidence as the first target category of the sample data; obtaining the first target confidence threshold of the first target category of the batch where the sample data is located; if the sample data If the first target confidence of the sample data is greater than or equal to the first target confidence threshold, the sample data is determined to be a first high-confidence sample; a first high-confidence sample data set is generated based on multiple first high-confidence samples; according to the prediction result of the sample data, the maximum confidence in the prediction result is determined to be the second target confidence of the sample data; the preset category corresponding to the second target confidence is used as the second target category of the sample data; the second target confidence threshold of the second target category of the batch where the sample data is located is obtained; if the second target confidence of the sample data is greater than or equal to the second target confidence threshold, the sample data is determined to be a second high-confidence sample; and a second high-confidence sample data set is generated based on multiple second high-confidence samples.

[0124] In this embodiment, first, a first target confidence and a corresponding first target category of each sample data are determined.

[0125]

[0126] Among them, the above con t,i is the first target confidence of the i-th sample data; is the maximum confidence in the pseudo label of the i-th sample data in the t-th training round;

[0127]

[0128] Among them, the above c t,i is the target category to which the i-th sample data belongs in the t-th training round; is the first target category corresponding to the maximum confidence in the pseudo label of the i-th sample data in the t-th training round.

[0129] Secondly, determine the batch to which the sample data belongs, and determine the first target confidence threshold of the target category of the sample data in the batch within the first confidence threshold. t , i(the first target confidence of the i-th sample data in the t-th training round) ≥ (In the tth training round, the first target confidence threshold of the target category in the batch to which the i-th sample data belongs), the sample data is classified as the first high confidence sample set Otherwise, it is classified into the low confidence sample set middle.

[0130] Furthermore, for any sample data, according to the above method, based on the prediction results of the sample data, the maximum confidence in the prediction results is determined as the second target confidence, and the preset category corresponding to the second target confidence is used as the second target category of the sample data. Thereafter, the second target confidence threshold of the second target category of the batch where the sample data is located is obtained. If the second target confidence of the sample data is greater than or equal to the second target confidence threshold, the sample data is divided into the second high confidence sample set. Otherwise, it is classified into the low confidence sample set middle.

[0131] Optionally, in order to improve the generalization ability of the model, after generating the high-confidence sample data set and the low-confidence sample data set, the prediction distribution of the pseudo labels in the two sets of sample sets is sharpened:

[0132]

[0133] Among them, the above γ is the temperature hyperparameter.

[0134] Afterwards, the sharpened pseudo-labels are used as new pseudo-labels for the sample data.

[0135] S208. Determine a positive loss value and a negative loss value based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo labels, and the prediction results.

[0136] This step and Figure 1 The method of step S106 shown is the same and will not be repeated here.

[0137] In an embodiment of the present application, optionally, in order to accurately calculate positive loss values ​​and negative loss values, step S208 determines positive loss values ​​and negative loss values ​​based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo-labels and the prediction results, specifically including: performing positive learning based on the first high-confidence sample data set and the second high-confidence sample data set to obtain positive loss values; generating a complementary sample data set based on the pseudo-labels of the sample data; and performing negative learning based on the pseudo-labels of the sample data in the complementary sample data set and the prediction results of multiple sample data to obtain negative loss values.

[0138] In this embodiment, first, positive learning is performed using the first high-confidence sample data set and the second high-confidence sample data set to obtain a positive loss value.

[0139] Afterwards, obtain the pseudo labels in the complementary sample dataset:

[0140]

[0141] Among them, the above is the pseudo label of the sample data in the complementary sample dataset; For the sample data of the c-th preset category whose pseudo label is less than or equal to the preset threshold vector, a complementary sample data set is generated; the above α is the preset threshold vector.

[0142] Furthermore, negative learning is performed based on the pseudo labels of the sample data in the complementary sample dataset and the prediction results of the student model to calculate the negative loss value:

[0143]

[0144] Among them, the above is a negative loss value; the above is the pseudo label of the sample data of the cth preset category in the complementary sample dataset; is the prediction result of the c-th preset category.

[0145] In an embodiment of the present application, optionally, in order to accurately calculate the positive loss value, positive learning is performed based on the first high-confidence sample data set and the second high-confidence sample data set to obtain the positive loss value, specifically including: importing the pseudo labels of the first high-confidence samples included in the first high-confidence sample data set and the prediction results of the second high-confidence samples included in the second high-confidence sample data set into the loss function to perform positive learning to obtain the positive loss value;

[0146] The loss function is:

[0147]

[0148] Among them, the above is a positive loss value; the above is the pseudo label of the sample data category c in the first high confidence sample data set; is the prediction result of the sample data category c in the second highest confidence sample data set.

[0149] In this embodiment, the pseudo labels of the first high-confidence samples included in the first high-confidence sample data set and the prediction results of the second high-confidence samples included in the second high-confidence sample data set are positively learned to obtain positive loss values.

[0150] S209. Update the parameters of the student model based on the positive loss value and the negative loss value.

[0151] S210. Update the parameters of the teacher model based on the updated parameters of the student model.

[0152] In steps S209 and S210, the total loss value is calculated using the positive loss value and the negative loss value:

[0153]

[0154] Among them, the above is the total loss value; is the positive loss value; the above λ is the weight value between positive loss and negative loss; the above Negative loss value.

[0155] Afterwards, the gradient descent algorithm is used to update the parameters of the student model.

[0156] Furthermore, the parameters of the teacher model are updated using the updated parameters of the student model:

[0157]

[0158] Among them, the above For the teacher model; is the student model; the above t is the training round of the model; the above β is the moving average parameter.

[0159] In order to make the technical problems, technical solutions and beneficial effects solved by this application more clearly understood, this application is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0160] This application performs adaptation tests on a variety of different types of dataset domains, such as the CHiME-3 dataset, the TED-LIUM2 dataset, the Common Voice dataset, and the Valentini dataset.

[0161] This application uses the LibriSpeech dataset as the source domain dataset, uses the AdamW optimizer to train the model, and applies the cosine annealing learning rate strategy, that is, the learning rate is adjusted by changing the cosine function. In this strategy, the learning rate changes in the form of a cosine function within one cycle, from the initial learning rate to the minimum learning rate, and then back to the initial learning rate. This adjustment can help the model converge better and avoid falling into a local optimal solution. In this application, the initial learning rate is set to 0.00004 and the final learning rate is set to 0.00002. At the same time, this application uses three different backbone networks to test the generalization ability of the invention: CTC model, Conformer and Transducer.

[0162] This application uses a quantitative approach to evaluate the performance of the method and compares it with the current state-of-the-art methods: Source, NormAdapt, TENT, SHOT, and MEMO.

[0163] This application uses word error rate (WER) to evaluate the performance of different models. The lower the value of this parameter, the better the performance. Table 1 (quantitative evaluation results of accuracy on the CHiME-3 test set), Table 2 (quantitative evaluation results of accuracy on the TED-LIUM2 test set), Table 3 (quantitative evaluation results of accuracy on the Common Voice test set) and Table 4 (quantitative evaluation results of accuracy on the Valentini test set) respectively list the quantitative results of the model proposed in this application on the test sets CHiME-3, TED-LIUM2, Common Voice and Valentini. The results show that the model proposed in this application can achieve results that are better than the existing most advanced models on the CHiME-3, TED-LIUM2, Common Voice and Valentini test sets and three different backbone networks, which proves the superiority of this application in versatility and accuracy, and has better application value.

[0164] Table 1

[0165]

[0166] Table 2

[0167]

[0168]

[0169] Table 3

[0170]

[0171] Table 4

[0172]

[0173] Further, as Figure 1 For the specific implementation of the method, the embodiment of the present application provides a model training device 300, such as Figure 3 As shown, the apparatus includes: an acquisition module 301 , a first generation module 302 , a second generation module 303 , a first determination module 304 , a third generation module 305 , a second determination module 306 , a first update module 307 and a second update module 308 .

[0174] An acquisition module 301 is configured to acquire a teacher model, a student model, multiple batches of sample data in a target domain, multiple preset categories, and preset training rounds;

[0175] The first generation module 302 is configured to sequentially input a plurality of sample data of each batch into the teacher model for any training round, and generate a pseudo label corresponding to each sample data, wherein the pseudo label is a confidence distribution of each sample data predicted by the teacher model to belong to a plurality of preset categories;

[0176] The second generation module 303 is used to sequentially input the multiple sample data of each batch into the student model to generate a prediction result corresponding to each sample data, wherein the prediction result is a confidence distribution of each sample data predicted by the student model to belong to multiple preset categories;

[0177] The first determination module 304 is configured to determine a first confidence threshold for each preset category in each batch based on the pseudo labels.

[0178] The third generating module 305 is used to generate a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model according to the multiple sample data, pseudo labels, prediction results and the first confidence threshold;

[0179] A second determination module 306 is configured to determine a positive loss value and a negative loss value based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo labels, and the prediction results;

[0180] A first updating module 307 is configured to update parameters of the student model based on the positive loss value and the negative loss value;

[0181] The second updating module 308 is used to update the parameters of the teacher model based on the updated parameters of the student model.

[0182] In a specific application scenario, the first determining module 304 specifically includes:

[0183] a calculation unit, configured to calculate a second confidence threshold for each batch based on the pseudo label of each sample data;

[0184] The calculation unit is further used to calculate the target confidence of each preset category based on the pseudo label of each sample data;

[0185] The calculation unit is further configured to obtain a first confidence threshold for each preset category in each batch by multiplying the target confidence of each preset category by the second confidence threshold for each batch.

[0186] In specific application scenarios, the computing unit is specifically used to:

[0187] Importing multiple pseudo labels of multiple sample data of each batch into the first preset mapping relationship, and calculating a second confidence threshold for each batch;

[0188] The first preset mapping relationship is:

[0189]

[0190] Among them, the above Ω t,j is the second confidence threshold of the jth batch in the tth training round; the above α is the moving average parameter of the teacher model; the above Ω t,j-1 is the second confidence threshold of the j-1th batch in the tth training round; the above N is the number of sample data in the jth batch; the above is the maximum confidence in the pseudo label of the i-th sample data in the j-th batch in the t-th training round.

[0191] In specific application scenarios, the computing unit is also used to:

[0192] Importing the pseudo label of each sample data into the second preset mapping relationship, and calculating the average confidence of each preset category;

[0193] Determine the maximum confidence level of this training round based on multiple pseudo labels of multiple sample data;

[0194] The target confidence of each preset category is obtained by dividing the average confidence of each preset category by the maximum confidence of this round of training;

[0195] The second preset mapping relationship is:

[0196]

[0197] Among them, the above ∈ c is the average confidence of the c-th preset category; is the pseudo label of the i-th sample data in the t-th training round; In the t-th training round, the category corresponding to the maximum confidence in the pseudo label of the i-th sample data is the number of the c-th preset category.

[0198] In a specific application scenario, the third generation module 305 specifically includes:

[0199] A first determining unit is configured to determine, for any sample data, based on the pseudo labels of the sample data, a maximum confidence level among the pseudo labels as a first target confidence level of the sample data;

[0200] A first generating unit, configured to use a preset category corresponding to the first target confidence as a first target category of the sample data;

[0201] A first acquisition unit is used to acquire a first target confidence threshold of a first target category of a batch of sample data;

[0202] a comparing unit, for comparing the first target confidence of the sample data with a first target confidence threshold;

[0203] a second determining unit, configured to determine that the sample data is a first high-confidence sample if the first target confidence of the sample data is greater than or equal to a first target confidence threshold;

[0204] A second generating unit, configured to generate a first high-confidence sample data set based on the plurality of first high-confidence samples;

[0205] a third determining unit, configured to determine, based on the prediction result of the sample data, a maximum confidence level in the prediction result as a second target confidence level of the sample data;

[0206] a third generating unit, configured to use the preset category corresponding to the second target confidence as the second target category of the sample data;

[0207] A second acquisition unit is used to obtain a second target confidence threshold of a second target category of the batch where the sample data is located;

[0208] The comparison unit is further configured to compare the second target confidence of the sample data with a second target confidence threshold;

[0209] a fourth determining unit, configured to determine that the sample data is a second high confidence sample if the second target confidence of the sample data is greater than or equal to a second target confidence threshold;

[0210] The fourth generating unit is configured to generate a second high-confidence sample data set based on a plurality of second high-confidence samples.

[0211] In a specific application scenario, the second determining module 306 specifically includes:

[0212] A first learning unit is configured to perform positive learning based on the first high-confidence sample data set and the second high-confidence sample data set to obtain a positive loss value;

[0213] a fifth generating unit, configured to generate a complementary sample data set based on the pseudo labels of the sample data and a preset threshold vector;

[0214] The second learning unit is used to perform negative learning based on the pseudo labels of the sample data in the complementary sample data set and multiple prediction results of the multiple sample data to obtain a negative loss value.

[0215] In specific application scenarios, the first learning unit is specifically used for:

[0216] Importing the pseudo labels of the first high-confidence samples included in the first high-confidence sample data set and the prediction results of the second high-confidence samples included in the second high-confidence sample data set into the loss function for positive learning to obtain a positive loss value;

[0217] The loss function is:

[0218]

[0219] Among them, the above is a positive loss value; the above c is the preset category, the above C is the number of preset categories; the above is the pseudo label of the first high confidence sample of the preset category c in the first high confidence sample data set; is the prediction result of the second highest confidence sample with the preset category c in the second highest confidence sample data set.

[0220] The model training device 300 provided in the embodiment of the present application uses a pre-trained teacher model to generate pseudo labels, and based on the pseudo labels, calculates a first confidence threshold whose categories change with training rounds. A dynamic first confidence threshold is used to divide the noisy speech into two groups of data: a high-confidence sample set and a low-confidence sample set. The two groups of data are then subjected to positive learning and negative learning to complete adaptation during speech recognition testing. Compared with the related art, the use of a large amount of sample data from a normal environment and a fixed confidence threshold for model training has the following technical problems: the collection and labeling of high-quality data requires a high time and resource cost, and the fixed threshold may ignore the diversity of the data set, fail to fully utilize the complementarity of different types of data, and weaken the applicability and robustness of the model in different environments or conditions. This application uses unlabeled noisy speech in the target domain as sample data, and adopts the teacher-student model and the idea of ​​dynamic threshold to obtain high-quality pseudo-labels. It does not require denoised original data, and there is no need to denoise and label the sample data, which can significantly reduce the cost and time of data preparation and processing. The model training is combined with the dynamic confidence threshold of the category that changes over time, so that the model can learn how to deal with noise conditions in actual applications. At the same time, as the training progresses, the dynamic threshold can provide feedback on the model's learning status in each category, helping the model to continuously adjust and improve the learning strategy to adapt it to the real characteristics and changes of the target domain, thereby improving the model's robustness and performance in real environments.

[0221] In an exemplary embodiment, the present application further provides an electronic device including a memory and a processor. The memory stores a computer program, and the processor is configured to execute the program stored in the memory and perform the model training method in the above embodiment.

[0222] In an exemplary embodiment, the present application also provides a readable storage medium having a computer program stored thereon, which implements the steps of the model training method when executed by a processor.

[0223] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented through hardware or by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0224] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application.

[0225] Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices in the implementation scenario according to the implementation scenario description, or can be modified accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module or further split into multiple units.

[0226] The above application serial numbers are for description only and do not represent the advantages or disadvantages of the implementation scenarios.

[0227] The above disclosure only describes several specific implementation scenarios of the present application. However, the present application is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.

Claims

1. A model training method, characterized in that: include: Obtaining a teacher model, a student model, multiple batches of sample data in a target domain, multiple preset categories, and preset training rounds, wherein the sample data is speech data containing noise in the target domain; For any training round, multiple sample data of each batch are sequentially input into the teacher model to generate pseudo labels corresponding to each sample data, wherein the pseudo labels are the confidence distribution of each sample data predicted by the teacher model to belong to the multiple preset categories; Inputting the plurality of sample data of each batch into the student model in sequence, and generating a prediction result corresponding to each sample data, wherein the prediction result is a confidence distribution of each sample data predicted by the student model to belong to the plurality of preset categories; Determining a first confidence threshold for each preset category in each batch according to the pseudo labels; Generate a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model according to the multiple sample data, the pseudo labels, the prediction results and the first confidence threshold; Determining a positive loss value and a negative loss value based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo label, and the prediction result; updating parameters of a student model based on the positive loss value and the negative loss value; Update the parameters of the teacher model based on the updated parameters of the student model.

2. The method according to claim 1, characterized in that The step of determining a first confidence threshold for each preset category in each batch according to the pseudo-label specifically includes: Calculating a second confidence threshold for each batch according to the pseudo label of each sample data; Calculating the target confidence of each preset category according to the pseudo label of each sample data; The first confidence threshold of each preset category in each batch is obtained by multiplying the target confidence of each preset category by the second confidence threshold of each batch.

3. The method according to claim 2, characterized in that The step of calculating the second confidence threshold of each batch according to the pseudo label of each sample data specifically includes: Importing the multiple pseudo labels of the multiple sample data of each batch into the first preset mapping relationship, and calculating the second confidence threshold of each batch; The first preset mapping relationship is: Among them, the above Ω t,j is the second confidence threshold of the jth batch in the tth training round; the above α is the moving average parameter; the above Ω t,j-1 is the second confidence threshold of the j-1th batch in the tth training round; the above N is the number of sample data in the jth batch; the above is the maximum confidence in the pseudo label of the i-th sample data in the j-th batch in the t-th training round.

4. The method according to claim 2, characterized in that The step of calculating the target confidence of each preset category based on the pseudo label of each sample data specifically includes: Importing the pseudo label of each sample data into a second preset mapping relationship, and calculating the average confidence of each preset category; Determine the maximum confidence level of this training round based on multiple pseudo labels of multiple sample data; Obtain the target confidence of each preset category by dividing the average confidence of each preset category by the maximum confidence of this training round; The second preset mapping relationship is: Among them, the above ∈ c is the average confidence of the c-th preset category; is the pseudo label of the i-th sample data in the t-th training round; In the t-th training round, the category corresponding to the maximum confidence in the pseudo label of the i-th sample data is the number of the c-th preset category.

5. The method according to claim 1, wherein The step of generating a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model based on the multiple sample data, the pseudo labels, the prediction results, and the first confidence threshold specifically includes: For any sample data, according to the pseudo-label of the sample data, determine the maximum confidence in the pseudo-label as the first target confidence of the sample data; Using the preset category corresponding to the first target confidence as the first target category of the sample data; Obtaining a first target confidence threshold of the first target category of the batch of sample data; If the first target confidence of the sample data is greater than or equal to the first target confidence threshold, determining that the sample data is a first high-confidence sample; Generating the first high-confidence sample data set based on a plurality of first high-confidence samples; According to the prediction results of the sample data, determining the maximum confidence level in the prediction results as the second target confidence level of the sample data; Using the preset category corresponding to the second target confidence as the second target category of the sample data; Obtaining a second target confidence threshold of the second target category in the batch where the sample data is located; If the second target confidence of the sample data is greater than or equal to the second target confidence threshold, determining the sample data as a second high confidence sample; The second high-confidence sample data set is generated based on a plurality of second high-confidence samples.

6. The method according to claim 1, characterized in that The step of determining positive loss values ​​and negative loss values ​​based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo labels, and the prediction results specifically includes: Performing positive learning based on the first high-confidence sample data set and the second high-confidence sample data set to obtain the positive loss value; Generate a complementary sample data set based on the pseudo labels of the sample data and the preset threshold vector; Negative learning is performed based on the pseudo labels of the sample data in the complementary sample data set and multiple prediction results of the multiple sample data to obtain the negative loss value.

7. The method according to claim 6, characterized in that The step of performing positive learning based on the first high-confidence sample data set and the second high-confidence sample data set to obtain the positive loss value specifically includes: Importing the pseudo labels of the first high-confidence samples included in the first high-confidence sample data set and the prediction results of the second high-confidence samples included in the second high-confidence sample data set into the loss function for positive learning to obtain a positive loss value; The loss function is: Among them, the above is a positive loss value; the above c is a preset category, the above C is the number of preset categories; the above is the pseudo label of the first high confidence sample of the preset category c in the first high confidence sample data set; is the prediction result of the second highest confidence sample with the preset category c in the second highest confidence sample data set.

8. A model training device, characterized in that: include: An acquisition module is used to obtain a teacher model, a student model, multiple batches of sample data in a target domain, multiple preset categories, and preset training rounds, wherein the sample data is speech data containing noise in the target domain; A first generation module is configured to, for any training round, sequentially input a plurality of sample data of each batch into the teacher model, and generate a pseudo label corresponding to each sample data, wherein the pseudo label is a confidence distribution of each sample data predicted by the teacher model to belong to the plurality of preset categories; A second generating module is configured to sequentially input the plurality of sample data of each batch into the student model to generate a prediction result corresponding to each sample data, wherein the prediction result is a confidence distribution of the student model's prediction that each sample data belongs to the plurality of preset categories; A first determination module is configured to determine a first confidence threshold for each preset category in each batch based on the pseudo-label; A third generating module is used to generate a first high-confidence sample data set corresponding to the teacher model and a second high-confidence sample data set corresponding to the student model according to the multiple sample data, the pseudo labels, the prediction results and the first confidence threshold; A second determination module is used to determine a positive loss value and a negative loss value based on the first high-confidence sample data set, the second high-confidence sample data set, the pseudo label and the prediction result; A first updating module, configured to update parameters of a student model based on the positive loss value and the negative loss value; The second updating module is used to update the parameters of the teacher model based on the parameters of the updated student model.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When a processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Semi-supervised target detection method based on teach-student model

    CN115115886A

  • Pseudo-label unsupervised data training method and device, equipment and medium

    CN116912624A