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

Through the prediction model optimization method, the predictive probability distribution is updated using pseudo-probability distribution and initial label deletion labels, the problem of remote supervision of labeled noise data is solved, the model performance is improved, and the dependence on prior information is avoided.

CN114580377BActive Publication Date: 2024-11-01ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011386291.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-01
Publication Date
2024-11-01
Estimated Expiration
2040-12-01

AI Technical Summary

Technical Problem

In the existing relationship extraction task, the noise data generated by the remote supervision labeling method affects the model effect, and the existing noise filtering and re-labeling methods have defects, relying on additional prior information or being unable to completely eliminate the noise impact.

Method used

The predicted probability distribution of the training instance is obtained through the prediction model, a pseudo-probability distribution is generated, and the prediction model is optimized using the pseudo-probability distribution and initial labels, and the predicted probability distribution is updated to correct the noise data and improve the model performance.

Benefits of technology

This method can effectively correct noise data, improve model performance, and does not rely on additional prior information, and has a wider range of application, which can reduce the impact of noise annotations on the model without relying on additional information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114580377B_ABST
    Figure CN114580377B_ABST
Patent Text Reader

Abstract

The present disclosure provides a model optimization method, device, electronic device and readable storage medium, the method comprising: using a prediction model to obtain a predicted probability distribution of each of a plurality of training instances on a label set, the training instances comprising an entity pair and a context in which the entity pair is located; according to the predicted probability distribution of each of the plurality of training instances on the label set, obtaining a pseudo probability distribution of each of the plurality of training instances on the label set; optimizing the prediction model using the pseudo probability distribution of each of the plurality of training instances on the label set and the initial labels of each of the plurality of training instances to update the predicted probability distribution of each of the plurality of training instances on the label set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a model optimization method, device, electronic device, and readable storage medium. Background Art

[0002] The goal of the relationship extraction task is to predict the relationship between entity pairs based on a pre-set set of labels given an entity pair and the context in which the entity pair exists. For example, for the entity pair "Beijing" and "China", the sentence "Beijing is the capital of China" expresses the relationship between them as " / region / country / capital". As an important subtask of information extraction, relationship extraction can be applied to many downstream tasks, such as the construction and expansion of knowledge graphs, question-answering systems, search engines, etc. At present, supervised learning methods are mainly used for relationship extraction: the relationship extraction task is regarded as a classification problem, effective features are designed based on training data, various classification models are learned, and then the trained classifier is used to predict the relationship. However, this method requires a large amount of manually annotated training corpus, and corpus annotation work is usually very time-consuming and labor-intensive. In order to break the limitations of manually annotated data in supervised learning, a remote supervision algorithm is proposed. The core idea of ​​the algorithm is to align the text with a large-scale knowledge graph and annotate the text using the existing entity relationships in the knowledge graph. Although the remote supervision labeling method is very efficient and can theoretically construct an unlimited amount of labeled data, the data labeled based on the remote supervision method usually contains a lot of noise, which will have a certain impact on the effect of the model. Therefore, reducing the negative impact of noise data on the model is of great significance to improving the effect of the model. Summary of the invention

[0003] In order to solve the problems in the related art, the embodiments of the present disclosure provide a model optimization method, device, electronic device and readable storage medium.

[0004] In a first aspect, a model optimization method is provided in an embodiment of the present disclosure.

[0005] Specifically, the model optimization method includes:

[0006] Using a prediction model to obtain a predicted probability distribution of each of a plurality of training instances on a label set, the training instances comprising an entity pair and a context in which the entity pair exists;

[0007] According to the predicted probability distribution of each of the multiple training instances on the label set, obtaining the pseudo probability distribution of each of the multiple training instances on the label set;

[0008] The prediction model is optimized using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

[0009] In combination with the first aspect, in a first implementation of the first aspect of the present disclosure, obtaining a predicted probability distribution of each of the plurality of training instances on a label set includes:

[0010] Obtaining a vector representation of the training instance;

[0011] The vector representation of the training instance is input into a fully connected layer with softmax as the activation function for nonlinear transformation to obtain the predicted probability distribution of the training instance on the label set.

[0012] In combination with the first implementation of the first aspect, in a second implementation of the first aspect of the present disclosure, obtaining the vector representation of the training instance includes:

[0013] Obtain a vector list of the training instance, the vector list including a word vector of each word in the training instance and a position vector of the word relative to an entity in the training instance;

[0014] Performing feature extraction on the vector list of the training instance to obtain a feature extraction result;

[0015] Performing maximum pooling on the feature extraction result with the position of the entity as a boundary to obtain a pooling result;

[0016] A vector representation of the training instance is obtained according to the pooling result.

