Model training method and device for multi-tower neural network

Through the multi-source noise marking group and reliability weight of the multi-tower neural network, the noise interference problem caused by inconsistency in labels is solved, and the robustness and prediction accuracy of the model are improved.

CN118917379AActive Publication Date: 2024-11-08ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410918883.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-08
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

In the prior art, the markers provided by multiple marking systems are inconsistent, resulting in noise interference during model training, affecting model performance, and making it difficult to accurately predict.

Method used

A model training method for multi-tower neural network is proposed. By obtaining multi-source noise marking groups, aggregating the output probability, and building a composite loss function, the second stage of training is carried out based on the reliability of noise marking, improving the robustness of the model.

Benefits of technology

By aggregating multi-source noise markers and reliability weights, a more robust multi-tower neural network is trained, which improves prediction accuracy and reduces the impact of noise interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917379A_ABST
    Figure CN118917379A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a model training method and device for a multi-tower neural network, and the method comprises the steps: carrying out the first stage training of the multi-tower neural network through a first loss function based on an obtained sample set and a multi-source noise mark group corresponding to each sample in the sample set; determining a multi-source aggregation output probability of each sample corresponding to each marking source view angle; performing second-stage training on the multi-tower neural network based on a target loss function constructed by the first loss function and the second loss function; the second loss function is a weighted average value of loss between a probability value output by the multi-tower neural network to each sample in the sample set under each marked source view angle and a multi-source aggregation output probability of the corresponding sample corresponding to the corresponding marked source view angle; the weight of the loss corresponding to any sample under any marking source view is in negative correlation with the reliability degree of cognition of the multi-tower neural network on the sample under the marking source view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of machine learning, and in particular, to a model training method and device for a multi-tower neural network. Background Art

[0002] In the field of machine learning, true labels are usually assigned to samples manually by experts, professionals, or strictly trained teams based on the true attributes of the data and target standards. The process of obtaining true labels often takes a lot of time and manpower. Therefore, in related technologies, model training can also be performed based on labels provided by multiple different labeling systems.

[0003] However, different labeling systems may differ in judgment criteria, professional knowledge levels, etc., which may cause these labeling systems to provide inconsistent labels for the same sample. If these labels containing noise interference are directly used for model training, the model may learn incorrect patterns, seriously affecting the final model performance. Summary of the invention

[0004] In view of this, one or more embodiments of the present specification provide a model training method and device for a multi-tower neural network.

[0005] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:

[0006] According to a first aspect of one or more embodiments of this specification, a model training method for a multi-tower neural network is proposed, comprising:

[0007] Obtain a sample set and a multi-source noise label group corresponding to each sample in the sample set, and perform a first-stage training on the multi-tower neural network based on the sample set, the multi-source noise label group and the first loss function; wherein the multi-source noise label group includes noise labels added by label sources to corresponding samples respectively, and any noise label is used to indicate whether the sample belongs to a preset positive class from the perspective of the corresponding label source;

[0008] Determine the multi-source aggregate output probability of each sample corresponding to each labeled source perspective; wherein the multi-source aggregate output probability of any sample under any labeled source perspective is obtained by aggregating the probability values ​​of the multi-tower neural network output of any sample under each other labeled source perspective;

[0009] Construct a target loss function, and perform a second-stage training on the multi-tower neural network based on the target loss function; wherein the target loss function is a composite loss function including the first loss function and the second loss function, and the second loss function is a weighted average of the losses between the probability value output by the multi-tower neural network for each sample in the sample set at each labeled source perspective and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding labeled source perspective, wherein the weight of the loss between the probability value output for any sample at any labeled source perspective and the multi-source aggregate output probability of any sample corresponding to the corresponding labeled source perspective is negatively correlated with the reliability of the multi-tower neural network's cognition of any sample at any labeled source perspective.

[0010] According to a second aspect of one or more embodiments of this specification, a model training device for a multi-tower neural network is proposed, comprising:

[0011] The first stage training unit is used to obtain a sample set and a multi-source noise label group corresponding to each sample in the sample set, and perform first stage training on the multi-tower neural network based on the sample set, the multi-source noise label group and the first loss function; wherein the multi-source noise label group includes noise labels added by label sources to corresponding samples respectively, and any noise label is used to indicate whether the sample belongs to a preset positive class from the perspective of the corresponding label source;

[0012] A multi-source aggregate output probability determination unit is used to determine the multi-source aggregate output probability of each sample corresponding to each labeled source perspective; wherein the multi-source aggregate output probability of any sample under any labeled source perspective is obtained by aggregating the probability values ​​output by the multi-tower neural network for any sample under other labeled source perspectives;

[0013] The second stage training unit is used to construct a target loss function and perform second stage training on the multi-tower neural network based on the target loss function; wherein the target loss function is a composite loss function including the first loss function and the second loss function, and the second loss function is a weighted average of the losses between the probability value output by the multi-tower neural network for each sample in the sample set at each labeled source perspective and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding labeled source perspective, wherein the weight of the loss between the probability value output for any sample at any labeled source perspective and the multi-source aggregate output probability of any sample corresponding to the corresponding labeled source perspective is negatively correlated with the reliability of the multi-tower neural network's cognition of any sample at any labeled source perspective.

[0014] According to a third aspect of one or more embodiments of this specification, an electronic device is proposed, comprising: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method described in the first aspect above by running the executable instructions.

[0015] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0016] According to a fifth aspect of one or more embodiments of this specification, a computer program product is proposed, including a computer program / instruction, which implements the method described in the first aspect when executed by a processor.

[0017] In the technical solution provided in this specification, the multi-tower neural network is trained in the first stage based on the sample set, each multi-source noise label group and the first loss function, wherein, since any multi-source noise label group contains noise labels added to the same sample by multiple label sources, the trained teacher network can output the probability value of the sample belonging to the preset positive class from the perspective of each label source for a certain sample in the sample set. For any sample under any label source, the probability value of the multi-tower neural network output for any sample from the perspective of other label sources can be aggregated to obtain the multi-source aggregated output probability of each sample corresponding to the perspective of each label source. Afterwards, the target loss function can be constructed based on the first loss function and the second loss function, and the multi-tower neural network can be trained in the second stage. The second loss function is the weighted average of the loss between the probability value output by the multi-tower neural network for each sample in the sample set at each label source perspective and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding label source perspective. The lower the reliability of the multi-tower neural network's cognition of any sample at any label source perspective, the smaller the weight of the loss between the probability value output for the sample at the label source perspective and the multi-source aggregate output probability of the sample corresponding to the corresponding label source perspective. Applying the technical solution of this specification, based on the reliability of the multi-tower neural network's cognition of any sample at any label source perspective, the proportion of the loss between the probability value output for each sample at the label source perspective and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding label source perspective in the calculation result of the second loss function can be determined. When the multi-tower neural network is trained in the second stage through an objective function that includes a second loss function, when the reliability of the multi-tower neural network's cognition of a certain sample from a certain label source perspective is low, it can refer more to the loss between the probability value output by the label source for the sample and the multi-source aggregate output probability of the sample corresponding to the corresponding label source perspective, thereby accurately training a more robust neural network and effectively improving the final prediction accuracy.

[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the embodiments of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic diagram of a multi-tower neural network provided by an exemplary embodiment.

[0020] Figure 2 It is a flowchart of a model training method for a multi-tower neural network provided by an exemplary embodiment.

[0021] Figure 3It is a flowchart of an exemplary embodiment for calculating the reliability of a multi-tower neural network's cognition of any sample from the perspective of any labeling source.

[0022] Figure 4 It is a schematic diagram of a knowledge distillation architecture provided by an exemplary embodiment.

[0023] Figure 5 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0024] Figure 6 It is a block diagram of a model training device for a multi-tower neural network provided by an exemplary embodiment. DETAILED DESCRIPTION

[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0026] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0027] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0028] In the field of machine learning, true labels are the basis for model (i.e., neural network) learning and evaluation. These labels represent the true category, attribute, or expected output of the sample, and are the target that the model attempts to predict. However, the process of obtaining true labels usually relies on highly specialized knowledge and careful manual review. They are generally assigned to samples manually by experts, professionals, or strictly trained teams based on the true category, true attribute, and target standard of the sample data to ensure that each sample is accurately labeled. It can be seen that the process of obtaining true labels often takes a lot of time and manpower. Therefore, in this field, model training can also be performed based on multiple different labeling systems or labels provided by non-professionals.

[0029] However, different labeling systems or individuals may have different judgment standards, professional knowledge levels, etc., which may cause different labeling sources to provide inconsistent or even conflicting labels for the same sample. For example, in a fraud detection scenario, the operation data corresponding to a certain operation behavior is a sample. In the case where the operation behavior is a certain transaction, the operation data of the transaction (including features such as amount, time, and location) is fixed, but it may be marked by multiple risk analysts or different fraud detection systems. These marks reflect whether there is fraud in the transaction. However, each risk analyst has different experience, or the detection algorithm of the fraud detection system is different, so multiple risk analysts or different fraud detection systems may give different judgments, resulting in inconsistent fraud labels for the same transaction.

