Neural network model training method, device, electronic device and computer-readable storage medium
By training neural network models, high -quality sample data is automatically selected, solving the problem of high costs in the field of risk control, and realizing efficient and accurate model training.
Patent Information
- Application Number
- CN202010944652.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-10
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2040-09-10
AI Technical Summary
In the field of risk control, the training sample labeling of business processing network models is expensive and requires a lot of manpower, material resources and financial resources. A network model that can automatically screen out high-quality sample data is now needed.
By training a neural network model, this model can obtain the first sample and second sample set of the current training cycle, enter the data screening network model to obtain the sample probability set, determine the third sample set according to the probability threshold, and bring it it Enter the business processing network model to determine the loss value of the model, and finally train the data screening network model based on the loss value.
The automatic screening of high -quality sample data is realized, the cost of sample labeling is reduced, and the efficiency and accuracy of model training is improved.
Smart Images

Figure CN114254723B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of neural network technology, and in particular to a neural network model training method, device, electronic device and computer-readable storage medium. Background Art
[0002] When training the model, high-quality samples have the purpose of advancing the completion progress of the learning object and are conducive to the convergence of the model.
[0003] In the field of risk control, the cost of labeling business processing network models, such as the training samples of risk control models, is very expensive. It requires the risk control department or even the public security department to conduct investigations and collect evidence, which consumes a huge amount of manpower, material resources, and financial resources. If high-quality samples in the training samples can be screened out in advance and only the screened high-quality samples are labeled, the cost of sample labeling will be greatly reduced.
[0004] There is an urgent need to train a network model that can automatically filter out high-quality sample data for business processing network models. Summary of the invention
[0005] The embodiments of the present application provide a neural network model training method, device, electronic device and computer-readable storage medium, which can train a network model that can automatically screen out high-quality sample data.
[0006] In a first aspect, an embodiment of the present application provides a neural network model training method, comprising:
[0007] Obtaining a first sample set and a second sample set of a current training cycle, wherein the first sample set is a sample set selected from a sample pool, and the second sample set is obtained according to a data set of a previous training cycle, and the data set of the previous training cycle is obtained according to a business processing network model in a training cycle before the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers;
[0008] Inputting the first sample set and the second sample set into a data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the number of target samples;
[0009] Determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold;
[0010] Inputting the third sample set into the business processing network model to determine a model loss value of the business processing network model;
[0011] The data screening network model is trained according to the model loss value.
[0012] In some implementations, inputting the first sample set and the second sample set into a data screening network model to obtain a sample probability set includes:
[0013] Performing a fusion process on the features in the first sample set and the second sample set to obtain a fused sample set, wherein the number of samples in the fused sample set is the target number of samples;
[0014] The fused sample set is input into the data screening network model to obtain the sample probability set.
[0015] In some implementations, determining the third sample set from the first sample set according to the sample probability set and a preset probability threshold includes:
[0016] Processing the probabilities in the sample probability set according to the probability threshold to obtain a processed sample probability set;
[0017] The processed sample probability set is cross-multiplied with the first sample set to obtain the third sample set.
[0018] In some implementations, processing the probabilities in the sample probability set according to the probability threshold to obtain a processed sample probability set includes:
[0019] The probability that the probability value in the sample probability set is less than the probability threshold is set to 0;
[0020] The probability of a probability value in the sample probability set being greater than or equal to the probability threshold is set to 1, to obtain the processed probability set.
[0021] In some implementations, before acquiring the first sample set and the second sample set of the current training cycle, the method further includes:
[0022] Obtaining the last training cycle data set;
[0023] Based on the target number of samples, the sample bit padding process is performed on the data set of the previous training cycle to obtain the second sample set.
[0024] In some implementations, inputting the third sample set into the service processing network model to determine the model loss value of the service processing network model includes:
[0025] The third sample set is input into the business processing network model to determine the model loss value and the current training cycle data set obtained in the current training cycle according to the business processing network model.
[0026] In some embodiments, training the data screening network model according to the model loss value includes:
[0027] Updating model parameters of the data screening network model and the business processing network model according to the model loss value;
[0028] Determining whether the data screening network model converges;
[0029] If not converged, updating the first sample set according to the sample pool, and updating the second sample set according to the current training cycle data set, and returning to execute the step of obtaining the first sample set and the second sample set of the current training cycle;
[0030] If converged, it is determined that the data screening network model has completed training, and a trained data screening network model is obtained.
[0031] In some implementations, after determining that the data screening network model has completed training and obtaining the trained data screening network model, the method further includes:
[0032] Get the data set to be screened;
[0033] Screening the data set to be screened based on the trained data screening network model to obtain a data set to be labeled;
[0034] Obtain the labeling results of the data in the data set to be labeled and obtain a labeled sample set;
[0035] The service processing network model to be trained is trained according to the labeled sample set.
[0036] In a second aspect, the embodiment of the present application further provides a neural network model training device, comprising:
[0037] an acquisition unit, configured to acquire a first sample set and a second sample set of a current training cycle, wherein the first sample set is a sample set selected from a sample pool, and the second sample set is a data set of a previous training cycle obtained according to a business processing network model in a previous training cycle of the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers;
[0038] A processing unit, configured to input the first sample set and the second sample set into a data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the number of target samples;
[0039] The processing unit is further configured to determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold;
[0040] The processing unit is further configured to input the third sample set into the service processing network model to determine a model loss value of the service processing network model;
[0041] The processing unit is also used to train the data screening network model according to the model loss value.
[0042] In some embodiments, the processing unit is further configured to:
[0043] Performing a fusion process on the features in the first sample set and the second sample set to obtain a fused sample set, wherein the number of samples in the fused sample set is the target number of samples;
[0044] The fused sample set is input into the data screening network model to obtain the sample probability set.
[0045] In some embodiments, the processing unit is further configured to:
[0046] Processing the probabilities in the sample probability set according to the probability threshold to obtain a processed sample probability set;
[0047] The processed sample probability set is cross-multiplied with the first sample set to obtain the third sample set.
[0048] In some embodiments, the processing unit is further configured to:
[0049] The probability that the probability value in the sample probability set is less than the probability threshold is set to 0;
[0050] The probability of a probability value in the sample probability set being greater than or equal to the probability threshold is set to 1, to obtain the processed probability set.
[0051] In some embodiments, the processing unit is further configured to:
[0052] Obtaining the last training cycle data set;
[0053] Based on the target number of samples, the sample bit padding process is performed on the data set of the previous training cycle to obtain the second sample set.
[0054] In some embodiments, the processing unit is further configured to:
[0055] The third sample set is input into the business processing network model to determine the model loss value and the current training cycle data set obtained in the current training cycle according to the business processing network model.
[0056] In some embodiments, the processing unit is further configured to:
[0057] Updating model parameters of the data screening network model and the business processing network model according to the model loss value;
[0058] Determining whether the data screening network model converges;
[0059] If not converged, updating the first sample set according to the sample pool, and updating the second sample set according to the current training cycle data set, and returning to execute the step of obtaining the first sample set and the second sample set of the current training cycle;
[0060] If converged, it is determined that the data screening network model has completed training, and a trained data screening network model is obtained.
[0061] In some embodiments, the processing unit is further configured to:
[0062] Get the data set to be screened;
[0063] Screening the data set to be screened based on the trained data screening network model to obtain a data set to be labeled;
[0064] Obtain the labeling results of the data in the data set to be labeled and obtain a labeled sample set;
[0065] The service processing network model to be trained is trained according to the labeled sample set.
[0066] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, it executes the steps of any one of the neural network model training methods provided in the embodiments of the present application.
[0067] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for loading by a processor to execute the steps in any one of the neural network model training methods provided in the embodiments of the present application.
[0068] In an embodiment of the present application, a neural network model training device obtains a first sample set and a second sample set in the current training cycle, wherein the first sample set is a sample set selected from a sample pool, the second sample set is obtained according to a data set of a previous training cycle, the data set of the previous training cycle is obtained according to a business processing network model in a previous training cycle of the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers; then the first sample set and the second sample set are input into a data screening network model to obtain a sample probability set, the number of probability values in the sample probability set is the same as the target sample number; a third sample set is determined from the first sample set according to the sample probability set and a preset probability threshold; then the third sample set is input into the business processing network model to determine the model loss value of the business processing network model; finally, the data screening network model is trained according to the model loss value. In this scheme, the data screening network model is trained according to the model loss value of the business processing network model. Since the data screening network model is trained in combination with the parameters of the business processing network model during training, the trained data screening network model can screen out high-quality sample data for the business processing network model. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0070] Figure 1 This is a schematic diagram of an application scenario of the neural network model training method provided in an embodiment of the present application;
[0071] Figure 2 It is a flow chart of a neural network model training method provided in an embodiment of the present application;
[0072] Figure 3 is another flowchart of the neural network model training method provided in an embodiment of the present application;
[0073] Figure 4 It is a flow chart of a training method for a business processing network model in a neural network model training method provided in an embodiment of the present application;
[0074] Figure 5 It is a schematic diagram of an application scenario of the data screening network model provided in an embodiment of the present application;
[0075] Figure 6It is a structural schematic diagram of a neural network model training device provided in an embodiment of the present application;
[0076] Figure 7 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] 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 those skilled in the art without creative work are within the scope of protection of this application.
[0078] In the following description, the specific embodiments of the present application will be described with reference to the steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to herein includes the operation of a computer processing unit by an electronic signal representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.
[0079] The principles of the present application may be operated using many other general or specific purpose computing, communication environments or configurations. Examples of well-known computing systems, environments and configurations suitable for use with the present application may include, but are not limited to, handheld phones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe computers, and distributed computing environments, including any of the above systems or devices.
[0080] The terms "first", "second", and "third" in this application are used to distinguish different objects rather than to describe a specific order. In addition, the terms "include", "have", and any variations thereof are intended to cover non-exclusive inclusions.
[0081] See also Figure 1 , Figure 1A schematic diagram of an application scenario of a neural network model training method provided for an embodiment of the present application, the application scenario includes a data screening network model and a business processing network model, the neural network model training method includes multiple training cycles, in the current training cycle, first, a first sample set is obtained from a sample pool, and a second sample set is obtained, wherein the second sample set is obtained according to a data set of a previous training cycle (obtained through a sigmod layer), the data set of the previous training cycle is obtained by the previous training cycle of the current training cycle according to the business processing network model, and the number of samples of the first sample set and the second sample set are both the target number of samples.
[0082] Then, the first sample set and the second sample set are input into the data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the target sample number, and then a third sample set is determined from the first sample set according to the sample probability set and a preset probability threshold; and the third sample set is input into the business processing network model, and the last layer of the business processing network model outputs the current training cycle data set of the current training cycle (used to generate the second sample set of the next training cycle), and determines the model loss value LOSS of the business processing network model; finally, the data screening network model and the business processing network model are trained according to the model loss value (feedback incentive reward) until the data screening network model converges, and the training of the data screening network model is stopped.
[0083] In some embodiments, the data screening network model mentioned in the present application is a reinforcement learning (RL) model, and the business processing network model is a machine learning (ML) model or a deep learning (DL) model.
[0084] The purpose of the embodiments of the present application is mainly to train a data screening network model, and perform data screening based on the trained data screening network model, and then manually label the screened data to obtain labeled samples, and then train the business processing network model based on the labeled samples, thereby reducing the sample labeling amount of the business processing network model while ensuring the model prediction accuracy.
[0085] See also Figure 2 , Figure 2 : is a flowchart of a neural network model training method provided by an embodiment of the present application. The execution subject of the neural network model training method may be a neural network model training device provided by an embodiment of the present application, or an electronic device integrating the neural network model training device, wherein the neural network model training device may be implemented in hardware or software, and the electronic device may be a smart phone, a tablet computer, a PDA, or a laptop computer, etc. The neural network model training method may include:
[0086] 201. Obtain a first sample set and a second sample set of a current training cycle.
[0087] Among them, the first sample set is a sample set selected from a sample pool, the second sample set is obtained based on a data set from a previous training cycle, and the data set from a previous training cycle is obtained from a business processing network model in a previous training cycle of the current training cycle. The number of samples in the first sample set and the second sample set are both the target number of samples.
[0088] It should be noted that, if the current training cycle is the first training cycle, the second sample set is 0 at this time.
[0089] Specifically, the present application randomly selects a first sample set from a sample pool with replacement, wherein the first sample set includes labeled training sample features containing h1*w1 dimensions, wherein h1 is the number of samples, and w1 is the feature dimension of the samples; the second sample set contains features of h1*w2 dimensions, wherein w2=1 when the business processing network model is a regression model, w2=2 when it is a binary classification model, and w2=the number of categories of the multi-classification model when it is a multi-classification model.
[0090] The samples in the first sample set may include multiple feature dimensions, such as the user's age, education level, gender, loan amount and other feature dimensions.
[0091] In this embodiment, before obtaining the first sample set and the second sample set of the current training cycle, the method further includes:
[0092] a. Get the dataset of the previous training cycle.
[0093] b. Based on the target number of samples, the sample bits of the data set of the previous training cycle are padded to obtain the second sample set.
[0094] That is, when the data set output by the last layer of the business processing network model in the previous training cycle is h2*w2, it is necessary to expand h2*w2 to h1*w2, keep the position of the original features, fill in the missing positions with 0, so that the number of samples in the first sample set and the second sample set remain consistent.
[0095] In this embodiment, the value of the target number of samples in different training cycles may be the same or different, and is not specifically limited here.
[0096] 202. Input the first sample set and the second sample set into a data screening network model to obtain a sample probability set.
[0097] The number of probability values in the sample probability set is the same as the number of target samples.
[0098] Specifically, the first sample set and the second sample set are input into a data screening network model to obtain a sample probability set, including:
[0099] a. Fusing the features in the first sample set and the second sample set to obtain a fused sample set.
[0100] Among them, the features of the first sample set and the second sample set are fused, specifically, the feature dimension w1 of the samples in the first sample set is added to the feature dimension w2 of the samples in the second sample set. At this time, the obtained fused sample set is h1*(w1+w2), that is, the input sample feature dimension of the data screening network model is h1*(w1+w2).
[0101] In this way, each sample in the fused sample set contains the feature dimensions (w1+w2) of the samples in the first sample set and the second sample set, wherein the number of samples in the fused sample set is the same as the number of target samples.
[0102] b. Input the fused sample set into the data screening network model to obtain the sample probability set.
[0103] After obtaining the fused sample set h1*(w1+w2), the labeled training features of the fused sample set h1*(w1+w2) are input into the data screening network model. The output vector of the model represents the sample probability set X1={p1,p2,p3…,p h1}.
[0104] In this embodiment, since the input of the data screening network model incorporates the second sample set, the second sample set is data obtained according to the business processing network model. Therefore, when the data screening network model performs data processing, the data of the business processing network model is combined, so that the data screening network model and the business processing network model are associated.
[0105] 203. Determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold.
[0106] In this embodiment, the value of the probability threshold α may be any number in the interval [0.2, 0.4], wherein the determining the third sample set from the first sample set according to the sample probability set and the preset probability threshold comprises:
[0107] a. Process the probabilities in the sample probability set according to the probability threshold to obtain a processed sample probability set.
[0108] Specifically, the probability that the probability value in the sample probability set is less than the probability threshold is set to 0; the probability that the probability value in the sample probability set is greater than or equal to the probability threshold is set to 1, and the processed probability set is obtained, and the formula is:
[0109] b. Perform a cross multiplication process on the processed sample probability set and the first sample set to obtain the third sample set.
[0110] In this embodiment, the formula of the processed sample probability set is X2=p(X1), and then the X2 vector is cross-multiplied with the first sample set h1*w1, and the samples in the first sample set that are greater than 0 are retained, and the final retained sample feature dimension is the third sample set h2*w1.
[0111] 204. Input the third sample set into the business processing network model to determine a model loss value of the business processing network model.
[0112] Specifically, the third sample set is input into the business processing network model to determine the model loss value and the current training cycle data set h2*w2 obtained according to the last layer of the business processing network model in the current training cycle, wherein when the second sample set is obtained in the next training cycle, the current training cycle data set h2*w2 will be expanded to h1*w2, that is, the original feature position is kept unchanged, and the insufficient positions of the samples are filled with 0, and then the second sample set of the current training cycle is used as the second sample set of the next training cycle after passing through the sigmod layer.
[0113] 205. The data screening network model is trained according to the model loss value.
[0114] In this embodiment, although the purpose is to train the data screening network model, the model parameters of the business processing network model also need to be updated while training the data screening network model. At this time, the data screening network model and the business processing network model are trained in conjunction.
[0115] Specifically, if Figure 3 As shown, the training of the data screening network model according to the model loss value includes:
[0116] 301. Update the model parameters of the data screening network model and the business processing network model according to the model loss value.
[0117] At this time, the model loss value of the business processing network model is used as feedback incentives (rewards) for the data screening network model and the business processing network model, and the parameters of the two models are updated at the same time.
[0118] 302. Determine whether the data screening network model converges. If not, execute step 303. If yes, execute step 304.
[0119] 303 . Update the first sample set according to the sample pool, and update the second sample set according to the current training cycle data set, and return to execute step 201 .
[0120] If the data screening network model has not converged, it means that the data screening network model has not been trained. At this time, the data screening network model needs to be trained for a training cycle and the same training steps as the current training cycle need to be performed in the next training cycle. At this time, the first sample set and the second sample set in step 201 need to be updated.
[0121] Specifically, the first sample set is randomly selected from the sample pool again with replacement, and then the original first sample set is replaced with the newly selected first sample set, and the second sample set is updated according to the current training cycle data set (ie, the original second sample set is replaced).
[0122] 304. Determine whether the data screening network model has completed training, and obtain a trained data screening network model.
[0123] After obtaining the trained data screening network model, it is necessary to apply the data screening network model to screen the data, and then train the business processing model based on the screened data.
[0124] like Figure 4 As shown, Figure 4 A flowchart of a training method for a business processing network model to be trained based on the trained data screening network model in an embodiment of the present application.
[0125] 401. Obtain the data set to be screened.
[0126] Among them, the samples included in the training set to be screened are unlabeled samples.
[0127] 402. The to-be-screened data set is screened based on the trained data screening network model to obtain a to-be-labeled data set.
[0128] Specifically, the data set to be screened is input into the trained data screening network model, and the data set to be labeled is output, wherein the data set to be labeled is a collection of data with higher quality in the data set to be screened relative to the trained business processing network model.
[0129] 403. Obtain the labeling results of the data in the to-be-labeled data set to obtain a labeling sample set.
[0130] After the generation of annotated data sets is determined, sample annotators can annotate the data. Screening the data before annotating can increase the annotation speed and reduce the annotation cost. This is especially true for the training of risk control models in the risk control field. The annotation cost of risk control model samples is very high. Only annotating the screened high-quality samples will greatly reduce the sample annotation cost.
[0131] 404. Train the business processing network model to be trained according to the labeled sample set.
[0132] The training business processing network model is trained based on the labeled high-quality sample set. During model training, high-quality samples have the purpose of promoting the completion progress of the learning object and are conducive to the convergence of the model. Therefore, at this time, the speed of model training can also be improved.
[0133] This embodiment uses the trained data screening network model to automatically screen the data set to be screened, and can also avoid the blindness and limitations of manual sample selection.
[0134] See also Figure 5 , Figure 5 A schematic diagram of an application scenario of a data screening network model provided for an embodiment of the present application, firstly, an unlabeled sample set is input into the data screening network model, then the data screening network model performs data screening on the sample set, filters out low-quality samples in the sample set, outputs high-quality samples, and then manually labels the high-quality samples to obtain a labeled high-quality sample set, and then trains the business processing network model based on the labeled high-quality sample set. Specifically, the parameters of the business processing network model are updated based on the model loss value of the business processing network model as the reward of the business processing network model. High-quality samples have the purpose of advancing the completion progress of the learning object, which is conducive to the convergence of the model. This embodiment only needs to label high-quality samples, which reduces the amount of sample labeling, saves labeling costs, and can improve the training efficiency of the model.
[0135] In an embodiment of the present application, a neural network model training device obtains a first sample set and a second sample set in the current training cycle, wherein the first sample set is a sample set selected from a sample pool, the second sample set is obtained according to a data set of a previous training cycle, the data set of the previous training cycle is obtained according to a business processing network model in a previous training cycle of the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers; then the first sample set and the second sample set are input into a data screening network model to obtain a sample probability set, the number of probability values in the sample probability set is the same as the target sample number; a third sample set is determined from the first sample set according to the sample probability set and a preset probability threshold; then the third sample set is input into the business processing network model to determine the model loss value of the business processing network model; finally, the data screening network model is trained according to the model loss value. In this scheme, the data screening network model is trained according to the model loss value of the business processing network model. Since the data screening network model is trained in combination with the parameters of the business processing network model during training, the trained data screening network model can screen out high-quality sample data for the business processing network model.
[0136] In order to facilitate better implementation of the neural network model training method provided in the embodiment of the present application, the embodiment of the present application also provides a device based on the above neural network model training method. The meanings of the terms are the same as those in the above neural network model training method, and the specific implementation details can refer to the description in the method embodiment.
[0137] See also Figure 6 , Figure 6 A schematic diagram of the structure of a neural network model training device provided in an embodiment of the present application, wherein the neural network model training device 600 may include an acquisition unit 601 and a processing unit 602, wherein:
[0138] An acquisition unit 601 is used to acquire a first sample set and a second sample set of a current training cycle, wherein the first sample set is a sample set selected from a sample pool, and the second sample set is a data set of a previous training cycle obtained according to a business processing network model in a previous training cycle of the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers;
[0139] Processing unit 602 is used to input the first sample set and the second sample set into a data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the number of target samples;
[0140] The processing unit 602 is further configured to determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold;
[0141] The processing unit 602 is further configured to input the third sample set into the service processing network model to determine a model loss value of the service processing network model;
[0142] The processing unit 602 is further used to train the data screening network model according to the model loss value.
[0143] In some implementations, the processing unit 602 is further configured to:
[0144] Performing a fusion process on the features in the first sample set and the second sample set to obtain a fused sample set, wherein the number of samples in the fused sample set is the target number of samples;
[0145] The fused sample set is input into the data screening network model to obtain the sample probability set.
[0146] In some implementations, the processing unit 602 is further configured to:
[0147] Processing the probabilities in the sample probability set according to the probability threshold to obtain a processed sample probability set;
[0148] The processed sample probability set is cross-multiplied with the first sample set to obtain the third sample set.
[0149] In some implementations, the processing unit 602 is further configured to:
[0150] The probability that the probability value in the sample probability set is less than the probability threshold is set to 0;
[0151] The probability of a probability value in the sample probability set being greater than or equal to the probability threshold is set to 1, to obtain the processed probability set.
[0152] In some implementations, the processing unit 602 is further configured to:
[0153] Obtaining the last training cycle data set;
[0154] Based on the target number of samples, the sample bit padding process is performed on the data set of the previous training cycle to obtain the second sample set.
[0155] In some implementations, the processing unit 602 is further configured to:
[0156] The third sample set is input into the business processing network model to determine the model loss value and the current training cycle data set obtained in the current training cycle according to the business processing network model.
[0157] In some implementations, the processing unit 602 is further configured to:
[0158] Updating model parameters of the data screening network model and the business processing network model according to the model loss value;
[0159] Determining whether the data screening network model converges;
[0160] If not converged, updating the first sample set according to the sample pool, and updating the second sample set according to the current training cycle data set, and returning to execute the step of obtaining the first sample set and the second sample set of the current training cycle;
[0161] If converged, it is determined that the data screening network model has completed training, and a trained data screening network model is obtained.
[0162] In some implementations, the processing unit 602 is further configured to:
[0163] Get the data set to be screened;
[0164] Screening the data set to be screened based on the trained data screening network model to obtain a data set to be labeled;
[0165] Obtain the labeling results of the data in the data set to be labeled and obtain a labeled sample set;
[0166] The service processing network model to be trained is trained according to the labeled sample set.
[0167] In the embodiment of the present application, the acquisition unit 601 acquires the first sample set and the second sample set of the current training cycle, wherein the first sample set is a sample set selected from the sample pool, the second sample set is obtained according to the data set of the previous training cycle, the data set of the previous training cycle is obtained according to the business processing network model in the previous training cycle of the current training cycle, and the number of samples in the first sample set and the second sample set are both the target number of samples; then the processing unit 602 inputs the first sample set and the second sample set into the data screening network model to obtain a sample probability set, and the number of probability values in the sample probability set is the same as the target number of samples; according to the sample probability set and the preset probability threshold, a third sample set is determined from the first sample set; then the third sample set is input into the business processing network model to determine the model loss value of the business processing network model; finally, the data screening network model is trained according to the model loss value. In this scheme, the data screening network model is trained according to the model loss value of the business processing network model. Since the data screening network model is trained in combination with the parameters of the business processing network model during training, the trained data screening network model can screen out high-quality sample data for the business processing network model.
[0168] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0169] refer to Figure 7 The embodiment of the present application provides a server 700, which may include one or more processing core processors 701, one or more computer-readable storage media memories 702, radio frequency (RF) circuits 703, power supplies 704, input units 705, and display units 706. Those skilled in the art will appreciate that Figure 7 The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0170] The processor 701 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server. By running or executing software programs and / or modules stored in the memory 702, and calling data stored in the memory 702, the processor 701 performs various functions of the server and processes data, thereby monitoring the server as a whole. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701.
[0171] The memory 702 may be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702 .
[0172] The RF circuit 703 may be used for receiving and sending signals during the process of sending and receiving information.
[0173] The server also includes a power supply 704 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 701 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0174] The server may further include an input unit 705, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0175] The server may also include a display unit 706, which may be used to display information input by a user or information provided to a user and various graphical user interfaces of the server, which may be composed of graphics, text, icons, videos, and any combination thereof. Specifically in this embodiment, the processor 701 in the server will load the executable files corresponding to the processes of one or more applications into the memory 702 according to the following instructions, and the processor 701 will run the applications stored in the memory 702, thereby realizing various functions, as follows:
[0176] Obtaining a first sample set and a second sample set of a current training cycle, wherein the first sample set is a sample set selected from a sample pool, and the second sample set is obtained according to a data set of a previous training cycle, and the data set of the previous training cycle is obtained according to a business processing network model in a training cycle before the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers;
[0177] Inputting the first sample set and the second sample set into a data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the number of target samples;
[0178] Determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold;
[0179] Inputting the third sample set into the business processing network model to determine a model loss value of the business processing network model;
[0180] The data screening network model is trained according to the model loss value.
[0181] In the above embodiments, the description of each embodiment has its own focus. For the part that is not described in detail in a certain embodiment, please refer to the detailed description of the neural network model training method above, which will not be repeated here.
[0182] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0183] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores a plurality of instructions, which can be loaded by a processor to execute the steps in any one of the neural network model training methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0184] Obtaining a first sample set and a second sample set of a current training cycle, wherein the first sample set is a sample set selected from a sample pool, and the second sample set is obtained according to a data set of a previous training cycle, and the data set of the previous training cycle is obtained according to a business processing network model in a training cycle before the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers;
[0185] Inputting the first sample set and the second sample set into a data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the number of target samples;
[0186] Determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold;
[0187] Inputting the third sample set into the business processing network model to determine a model loss value of the business processing network model;
[0188] The data screening network model is trained according to the model loss value.
[0189] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0190] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0191] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the neural network model training methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the neural network model training methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0192] The above is a detailed introduction to a neural network model training method, device, electronic device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A neural network model training method, characterized in that: include: Obtaining a first sample set and a second sample set of the current training cycle, wherein the first sample set is a sample set selected from a sample pool, wherein the samples in the first sample set include at least two feature dimensions of the user's age, education level, gender, and loan amount, and the second sample set is obtained based on a data set of a previous training cycle, wherein the data set of the previous training cycle is obtained based on a business processing network model in a training cycle previous to the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers; Inputting the first sample set and the second sample set into a data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the number of target samples; Determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold; Inputting the third sample set into the business processing network model to determine a model loss value of the business processing network model; Training the data screening network model according to the model loss value; Obtaining a data set to be screened, wherein the data set to be screened is a risk control model sample; Screening the data set to be screened based on the trained data screening network model to obtain a data set to be labeled; Obtain the labeling results of the data in the data set to be labeled and obtain a labeled sample set; The business processing network model to be trained is trained according to the labeled sample set, wherein the business processing network model is a risk control model.
2. The method according to claim 1, characterized in that: The step of inputting the first sample set and the second sample set into a data screening network model to obtain a sample probability set includes: Performing a fusion process on the features in the first sample set and the second sample set to obtain a fused sample set, wherein the number of samples in the fused sample set is the target number of samples; The fused sample set is input into the data screening network model to obtain the sample probability set.
3. The method according to claim 1, characterized in that The determining the third sample set from the first sample set according to the sample probability set and a preset probability threshold comprises: Processing the probabilities in the sample probability set according to the probability threshold to obtain a processed sample probability set; The processed sample probability set is cross-multiplied with the first sample set to obtain the third sample set.
4. The method according to claim 1, characterized in that: The processing of the probabilities in the sample probability set according to the probability threshold to obtain a processed sample probability set includes: The probability that the probability value in the sample probability set is less than the probability threshold is set to 0; The probability of a probability value in the sample probability set being greater than or equal to the probability threshold is set to 1, to obtain the processed probability set.
5. The method according to claim 1, characterized in that Before obtaining the first sample set and the second sample set of the current training cycle, the method further includes: Obtaining the last training cycle data set; Based on the target number of samples, the sample bit padding process is performed on the data set of the previous training cycle to obtain the second sample set.
6. The method according to claim 1, characterized in that Inputting the third sample set into the service processing network model to determine the model loss value of the service processing network model includes: The third sample set is input into the business processing network model to determine the model loss value and the current training cycle data set obtained in the current training cycle according to the business processing network model.
7. The method according to claim 6, characterized in that The training of the data screening network model according to the model loss value comprises: Updating model parameters of the data screening network model and the business processing network model according to the model loss value; Determining whether the data screening network model converges; If not converged, updating the first sample set according to the sample pool, and updating the second sample set according to the current training cycle data set, and returning to execute the step of obtaining the first sample set and the second sample set of the current training cycle; If converged, it is determined that the data screening network model has completed training, and a trained data screening network model is obtained.
8. A neural network model training device, characterized in that: include: an acquisition unit, configured to acquire a first sample set and a second sample set of a current training cycle, wherein the first sample set is a sample set selected from a sample pool, wherein the samples in the first sample set include at least two feature dimensions of a user's age, education level, gender, and loan amount, and the second sample set is a data set of a previous training cycle obtained according to a business processing network model in a previous training cycle of the current training cycle, and the number of samples in the first sample set and the second sample set are both target sample numbers; A processing unit, configured to input the first sample set and the second sample set into a data screening network model to obtain a sample probability set, wherein the number of probability values in the sample probability set is the same as the number of target samples; The processing unit is further configured to determine a third sample set from the first sample set according to the sample probability set and a preset probability threshold; The processing unit is further configured to input the third sample set into the service processing network model to determine a model loss value of the service processing network model; The processing unit is further used to train the data screening network model according to the model loss value; The processing unit is also used to obtain a data set to be screened, wherein the data set to be screened is a risk control model sample; screen the data set to be screened based on the trained data screening network model to obtain a data set to be labeled; obtain the labeling results of the data in the data set to be labeled to obtain a labeled sample set; train the business processing network model to be trained according to the labeled sample set, wherein the business processing network model is a risk control model.
9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, it executes the neural network model training method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute the neural network model training method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Risk control model training method
CN112907371A