[0017] In combination with the second implementation of the first aspect, in a third implementation of the first aspect of the present disclosure:

[0018] The extracting features from the vector list of the training instance to obtain the feature extraction result comprises: inputting the vector list into a convolutional neural network, and the convolutional neural network outputting the feature extraction result;

[0019] The obtaining the vector representation of the training instance according to the pooling result includes: inputting the pooling result into a discard layer, and the discard layer outputting the vector representation.

[0020] In combination with the first aspect, in a fourth implementation of the first aspect of the present disclosure, the method further includes:

[0021] The prediction model is pre-trained using the multiple training instances and the initial labels of each of the multiple training instances.

[0022] In combination with the first aspect, in a fifth implementation of the first aspect of the present disclosure, the optimizing the prediction model using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set includes:

[0023] Determine the pseudo labels of each of the multiple training instances according to the pseudo probability distribution of each of the multiple training instances on the label set;

[0024] Using the multiple training instances, their respective initial labels and their respective pseudo labels, the parameters of the prediction model are updated according to the first constraint condition to update the predicted probability distribution of each of the multiple training instances on the label set.

[0025] In combination with the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect of the present disclosure, the first constraint condition includes:

[0026] Minimize the total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial labels and pseudo labels of the corresponding training instances.

[0027] In combination with the sixth implementation manner of the first aspect, in a seventh implementation manner of the first aspect of the present disclosure, the first constraint condition further includes:

[0028] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0029] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0030] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0031] In combination with the first aspect, in an eighth implementation manner of the first aspect of the present disclosure, obtaining the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set includes:

[0032] According to the predicted probability distribution of each of the multiple training instances and the second constraint, a pseudo probability distribution of each of the multiple training instances on the label set is determined.

[0033] In combination with the eighth implementation manner of the first aspect, in a ninth implementation manner of the first aspect of the present disclosure, the second constraint condition includes:

[0034] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0035] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0036] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0037] In combination with the first aspect, in a tenth implementation manner of the first aspect of the present disclosure, the method further includes:

[0038] Using the initial labels of the multiple training instances, the pseudo probability distribution of the multiple training instances on the label set is initialized.

[0039] In combination with the first aspect, in an eleventh implementation manner of the first aspect of the present disclosure, the label represents the relationship between entities in the corresponding training instance.

[0040] In a second aspect, an embodiment of the present disclosure provides a model optimization device, the model optimization device comprising:

[0041] A first acquisition module is configured to use a prediction model to acquire a predicted probability distribution of each of a plurality of training instances on a label set, wherein the training instances include entity pairs and contexts where the entity pairs are located;

[0042] A second acquisition module is configured to acquire a pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set;

[0043] The optimization module is configured to optimize the prediction model using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

[0044] In combination with the second aspect, in a first implementation of the second aspect of the present disclosure, obtaining a predicted probability distribution of each of the plurality of training instances on the label set includes:

[0045] Obtaining a vector representation of the training instance;

[0046] The vector representation of the training instance is input into a fully connected layer with softmax as the activation function for nonlinear transformation to obtain the predicted probability distribution of the training instance on the label set.

[0047] In combination with the first implementation manner of the second aspect, in a second implementation manner of the second aspect of the present disclosure, obtaining the vector representation of the training instance includes:

[0048] Obtain a vector list of the training instance, the vector list including a word vector of each word in the training instance and a position vector of the word relative to an entity in the training instance;

[0049] Performing feature extraction on the vector list of the training instance to obtain a feature extraction result;

[0050] Performing maximum pooling on the feature extraction result with the position of the entity as a boundary to obtain a pooling result;

[0051] A vector representation of the training instance is obtained according to the pooling result.

[0052] In combination with the second implementation of the second aspect, in a third implementation of the second aspect of the present disclosure:

[0053] The extracting features from the vector list of the training instance to obtain the feature extraction result comprises: inputting the vector list into a convolutional neural network, and the convolutional neural network outputting the feature extraction result;

[0054] The obtaining the vector representation of the training instance according to the pooling result includes: inputting the pooling result into a discard layer, and the discard layer outputting the vector representation.

[0055] In combination with the second aspect, in a fourth implementation of the second aspect of the present disclosure, the device further includes:

[0056] The pre-training module is configured to pre-train the prediction model using the multiple training instances and the initial labels of the multiple training instances.

[0057] In combination with the second aspect, in a fifth implementation of the second aspect of the present disclosure, the optimizing the prediction model using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set includes:

[0058] Determine the pseudo labels of each of the multiple training instances according to the pseudo probability distribution of each of the multiple training instances on the label set;