[0030] In this case, there must be problems such as inaccurate sample labeling or the labeling is completely inconsistent with the actual situation of the sample, that is, the noise interference problem. If the model is trained using labels containing a lot of noise interference, it may cause the model to learn the wrong pattern, which will seriously affect the model performance and reduce the final prediction accuracy.

[0031] In the related art, the methods for solving the above problems can be roughly divided into two categories: two-stage methods and end-to-end methods. In the two-stage method, the steps of multi-source label aggregation and model training are usually separated. First, the labels given by different label sources for the same sample are aggregated, and then the input sample and the aggregated labels are used to train the model in a traditional supervised manner. For example, for sample x i , the labels given by three different label sources are Then the three markers are aggregated to obtain Reunify with As x iThe above process often ignores the differences between multiple labels when aggregating multiple labels, and correspondingly ignores certain information in the sample, resulting in poor quality of aggregated labels, which is not conducive to model learning. In end-to-end methods, confusion matrices and classifiers of label sources are usually learned. For example, a crowdsourcing layer can be used to estimate the confusion matrix of multiple label sources and update the classifier at the same time. However, there is usually no guarantee that the confusion matrix estimated by such methods can correctly identify the confusing features of the label source.

[0032] Therefore, in order to solve the above problems, this specification proposes a model training method for a multi-tower neural network, which can determine the proportion of the loss between the probability value output for each sample from the perspective of the label source and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding label source perspective in the second loss function based on the reliability of the multi-tower neural network's cognition of any sample from the perspective of any label source. When the multi-tower neural network is trained in the second stage through an objective function including the second loss function, when the reliability of the multi-tower neural network's cognition of a sample from a certain label source perspective is low, more reference can be made to the loss between the probability value output by the label source for the sample and the multi-source aggregate output probability of the sample corresponding to the corresponding label source perspective, thereby accurately training a more robust neural network and effectively improving the final prediction accuracy.

[0033] Figure 1 FIG. 1 is a schematic diagram of a multi-tower neural network provided by an exemplary embodiment. Figure 1 As shown, when training the multi-tower neural network, the training data 11 includes sample data 110 and labeled source data provided by multiple label sources, such as labeled source data 111, labeled source data 112, and labeled source data 113. The multi-tower neural network 12 includes multiple parallel sub-networks corresponding to each label source, such as sub-network 121, sub-network 122, and sub-network 123. Each sub-network learns the behavior pattern of the corresponding label source based on the sample data 110 and the labeled source data provided by the corresponding label source, and outputs the prediction result of a sample from the perspective of the corresponding label source (such as prediction result 1, prediction result 2, and prediction result 3), so that the multi-tower neural network can output the prediction results for the sample from the perspective of each label source.

[0034] Figure 2 FIG. 1 is a flowchart of a model training method for a multi-tower neural network provided by an exemplary embodiment. Figure 2 As shown, the method may include the following steps:

[0035] Step 201, obtain a sample set and a multi-source noise label group corresponding to each sample in the sample set, and perform a first-stage training on the multi-tower neural network based on the sample set, the multi-source noise label group and the first loss function; wherein the multi-source noise label group includes noise labels added by label sources to corresponding samples respectively, and any noise label is used to characterize whether the sample belongs to a preset positive class from the perspective of the corresponding label source.

[0036] In one embodiment, a sample may also be referred to as an instance, which is the basic unit in a data set and is used to represent an independent, specific data record or event. Each sample contains a series of features, which may be specific numerical values, text, image fragments, or other forms of data used to describe the characteristics of the sample. For example, in a fraud detection task, a transaction is a sample, which may contain features such as amount, time, and location; in a spam filtering task, an email is a sample, which may contain features such as sender, recipient, email subject, and text content. A sample set usually contains multiple samples. Generally speaking, the more samples and corresponding labels there are, the better the performance of the trained model, but when the sample size reaches a certain level, the performance improvement that may be brought about by continuing to increase will gradually decrease, and may even increase costs due to limitations on computing resources. Technicians can set the sample size in the sample set according to actual needs, and this specification does not limit this.

[0037] In one embodiment, the label may also be referred to as a tag, category, target variable, and response variable, and is a judgment result associated with the sample. The judgment result may be a result manually determined by a professional or non-professional, or it may be a prediction result output by a neural network or a labeling system, and is not necessarily the true label of the sample. The noise label of the sample in the embodiment of this specification is different from the true label of the sample. It is a label added by non-professionals such as a neural network, a labeling system, or other outsourced labeling team, and the provider of these noise labels is used as the label source in the embodiment of this specification.

[0038] For a certain sample, if there are multiple labeling sources, there may be multiple noise labels added to the sample by different labeling sources, and these multiple noise labels constitute a multi-source noise label group for the sample. Each noise label in the multi-source noise label group represents the judgment result of the sample from the perspective of the corresponding labeling source.

[0039] Specifically, in a binary classification problem, any noise tag is used to characterize the judgment result of whether the sample belongs to the preset positive class from the perspective of the corresponding tag source. Here, the preset positive class refers to one of the target categories that the model needs to predict or classify, and usually represents the category with specific attributes or results that are of final concern. In short, the preset positive class is the category that the model is expected to recognize as "yes". In contrast, the preset negative class represents the category without the specific attribute or result. Of course, the definition of positive and negative classes depends entirely on the specific tasks and goals. In different application scenarios, the positive class can have different meanings. For example, in a fraud detection task, if the goal is to identify data with fraud risks, then the preset positive class can be "data with fraud risks", and the preset negative class can be "data without fraud risks"; in a spam filtering task, if the goal is to identify and isolate spam, then the preset positive class can be "spam", and the preset negative class can be "non-spam", and so on.

[0040] Furthermore, in binary classification problems, "0" and "1" are used to represent the labels of samples. i For example, if the label source 1 believes that sample x i Belongs to the preset positive class, then the noise mark added by marker source 1 to the sample The value of is 1, that is If the label source 2 considers sample x i If it does not belong to the preset positive class, then the noise mark added by the label source 2 to the sample The value of is 0, that is For example, in a fraud detection task, if the goal is to identify data with fraud risk, the operation data x of a transaction i , if the tag source 1 believes that there is a risk of fraud, then the tag source 1 will target the operation data x i Noise marker added The value of is 1, that is If the tag source 2 believes that there is no fraud risk, then the tag source 2 will i Noise marker added The value of is 0, that is

[0041] In one embodiment, a multi-tower neural network can be trained based on each sample in the sample set, each multi-source noise label group corresponding to each sample, and a first loss function. Specifically, there are n samples in the sample set X, that is, X = {x1, x2, ..., x n}, and there are s labeled sources, then for any sample x in the sample set i, there are s noise marks added by each mark source, and these noise marks constitute the multi-source noise mark group Y, that is, At this point, the dataset used to train the multi-tower neural network can be written as

[0042] As mentioned above, each subnetwork in the multi-tower neural network will learn the behavior pattern of the corresponding label source based on the sample data and the label source data provided by the corresponding label source, and output the prediction result of a certain sample from the perspective of the corresponding label source. The prediction result here can be the probability value (such as probability value 1, probability value 2 and probability value 3) output by the multi-tower neural network that a certain sample belongs to the preset positive class from the perspective of the corresponding label source, and the value range is [0,1]. Since the multi-tower neural network contains multiple parallel subnetworks corresponding to each label source one by one, the multi-tower neural network can output the probability value for the sample from the perspective of each label source. If the multi-tower neural network is from the perspective of label source j, for sample x i The output probability value If it is 0.8, it means that after learning the behavior pattern of label source j, the multi-tower neural network believes that the probability that label source j judges that the sample belongs to the preset positive class is 0.8.

[0043] After obtaining the data set for training the multi-tower neural network, a first loss function can be constructed based on the loss between the probability values ​​output by the multi-tower neural network for the samples in the sample set from the perspective of each label source and the noise labels added by the corresponding label sources, and the multi-tower neural network can be trained in the first stage based on the first loss function. Here, the first loss function can be the following loss function:

[0044]

[0045] Among them, if the multi-tower neural network is G Θ (x)|:X→R s , then the multi-tower neural network, from the perspective of the jth labeled source, targets the sample x in the sample set i The output probability value is Then it is the jth label source for sample x i The noise tag is directly provided. And l is used to represent the binary cross entropy loss function, which can be written as:

[0046]

[0047] Among them, h Θ (x i ) represents the neural network h Θ (x) for sample x i The output probability value is Represents sample x i The corresponding label can be a real label or a label provided by other label sources.

