Knowledge screening-based common sense reasoning model training method and device
By constructing and using the constraints of the variational estimation method to screen the initial background knowledge of the commonsense reasoning model, the problem of knowledge redundancy in the commonsense reasoning model is solved and the reasoning performance of the model is improved.
Patent Information
- Application Number
- CN202410682396.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-13
AI Technical Summary
Existing common sense reasoning models have knowledge redundancy in tasks, resulting in low reasoning performance.
By constructing the first constraint and the second constraint, the variation estimation method is used to screen the initial background knowledge, maximize the correlation between the optimal background knowledge and the question and answer pairs, and minimize the correlation between the optimal background knowledge and the initial background knowledge, and obtain knowledge-based screening. Common sense reasoning model.
It achieves accurate and effective knowledge screening, avoids the interference of redundant knowledge, improves the accuracy and speed of model reasoning, and improves reasoning performance.
Smart Images

Figure CN118643899A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a training method and device for a common sense reasoning model based on knowledge screening. Background Art
[0002] At present, it is widely used to inject knowledge into pre-trained language models and use knowledge-enhanced pre-trained language models to solve these knowledge-intensive tasks. Among many knowledge-intensive tasks, common sense reasoning tasks are representative tasks, which require the model to have sufficient common sense knowledge background to correctly answer questions. For common sense reasoning tasks, existing methods usually use external common sense knowledge bases such as ConceptNet to inject necessary common sense knowledge into pre-trained language models to answer questions, that is, by finding knowledge related to the question and answer pair in the external knowledge base as the background knowledge of the question, to help the pre-trained language model reason and obtain the corresponding answer.
[0003] However, existing methods ignore whether the background knowledge obtained through search is helpful for model reasoning, that is, there is knowledge redundancy in the problem-related knowledge obtained through search, which in turn affects the reasoning performance of the model. Summary of the invention
[0004] The present invention provides a training method and device for a common sense reasoning model based on knowledge screening, which is used to solve the defect in the prior art that the background knowledge obtained by searching when performing common sense reasoning tasks has knowledge redundancy, resulting in low reasoning performance of the model.
[0005] The present invention provides a training method for a common sense reasoning model based on knowledge screening, comprising:
[0006] Obtaining a sample question-answer pair, wherein the sample question-answer pair includes a sample question and a sample answer corresponding to the sample question;
[0007] Screening the initial background knowledge of the sample question-answer pair based on the initial common sense reasoning model to obtain optimal background knowledge;
[0008] Determining a reasoning answer to the sample question based on the preferred background knowledge, the sample question, and the initial common sense reasoning model;
[0009] Based on the reasoning answers to the sample questions and the sample answers, training the initial common sense reasoning model iteratively to obtain a common sense reasoning model based on knowledge screening;
[0010] The initial common sense reasoning model is based on constructing a first constraint and a second constraint, and based on variational estimation of the first constraint and the second constraint, determining the upper bound of the constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
[0011] According to a training method for a common sense reasoning model based on knowledge screening provided by the present invention, the first constraint is obtained based on calculating the mutual information between the preferred background knowledge and the sample question-answer pair;
[0012] The second constraint is obtained based on calculating the mutual information between the preferred background knowledge and the initial background knowledge.
[0013] According to a training method of a common sense reasoning model based on knowledge screening provided by the present invention, the reasoning step of the constraint upper bound includes:
[0014] Based on the inference distribution probability of the inference answer, performing variational estimation on the first constraint to obtain a maximum first constraint;
[0015] Based on the prior distribution and the screening distribution probability of the preferred background knowledge, performing variational estimation on the second constraint to obtain a minimum second constraint;
[0016] The constraint upper bound is determined based on the maximum first constraint and the minimum second constraint.
[0017] According to a training method for a common sense reasoning model based on knowledge screening provided by the present invention, the step of obtaining the prior distribution of the preferred background knowledge includes:
[0018] Acquire a knowledge graph of the initial background knowledge;
[0019] The retention probability of each connecting edge in the knowledge graph of the initial background knowledge is determined based on a reparameterization algorithm to obtain a prior distribution of the preferred background knowledge.
[0020] According to a training method for a common sense reasoning model based on knowledge screening provided by the present invention, the step of determining the reasoning distribution probability of the reasoning answer includes:
[0021] Based on the preferred background knowledge, the sample question and the common sense reasoning module in the initial common sense reasoning model, reasoning to obtain the reasoning distribution probability of the reasoning answer;
[0022] The common sense reasoning module is obtained based on a general common sense reasoning model.
[0023] According to a training method for a common sense reasoning model based on knowledge screening provided by the present invention, the initial common sense reasoning model is trained iteratively based on the reasoning answer to the sample question and the sample answer to obtain the common sense reasoning model based on knowledge screening, including:
[0024] Based on the inference answers to the sample questions and the losses between the sample answers, the constraint upper bound of the initial common sense reasoning model is optimized to obtain the common sense reasoning model based on knowledge screening.
[0025] The present invention also provides a training device for a common sense reasoning model based on knowledge screening, comprising:
[0026] An acquisition unit is configured to acquire a sample question-answer pair, wherein the sample question-answer pair includes a sample question and a sample answer corresponding to the sample question;
[0027] A knowledge screening unit, which screens the initial background knowledge of the sample question-answer pair based on an initial common sense reasoning model to obtain preferred background knowledge;
[0028] A reasoning unit, which determines a reasoning answer to the sample question based on the preferred background knowledge, the sample question and the initial common sense reasoning model;
[0029] A training unit, based on the reasoning answers to the sample questions and the sample answers, iterates the training of the initial common sense reasoning model to obtain a common sense reasoning model based on knowledge screening;
[0030] The initial common sense reasoning model is based on constructing a first constraint and a second constraint, and based on variational estimation of the first constraint and the second constraint, determining the upper bound of the constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a training method for a common sense reasoning model based on knowledge screening as described above is implemented.
[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described methods for training a common sense reasoning model based on knowledge screening.
[0033] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for training a common sense reasoning model based on knowledge screening.
[0034] The training method and device of the common sense reasoning model based on knowledge screening provided by the present invention construct a first constraint for maximizing the association between the preferred background knowledge and the question-answer pair, and a second constraint for minimizing the association between the preferred background knowledge and the initial background knowledge, and obtain the constraint upper bound of the initial common sense reasoning model by performing variational estimation on the first constraint and the second constraint, so as to iterate the training of the initial common sense reasoning model through sample question-answer pairs to obtain the common sense reasoning model based on knowledge screening, realize accurate and effective knowledge screening, avoid the interference of redundant knowledge, greatly improve the accuracy and speed of model reasoning, and thus improve the reasoning performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 It is a flowchart of a training method of a common sense reasoning model based on knowledge screening provided by the present invention;
[0037] Figure 2 It is a structural diagram of a common sense reasoning model based on knowledge enhancement provided by the prior art;
[0038] Figure 3 is an example diagram of redundant knowledge provided by the present invention;
[0039] Figure 4 is a modeling diagram of the common sense reasoning task provided by the present invention;
[0040] Figure 5 It is a schematic diagram of the structure of the common sense reasoning model based on knowledge screening provided by the present invention;
[0041] Figure 6 It is a schematic diagram of the workflow of the common sense reasoning knowledge selection model based on information bottleneck provided by the present invention;
[0042] Figure 7 It is a schematic diagram of the knowledge screening ratio result provided by the present invention;
[0043] Figure 8 This is a performance comparison chart of the information bottleneck-based and sparsity-based knowledge screening methods provided by the present invention;
[0044] Fig. 9It is a structural schematic diagram of a training device for a common sense reasoning model based on knowledge screening provided by the present invention;
[0045] Fig.10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] In recent years, pre-trained language models have achieved amazing performance on various tasks and have been widely used. However, the performance of pre-trained language models on knowledge-intensive tasks is not ideal because these tasks require sufficient knowledge background in the model. However, pre-trained language models do not do enough pre-training on relevant knowledge, so the effect is average. Therefore, the method of injecting knowledge into pre-trained language models and using knowledge-enhanced pre-trained language models to solve these knowledge-intensive tasks has emerged.
[0048] The main focus of existing methods is how to encode this background knowledge to obtain better knowledge representation and how to better integrate the two heterogeneous representations of text representation and knowledge representation. However, these methods all ignore an important issue, that is, whether the background knowledge obtained by searching is helpful for model reasoning. It is understandable that when the model relies on too much redundant background knowledge when reasoning, it will affect the correctness and speed of model reasoning, and thus affect the reasoning performance of the model.
[0049] In response to the above problems, the present invention proposes a training method for a common sense reasoning model based on knowledge screening to streamline the background knowledge obtained through the search and improve the reasoning performance of the model. Figure 1 is a flow chart of the training method of the common sense reasoning model based on knowledge screening provided by the present invention, such as Figure 1 As shown, the method includes:
[0050] Step 110: Obtain a sample question-answer pair, where the sample question-answer pair includes a sample question and a sample answer corresponding to the sample question.
[0051] Here, the sample question-answer pair includes a sample question to be subjected to common sense reasoning and a sample answer obtained by performing common sense reasoning on the sample question. Specifically, the sample question-answer pair can be obtained by obtaining question-answer pairs in commonly used datasets such as CommonsenseQA and OpenbookQA.
[0052] It should be noted that the common sense reasoning model based on knowledge enhancement in the prior art usually relies on an external common sense knowledge base to inject the necessary common sense knowledge into the model to answer questions. Figure 2 It is a schematic diagram of the structure of the common sense reasoning model based on knowledge enhancement provided by the prior art, such as Figure 2 As shown in the figure, the model includes: text encoding module, graph encoding module, aggregation module, and reasoning module. Specifically, after identifying the entities in the question and answer, relevant knowledge triples are found in the external knowledge base to construct a background knowledge subgraph related to the question. For the question and answer text, a pre-trained language model is used as an encoding module to encode the question to obtain its text representation. For the obtained background knowledge subgraph, a graph encoder is used to encode it to obtain the knowledge representation. Then, the text representation and knowledge representation are fused together for reasoning to obtain the output answer.
[0053] However, based on Figure 2 There is redundant knowledge in the background knowledge subgraph obtained by searching the common sense reasoning model based on knowledge enhancement. Figure 3 is an example diagram of redundant knowledge provided by the present invention, such as Figure 3 As shown in Figure 1, the background knowledge subgraph obtained by searching the common sense reasoning model based on knowledge enhancement is composed of entities in questions and answers, as well as background knowledge related to questions and answers as nodes, and entity relationships between entities as connecting edges. Figure 3 As shown in the figure, the nodes in the dashed box represent the entities in the question and answer (the entities in the question include: "Child, Sit, Desk", and the entities in the question include "Schoolroom"), the nodes in the solid box represent the external knowledge obtained by the search, and the entities connected by the dashed edges in the figure are redundant knowledge. It is understandable that when the model relies on too much redundant background knowledge when reasoning, it will affect the correctness and speed of the model's reasoning, and thus affect the model's reasoning performance.
[0054] Therefore, the present invention proposes a common sense reasoning model based on knowledge screening to achieve knowledge screening of the complete background knowledge subgraph obtained by the search. Here, the initial common sense reasoning model is based on constructing a first constraint and a second constraint, and determining the constraint upper bound based on variational estimation of the first constraint and the second constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question-answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
[0055] Here, the initial background knowledge refers to the knowledge related to the entities in the sample question-answer pair that is searched from the injected external knowledge base through the initial common sense reasoning model. The initial background knowledge here can be considered as the background knowledge used by the common sense reasoning model in the prior art when performing reasoning, that is, it contains redundant knowledge. The preferred background knowledge here refers to the streamlined knowledge obtained by filtering the initial background knowledge through the filtering module in the initial common sense reasoning model.
[0056] In addition, in order to achieve knowledge screening, it is hoped that the correlation between the screened optimized background knowledge and the initial background knowledge is as small as possible, and at the same time, the selected optimized background knowledge should help the model to infer the correct answer as much as possible. Therefore, the first constraint is used to constrain the correlation between the preferred background knowledge obtained by screening based on the common sense reasoning model and the sample question and answer pairs, that is, to maximize the correlation between the preferred background knowledge and the sample question and answer pairs, so that the screened preferred background knowledge can be closely related to the sample question and answer pairs, and then can provide reliable and accurate background knowledge for the common sense reasoning model to infer the answer that is close to the sample answer corresponding to the sample question. The second constraint is used to constrain the correlation between the preferred background knowledge obtained by screening based on the common sense reasoning model and the initial background knowledge, that is, to minimize the correlation between the preferred background knowledge and the initial background knowledge, so that the preferred background knowledge obtained by screening based on the common sense reasoning model is sufficiently concise, that is, to more comprehensively screen out redundant knowledge in the initial background knowledge.
[0057] Specifically, the first constraint and the second constraint can be constructed based on the information bottleneck method to complete the modeling of common sense reasoning. Figure 4 is a modeling diagram of the common sense reasoning task provided by the present invention, such as Figure 4 As shown in the figure, the initial background knowledge G can be obtained by knowledge search through the sample question X, and then the preferred background knowledge G can be obtained by knowledge screening of the initial background knowledge G. s Finally, through the sample question X and the optimal background knowledge G s The sample answer Y is obtained by reasoning. Among them, the sample question X is also related to the optimal background knowledge G s There is a connection.
[0058] It should be noted that, considering that the construction of the first constraint and the second constraint is not differentiable, it is impossible to directly train the common sense reasoning model based on the optimization target constructed by the first constraint and the second constraint. For example, there are distributions that cannot be estimated in the first constraint and the second constraint. For example, the probability distribution of generating sample answers based on sample questions and preferred background knowledge in the first constraint is difficult to estimate, and the probability distribution of generating preferred background knowledge based on sample questions in the second constraint cannot be estimated. Therefore, the upper bound of the constraint based on the first constraint and the second constraint can be obtained by performing variational estimation on the probability distribution that cannot be estimated in the first constraint and the second constraint, that is, replacing the probability distribution that cannot be estimated with a computable probability distribution. Therefore, the training of the common sense reasoning model can be achieved by optimizing the upper bound of the constraint to obtain the final common sense reasoning model based on knowledge screening.
[0059] Step 120 , screening the initial background knowledge of the sample question-answer pair based on the initial common sense reasoning model to obtain preferred background knowledge.
[0060] Specifically, the sample question-answer pair can be input into the initial common sense reasoning model, and the initial background knowledge related to the sample question-answer pair can be searched in the external knowledge base pre-set in the initial common sense reasoning model. Then, the initial background knowledge of the sample question-answer pair is screened by the initial common sense reasoning model to obtain the preferred background knowledge. For example, the connection edges in the knowledge subgraph of the initial background knowledge can be retained to obtain the preferred background knowledge.
[0061] Step 130, determining the reasoning answer to the sample question based on the preferred background knowledge, the sample question and the initial common sense reasoning model.
[0062] Specifically, the encoder in the initial common sense reasoning model can be used to encode the features of the preferred background knowledge and the sample question to obtain the corresponding text features. Then, the text features corresponding to the preferred background knowledge and the sample question can be fused and reasoned based on the reasoning module in the initial common sense reasoning model to obtain the feature representation of the corresponding reasoning answer, and the feature representation of the reasoning answer can be decoded to obtain the reasoning answer corresponding to the sample question.
[0063] Figure 5 is a schematic diagram of the structure of the common sense reasoning model based on knowledge screening provided by the present invention, such as Figure 5As shown, the model includes a general common sense reasoning model based on knowledge enhancement, a knowledge screening module, and a pre-set external common sense knowledge base. Specifically, in the application stage of the common sense reasoning model based on knowledge screening, first, the problem to be reasoned is obtained. Then, by extracting the entity in the problem (the text in the box), the knowledge related to the entity is searched in the external common sense knowledge base as the initial background knowledge graph G for reasoning the problem. Then, the initial background knowledge graph G is subjected to knowledge screening by the knowledge screening module to obtain the screened preferred background knowledge graph G s .Depend on Figure 5 It can be seen that the connecting edges connected by dotted lines in the initial background knowledge graph G are redundant knowledge. Specifically, in the screening module, the initial background knowledge graph G is feature encoded by the graph encoder to obtain the corresponding initial background knowledge graph features, and the text features of the problem to be inferred based on the text encoder are obtained. The initial background knowledge features and the text features of the problem to be inferred are input into the MLP (Multi-Layer Perceptron) network, and the optimized background knowledge graph G can be obtained through the Gumbel Softmax function. s The probability distribution of , in order to obtain the filtered optimized background knowledge graph G s , and optimize the background knowledge graph G s Input to a general knowledge-enhanced commonsense reasoning model.
[0064] In the general knowledge-enhanced commonsense reasoning model, the background knowledge graph G is optimized by the graph encoder. s Perform feature encoding to obtain optimized background knowledge features. Then, input the optimized background knowledge features and the text features of the question to be reasoned into the fusion device for fusion reasoning to obtain the predicted reasoning answer.
[0065] It can be understood that the common sense reasoning model based on knowledge screening provided by the present invention performs additional knowledge screening in the common sense reasoning model in the prior art to improve the accuracy and efficiency of the common sense reasoning model in problem reasoning, thereby improving the reasoning performance of the common sense reasoning model.
[0066] Step 140, based on the inference answers to the sample questions and the sample answers, the initial common sense reasoning model is trained iteratively to obtain a common sense reasoning model based on knowledge screening.
[0067] Specifically, the sample answer can be used as a label, and the inference loss between the inference answer output by the initial common sense reasoning model and the sample answer can be calculated as a feedback to judge the quality of the selected background knowledge. Therefore, the model parameters of the screening module and the inference module in the initial common sense reasoning model can be adjusted through the inference loss, and a common sense reasoning model based on knowledge screening can be obtained through multiple rounds of training.
[0068] The method provided by the embodiment of the present invention constructs a first constraint for maximizing the association between the preferred background knowledge and the question-answer pair, and a second constraint for minimizing the association between the preferred background knowledge and the initial background knowledge, and obtains the constraint upper bound of the initial common sense reasoning model by performing variational estimation on the first constraint and the second constraint, so as to iteratively train the initial common sense reasoning model through sample question-answer pairs to obtain a common sense reasoning model based on knowledge screening, thereby achieving accurate and effective knowledge screening, avoiding interference from redundant knowledge, greatly improving the accuracy and speed of model reasoning, and thereby improving the reasoning performance of the model.
[0069] Based on any of the above embodiments, the first constraint is obtained based on calculating the mutual information between the preferred background knowledge and the sample question-answer pair;
[0070] The second constraint is obtained based on calculating the mutual information between the preferred background knowledge and the initial background knowledge.
[0071] Specifically, the first constraint and the second constraint can be calculated based on the information bottleneck method. Among them, the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair, which can be obtained by calculating the mutual information between the preferred background knowledge and the sample question and answer and the sample answer. In addition, the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge, which can be obtained by calculating the mutual information between the preferred background knowledge and the initial background knowledge. Thus, more accurate knowledge screening can be achieved by maximizing the first constraint and minimizing the second constraint.
[0072] The method provided by the embodiment of the present invention obtains the first constraint by calculating the mutual information between the preferred background knowledge and the sample question and answer pairs, and obtains the second constraint by calculating the mutual information between the preferred background knowledge and the initial background knowledge. The information bottleneck method is used to construct common sense problem reasoning including knowledge screening, thereby achieving comprehensive knowledge screening and ensuring the accuracy of common sense reasoning.
[0073] Based on any of the above embodiments, the reasoning step of the constraint upper bound includes:
[0074] Based on the inference distribution probability of the inference answer, performing variational estimation on the first constraint to obtain a maximum first constraint;
[0075] Based on the prior distribution and the screening distribution probability of the preferred background knowledge, performing variational estimation on the second constraint to obtain a minimum second constraint;
[0076] The constraint upper bound is determined based on the maximum first constraint and the minimum second constraint.
[0077] Here, the inference distribution probability of the inference answer can be predicted by the inference module in the common sense reasoning model based on the sample question and the optimized background knowledge corresponding to the sample question, and is a probability distribution that can be calculated. In addition, the prior distribution of the preferred background knowledge here refers to the pre-set probability distribution of the preferred background knowledge based on the initial background knowledge, which can be considered as a known probability distribution. The screening distribution probability of the preferred background knowledge here refers to the probability obtained by screening based on the initial background knowledge by the knowledge screening module in the common sense reasoning model, which is also a probability that can be calculated.
[0078] Specifically, the inference distribution probability of the inference answer can be used to perform variational estimation on the corresponding inestimable probability distribution in the calculated first constraint to obtain the maximum first constraint. For example, the maximum first constraint can be inferred by the following formula, as shown below:
[0079]
[0080] In the formula, I(X, G S ; Y) represents the sample problem X and the optimization background knowledge G S The mutual information between the sample answer Y; p(x, G S , y) represents sample question X, sample answer Y and optimized background knowledge G S The joint probability density of p(y|x, G S ) represents the problem based on the sample X and the optimized background knowledge G S The probability of getting a sample answer cannot be calculated directly; p(y) represents the probability distribution of the sample answer Y; dx represents the differential of the sample question X; dy represents the differential of the sample answer Y; dG S Represents the optimization background knowledge G S The differential of p θ (y|x,G S ) represents the inference distribution probability of the inference answer, that is, the inference module in the common sense reasoning model is based on the sample question X and the optimized background knowledge G S The probability distribution of the inference answer obtained by reasoning, θ represents the model parameters of the inference module; KL[(p(y|x, G S )||p θ (y|x,G S )] represents the inference loss of the inference module, that is, the loss between the sample answer and the inference answer. Since the inference loss is a non-negative number, the maximum first constraint can be expressed as ≥∫p(x, G S ,y)log p θ (y|x,G S )dxdG SThat is to say, when the first constraint is the largest, the reasoning loss is the smallest, that is, the higher the reasoning accuracy of the common sense reasoning model, the more accurate the optimized background knowledge obtained by knowledge screening.
[0081] Similarly, the prior distribution of the preferred background knowledge and the screening distribution probability can be used to perform variational estimation on the corresponding unestimable probability distribution in the calculation of the second constraint to obtain the minimum second constraint. For example, the minimum second constraint can be obtained by the following formula thrust, as shown below:
[0082]
[0083]
[0084] In the formula, I(G; G S |X) represents the initial background knowledge G and the optimized background knowledge G given the sample problem X. S The mutual information between them; p(G, G S , x) represents the initial background knowledge G, the optimized background knowledge G S And the joint probability density of sample problem X; p(G S |x, G) means that given the sample problem X and the initial background knowledge G, the optimized background knowledge G is screened. S The probability of can be calculated by the probability distribution of the optimized background knowledge obtained by the screening module; p(G S |x) means that given a sample problem X, we get the optimized background knowledge G S The probability of cannot be calculated directly; φ (G S |x, G) represents the probability distribution of the optimized background knowledge output by the screening module; r(G S |x) means that in the case of sample problem X, the optimized background knowledge G is obtained S The prior distribution of KL[p(G S |x)||r(G S |x)] represents the screening loss of the screening module, that is, optimizing the background knowledge G S The loss between the prior distribution of and the probability distribution of the optimized background knowledge output by the screening module; since the screening loss is non-negative, the minimum second constraint can be expressed as That is, when the second constraint is the smallest, the screening loss is the smallest, and the optimized background knowledge obtained by knowledge screening is more accurate, and thus the reasoning accuracy of the common sense reasoning model is higher.
[0085] Therefore, the constraint upper bound can be obtained by combining the first constraint and the second constraint. For example, the constraint upper bound can be obtained by combining the following formula, as shown in the following formula:
[0086] -I(X,G S ;Y)+βI(G;G S |X)
[0087] -I(X,G S ;Y)+βI(G;G S |X) represents the upper bound of the constraint; I(X, G S ; Y) represents the maximum first constraint; β represents the binding parameter; I(G; G S |X) represents the minimum second constraint.
[0088] Specifically, for the maximum first constraint, G can be introduced into the probability density, and then p(x, G) can be converted into S , y, G) is decomposed into p(x, y)p φ (G S |x,G)p(G|x), where p(x,G S , y, G) represents the sample problem X and the optimization background knowledge G S , the joint probability density of the sample answer Y and the initial background knowledge G; p(x, y) represents the joint probability density of the sample question X and the sample answer Y; then the above maximum first constraint can be further simplified as:
[0089] I(X,G S ; Y)≥∫p(x,G S ,y,G)log p θ (y|x,G S )dxdG S dG
[0090] =∫p(x,y)p φ (G S |x,G)p(G|x)log p θ (y|x,G S )dxdG S dG
[0091] Similarly, for the minimum second constraint, after introducing y into the probability density and decomposing it according to the probability graph, the above formula can be further simplified to:
[0092]
[0093] Therefore, the upper bound of the constraint can be calculated by the following formula, as shown below:
[0094]
[0095] During the experiment, p(x, y) can be approximated as the empirical data distribution Where N represents the number of samples; xi represents the i-th sample problem; y i represents the i-th sample answer. At the same time, for a certain method, given x i Then the initial background knowledge G corresponding to the i-th sample problem i is certain. Therefore, the upper bound of the constraint can be simplified to:
[0096]
[0097] The method provided by the embodiment of the present invention constructs the first constraint and the second constraint through the information bottleneck counter-party, performs variational estimation on the first constraint based on the reasoning distribution probability of the reasoning answer obtained by the reasoning module of the common sense reasoning model, and obtains the maximum first constraint; and performs variational estimation on the second constraint based on the screening distribution probability of the preferred background knowledge obtained by the screening module of the common sense reasoning model and the prior distribution of the preferred background knowledge, and obtains the minimum second constraint. Finally, since the mutual information term is not differentiable, the constraint upper bound is obtained based on the maximum first constraint and the minimum second constraint, and then the common sense reasoning model can be trained by optimizing the constraint upper bound, realizing the implementation of the information bottleneck method in the training method of the common sense reasoning model based on knowledge screening.
[0098] Based on any of the above embodiments, the step of obtaining the prior distribution of the preferred background knowledge includes:
[0099] Acquire a knowledge graph of the initial background knowledge;
[0100] The retention probability of each connecting edge in the knowledge graph of the initial background knowledge is determined based on a reparameterization algorithm to obtain a prior distribution of the preferred background knowledge.
[0101] Specifically, in the model training phase, sample questions, sample answers, and searched external knowledge points can be used as nodes of the knowledge graph, and the relationships between nodes can be used as connecting edges to construct a knowledge graph for obtaining initial background knowledge. It is understandable that in the application phase, the nodes of the knowledge graph here do not include entities in the sample answers.
[0102] Next, we can use a reparameterization algorithm to determine whether the binary vectors of the edges in the knowledge graph of the initial background knowledge are retained. For example, we can use the Bernoulli distribution α e ~Bern(p) to determine whether to keep the edge in the graph. For example, when α e =1, it means that the edge is retained; when α e = 0, it means that the edge is removed. It should be noted that the retention probability of each connecting edge can be adjusted according to the actual importance of each connecting edge in the knowledge graph. For example, if the edge connecting the question entity and the answer entity is more important, then the corresponding edge that plays a connecting role can be adjusted by αe ~Bern(p1), and α is used for the connection edges between other entities e ~Bern(p2) distribution, p1 and p2 both represent the probability of retaining the connecting edge. If p1>p2, it means that the edge that plays a connecting role has a greater probability of being retained.
[0103] The method provided by the embodiment of the present invention introduces a prior distribution of optimized background knowledge so that the common sense reasoning model based on knowledge screening can more fully learn how to correctly screen and obtain the preferred background knowledge related to the correct answer during the training phase.
[0104] Based on any of the above embodiments, the step of determining the inference distribution probability of the inference answer includes:
[0105] Based on the preferred background knowledge, the sample question and the common sense reasoning module in the initial common sense reasoning model, reasoning to obtain the reasoning distribution probability of the reasoning answer;
[0106] The common sense reasoning module is obtained based on a general common sense reasoning model.
[0107] Here, the general common sense reasoning model refers to any common sense reasoning model based on knowledge enhancement. Specifically, the common sense reasoning model based on knowledge screening provided by the embodiment of the present invention can be obtained by adding a knowledge screening module to the existing general common sense reasoning model. Therefore, the common sense reasoning model based on knowledge screening provided by the embodiment of the present invention can be applicable to a variety of common sense reasoning models based on knowledge enhancement, thereby improving the versatility of the common sense reasoning model based on knowledge screening provided by the embodiment of the present invention.
[0108] Based on any of the above embodiments, the inference answer based on the sample question and the sample answer, step 140 includes:
[0109] Based on the inference answers to the sample questions and the losses between the sample answers, the constraint upper bound of the initial common sense reasoning model is optimized to obtain the common sense reasoning model based on knowledge screening.
[0110] Specifically, the constraint upper bound of the initial common sense reasoning model can be optimized by calculating the inference answers to sample questions and the loss between the sample answers. That is, the parameters of the reasoning module and the knowledge screening module in the common sense reasoning model based on knowledge screening can be optimized to obtain a common sense reasoning model based on knowledge screening with accurate knowledge screening.
[0111] Based on any of the above embodiments, Figure 6 is a schematic diagram of the workflow of the common sense reasoning knowledge selection model based on information bottleneck provided by the present invention, such as Figure 6 As shown, the process includes:
[0112] First, the common sense reasoning task is modeled based on the information bottleneck framework. Specifically, the first constraint and the second constraint are constructed. The first constraint is used to maximize the association between the preferred background knowledge and the sample question-answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge. Then, the knowledge screening module is constructed according to the derived upper bound. Specifically, the first constraint and the second constraint are subjected to variational estimation to determine the constraint upper bound. That is, based on the inference distribution probability of the inference answer, the first constraint is subjected to variational estimation to obtain the maximum first constraint; based on the prior distribution of the preferred background knowledge and the screening distribution probability, the second constraint is subjected to variational estimation to obtain the minimum second constraint. At the same time, a common sense reasoning module is constructed. For example, a common sense reasoning module is constructed according to the existing knowledge enhancement model method. Furthermore, the medium parameter method is used to train only the vectors that are retained or not. Finally, the knowledge screening module and the common sense reasoning module are jointly trained.
[0113] The method provided by the embodiment of the present invention is trained in an end-to-end manner. The external knowledge used by the common sense reasoning module is no longer all the knowledge, but the knowledge screened by the knowledge screening module. At the same time, the difference between the output of the common sense reasoning module and the correct answer can be used as a feedback on the quality of the screened knowledge, helping the knowledge screening module to screen out knowledge that is more helpful for reasoning. In this way, the two modules are jointly trained to obtain the final model, which can adaptively screen useful knowledge from external knowledge to perform common sense reasoning tasks.
[0114] In order to verify the training effect of the common sense reasoning model based on knowledge screening provided by the embodiment of the present invention, the common sense reasoning model based on knowledge screening provided by the embodiment of the present invention can be trained on two commonly used data sets, CommonsenseQA and OpenbookQA. The data sets can be divided into a training set and a test set.
[0115] First, three classic knowledge enhancement methods RGCN, MHGRN and QA-GNN are selected, and then the proposed knowledge screening framework is added to the three models respectively. Pre-trained language models of different scales BERT-base, BERT-large and Roberta-large can be selected for experiments. The following table shows the experimental results of the knowledge selection framework based on information bottleneck on the CommonsenseQA dataset, as shown in the following table:
[0116]
[0117] Among them, BERT-base, BERT-large, and RoBerta-large represent three different encoders respectively; the RGCN line represents the experimental results of the RGCN basic model based on knowledge enhancement; the +IBKS line represents the experimental results provided by the RGCN model based on knowledge enhancement with knowledge screening added, that is, the common sense reasoning model based on knowledge screening provided by an embodiment of the present invention.
[0118] The following table shows the experimental results of the knowledge selection framework based on information bottleneck on the OpenbookQA dataset:
[0119]
[0120] In the table, BERT-base, BERT-large, and RoBerta-large represent three different encoders respectively; the RGCN row represents the experimental results of the RGCN basic model based on knowledge enhancement; the +IBKS row represents the experimental results provided by the RGCN model based on knowledge enhancement with knowledge screening added, that is, the common sense reasoning model based on knowledge screening provided by an embodiment of the present invention.
[0121] It can be seen from the above table that the knowledge selection information bottleneck framework has achieved further performance improvement, which once again verifies the importance of knowledge screening.
[0122] It should be noted that, under different data sets and based on different encoders, the method provided by the embodiment of the present invention has achieved further performance improvement on the three representative knowledge enhancement models. In addition, the effectiveness of knowledge screening can also be verified at the same time, that is, the proportion of screened knowledge can be calculated. Figure 7 is a schematic diagram of the knowledge screening ratio results provided by the present invention, such as Figure 7 As shown in the figure, three different encoder structures are respectively applied to the three common sense reasoning models based on RGCN, MHGRN and QA-GNN with the knowledge screening module added, and the results of knowledge screening ratio are shown. Figure 7 It can be seen that, under different data sets and based on different encoders, the method provided by the embodiment of the present invention can filter out a certain proportion of supplementary knowledge on three representative knowledge enhancement models.
[0123] In addition, the knowledge screening module proposed in the embodiment of the present invention is also added to a stronger model, GreaseLM, to compare with the methods and common large models that have achieved good performance on this task in recent years. It can be seen that after the knowledge screening module proposed in the embodiment of the present invention is added to the GreaseLM method, it achieves the best experimental results on both data sets compared with the baseline method, and performs better than the three large language models on this task, which once again verifies that knowledge screening is very useful for knowledge enhancement models.
[0124] In addition, we can also compare it with random screening to verify whether the performance improvement brought by knowledge screening comes from the reduction of knowledge scale. We can randomly select knowledge of the same scale as the knowledge selected by the proposed knowledge screening for experiments. The results show that such random selection may even bring negative effects. Therefore, it is verified that the performance improvement brought by knowledge screening is the selection of useful knowledge rather than the reduction of knowledge scale.
[0125] Furthermore, we compare it with the knowledge screening scheme based on sparsity constraints to further illustrate whether the knowledge screening framework based on the information bottleneck method is a more effective choice. The sparsity constraints are as follows:
[0126]
[0127] Here, the count function is used to calculate the number of edges in the graph.
[0128] Specifically, the knowledge screening method and the screening method based on sparsity constraints provided in the embodiment of the present invention can be used to conduct multiple experiments on multiple groups of β, and the corresponding mean-variance comparison curves can be plotted. Figure 8 is a performance comparison chart of the knowledge screening method based on information bottleneck and sparsity provided by the present invention, such as Figure 8 As shown in the figure, β = 0 means that no knowledge screening is performed. It can be found that both the knowledge screening method based on information bottleneck and the knowledge screening method based on sparsity have achieved performance improvement, which shows the necessity of knowledge screening. Secondly, it can be found that under different β, the knowledge screening method based on information bottleneck is better than the knowledge screening method based on sparsity, with a higher mean and lower variance. This shows that the knowledge screening method based on information bottleneck is a better knowledge screening method.
[0129] Similarly, an ablation experiment analysis can be performed on the important components of the common sense reasoning model based on knowledge screening proposed in the embodiment of the present invention, verifying the influence of whether to consider the text constraints in the probability graph and whether to use the task-related probability prior on the experimental performance.
[0130] Based on any of the above embodiments, Fig. 9is a schematic diagram of the structure of the training device of the common sense reasoning model based on knowledge screening provided by the present invention, such as Fig. 9 As shown, the device comprises:
[0131] An acquiring unit 910 acquires a sample question-answer pair, wherein the sample question-answer pair includes a sample question and a sample answer corresponding to the sample question;
[0132] A knowledge screening unit 920 screens the initial background knowledge of the sample question-answer pair based on an initial common sense reasoning model to obtain preferred background knowledge;
[0133] The reasoning unit 930 determines the reasoning answer to the sample question based on the preferred background knowledge, the sample question and the initial common sense reasoning model;
[0134] A training unit 840, based on the reasoning answer to the sample question and the sample answer, iterates the training of the initial common sense reasoning model to obtain a common sense reasoning model based on knowledge screening;
[0135] The initial common sense reasoning model is based on constructing a first constraint and a second constraint, and based on variational estimation of the first constraint and the second constraint, determining the upper bound of the constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
[0136] The device provided by the embodiment of the present invention constructs a first constraint for maximizing the association between the preferred background knowledge and the question-answer pair, and a second constraint for minimizing the association between the preferred background knowledge and the initial background knowledge, and obtains the constraint upper bound of the initial common sense reasoning model by performing variational estimation on the first constraint and the second constraint, so as to iterate the training of the initial common sense reasoning model through sample question-answer pairs to obtain a common sense reasoning model based on knowledge screening, thereby achieving accurate and effective knowledge screening, avoiding interference from redundant knowledge, greatly improving the accuracy and speed of model reasoning, and thereby improving the reasoning performance of the model.
[0137] Based on any of the above embodiments, the first constraint is obtained based on calculating the mutual information between the preferred background knowledge and the sample question-answer pair;
[0138] The second constraint is obtained based on calculating the mutual information between the preferred background knowledge and the initial background knowledge.
[0139] Based on any of the above embodiments, the reasoning step of the constraint upper bound includes:
[0140] Based on the inference distribution probability of the inference answer, performing variational estimation on the first constraint to obtain a maximum first constraint;
[0141] Based on the prior distribution and the screening distribution probability of the preferred background knowledge, performing variational estimation on the second constraint to obtain a minimum second constraint;
[0142] The constraint upper bound is determined based on the maximum first constraint and the minimum second constraint.
[0143] Based on any of the above embodiments, the step of obtaining the prior distribution of the preferred background knowledge includes:
[0144] Acquire a knowledge graph of the initial background knowledge;
[0145] The retention probability of each connecting edge in the knowledge graph of the initial background knowledge is determined based on a reparameterization algorithm to obtain a prior distribution of the preferred background knowledge.
[0146] Based on any of the above embodiments, the step of determining the inference distribution probability of the inference answer includes:
[0147] Based on the preferred background knowledge, the sample question and the common sense reasoning module in the initial common sense reasoning model, reasoning to obtain the reasoning distribution probability of the reasoning answer;
[0148] The common sense reasoning module is obtained based on a general common sense reasoning model.
[0149] Based on any of the above embodiments, the training unit is specifically used for:
[0150] Based on the inference answers to the sample questions and the losses between the sample answers, the constraint upper bound of the initial common sense reasoning model is optimized to obtain the common sense reasoning model based on knowledge screening.
[0151] Fig.10 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.10As shown, the electronic device may include: a processor (processor) 1010, a communication interface (Communications Interface) 1020, a memory (memory) 1030 and a communication bus 1040, wherein the processor 1010, the communication interface 1020, and the memory 1030 communicate with each other through the communication bus 1040. The processor 1010 can call the logic instructions in the memory 1030 to execute a training method for a common sense reasoning model based on knowledge screening, the method comprising: obtaining a sample question and answer pair, the sample question and answer pair comprising a sample question and a sample answer corresponding to the sample question; screening the initial background knowledge of the sample question and answer pair based on the initial common sense reasoning model to obtain preferred background knowledge; determining the inference answer to the sample question based on the preferred background knowledge, the sample question and the initial common sense reasoning model; training the initial common sense reasoning model iteratively based on the inference answer to the sample question and the sample answer to obtain a common sense reasoning model based on knowledge screening; the initial common sense reasoning model is based on constructing a first constraint and a second constraint, and determining a constraint upper bound based on variational estimation of the first constraint and the second constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
[0152] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0153] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the training method of the common sense reasoning model based on knowledge screening provided by the above methods, the method including: obtaining a sample question and answer pair, the sample question and answer pair including a sample question and a sample answer corresponding to the sample question; screening the initial background knowledge of the sample question and answer pair based on the initial common sense reasoning model to obtain preferred background knowledge; determining the inference answer to the sample question based on the preferred background knowledge, the sample question and the initial common sense reasoning model; training the initial common sense reasoning model iteratively based on the inference answer to the sample question and the sample answer to obtain a common sense reasoning model based on knowledge screening; the initial common sense reasoning model is based on constructing a first constraint and a second constraint, and based on performing variational estimation on the first constraint and the second constraint to determine the constraint upper bound; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
[0154] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the training method of the common sense reasoning model based on knowledge screening provided by the above-mentioned methods, the method comprising: obtaining a sample question and answer pair, the sample question and answer pair comprising a sample question and a sample answer corresponding to the sample question; screening the initial background knowledge of the sample question and answer pair based on the initial common sense reasoning model to obtain preferred background knowledge; determining the inference answer to the sample question based on the preferred background knowledge, the sample question and the initial common sense reasoning model; training the initial common sense reasoning model iteratively based on the inference answer to the sample question and the sample answer to obtain the common sense reasoning model based on knowledge screening; the initial common sense reasoning model is obtained by constructing a first constraint and a second constraint, and determining the constraint upper bound based on variational estimation of the first constraint and the second constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
[0155] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. 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 labor.
[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0157] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A training method for common sense reasoning models based on knowledge screening, It is characterized in that include: Obtaining a sample question-answer pair, wherein the sample question-answer pair includes a sample question and a sample answer corresponding to the sample question; Screening the initial background knowledge of the sample question-answer pair based on the initial common sense reasoning model to obtain optimal background knowledge; Determining a reasoning answer to the sample question based on the preferred background knowledge, the sample question, and the initial common sense reasoning model; Based on the reasoning answers to the sample questions and the sample answers, training the initial common sense reasoning model iteratively to obtain a common sense reasoning model based on knowledge screening; The initial common sense reasoning model is based on constructing a first constraint and a second constraint, and based on variational estimation of the first constraint and the second constraint, determining the upper bound of the constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
2. The training method of the common sense reasoning model based on knowledge screening according to claim 1, It is characterized in that The first constraint is obtained based on calculating the mutual information between the preferred background knowledge and the sample question-answer pair; The second constraint is obtained based on calculating the mutual information between the preferred background knowledge and the initial background knowledge.
3. The training method of the common sense reasoning model based on knowledge screening according to claim 2, It is characterized in that The reasoning steps of the constraint upper bound include: Based on the inference distribution probability of the inference answer, performing variational estimation on the first constraint to obtain a maximum first constraint; Based on the prior distribution and the screening distribution probability of the preferred background knowledge, performing variational estimation on the second constraint to obtain a minimum second constraint; The constraint upper bound is determined based on the maximum first constraint and the minimum second constraint.
4. The method for training a common sense reasoning model based on knowledge screening according to claim 3, It is characterized in that The step of obtaining the prior distribution of the preferred background knowledge includes: Acquire a knowledge graph of the initial background knowledge; The retention probability of each connecting edge in the knowledge graph of the initial background knowledge is determined based on a reparameterization algorithm to obtain a prior distribution of the preferred background knowledge.
5. The method for training a common sense reasoning model based on knowledge screening according to claim 3, It is characterized in that The step of determining the inference distribution probability of the inference answer comprises: Based on the preferred background knowledge, the sample question and the common sense reasoning module in the initial common sense reasoning model, reasoning to obtain the reasoning distribution probability of the reasoning answer; The common sense reasoning module is obtained based on a general common sense reasoning model.
6. The method for training a common sense reasoning model based on knowledge screening according to any one of claims 1 to 5, It is characterized in that The training iteratively training the initial common sense reasoning model based on the reasoning answer to the sample question and the sample answer to obtain the common sense reasoning model based on knowledge screening includes: Based on the reasoning answers to the sample questions and the losses between the sample answers, the constraint upper bound of the initial common sense reasoning model is optimized to obtain the common sense reasoning model based on knowledge screening.
7. A training device for a common sense reasoning model based on knowledge screening, It is characterized in that include: An acquisition unit is configured to acquire a sample question-answer pair, wherein the sample question-answer pair includes a sample question and a sample answer corresponding to the sample question; A knowledge screening unit, which screens the initial background knowledge of the sample question-answer pair based on an initial common sense reasoning model to obtain preferred background knowledge; A reasoning unit, which determines a reasoning answer to the sample question based on the preferred background knowledge, the sample question and the initial common sense reasoning model; A training unit, based on the reasoning answers to the sample questions and the sample answers, iterates the training of the initial common sense reasoning model to obtain a common sense reasoning model based on knowledge screening; The initial common sense reasoning model is based on constructing a first constraint and a second constraint, and based on variational estimation of the first constraint and the second constraint, determining the upper bound of the constraint; the first constraint is used to maximize the association between the preferred background knowledge and the sample question and answer pair; the second constraint is used to minimize the association between the preferred background knowledge and the initial background knowledge.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the training method of the common sense reasoning model based on knowledge screening as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the training method of the common sense reasoning model based on knowledge screening as described in any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the training method of the common sense reasoning model based on knowledge screening as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Visual common sense reasoning method and system based on knowledge perception attention network
CN115759262A
Pretraining language model-based common sense question and answer method and system
CN116842157A