[0059] Using the multiple training instances, their respective initial labels and their respective pseudo labels, the parameters of the prediction model are updated according to the first constraint condition to update the predicted probability distribution of each of the multiple training instances on the label set.

[0060] In combination with the fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect of the present disclosure, the first constraint condition includes:

[0061] Minimize the total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial labels and pseudo labels of the corresponding training instances.

[0062] In combination with the sixth implementation manner of the second aspect, in a seventh implementation manner of the second aspect of the present disclosure, the first constraint condition further includes:

[0063] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0064] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0065] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0066] In combination with the second aspect, in an eighth implementation manner of the second aspect of the present disclosure, obtaining the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set includes:

[0067] According to the predicted probability distribution of each of the multiple training instances and the second constraint, a pseudo probability distribution of each of the multiple training instances on the label set is determined.

[0068] In conjunction with the eighth implementation manner of the second aspect, in a ninth implementation manner of the second aspect of the present disclosure, the second constraint condition includes:

[0069] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0070] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0071] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0072] In combination with the second aspect, in a tenth implementation manner of the second aspect of the present disclosure, the device further includes:

[0073] The initialization module is configured to initialize the pseudo probability distribution of each of the multiple training instances on the label set using the initial labels of each of the multiple training instances.

[0074] In combination with the second aspect, in an eleventh implementation manner of the second aspect of the present disclosure, the label represents the relationship between entities in the corresponding training instance.

[0075] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer instructions, and wherein the one or more computer instructions are executed by the processor to implement a method as described in any one of the first aspect to the eleventh implementation manner of the first aspect.

[0076] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the methods described in the first aspect to the eleventh implementation manner of the first aspect are implemented.

[0077] In a fifth aspect, a computer program product is provided in an embodiment of the present disclosure, comprising computer instructions, which, when executed by a processor, implement a method as described in any one of the first aspect to the eleventh implementation manner of the first aspect.

[0078] According to the technical solution provided by the embodiment of the present disclosure, a prediction model is used to obtain the predicted probability distribution of each of the multiple training instances on the label set, the training instances include entity pairs and the contexts in which the entity pairs are located, and according to the predicted probability distribution of each of the multiple training instances on the label set, a pseudo probability distribution of each of the multiple training instances on the label set is obtained, and the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances are used to optimize the prediction model to update the predicted probability distribution of each of the multiple training instances on the label set. In this way, compared to the method of filtering out data that may be noise, the method of the embodiment of the present disclosure can correct the noise annotations in the data and convert the noise data into valuable data, thereby improving the performance of the model; in addition, compared to other noise relabeling methods, the method of the embodiment of the present disclosure does not rely on additional prior information, has a wider range of applications, and is easier to implement.

[0079] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:

[0081] Figure 1 A flow chart showing a data processing method according to an embodiment of the present disclosure.

[0082] Figure 2 A system architecture diagram according to an embodiment of the present disclosure is shown.

[0083] Figure 3 A schematic diagram of the structure of a prediction model according to an embodiment of the present disclosure is shown.

[0084] Figure 4 A schematic diagram showing the principles of updating pseudo labels and updating predicted probability distributions.

[0085] Figure 5 A structural block diagram of a data processing device according to an embodiment of the present disclosure is shown.

[0086] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0087] Figure 7 A schematic diagram showing the structure of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0088] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.

[0089] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.

[0090] It should also be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0091] In the present disclosure, the acquisition of user information or user data is an operation authorized and confirmed by the user, or actively selected by the user.

[0092] As mentioned above, although the remote supervision labeling method is very efficient and can theoretically construct an unlimited amount of labeled data, the data labeled based on the remote supervision method usually contains a lot of noise, and these noisy labels will have a certain impact on the effect of the model. Therefore, reducing the negative impact of noise data on the model is of great significance to improving the effect of the model.

[0093] There are three main methods for reducing the impact of remote supervision noise annotation in the relationship extraction task: filtering out data that may be noise in the dataset; assigning different weights to data based on the possibility that the data contains noise; and re-labeling the noise data. The above methods all have certain defects. For example, the first two methods do not completely eliminate the impact of noise because the noise labels are fixed during the training process, and the method of re-labeling the noise data often depends on the prior information of the task.

[0094] The present disclosure provides a model optimization method, including:

[0095] Using a prediction model to obtain a predicted probability distribution of each of a plurality of training instances on a label set, the training instances comprising an entity pair and a context in which the entity pair exists;

[0096] According to the predicted probability distribution of each of the multiple training instances on the label set, obtaining the pseudo probability distribution of each of the multiple training instances on the label set;

[0097] The prediction model is optimized using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