[0048] Then, by continuously adjusting the parameters of the multi-tower neural network, the and The loss between is used to minimize the value of this loss function, so that each sub-network in the multi-tower neural network can better learn the behavior pattern of the corresponding labeled source.

[0049] It should be noted that the loss between the probability value and the mark, the loss between the probability value and the probability value, etc. recorded in this specification can be understood as a characterization of the difference between the two. In the embodiments of this specification, the above-mentioned binary cross entropy loss function is usually used to calculate the loss of the two to measure the difference. Of course, technicians can also choose other applicable loss functions for calculation according to actual needs.

[0050] Step 202, determining the multi-source aggregate output probability of each sample corresponding to each labeled source perspective; wherein the multi-source aggregate output probability of any sample under any labeled source perspective is obtained by aggregating the probability values ​​of the multi-tower neural network output of any sample under each other labeled source perspective.

[0051] In one embodiment, since the multi-tower neural network can output probability values ​​for a certain sample from the perspective of each label source, the multi-source aggregate output probability of the sample can be determined based on the probability values ​​output by the multi-tower neural network for each sample from the perspective of multiple label sources. For the multi-source aggregate output probability of any sample from the perspective of any label source, the weighted average of the probability values ​​output by the multi-tower neural network for the sample from the perspectives of multiple label sources other than the current label source can be calculated.

[0052] In the weighted average calculation process, the weight of the probability value output for the sample from the perspective of any other label source is the reliability of the multi-tower neural network's cognition of the sample from the perspective of the corresponding other label source. The reliability of the multi-tower neural network's cognition of a sample from the perspective of a certain label source needs to be determined based on the reliability of the sample from the perspective of the label source and the reliability of the label source.

[0053] The following will be combined Figure 3 , the calculation process of the reliability of the multi-tower neural network's cognition of any sample from the perspective of any labeled source is described in detail.

[0054] Step 301, based on the loss between the probability value output by the multi-tower neural network for any sample from the perspective of any labeling source and the noise label added by the corresponding labeling source to any sample, determine the reliability of any sample from the perspective of any labeling source.

[0055] Specifically, the multi-tower neural network can be trained for multiple rounds, and in each round of training, the loss between the probability value output by the multi-tower neural network for the sample from the perspective of the label source and the noise label added by the corresponding label source to the sample is obtained as the single-round loss corresponding to the sample from the perspective of the label source.

[0056]

[0057] in, It is a multi-tower neural network for sample x from the perspective of labeled source j. i The output probability value is For the jth labeled source, for sample x i The noise tag provided directly, l is used to represent the calculation method of the binary cross entropy loss function described above. In the process of training the multi-tower neural network for multiple rounds, the multi-tower neural network will target the sample x from the perspective of the label source j in each round of training. i Output a probability value, That is, the sample x obtained in the kth round i Single-round loss at the viewpoint of labeled source j.

[0058] Afterwards, from any label source perspective, multiple single-round losses corresponding to any sample in multiple rounds of training can be aggregated and calculated, and the result of the aggregate calculation can be used as the reliability of the sample from the perspective of the label source. The specific calculation steps are as follows:

[0059] First, we can calculate the sample loss thresholds corresponding to each round of training. Specifically, in any round of training, we can calculate the set of single-round losses corresponding to each sample in the sample set from the perspective of the label source. Here, the single-round loss set is a vector. For example, for the j-th label source in the k-th round of training, the single-round loss set can be determined as Then, the value corresponding to the preset percentile of the single-round loss set can be calculated as the single-round loss threshold for the j-th labeled source in the k-th round of training. Here, the preset percentile can be adjusted by the technician based on actual situation and needs.

[0060] Afterwards, the indicator function II (·) can be used to select the single-round loss corresponding to any sample in each round of training from the perspective of any label source. In the indicator function, if the condition is met (i.e., the condition in the brackets of the indicator function), the value of the indicator function is 1; if the condition is not met, the value of the indicator function is 0. In the detailed calculation process, the single-round loss corresponding to any sample from the perspective of any label source can be compared with the sample loss threshold corresponding to the corresponding round of training to obtain the comparison result value of the sample corresponding to the training from the perspective of the label source, that is, the value of the indicator function corresponding to the sample from the perspective of the label source in the round of training. Among them, if the single-round loss corresponding to the sample from the perspective of the label source is less than the sample loss threshold corresponding to the round of training, the comparison result value is the first value, that is, 1; if the single-round loss corresponding to the sample from the perspective of the label source is not less than the sample loss threshold corresponding to the round of training, the comparison result value is the second value, that is, 0.

[0061] In other words, the indicator function can be used Make a selection, if the condition is met (i.e. ), represents the sample x in the kth round of training i The corresponding single-round loss at the jth labeled source perspective Less than the sample loss threshold corresponding to the e-th round of training At this time, the indicator function takes the value of 1; if the condition is not met (i.e. ), represents the sample x in the kth round of training i The corresponding single-round loss at the jth labeled source perspective Greater than or equal to the sample loss threshold corresponding to the kth round of training At this time, the value of the indicator function is 0. For example, the sample loss threshold for the jth labeled source in the eth round of training is When is 0.12, if the sample x in the kth round of training i Single-round loss from the perspective of labeled source j is 0.07, the indicator function takes the value of 1; the sample loss threshold for the jth labeled source in the k+1th round of training When 0.10, if the sample x in the k+1th round of training i Single-round loss from the perspective of labeled source j is 0.11, then the value of the indicator function is 0.

[0062] Finally, the comparison result values ​​of any sample corresponding to each round of training under any label source perspective are aggregated and calculated to obtain the aggregate comparison result value of the sample under the label source perspective. Specifically, the average of the comparison result values ​​of each round of training can be taken to obtain the aggregate comparison result value

[0063]

[0064] The aggregate comparison result value can be used as the calculation result of the aggregate calculation for the single-round loss recorded above, that is, the reliability of the sample from the perspective of the marking source.

[0065] Here, in the case of t rounds of training, the way of calculating the average value can fully consider the detailed information obtained by the neural network during the training process. Of course, since generally speaking, the more rounds of training a neural network undergoes, the better its performance, the comparison result values ​​of each round can be weighted, and a higher weight can be given to the comparison result values ​​obtained when the number of rounds is larger, so that the information obtained when the neural network is more reliable can play a greater role, and this specification does not limit this.

[0066] It should be noted that the process of calculating the sample loss threshold by the preset percentile and selecting it by the indicator function can be understood as the process of evaluating whether the probability value output by the multi-tower neural network for any sample in any round of training from the perspective of any label source is a probability value (also called noise) that has no reference value through the indicator function. Therefore, in the step of calculating the sample loss threshold by the preset percentile recorded above, if the technician believes that the probability value output by the current multi-tower neural network can more accurately reflect the true label of the sample, that is, if the current multi-tower neural network is more trusted, a higher percentile can be taken for the single-round loss set, indicating that the technician believes that the probability value output by the multi-tower neural network for any sample in any round of training from the perspective of any label source is a probability value with reference value in most cases. Correspondingly, if the technician believes that the probability value output by the current multi-tower neural network cannot more accurately reflect the true label of the sample, that is, if the current multi-tower neural network is less trusted, a lower percentile can be taken for the single-round loss set.

[0067] Step 302: Determine the reliability of any labeling source based on the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of any labeling source and the noise label added by the corresponding labeling source.

[0068] First of all, it should be noted that the prediction performance of the neural network can indirectly reflect the quality of its training data (especially the labeled data). When the neural network is trained based on accurate and consistent labels, in theory it should be able to make judgments similar to the label source on the same or similar samples. This is because the model has learned the behavior patterns and rules of the label source represented by the label. In other words, the model trained based on the labels added by the label source with better quality has a prediction result for a certain sample that is closer to the label added by the label source to the sample. Therefore, the similarity between the probability value output by the multi-tower neural network for a certain sample from the perspective of a certain label source and the noise label directly added by the label source to the sample can be calculated, and the reliability of the label source can be determined based on the obtained similarity. The reliability of the corresponding label source is positively correlated with the determined similarity, that is, the higher the determined similarity, the higher the reliability of the corresponding label source.

[0069] Here, the similarity is the similarity between all probability values ​​output by the multi-tower neural network from the perspective of a certain tag source and all noise tags added by the tag source. Specifically, if the multi-tower neural network is G Θ (x): X→R s , then the multi-tower neural network, from the perspective of the jth labeled source, for a sample x in the sample set i Can output a probability value Therefore, the probability values ​​output by the multi-tower neural network for all samples in the sample set from the perspective of the jth labeled source can form a multi-sample prediction value group, that is, a vector in Similarly, the jth label source for sample x i A noise marker is also provided directly Then the noise labels added by the jth label source to all samples in the sample set can also form a multi-sample label group, that is, a vector in Therefore, the similarity between the probability values ​​output by the multi-tower neural network for the samples in the sample set from the perspective of each label source and the noise labels added by the corresponding label source is the similarity between the multi-sample prediction value group and the multi-sample label group, that is, and The similarity between .