[0098] Compared with the method of filtering out data that may be noise, the method of the embodiment of the present disclosure can correct the noise annotations in the data and convert the noise data into valuable data, thereby improving the performance of the model; in addition, compared with other noise relabeling methods, the method of the embodiment of the present disclosure does not rely on additional prior information, has a wider range of applications, and is easier to implement.

[0099] Figure 1 A flow chart showing a data processing method according to an embodiment of the present disclosure.

[0100] like Figure 1 As shown, the data processing method includes the following steps S101-S103:

[0101] In step S101, a prediction model is used to obtain a predicted probability distribution of each of a plurality of training instances on a label set, wherein the training instances include entity pairs and contexts where the entity pairs are located;

[0102] In step S102, according to the predicted probability distribution of each of the multiple training instances on the label set, a pseudo probability distribution of each of the multiple training instances on the label set is obtained;

[0103] In step S103, the prediction model is optimized using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

[0104] Compared to the method of filtering out data that may be noise, the method of the embodiment of the present disclosure can correct the noise annotations in the data by updating the predicted probability distribution of the training instance on the label set. When the model optimization is completed, the label of the training instance can be updated according to the predicted probability distribution of the training instance on the label set, thereby converting the noise data into valuable data and improving the performance of the model; in addition, compared to other noise relabeling methods, the method of the embodiment of the present disclosure does not rely on additional prior information, has a wider range of applications, and is easier to implement.

[0105] According to an embodiment of the present disclosure, a training instance may include, for example, an entity pair and a context in which the entity pair exists, and the label represents the relationship between entities in the corresponding training instance. The present disclosure embodiment may be used to correct noisy labels of entity relationships in training instances determined by remote supervision, and may also be used to correct other training instance labels, such as semantic labels of text, sentiment labels, and the like.

[0106] According to an embodiment of the present disclosure, the initial label of the training instance may be a label obtained by annotating the training instance through a remote supervision algorithm, or may be a label obtained by other methods and may contain noise.

[0107] Figure 2 A system architecture diagram according to an embodiment of the present disclosure is shown.

[0108] like Figure 2 As shown, a prediction model is pre-trained using multiple training instances and their respective initial labels, and the pre-trained prediction model outputs the predicted probability distribution of the training instances on the label set.

[0109] The predicted probability distribution of each of the multiple training instances is input into the noise relabeling module, and the noise relabeling module obtains the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution. Then, the prediction model is optimized using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set. Next, the pseudo probability distribution of each of the multiple training instances on the label set is updated using the updated predicted probability distribution of each of the multiple training instances on the label set. Then, the prediction model is optimized using the updated pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set. The updating of pseudo labels and the updating of predicted probability distributions are iteratively performed until the model optimization is completed.

[0110] In a specific example, the predicted probability distribution of each of the multiple training instances can be input into the noise re-labeling module, and the noise re-labeling module obtains the pseudo probability distribution of each of the multiple training instances on the label set under the second constraint according to the predicted probability distribution. The pseudo labels of each of the multiple training instances are determined based on the pseudo probability distribution of each of the multiple training instances on the label set. For example, the pseudo label with the largest pseudo probability is determined as the pseudo label of the corresponding training instance. Then, the prediction model is jointly trained under the first constraint using the multiple training instances, the initial labels of each of the multiple training instances, and the pseudo labels of each of the multiple training instances to update the predicted probability distribution. Then, the updated pseudo labels of each of the multiple training instances are obtained under the second constraint with the updated predicted probability distribution, and the above-mentioned process of updating the predicted probability distribution is repeated using the updated pseudo labels. The update of the pseudo labels and the update of the predicted probability distribution are iteratively performed until both the first constraint and the second constraint are satisfied. At this time, the predicted probability distribution output by the prediction model is the final updated result of the predicted probability distribution. Then, according to the final updated result, the label of the corresponding training instance is determined. For example, the label with the largest probability in the final updated result is used as the label of the corresponding training instance.

[0111] Figure 3 A schematic diagram of the structure of a prediction model according to an embodiment of the present disclosure is shown.

[0112] According to an embodiment of the present disclosure, obtaining the predicted probability distribution of each of the plurality of training instances on the label set includes:

[0113] Obtaining a vector representation of the training instance;

[0114] The vector representation of the training instance is input into a fully connected layer with softmax as the activation function for nonlinear transformation to obtain the predicted probability distribution of the training instance on the label set.

[0115] According to an embodiment of the present disclosure, obtaining the vector representation of the training instance includes:

[0116] Obtain a vector list of the training instance, the vector list including a word vector of each word in the training instance and a position vector of the word relative to an entity in the training instance;

[0117] Performing feature extraction on the vector list of the training instance to obtain a feature extraction result;

[0118] Performing maximum pooling on the feature extraction result with the position of the entity as a boundary to obtain a pooling result;

[0119] A vector representation of the training instance is obtained according to the pooling result.

[0120] According to an embodiment of the present disclosure, the extracting features from the vector list of the training instance to obtain the feature extraction result includes: inputting the vector list into a convolutional neural network, and the convolutional neural network outputting the feature extraction result;

[0121] The obtaining the vector representation of the training instance according to the pooling result includes: inputting the pooling result into a discard layer, and the discard layer outputting the vector representation.

[0122] For example, Figure 3 As shown, the word2vec tool can be used to obtain the word vector of each word in the training instance, and the position vector of each word relative to the two entities in the entity pair is determined according to the position of the entity pair, and the position vector represents the distance of the word relative to the two entities. The vector representation of each word includes the word vector of the word and the position vector of the word. The vector representation of each word in the training instance constitutes a vector list of the training instance. The vector list is input into a feature extraction layer, such as a convolutional neural network, to obtain a feature extraction result. The feature extraction result is pooled with the position of the entity as the boundary to obtain a pooling result. For example, the feature extraction result is divided into three sections with the position of the entity as the boundary for maximum pooling, and the three vectors obtained by the maximum pooling are spliced ​​together, and then passed through a discard layer (dropout layer, not shown in the figure) to obtain a vector representation of the training instance. Then, the vector representation of the training instance is input into a classifier, such as a fully connected layer with softmax as the activation function, to obtain the predicted probability distribution of the training instance on the label set.

[0123] According to an embodiment of the present disclosure, the optimizing the prediction model using the pseudo probability distribution of each of the plurality of training instances on the label set and the initial labels of each of the plurality of training instances to update the predicted probability distribution of each of the plurality of training instances on the label set includes:

[0124] Determine the pseudo labels of each of the multiple training instances according to the pseudo probability distribution of each of the multiple training instances on the label set;

[0125] Using the multiple training instances, their respective initial labels and their respective pseudo labels, the parameters of the prediction model are updated according to the first constraint condition to update the predicted probability distribution of each of the multiple training instances on the label set.

[0126] like Figure 3 As shown, the prediction model may include a module for generating a vector list of training instances, a feature extraction layer, a segment pooling layer, and a classifier. All parameters in the prediction model are trainable, or some parameters in the prediction model (e.g., parameters for obtaining the word vector of each word in the training instance) may be pre-set and unchanged, while the remaining parameters are trainable. The prediction model may be pre-trained using the multiple training instances and the initial labels of each of the multiple training instances, and the pre-trained model may be used to output the predicted probability distribution of the training instance on the label set.

[0127] After obtaining the pseudo-labels of each of the multiple training instances, the parameters of the prediction probability model can be updated using the multiple training instances, the initial labels and pseudo-labels of each of the multiple training instances, and the first constraint to update the prediction probability distribution of each of the multiple training instances on the label set.

[0128] According to an embodiment of the present disclosure, obtaining the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set includes:

[0129] According to the predicted probability distribution of each of the multiple training instances and the second constraint, a pseudo probability distribution of each of the multiple training instances on the label set is determined.

[0130] According to an embodiment of the present disclosure, the pseudo probability distribution can be used as a trainable parameter and updated through back propagation.

[0131] According to an embodiment of the present disclosure, a pseudo-label is generated based on the predicted probability distribution of the label, and a prediction model is jointly trained based on the pseudo-label and the initial label to update the predicted probability distribution. The pseudo-label is updated and the predicted probability distribution is updated iteratively, which can effectively reduce the impact of noise annotations on the prediction model without the need for additional prior knowledge.

[0132] Figure 4 A schematic diagram showing the principles of updating pseudo labels and updating predicted probability distributions.

[0133] According to an embodiment of the present disclosure, the first constraint condition includes: minimizing the total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial label and pseudo-label of the corresponding training instance. The total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial label and pseudo-label of the corresponding training instance is calculated, for example, in the following manner: for each training instance, respectively calculate the loss function of the predicted probability distribution of the training instance on the label set relative to the initial label of the training instance and the loss function of the predicted probability distribution of the training instance on the label set relative to the pseudo-label of the training instance, and then sum the two loss functions of the multiple training instances as the total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial label and pseudo-label of the corresponding training instance.

[0134] According to an embodiment of the present disclosure, the first constraint condition further includes:

[0135] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0136] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0137] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0138] According to an embodiment of the present disclosure, the second constraint condition includes:

[0139] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0140] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0141] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0142] like Figure 4As shown, because the higher the accuracy of the predicted probability distribution, the greater the mutual information between the predicted probability distribution and the pseudo probability distribution, one of the constraints for updating the pseudo probability distribution is to maximize the total mutual information lower bound (infoNCE) between the pseudo probability distribution of each of the multiple training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set. According to an embodiment of the present disclosure, since it is very difficult to directly calculate the mutual information of two variables in a high-dimensional space, an easily obtained lower bound of the mutual information infoNCE is used to estimate the mutual information. In addition, the initial labels of each of the multiple training instances can be used to initialize the pseudo probability distribution of each of the multiple training instances on the label set to make full use of the information in the initial labels. It is stipulated in the constraint that the total cross entropy loss between the predicted probability distribution of each of the multiple training instances and the initial labels of the corresponding training instances converges to prevent the parameters of the prediction model from being drastically updated. In addition, an entropy reduction constraint is added to the predicted probability distribution, requiring the predicted probability distribution of each of the multiple training instances to satisfy the probability that the probability on one label is much greater than the probability on other labels.

[0143] According to an embodiment of the present disclosure, the update of the pseudo-probability distribution of training instances on the label set (and the update of the pseudo-labels) and the joint training of the prediction model (i.e., the update of the prediction probability distribution) are performed alternately. The second constraint needs to be considered when updating the pseudo-probability distribution, and the first constraint needs to be considered during the joint training.

[0144] Figure 5 The structural block diagram of the data processing device according to the embodiment of the present disclosure is shown. The device can be implemented as part or all of the electronic device through software, hardware or a combination of both.

[0145] like Figure 5 As shown, the data processing device 500 includes a first acquisition module 510 , a second acquisition module 520 , and an optimization module 530 .

[0146] The first acquisition module 510 is configured to use the prediction model to obtain the predicted probability distribution of each of a plurality of training instances on the label set, wherein the training instances include entity pairs and the contexts in which the entity pairs are located;

[0147] The second acquisition module 520 is configured to acquire the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set;

[0148] The optimization module 530 is configured to optimize the prediction model using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

[0149] According to an embodiment of the present disclosure, obtaining the predicted probability distribution of each of the plurality of training instances on the label set includes:

[0150] Obtaining a vector representation of the training instance;

[0151] The vector representation of the training instance is input into a fully connected layer with softmax as the activation function for nonlinear transformation to obtain the predicted probability distribution of the training instance on the label set.

[0152] According to an embodiment of the present disclosure, obtaining the vector representation of the training instance includes:

[0153] Obtain a vector list of the training instance, the vector list including a word vector of each word in the training instance and a position vector of the word relative to an entity in the training instance;

[0154] Performing feature extraction on the vector list of the training instance to obtain a feature extraction result;

[0155] Performing maximum pooling on the feature extraction result with the position of the entity as a boundary to obtain a pooling result;

[0156] A vector representation of the training instance is obtained according to the pooling result.

[0157] According to an embodiment of the present disclosure:

[0158] The extracting features from the vector list of the training instance to obtain the feature extraction result comprises: inputting the vector list into a convolutional neural network, and the convolutional neural network outputting the feature extraction result;

[0159] The obtaining the vector representation of the training instance according to the pooling result includes: inputting the pooling result into a discard layer, and the discard layer outputting the vector representation.

[0160] According to an embodiment of the present disclosure, the device further includes:

[0161] The pre-training module 540 is configured to pre-train the prediction model using the multiple training instances and the initial labels of the multiple training instances.

[0162] According to an embodiment of the present disclosure, the optimizing the prediction model using the pseudo probability distribution of each of the plurality of training instances on the label set and the initial labels of each of the plurality of training instances to update the predicted probability distribution of each of the plurality of training instances on the label set includes:

[0163] Determine the pseudo labels of each of the multiple training instances according to the pseudo probability distribution of each of the multiple training instances on the label set;

[0164] Using the multiple training instances, their respective initial labels and their respective pseudo labels, the parameters of the prediction model are updated according to the first constraint condition to update the predicted probability distribution of each of the multiple training instances on the label set.

[0165] According to an embodiment of the present disclosure, the first constraint condition includes:

[0166] Minimize the total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial labels and pseudo labels of the corresponding training instances.

[0167] According to an embodiment of the present disclosure, the first constraint condition further includes:

[0168] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0169] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0170] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0171] According to an embodiment of the present disclosure, obtaining the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set includes:

[0172] According to the predicted probability distribution of each of the multiple training instances and the second constraint, a pseudo probability distribution of each of the multiple training instances on the label set is determined.

[0173] According to an embodiment of the present disclosure, the second constraint condition includes:

[0174] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0175] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0176] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0177] According to an embodiment of the present disclosure, the device further includes:

[0178] The initialization module 550 is configured to initialize the pseudo probability distribution of each of the multiple training instances on the label set using the initial labels of each of the multiple training instances.