[0070] In one embodiment, if you want to accurately determine the reliability of each marking source within the range of multiple marking sources so that it has reference value, you need to unify the measurement standards. Therefore, you can accumulate the similarities between the probability values ​​of the multi-tower neural network output for the samples in the sample set from the perspective of multiple marking sources and the noise marks added by the corresponding marking sources to obtain the cumulative sum of similarities, and then use the ratio of the similarity between the probability values ​​of the samples in the sample set output from the perspective of each marking source and the noise marks added by the corresponding marking source to the cumulative sum of similarities as the reliability of the corresponding marking source, and the reliability of each marking source together constitutes a vector q:

[0071]

[0072] Among them, q i Indicates the reliability of the marking source i, S i It represents the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of the label source i (i.e., the multi-sample prediction value group mentioned above) and the noise label added by the corresponding label source (i.e., the multi-sample label group mentioned above). In the case of s label sources, the denominator in the above formula, i.e., the cumulative sum of similarities, can be obtained by accumulating the s calculated similarities. On this basis, the similarity corresponding to each label source is used as the numerator to obtain the reliability of each label source.

[0073] It can be seen from the above embodiments that the above processing converts all reliability levels to a common scale, and the obtained ratio value is always between 0 and 1, which can intuitively show the overall gap between each marking source, and then enable the reliability of all marking sources to be placed in the same framework for fair comparison, and accurately determine the reliability of each marking source; at the same time, this processing makes the sum of the reliability of each source equal to 1, which provides a reliable calculation basis for subsequent further processing using weighted random selection.

[0074] In one embodiment, a multi-tower neural network may be trained for multiple rounds, and in each round of training, the similarity between the probability values ​​output by the multi-tower neural network for samples in the sample set from the perspective of each label source and the noise labels added by the corresponding label source is obtained as the single-round reliability corresponding to each label source. It is understandable that the neural network will not reach the desired state after one training, and usually requires multiple training iterations. During multiple rounds of training, the neural network needs to minimize the value of the loss function by continuously adjusting its parameters. The smaller the loss function, the more consistent the model's prediction is with the actual situation. Therefore, in multiple rounds of training of the multi-tower neural network, the similarity between the probability values ​​output by the multi-tower neural network for samples in the sample set from the perspective of each label source and the noise labels added by the corresponding label source can be obtained once in each round. Specifically, if the probability values ​​output by the multi-tower neural network for all samples in the sample set from the perspective of the jth label source can form a multi-sample prediction value group, that is, Then in the kth round of training, we can get the multi-sample prediction value set of the kth round: at this time and The similarity between them is the similarity between the multi-sample prediction value group and the multi-sample label group in the kth round of training. Afterwards, a comprehensive calculation can be performed on the multiple single-round reliability obtained by each label source in multiple rounds of training, and the result of the comprehensive calculation is used as the reliability of the corresponding label source.

[0075] Here, the technician can choose a method to comprehensively calculate multiple single-round reliability levels according to actual needs. For example, the average of each single-round reliability level can be taken, and the reliability levels of each marking source can be used together to form a vector q t , then we can get:

[0076]

[0077] Among them, q i Indicates the reliability of the label source i. In the case of t rounds of training, the average value of the reliability of each label source obtained by the ratio method described above can be calculated, taking into full account the detailed information obtained by the neural network during the training process. Of course, since generally speaking, the more rounds of training a neural network undergoes, the better its performance, the reliability of each single round can be weighted, and a higher weight is given to the similarity obtained when the number of rounds is larger, so that the similarity obtained when the neural network is more reliable plays a greater role, and this specification does not limit this.

[0078] It can be seen from the above embodiments that the technical solution of this specification takes into account the information carried by the neural network during multiple rounds of training when calculating the similarity between the probability values ​​output by the multi-tower neural network for samples in the sample set from the perspective of each labeling source and the noise labels added by the corresponding labeling source. By calculating the cosine similarity between the multi-sample prediction value group and the multi-sample labeling group, the reliability of each labeling source is accurately measured.

[0079] Specifically, when determining the similarity between the probability values ​​output by the multi-tower neural network for the samples in the sample set from the perspective of each label source and the noise labels added by the corresponding label sources, the multi-sample prediction value group can be calculated. Multi-sample tag sets corresponding to the corresponding tag sources The cosine similarity between them is calculated, and the calculated cosine similarity is used as the single-round reliability, that is, calculation and Cosine similarity:

[0080]

[0081] in, It represents the prediction value group composed of multiple probability values ​​output by the multi-tower neural network for each sample in the sample set from the perspective of the jth labeled source during the kth round of training; It represents a multi-sample label group consisting of noise labels added by the jth label source to all samples in the sample set. and In fact, they are all vectors containing multiple values ​​(multiple components). Therefore, calculating the cosine similarity between the two is to calculate the ratio of the dot product (inner product) and the modulus. When calculating the dot product of two vectors, it is necessary to calculate the sum of the products of the corresponding components in the two, which is the numerator of the above formula. When calculating the modulus of each vector, it is obtained according to the Euclidean norm, which will not be repeated here.

[0082] Furthermore, by integrating the above method of calculating the cosine similarity with the above method of calculating the reliability of each tag source, we can obtain:

[0083]

[0084] Among them, the molecular part It represents the prediction value group composed of multiple probability values ​​output by the multi-tower neural network for each sample in the sample set from the perspective of the i-th label source during the k-th round of training. It represents a multi-sample label group consisting of noise labels added by the i-th label source to all samples in the sample set. The denominator represents the cumulative sum of similarities corresponding to multiple label sources.

[0085] In one embodiment, the above formula can be further optimized. For example, the reliability of each label source obtained in each round of training can be smoothed, and then the smoothed results obtained in each round of training can be comprehensively calculated. For example, the reliability of each label source obtained in each round of training can be processed by the Softmax-T function to obtain:

[0086]

[0087] Among them, T is an adjustable hyperparameter. It can be understood that when the reliability of each marking source is integrated into the same space, a curve can be obtained from each reliability "point". Then by adjusting the size of T in the above formula, the smoothness of the curve can be changed. When T = 1, it is a standard Softmax function, which plays a normalization role; when T>1, it will make the curve smoother, that is, the difference in the reliability of each marking source is reduced; and when T<1, it will make the curve sharper, that is, the difference in the reliability of each marking source is increased, and the prominent reliability "point" will be more prominent, thereby improving the boundary distinction between the reliability of each marking source. In the embodiments of this specification, a T value less than 1 is usually used to make the numerical value of the marking source with a high degree of reliability more prominent.

[0088] Step 303, based on the reliability of any sample from the perspective of any labeling source and the reliability of any labeling source, determine the reliability of the multi-tower neural network's cognition of any sample from the perspective of any labeling source.

[0089] In one embodiment, since the reliability of each sample is different from the perspective of different labeling sources, the reliability of each labeling source is also different. Therefore, it is necessary to comprehensively consider the sample dimension and the labeling source dimension to more accurately obtain the reliability of the multi-tower neural network's cognition of any sample from the perspective of any labeling source. If you want to accurately determine the reliability of each sample from the perspective of each labeling source to make it referenceable, you need to unify the measurement standards. Therefore, the reliability of the multi-tower neural network's cognition of any sample from the perspective of any labeling source can be calculated by the following fraction:

[0090]

[0091] The numerator is the multi-tower neural network for the sample x from the perspective of the jth labeled source. i The reliability of cognition The reliability of the jth label source The denominator is the product of the sample x iThe cumulative sum of the product of the reliability of each marker source and the reliability of the corresponding marker source. In the case of s marker sources, the reliability of the sample from the perspective of each marker source and the reliability of the corresponding marker source are accumulated.

[0092] The above processing converts the reliability of the multi-tower neural network's cognition of each sample from the perspective of each labeling source (when there are n samples and s labeling sources, n×s reliabilities of the samples can be obtained) to a common scale, and the obtained ratio value is always between 0 and 1, which enables the reliability of the multi-tower neural network's cognition of all samples to be fairly compared in the same framework; at the same time, it also provides a reliable basis for further calculation using the reliability as a weight.

[0093] In one embodiment, after the reliability of the multi-tower neural network's recognition of each sample from the perspective of each label source is obtained, it can be used as a corresponding weight to participate in the process of calculating the multi-source aggregate output probability. As mentioned above, for the multi-source aggregate output probability of any sample from the perspective of any label source, the weighted average of the probability values ​​output by the multi-tower neural network for the sample from the perspectives of multiple label sources other than the current label source can be calculated:

[0094]