[0179] According to an embodiment of the present disclosure, the labels represent the relationships between entities in the corresponding training instances.

[0180] The present disclosure also discloses an electronic device, Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0181] like Figure 6 As shown, the electronic device 600 includes a memory 601 and a processor 602, wherein the memory 601 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 602 to implement the method according to an embodiment of the present disclosure.

[0182] According to an embodiment of the present disclosure, a model optimization method includes:

[0183] Using a prediction model to obtain a predicted probability distribution of each of a plurality of training instances on a label set, the training instances comprising an entity pair and a context in which the entity pair exists;

[0184] According to the predicted probability distribution of each of the multiple training instances on the label set, obtaining the pseudo probability distribution of each of the multiple training instances on the label set;

[0185] The prediction model is optimized using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

[0186] According to an embodiment of the present disclosure, obtaining the predicted probability distribution of each of the plurality of training instances on the label set includes:

[0187] Obtaining a vector representation of the training instance;

[0188] The vector representation of the training instance is input into a fully connected layer with softmax as the activation function for nonlinear transformation to obtain the predicted probability distribution of the training instance on the label set.

[0189] According to an embodiment of the present disclosure, obtaining the vector representation of the training instance includes:

[0190] Obtain a vector list of the training instance, the vector list including a word vector of each word in the training instance and a position vector of the word relative to an entity in the training instance;

[0191] Performing feature extraction on the vector list of the training instance to obtain a feature extraction result;

[0192] Performing maximum pooling on the feature extraction result with the position of the entity as a boundary to obtain a pooling result;

[0193] A vector representation of the training instance is obtained according to the pooling result.

[0194] According to an embodiment of the present disclosure:

[0195] The extracting features from the vector list of the training instance to obtain the feature extraction result comprises: inputting the vector list into a convolutional neural network, and the convolutional neural network outputting the feature extraction result;

[0196] The obtaining the vector representation of the training instance according to the pooling result includes: inputting the pooling result into a discard layer, and the discard layer outputting the vector representation.

[0197] According to an embodiment of the present disclosure, the method further includes:

[0198] The prediction model is pre-trained using the multiple training instances and the initial labels of each of the multiple training instances.

[0199] According to an embodiment of the present disclosure, the optimizing the prediction model using the pseudo probability distribution of each of the plurality of training instances on the label set and the initial labels of each of the plurality of training instances to update the predicted probability distribution of each of the plurality of training instances on the label set includes:

[0200] Determine the pseudo labels of each of the multiple training instances according to the pseudo probability distribution of each of the multiple training instances on the label set;

[0201] Using the multiple training instances, their respective initial labels and their respective pseudo labels, the parameters of the prediction model are updated according to the first constraint condition to update the predicted probability distribution of each of the multiple training instances on the label set.

[0202] According to an embodiment of the present disclosure, the first constraint condition includes:

[0203] Minimize the total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial labels and pseudo labels of the corresponding training instances.

[0204] According to an embodiment of the present disclosure, the first constraint condition further includes:

[0205] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0206] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0207] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0208] According to an embodiment of the present disclosure, obtaining the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set includes:

[0209] According to the predicted probability distribution of each of the multiple training instances and the second constraint, a pseudo probability distribution of each of the multiple training instances on the label set is determined.

[0210] According to an embodiment of the present disclosure, the second constraint condition includes:

[0211] Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set;

[0212] Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances;

[0213] The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

[0214] According to an embodiment of the present disclosure, the method further includes:

[0215] Using the initial labels of the multiple training instances, the pseudo probability distribution of the multiple training instances on the label set is initialized.

[0216] According to an embodiment of the present disclosure, the labels represent the relationships between entities in the corresponding training instances. Figure 7 A schematic diagram showing the structure of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown.

[0217] like Figure 7As shown, the computer system 700 includes a processing unit 701, which can perform various processes in the above-mentioned embodiments according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The processing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0218] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed. Among them, the processing unit 701 can be implemented as a processing unit such as a CPU, a GPU, a TPU, an FPGA, an NPU, etc.

[0219] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a computer-readable storage medium, and the computer program includes a program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 709, and / or installed from the removable medium 711.

[0220] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0221] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or programmable hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0222] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into a device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.

[0223] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. A model optimization method, comprising: Using a prediction model to obtain a predicted probability distribution of each of a plurality of training instances on a label set, the training instances comprising an entity pair and a context in which the entity pair exists; According to the predicted probability distribution of each of the multiple training instances on the label set and the second constraint condition, the pseudo probability distribution of each of the multiple training instances on the label set is obtained, wherein the second constraint condition includes: maximizing the lower bound of the total mutual information between the pseudo probability distribution of each of the multiple training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set, converging the total cross entropy loss between the predicted probability distribution of each of the multiple training instances and the initial label of the corresponding training instance, and making the predicted probability distribution of each of the multiple training instances satisfy that the probability on one label is much greater than the probability on other labels; The prediction model is optimized using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