[0095] in, is the multi-tower neural network for sample x from the perspective of the jth labeled source i The reliability of the cognition is also the reliability of the multi-tower neural network in the calculation process from the perspective of the jth label source for the sample x i The weight corresponding to the output probability value. In the calculation of weighted average, the denominator should be the sum of the weights, that is, the weights of the sample x by the s label sources. i The cumulative sum of the reliability of cognition.

[0096] It should be emphasized that when the probability values ​​of multiple marking sources are aggregated here, the probability value output by the current marking source does not participate in the calculation process. The goal of this step is to obtain the aggregation result of the probability values ​​output by multiple marking sources other than the current marking source for subsequent calculations.

[0097] It can be seen from the above embodiments that if the multi-tower neural network has a higher degree of reliability in recognizing a certain sample from the perspective of a certain label source, then the probability value of its output will have a greater impact on the final multi-source aggregate output probability, so that more reliable information plays a greater role and provides a more reliable basis for subsequent calculations.

[0098] Step 203, construct a target loss function, and perform a second stage of training on the multi-tower neural network based on the target loss function; wherein the target loss function is a composite loss function including the first loss function and the second loss function, and the second loss function is a weighted average of the losses between the probability value output by the multi-tower neural network for each sample in the sample set at each labeled source perspective and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding labeled source perspective, wherein the weight of the loss between the probability value output for any sample at any labeled source perspective and the multi-source aggregate output probability of any sample corresponding to the corresponding labeled source perspective is negatively correlated with the reliability of the multi-tower neural network's cognition of any sample at any labeled source perspective.

[0099] It is understandable that if the reliability of the multi-tower neural network's cognition of a sample from the perspective of a certain label source is lower, that is, the probability value output by the multi-tower neural network from the perspective of the label source may not be able to well reflect the true label of the sample, then in this case, more reference should be made to the multi-tower neural network's cognition of the sample from other label sources during training, that is, the multi-source aggregate output probability calculated above. If the reliability of the multi-tower neural network's cognition of a sample from the perspective of a certain label source is higher, that is, the probability value output by the multi-tower neural network from the perspective of the label source may already be able to well reflect the true label of the sample, in this case, there may be no need to refer more to its corresponding multi-source aggregate output probability. Therefore, based on the above considerations, the following loss function can be used as the second loss function:

[0100]

[0101] Among them, l is used to represent the calculation method of the binary cross entropy loss function recorded above, which can be used to calculate the multi-tower neural network for sample x from the perspective of the jth labeled source. i The output probability value is the same as the sample x i The loss between the corresponding multi-source aggregation output probabilities. is the weight corresponding to the loss. Here, if the multi-tower neural network analyzes the sample x from the perspective of the jth labeled source i The reliability of cognition The lower, The larger the value of , the greater the impact of the loss on the result of the second loss function after weighted average calculation; correspondingly, if the multi-tower neural network analyzes the sample x from the perspective of the jth labeled source i The reliability of cognition The higher, The smaller the value of , the smaller the impact of this loss on the result of the second loss function after weighted averaging.

[0102] After integrating the probability value output by the multi-tower neural network for each sample from the perspective of each label source and the loss of the multi-source aggregate output probability corresponding to it, reliable information transmission and exchange can be carried out between the sub-networks in the multi-tower neural network, further improving the performance of each sub-network.

[0103] In one embodiment, a composite loss function can be constructed based on the first loss function and the second loss function described above, and the composite loss function is used as the target loss function to perform the second stage of training on the multi-tower neural network. The first loss function and the second loss function of the target loss function can both include weight coefficients, and the value of the weight coefficient can be adjusted by the technician according to the actual situation and needs. Therefore, the target loss function can be expressed as follows:

[0104] L=αL B +βL M

[0105] Among them, L B is the first loss function, α is the weight of the first loss function, L M is the second loss function, and β is the weight of the second loss function. When the technicians believe that after the first stage of training, the multi-tower neural network has good performance and can output relatively accurate prediction results for samples, they can refer less to the loss used to reflect the loss between sub-networks, that is, the loss calculated by the second loss function. At this time, the weight of the second loss function can be appropriately reduced; correspondingly, if the first stage of training is not ideal, the weight of the second loss function can be appropriately increased.

[0106] By applying the technical solution of this specification, the proportion of the loss between the probability value output for each sample from the perspective of the label source and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding label source perspective in the calculation result of the second loss function can be determined based on the reliability of the multi-tower neural network's cognition of any sample from the perspective of any label source. When the multi-tower neural network is trained in the second stage through an objective function including the second loss function, when the reliability of the multi-tower neural network's cognition of a sample from a certain label source perspective is low, more reference can be made to the loss between the probability value output by the label source for the sample and the multi-source aggregate output probability of the sample corresponding to the corresponding label source perspective, thereby accurately training a neural network with higher robustness and effectively improving the final prediction accuracy.

[0107] In one embodiment, a multi-tower neural network may also be used as a teacher network, and the corresponding student network may be trained according to the distillation loss function.

[0108] Figure 4FIG. 1 is a schematic diagram of a knowledge distillation framework provided by an exemplary embodiment. Figure 4 As shown, it includes training data 41, teacher network 42 and student network 43.

[0109] Knowledge distillation is a model compression and transfer learning technique that aims to transfer the knowledge learned by a complex, large neural network, namely the teacher network42, to a smaller, more efficient network, namely the student network43, thereby reducing the model size and computational requirements while maintaining or approaching the performance of the original model. In some knowledge distillation settings, the student network may learn from multiple teacher networks, or from a multi-tower teacher network, thereby combining the advantages of multiple teacher networks or the advantages of multiple parallel sub-networks in a multi-tower teacher network, so that the performance of the student network is better than that of the teacher network.

[0110] Among them, the training data 41 contains multiple samples and corresponding true labels. In the process of knowledge distillation, it is first necessary to fully train the complex teacher network 42 based on the training data 41 until the teacher network 42 achieves a satisfactory performance level on a specific task. After the training of the teacher network 42 is completed, the training data 41 is forward propagated to output the probability distribution of each sample belonging to a certain category, also known as a soft label. During training, the student network 43 must not only learn the true labels of the samples, but also learn the soft labels of the teacher network, so as to transfer the knowledge of the teacher network 42 to the student network 43. Afterwards, the student network 43 can be trained based on the distillation loss function, and through optimization methods such as backpropagation and gradient descent, the parameters of the student network are continuously adjusted, so that it can not only fit the true labels of the samples, but also imitate the behavior of the teacher network 42.

[0111] In one embodiment, after obtaining the teacher network (that is, the aforementioned multi-tower neural network after the second stage of training), the student network can be trained according to the distillation loss function based on the teacher network to obtain a single-tower student network. The distillation loss function includes a hard label loss part and a soft label loss part. Among them, the hard label loss part usually uses the loss function used in traditional supervised learning, such as the cross entropy loss function, which is used to measure the difference between the output predicted by the student network and the true label. The soft label loss part is an embodiment of knowledge distillation based on the teacher network, which is used to measure the difference between the probability value predicted by the student network and the probability value output by the teacher network (that is, the soft label). When training the student network based on the distillation loss function, it is necessary to continuously adjust the parameters of the student network through optimization methods such as back propagation and gradient descent to narrow the above differences and obtain a student network that can ultimately meet performance expectations.

[0112] It is understandable that in the binary classification problem, the performance expectation of the final student network should be that the student network can more accurately determine whether a sample belongs to the preset positive class, and the quality of the training data is crucial to the prediction performance of the neural network. Therefore, in the case of multiple label sources, the noise labels added by the label sources with higher reliability should be selected to train the student network, that is, the noise labels added by the label sources with higher reliability should be used to construct the hard label loss part of the distillation loss function, that is, the probability of each noise label in each multi-source noise label group participating in the construction of the hard label loss part is positively correlated with the reliability of the corresponding label source. In the case where the teacher network is a multi-tower neural network, since the teacher network has learned the behavior patterns of each label source, the probability values ​​output from the label source perspective corresponding to the label source with higher reliability should also be selected to train the student network, that is, the probability values ​​output from the label source perspective corresponding to the label source with higher reliability should be used to construct the soft label loss part of the distillation loss function, that is, the probability values ​​output from the label source perspective corresponding to the label source with higher reliability should be used to construct the soft label loss part of the distillation loss function, that is, the probability values ​​output by the teacher network for the same sample from each label source perspective participate in the construction of the soft label loss part is positively correlated with the reliability of the corresponding label source. Here, the technician can determine whether to consider the reliability of the label source in both the hard label loss part and the soft label loss part according to actual needs. When the reliability of the label source is taken into account in the hard label loss part, one of the probability values ​​output by the teacher network can be selected in other ways to participate in the construction of the soft label loss part. Similarly, this manual does not limit this.

[0113] In one embodiment, the distillation loss function is constructed based on the distillation losses of multiple samples, that is, the corresponding distillation loss is calculated separately for each sample, and then the distillation loss corresponding to each sample is comprehensively calculated to obtain the overall distillation loss. At the same time, the hard label and / or soft label loss part of the distillation loss function includes a weight coefficient, and the value of the weight coefficient is adjustable. As mentioned above, the distillation loss function includes a hard label loss part and a soft label loss part, where the hard label loss part and the soft label loss part can respectively include an adjustable weight coefficient at the same time, or only a part of them can include an adjustable weight coefficient. In the case where the weight coefficient is not included, the coefficient of the corresponding loss part is 1 by default. By adjusting the weight coefficient, the degree of emphasis on the noise mark added by the label source and the probability value output by the teacher network can be changed during the training of the student network. If the technician believes that the accuracy of the noise mark provided by the label source is generally high, the weight coefficient of the hard label loss part can be increased, or the weight coefficient of the soft label loss part can be reduced, so that the process of training the student network pays more attention to reducing the difference between the output result of the student network and the noise mark added by the label source. If the technicians believe that the accuracy of the noise labels provided by the labeling source is generally low, they can increase the weight coefficient of the soft label loss part, or reduce the weight coefficient of the hard label loss part, so that the process of training the student network pays more attention to reducing the difference between the output results of the student network and the output results of the teacher network. By setting adjustable weight coefficients, the focus of attention can be flexibly changed according to the actual situation when training the student network, so that the trained student network can better adapt to the actual situation and have better performance.

[0114] In one embodiment, a weighted random selection method can be used to achieve that the probability of each noise label in each multi-source noise label group participating in the construction of the hard label loss part is positively correlated with the reliability of the corresponding label source, or that the probability value output by the teacher network for the same sample from the perspective of each label source participates in the construction of the soft label loss part is positively correlated with the reliability of the corresponding label source. Specifically, a weighted random selection process can be described by R(a,b), where a and b are both vectors containing multiple components, a=[a1,a2,...,a s ],b=[b1,b2,...,b s ], b i Indicates the corresponding a i The probability of being selected, that is, selecting an element from vector a according to the probability provided by vector b.

[0115] Therefore, combined with the above records about the distillation loss function, on the basis of using the binary cross entropy loss function, the following distillation loss function can be used to train the student network:

[0116]

[0117] Among them, α is the weight of the hard label loss part, and β is the weight of the soft label loss part. θ (x i ) is the student network for sample x i The output probability value, here the probability value is also the probability value of a sample belonging to the preset positive class, and the value range is [0,1]. Indicates that each label source is used for sample x i Add all noise markers, vector It means that the teacher network targets sample x from each labeled source perspective. i All probability values ​​of the output, and the vector q t The reliability of each source calculated previously is included in . Of course, here, the reliability of each label source can also be recalculated according to the aforementioned method based on the multi-tower neural network that has completed the second stage of training, and this application does not limit this.

[0118] In q t Based on the probability of each component in (that is, the reliability of each label source), the weighted random selection process in the above function usually selects the noise labels provided by the label sources with higher reliability from various noise labels to participate in the construction of the hard label loss part of the distillation loss function; at the same time, it also selects the probability values ​​output from the perspective corresponding to the label sources with higher reliability from the probability values ​​output by the teacher network to participate in the construction of the soft label loss part of the distillation loss function. On the whole, the student network can be trained based on more reliable data, and then a more robust neural network can be accurately trained, effectively improving the final prediction accuracy.

[0119] It should be noted that the weighted random selection method used in the embodiments of this specification does not completely ignore the noise mark corresponding to the less reliable mark source or the probability value of the teacher network output from its perspective. In the process of weighted random selection, there is still a probability of selecting the noise mark corresponding to the most unreliable mark source or the probability value of the teacher network output from its perspective, so that the student network can fully learn the diverse information provided by each mark source during the training process. Of course, technicians can also use other selection methods according to actual needs, such as directly selecting the noise mark corresponding to the most reliable mark source or the probability value of the teacher network output from its perspective to participate in the construction of the distillation loss function, and this specification does not limit this.

[0120] It can be seen from the above embodiments that the technical solution of this specification can calculate the reliability of each labeling source, and pay attention to the labeling sources with higher reliability in the process of knowledge distillation, so that the student network can be trained based on more reliable labels, and then a more robust neural network can be accurately trained, effectively improving the final prediction accuracy.

[0121] In one embodiment, the technical solution provided in this specification can be used for training multiple models, such as fraud detection models, spam filtering models, and disease detection models for processing binary classification problem models. As mentioned above, different models have different application scenarios, so the samples in the sample set used in model training, the noise tags in the multi-source noise tag group, and the definitions of the preset positive class in each model are all different. For example, when training a spam filtering model, the multiple samples contained in the sample set are multiple emails, and the multi-source noise tag group contains noise tags provided by multiple different tag sources for these emails, each noise tag indicates whether the corresponding tag source considers the corresponding email to be spam; in the diabetes detection model, the multiple samples contained in the sample set are health data of multiple users, and the multi-source noise tag group contains noise tags provided by multiple different tag sources for these health data, each noise tag indicates whether the corresponding tag source considers the corresponding health data to be the data of a user with diabetes, that is, whether the corresponding user has diabetes. Although the models are different in the above aspects, for any model, when training the model, the reliability of each labeling source can be determined by calculating the similarity between the noise label added by the labeling source and the probability value output by the teacher network from the perspective of the labeling source, and the student network can be guided to perform selective knowledge distillation based on the obtained reliability, so that the final model's prediction results for its task are more accurate.

[0122] Specifically, taking the training of fraud detection models as an example, during the training process of fraud detection models, samples may include operation data extracted from operation records. One piece of operation data corresponds to one operation behavior, that is, one operation behavior is a sample. For example, if the operation behavior is a certain transaction, then the operation data of the transaction is a sample, which may include features such as amount, time, and location. Each labeling source (non-professional, labeling team, and other neural networks or labeling systems) can determine whether the transaction has a fraud risk based on these features. At this time, the preset positive class is used to characterize the operation data with a fraud risk.

[0123] Specifically, for a piece of operation data, the noise tags added by different tag sources can be obtained. These noise tags represent whether the corresponding tag sources believe that the piece of operation data has a fraud risk.i , if the tag source 1 believes that there is a risk of fraud, then the tag source 1 will target the operation data x i Noise marker added The value of is 1, that is If the tag source 2 believes that there is no fraud risk, then the tag source 2 will i Noise marker added The value of is 0, that is After collecting multiple sets of operation data and their corresponding multi-source noise label groups, a multi-tower neural network can be trained based on the operation data and the corresponding noise labels and the first loss function. Each sub-network in the multi-tower neural network can learn the behavior pattern of the corresponding label source and output the judgment results of each operation data from the perspective of the corresponding label source, so that the multi-tower neural network can learn the behavior pattern of each label source as a whole.

[0124] Afterwards, a second loss function can be constructed based on the multi-source aggregate output probability of each sample corresponding to each label source perspective and the reliability of the multi-tower neural network's cognition of each sample from the corresponding label source perspective, and the multi-tower neural network is trained in the second stage based on the target loss function constructed by the first loss function and the second loss function. This allows more reference to the loss between the probability value output by the label source for the sample and the multi-source aggregate output probability of the sample corresponding to the corresponding label source perspective when the reliability of the multi-tower neural network's cognition of a sample from a certain label source perspective is low, thereby accurately training a more robust fraud detection model.

[0125] Furthermore, the obtained multi-tower neural network can be used as a teacher network, and the student network can be guided to perform selective knowledge distillation according to the reliability of each label source, thereby obtaining a single-tower student network for detecting whether the operation behavior corresponding to the operation data is a fraudulent behavior. Since more reliable label sources are given more attention during the student network training process, the fraud detection model obtained in the end is a model that is easier to deploy and more robust, which can not only save computing resources, but also more accurately determine whether the operation data has a fraud risk.

[0126] Figure 5 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 5At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, and may also include hardware required for other functions. One or more embodiments of this specification may be implemented based on software, such as the processor 502 reading the corresponding computer program from the non-volatile memory 510 into the memory 508 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0127] Please refer to Figure 6 , the model training device for multi-tower neural network can be applied to Figure 5 The device shown in the figure is used to implement the technical solution of this specification. Among them, the model training device for multi-tower neural network may include:

[0128] The first stage training unit 61 is used to obtain a sample set and a multi-source noise label group corresponding to each sample in the sample set, and perform first stage training on the multi-tower neural network based on the sample set, the multi-source noise label group and the first loss function; wherein the multi-source noise label group includes noise labels added by label sources to corresponding samples respectively, and any noise label is used to indicate whether the sample belongs to a preset positive class from the perspective of the corresponding label source;