2. The method according to claim 1, wherein: The obtaining of the predicted probability distribution of each of the plurality of training instances on the label set comprises: Obtaining a vector representation of the training instance; The vector representation of the training instance is input into a fully connected layer with softmax as the activation function for nonlinear transformation to obtain the predicted probability distribution of the training instance on the label set.

3. The method according to claim 2, wherein: The obtaining of the vector representation of the training instance comprises: Obtain a vector list of the training instance, the vector list including a word vector of each word in the training instance and a position vector of the word relative to an entity in the training instance; Performing feature extraction on the vector list of the training instance to obtain a feature extraction result; Performing maximum pooling on the feature extraction result with the position of the entity as a boundary to obtain a pooling result; A vector representation of the training instance is obtained according to the pooling result.

4. The method according to claim 3, wherein: The extracting features from the vector list of the training instance to obtain the feature extraction result comprises: inputting the vector list into a convolutional neural network, and the convolutional neural network outputting the feature extraction result; The obtaining the vector representation of the training instance according to the pooling result includes: inputting the pooling result into a discard layer, and the discard layer outputting the vector representation.

5. The method according to claim 1, further comprising: The prediction model is pre-trained using the multiple training instances and the initial labels of each of the multiple training instances.

6. The method according to claim 1, wherein: The optimizing the prediction model using the pseudo probability distribution of each of the plurality of training instances on the label set and the initial labels of each of the plurality of training instances to update the predicted probability distribution of each of the plurality of training instances on the label set includes: Determine the pseudo labels of each of the multiple training instances according to the pseudo probability distribution of each of the multiple training instances on the label set; Using the multiple training instances, their respective initial labels and their respective pseudo labels, the parameters of the prediction model are updated according to the first constraint condition to update the predicted probability distribution of each of the multiple training instances on the label set.

7. The method according to claim 6, wherein: The first constraint condition includes: Minimize the total loss function of the predicted probability distribution of each of the multiple training instances on the label set relative to the initial labels and pseudo labels of the corresponding training instances.

8. The method according to claim 7, wherein: The first constraint condition also includes: Maximizing a lower bound of the total mutual information between the pseudo probability distribution of each of the plurality of training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set; Converging the total cross entropy loss between the predicted probability distribution of each of the plurality of training instances and the initial labels of the corresponding training instances; The predicted probability distribution of each of the multiple training instances is made to satisfy the condition that the probability of one label is much greater than the probability of other labels.

9. The method according to claim 1, further comprising: Using the initial labels of the multiple training instances, the pseudo probability distribution of the multiple training instances on the label set is initialized.

10. The method according to claim 1, wherein: The labels represent the relationships between entities in the corresponding training instances.

11. A model optimization device, comprising: A first acquisition module is configured to use a prediction model to acquire a predicted probability distribution of each of a plurality of training instances on a label set, wherein the training instances include entity pairs and contexts where the entity pairs are located; A second acquisition module is configured to acquire the pseudo probability distribution of each of the multiple training instances on the label set according to the predicted probability distribution of each of the multiple training instances on the label set and the second constraint condition, wherein the second constraint condition includes: maximizing the lower bound of the total mutual information between the pseudo probability distribution of each of the multiple training instances on the label set and the predicted probability distribution of the corresponding training instance on the label set, converging the total cross entropy loss between the predicted probability distribution of each of the multiple training instances and the initial label of the corresponding training instance, and making the predicted probability distribution of each of the multiple training instances satisfy that the probability on one label is much greater than the probability on other labels; The optimization module is configured to optimize the prediction model using the pseudo probability distribution of each of the multiple training instances on the label set and the initial labels of each of the multiple training instances to update the predicted probability distribution of each of the multiple training instances on the label set.

12. The apparatus according to claim 11, further comprising: The pre-training module is configured to pre-train the prediction model using the multiple training instances and the initial labels of the multiple training instances.

13. The apparatus according to claim 11, further comprising: The initialization module is configured to initialize the pseudo probability distribution of each of the multiple training instances on the label set using the initial labels of each of the multiple training instances.

14. An electronic device comprising a memory and a processor; wherein: The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps described in any one of claims 1-10.

15. A readable storage medium having computer instructions stored thereon, wherein the computer instructions, when executed by a processor, implement the method steps described in any one of claims 1 to 10.

16. A computer program product, comprising computer instructions, which, when executed by a processor, implement the method steps of any one of claims 1 to 10.