[0129] The multi-source aggregate output probability determination unit 62 is used to determine the multi-source aggregate output probability of each sample corresponding to each labeled source perspective; wherein the multi-source aggregate output probability of any sample under any labeled source perspective is obtained by aggregating the probability values ​​of the output of any sample under other labeled source perspectives by the multi-tower neural network;

[0130] The second stage training unit 63 is used to construct a target loss function and perform second stage training on the multi-tower neural network based on the target loss function; wherein the target loss function is a composite loss function including the first loss function and the second loss function, and the second loss function is a weighted average of the losses between the probability value output by the multi-tower neural network for each sample in the sample set at each labeled source perspective and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding labeled source perspective, wherein the weight of the loss between the probability value output for any sample at any labeled source perspective and the multi-source aggregate output probability of any sample corresponding to the corresponding labeled source perspective is negatively correlated with the reliability of the multi-tower neural network's cognition of any sample at any labeled source perspective.

[0131] Optionally, the reliability of the multi-tower neural network's recognition of any sample from the perspective of any label source is calculated in the following manner:

[0132] Determine the reliability of any sample from the perspective of any label source based on the loss between the probability value output by the multi-tower neural network for any sample from the perspective of any label source and the noise mark added by the corresponding label source to the any sample; and determine the reliability of any label source based on the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of any label source and the noise mark added by the corresponding label source;

[0133] Based on the reliability of any one of the samples from the perspective of any one of the labeling sources and the reliability of any one of the labeling sources, the reliability of the multi-tower neural network's cognition of any one of the samples from the perspective of any one of the labeling sources is determined.

[0134] Optionally, determining the reliability of any sample from the perspective of any label source based on the loss between the probability value output by the multi-tower neural network for any sample from the perspective of any label source and the noise label added by the corresponding label source to the any sample includes:

[0135] Perform multiple rounds of training on the multi-tower neural network, and obtain in each round of training the loss between the probability value output by the multi-tower neural network for any sample from the perspective of any label source and the noise label added by the corresponding label source to any sample as the single-round loss corresponding to any sample from the perspective of any label source;

[0136] Under the perspective of any label source, multiple single-round losses corresponding to any sample in multiple rounds of training are aggregated and calculated, and the result of the aggregate calculation is used as the reliability of any sample under the perspective of any label source.

[0137] Optionally, performing aggregate calculation on a plurality of single-round losses respectively corresponding to any one of the samples in multiple rounds of training under the perspective of any one of the label sources includes:

[0138] In any round of training, based on a set of single-round losses corresponding to each sample in the sample set under the perspective of any label source, a sample loss threshold corresponding to the any round of training is determined;

[0139] In any round of training, the single-round loss corresponding to any sample from the perspective of any label source is compared with the sample loss threshold corresponding to any round of training, and a comparison result value of any sample corresponding to any round of training from the perspective of any label source is obtained; wherein, if the single-round loss corresponding to any sample from the perspective of any label source is less than the sample loss threshold corresponding to any round of training, the comparison result value is a first value, and if the single-round loss corresponding to any sample from the perspective of any label source is not less than the sample loss threshold corresponding to any round of training, the comparison result value is a second value;

[0140] Determine an aggregate comparison result value of any one of the samples under the perspective of any one of the label sources, wherein the aggregate comparison result value is obtained by aggregating and calculating comparison result values ​​of any one of the samples corresponding to each round of training under the perspective of any one of the label sources.

[0141] Optionally, determining the reliability of any label source based on the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of any label source and the noise label added by the corresponding label source includes:

[0142] Accumulating the similarities between the probability values ​​output by the multi-tower network for the samples in the sample set from the perspectives of multiple label sources and the noise labels added by the corresponding label sources to obtain a similarity accumulation sum;

[0143] The ratio of the similarity between the probability value output for the sample in the sample set from the perspective of any label source and the noise label added by the corresponding label source to the cumulative sum of the similarities is used as the reliability of the corresponding label source.

[0144] Optionally, determining the reliability of any label source based on the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of any label source and the noise label added by the corresponding label source includes:

[0145] Perform multiple rounds of training on the multi-tower neural network, and obtain in each round of training the similarity between the probability values ​​output by the multi-tower neural network for the samples in the sample set from the perspective of any label source and the noise labels added by the corresponding label source as the single-round reliability corresponding to any label source;

[0146] A comprehensive calculation is performed on a plurality of single-round reliability levels respectively obtained from the any label source in multiple rounds of training, and a result of the comprehensive calculation is used as the reliability level of the any label source.

[0147] Optionally, the single-round reliability is calculated in the following manner:

[0148] Calculate the cosine similarity between the multi-sample prediction value group and the multi-sample label group corresponding to the corresponding label source;

[0149] The cosine similarity is used as the single-round reliability.

[0150] Optionally, determining the reliability of the multi-tower neural network's recognition of each sample from the perspective of each labeling source based on the reliability of each sample in the sample set from the perspective of each labeling source and the reliability of each labeling source includes:

[0151] Calculate the product of the reliability of any sample under the perspective of any marking source and the reliability of any marking source; and calculate the cumulative sum of the products of the reliability of any sample under the perspective of each marking source and the reliability of the corresponding marking source;

[0152] The ratio of the calculated product to the cumulative sum of the calculated products is used as the reliability of the multi-tower neural network's cognition of any sample from the perspective of any label source.

[0153] Optionally, the multi-source aggregate output probability of any sample under the perspective of any labeled source is obtained by the following method:

[0154] For any sample under the perspective of any label source, calculate the weighted average of the probability values ​​output by the multi-tower neural network for any sample under the perspectives of multiple other label sources;

[0155] Among them, the weight of the probability value output for any sample from the perspective of any other label source is the reliability of the multi-tower neural network's cognition of any sample from the perspective of any other label source.

[0156] Optionally, the first loss function is constructed based on the loss between the probability values ​​output by the multi-tower neural network for the samples in the sample set from the perspective of each labeling source and the noise labels added by the corresponding labeling sources.

[0157] Optionally, the first loss function and / or the second loss function of the objective loss function includes a weight coefficient, and the value of the weight coefficient is adjustable.

[0158] Optionally, the device further comprises:

[0159] The student network training unit 64 is used to use the multi-tower neural network as a teacher network and train the student network according to the distillation loss function; wherein the distillation loss function includes a hard label loss part and a soft label loss part, and the probability of each noise label in each multi-source noise label group participating in the construction of the hard label loss part is positively correlated with the reliability of the corresponding label source, and / or the probability value output by the teacher network for the same sample from the perspective of each label source participates in the construction of the soft label loss part, which is also positively correlated with the reliability of the corresponding label source.

[0160] Optionally, the distillation loss function is constructed based on the distillation losses of multiple samples, and the hard label and / or soft label loss part of the distillation loss function includes a weight coefficient, and the value of the weight coefficient is adjustable.

[0161] Optionally, when the hard label loss part of the distillation loss function is positively correlated with the reliability of the corresponding label source:

[0162] The reliability is used to perform weighted random selection on each noise marker in the multi-source noise marker group corresponding to any sample;

[0163] The obtained weighted random selection result is used to construct the hard label loss part of the distillation loss function together with the probability value output by the student network for any sample.

[0164] Optionally, when the soft label loss part of the distillation loss function is positively correlated with the reliability of the corresponding label source:

[0165] The reliability is used to perform weighted random selection on the probability values ​​output by the teacher network for any sample under the perspective of each label source;

[0166] The obtained weighted random selection result is used to construct the soft label loss part of the distillation loss function together with the probability value output by the student network for any sample.

[0167] Optionally, the teacher network includes multiple parallel sub-networks corresponding one-to-one to the label sources, each sub-network is used to output a probability value that the sample belongs to a preset positive class from the perspective of the corresponding label source; the student network is a single-tower neural network.

[0168] Optionally, the sample includes operation data extracted from operation records, the preset positive class is used to characterize operation data with fraud risks, and the teacher network and / or student network includes a fraud detection model for detecting whether the operation behavior corresponding to the operation data is fraudulent behavior.

[0169] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0170] Accordingly, the present specification also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.

[0171] Accordingly, an embodiment of this specification also proposes a computer program product, which is configured to execute the method described in any of the above embodiments.

[0172] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0173] Based on the same concept as the above method, this specification also provides an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements the steps of the method described in any of the above embodiments by running the executable instructions.

[0174] Based on the same concept as the above method, this specification also provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the method described in any of the above embodiments are implemented.

[0175] Based on the same concept as the above method, this specification also provides a computer program product, including a computer program / instruction, which implements the steps of the method described in any of the above embodiments when executed by a processor.

Claims

1. A model training method for a multi-tower neural network, characterized in that: include: Obtain a sample set and a multi-source noise label group corresponding to each sample in the sample set, and perform a first-stage training on the multi-tower neural network based on the sample set, the multi-source noise label group and the first loss function; wherein the multi-source noise label group includes noise labels added by label sources to corresponding samples respectively, and any noise label is used to indicate whether the sample belongs to a preset positive class from the perspective of the corresponding label source; Determine the multi-source aggregate output probability of each sample corresponding to each labeled source perspective; wherein the multi-source aggregate output probability of any sample under any labeled source perspective is obtained by aggregating the probability values ​​of the multi-tower neural network output of any sample under each other labeled source perspective; Construct a target loss function, and perform a second-stage training on the multi-tower neural network based on the target loss function; wherein the target loss function is a composite loss function including the first loss function and the second loss function, and the second loss function is a weighted average of the losses between the probability value output by the multi-tower neural network for each sample in the sample set at each labeled source perspective and the multi-source aggregate output probability of the corresponding sample corresponding to the corresponding labeled source perspective, wherein the weight of the loss between the probability value output for any sample at any labeled source perspective and the multi-source aggregate output probability of any sample corresponding to the corresponding labeled source perspective is negatively correlated with the reliability of the multi-tower neural network's cognition of any sample at any labeled source perspective.

2. The method according to claim 1, characterized in that The reliability of the multi-tower neural network's recognition of any sample from the perspective of any label source is calculated in the following way: Determine the reliability of any sample from the perspective of any label source based on the loss between the probability value output by the multi-tower neural network for any sample from the perspective of any label source and the noise label added by the corresponding label source to any sample; And, based on the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of the any label source and the noise label added by the corresponding label source, determining the reliability of the any label source; Based on the reliability of any one of the samples from the perspective of any one of the labeling sources and the reliability of any one of the labeling sources, the reliability of the multi-tower neural network's cognition of any one of the samples from the perspective of any one of the labeling sources is determined.

3. The method according to claim 2, characterized in that Determining the reliability of any sample from the perspective of any label source based on the loss between the probability value output by the multi-tower neural network for any sample from the perspective of any label source and the noise label added by the corresponding label source to the any sample, including: Perform multiple rounds of training on the multi-tower neural network, and obtain in each round of training the loss between the probability value output by the multi-tower neural network for any sample from the perspective of any label source and the noise label added by the corresponding label source to any sample as the single-round loss corresponding to any sample from the perspective of any label source; Under the perspective of any label source, multiple single-round losses corresponding to any sample in multiple rounds of training are aggregated and calculated, and the result of the aggregate calculation is used as the reliability of any sample under the perspective of any label source.

4. The method according to claim 3, characterized in that The step of performing aggregate calculation on a plurality of single-round losses respectively corresponding to the any sample in multiple rounds of training under the perspective of any label source includes: In any round of training, based on a set of single-round losses corresponding to each sample in the sample set under the perspective of any label source, a sample loss threshold corresponding to the any round of training is determined; In any round of training, the single-round loss corresponding to any sample from the perspective of any label source is compared with the sample loss threshold corresponding to any round of training, and a comparison result value of any sample corresponding to any round of training from the perspective of any label source is obtained; wherein, if the single-round loss corresponding to any sample from the perspective of any label source is less than the sample loss threshold corresponding to any round of training, the comparison result value is a first value, and if the single-round loss corresponding to any sample from the perspective of any label source is not less than the sample loss threshold corresponding to any round of training, the comparison result value is a second value; Determine an aggregate comparison result value of any one of the samples under the perspective of any one of the label sources, wherein the aggregate comparison result value is obtained by aggregating and calculating comparison result values ​​of any one of the samples corresponding to each round of training under the perspective of any one of the label sources.

5. The method according to claim 2, characterized in that: The determining the reliability of any label source based on the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of any label source and the noise label added by the corresponding label source includes: Accumulating the similarities between the probability values ​​output by the multi-tower network for the samples in the sample set from the perspectives of multiple label sources and the noise labels added by the corresponding label sources to obtain a similarity accumulation sum; The ratio of the similarity between the probability value output for the sample in the sample set from the perspective of any label source and the noise label added by the corresponding label source to the cumulative sum of the similarities is used as the reliability of the corresponding label source.

6. The method according to claim 2, characterized in that The determining the reliability of any label source based on the similarity between the probability value output by the multi-tower neural network for the samples in the sample set from the perspective of any label source and the noise label added by the corresponding label source includes: Perform multiple rounds of training on the multi-tower neural network, and obtain in each round of training the similarity between the probability values ​​output by the multi-tower neural network for the samples in the sample set from the perspective of any label source and the noise labels added by the corresponding label source as the single-round reliability corresponding to any label source; A comprehensive calculation is performed on a plurality of single-round reliability levels respectively obtained from the any label source in multiple rounds of training, and a result of the comprehensive calculation is used as the reliability level of the any label source.

7. The method according to claim 6, characterized in that The single-round reliability is calculated as follows: Calculate the cosine similarity between the multi-sample prediction value group and the multi-sample label group corresponding to the corresponding label source; The cosine similarity is used as the single-round reliability.

8. The method according to claim 2, characterized in that: The step of determining the reliability of the multi-tower neural network's recognition of each sample from the perspective of each label source based on the reliability of each sample in the sample set from the perspective of each label source and the reliability of each label source includes: Calculate the product of the reliability of any sample under the perspective of any marking source and the reliability of any marking source; and calculate the cumulative sum of the products of the reliability of any sample under the perspective of each marking source and the reliability of the corresponding marking source; The ratio of the calculated product to the cumulative sum of the calculated products is used as the reliability of the multi-tower neural network's cognition of any sample from the perspective of any label source.

9. The method according to claim 1, characterized in that: The multi-source aggregation output probability of any sample under any label source perspective is obtained in the following way: For any sample under the perspective of any label source, calculate the weighted average of the probability values ​​output by the multi-tower neural network for any sample under the perspectives of multiple other label sources; Among them, the weight of the probability value output for any sample from the perspective of any other label source is the reliability of the multi-tower neural network's cognition of any sample from the perspective of any other label source.

10. The method according to claim 1, characterized in that The first loss function is constructed based on the loss between the probability values ​​of the samples in the sample set output by the multi-tower neural network from the perspective of each label source and the noise labels added by the corresponding label sources.

11. The method according to claim 1, characterized in that: The first loss function and / or the second loss function of the objective loss function include a weight coefficient, and the value of the weight coefficient is adjustable.

12. The method according to claim 1, characterized in that Also includes: The multi-tower neural network is used as a teacher network, and the student network is trained according to a distillation loss function; wherein the distillation loss function includes a hard label loss part and a soft label loss part, and the probability of each noise label in each multi-source noise label group participating in the construction of the hard label loss part is positively correlated with the reliability of the corresponding label source, and / or the probability value output by the teacher network for the same sample from the perspective of each label source participates in the construction of the soft label loss part, which is also positively correlated with the reliability of the corresponding label source.

13. The method according to claim 12, characterized in that The distillation loss function is constructed based on the distillation losses of multiple samples. The hard label and / or soft label loss part of the distillation loss function includes a weight coefficient, and the value of the weight coefficient is adjustable.

14. The method according to claim 12, characterized in that In the case where the hard label loss part of the distillation loss function is positively correlated with the reliability of the corresponding label source: The reliability is used to perform weighted random selection on each noise marker in the multi-source noise marker group corresponding to any sample; The obtained weighted random selection result is used to construct the hard label loss part of the distillation loss function together with the probability value output by the student network for any sample.

15. The method according to claim 12, characterized in that In the case where the soft label loss part of the distillation loss function is positively correlated with the reliability of the corresponding label source: The reliability is used to perform weighted random selection on the probability values ​​output by the teacher network for any sample under the perspective of each label source; The obtained weighted random selection result is used to construct the soft label loss part of the distillation loss function together with the probability value output by the student network for any sample.

16. The method according to claim 12, characterized in that The teacher network includes a plurality of parallel sub-networks corresponding one to one with the label source, and each sub-network is used to output a probability value that the sample belongs to a preset positive class from the perspective of the corresponding label source; the student network is a single-tower neural network.

17. The method according to claim 12, characterized in that The sample includes operation data extracted from operation records, the preset positive class is used to characterize operation data with fraud risks, and the teacher network and / or student network includes a fraud detection model for detecting whether the operation behavior corresponding to the operation data is fraudulent behavior.

18. An electronic device, characterized in that: include: processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method according to any one of claims 1 to 17 by executing the executable instructions.

19. A computer-readable storage medium, characterized in that: Computer instructions are stored thereon, and when the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 17 are implemented.

20. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 17.

Citation Information

Patent Citations

  • Neural network training method, neural network training device and electronic equipment

    CN112348161A

  • Model determination method and device, electronic equipment and memory

    CN113947195A

  • Rotating machine fault diagnosis method based on multi-source migration fusion contraction framework

    CN114048568A

  • Data-analysis-based, noisy labeled and unlabeled datapoint detection and rectification for machine-learning

    US20210357776A1