An interpretable link prediction method for knowledge hypergraphs

By combining knowledge hypergraph embedding model and Markov logical network, the lower bound of confidence of log-likelihood functions is optimized using variational EM algorithm, and the lack of interpretability of knowledge hypergraph representation learning methods in link prediction and the inability to combine logical rules is solved. The problem of this paper achieves efficient interpretability link prediction and representation performance improvement.

CN114780879BActive Publication Date: 2025-02-25TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210324786.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2025-02-25
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

The existing knowledge hypergraph representation learning methods lack interpretability in link prediction and cannot effectively reason with domain knowledge in logical rules.

Method used

A method of interpretability link prediction based on knowledge hypergraph embedding model and Markov logical network is proposed. The lower bound of confidence of log likelihood functions is optimized through the variational EM algorithm, and the inference results are explained in combination with logical rules.

Benefits of technology

The interpretability of the prediction results of knowledge hypergraph links is realized, and the representation performance is improved. It can simultaneously use the semantic information of embedded space and the domain knowledge of logical rules for hidden tuple reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114780879B_ABST
    Figure CN114780879B_ABST
Patent Text Reader

Abstract

The present invention discloses an interpretable link prediction method for knowledge hypergraph, including constructing an interpretable knowledge hypergraph representation learning model based on a knowledge hypergraph embedding model and a Markov logic network; establishing joint probability for all observable tuples and hidden tuples of the knowledge hypergraph through a Markov logic network, taking maximizing the log-likelihood of the observable tuple as a training target; optimizing the confidence lower bound of the log-likelihood function using a variational EM algorithm to realize model training and verification; using the verified interpretable knowledge hypergraph representation learning model to perform link prediction on a knowledge hypergraph data set, namely, taking a hidden tuple in the knowledge hypergraph data set as the input of the model, and the model outputting the probability value of the hidden tuple being established and the contribution of the entities and relations connected to the hidden tuple to the establishment of the hidden tuple. The method of the present invention can make full use of the domain knowledge in the logic rules and the semantic information in the vector space, and improve the effect of knowledge hypergraph representation learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a knowledge hypergraph, and in particular to a representation learning method for a large-scale knowledge hypergraph. Background Art

[0002] With the rapid development of the Internet, the amount of data has exploded. In order to deeply understand the semantic information behind user queries and enhance the search quality of search engines, Google first proposed the concept of knowledge graph in 2012. Knowledge graph formally describes things in the real world and their relationships with each other. It is a large-scale semantic network that stores human knowledge in the form of a graph. It represents knowledge as a triple p(s,o), where p is the predicate, s is the subject, and o is the object. A triple p(s,o) is used to indicate that there is a relationship p between resource s and resource o, or that resource s has an attribute p and its value is o.

[0003] Knowledge Hypergraph is a graph-structured knowledge base that stores facts in the world in the form of multiple groups. It can be regarded as a generalization of knowledge graph. It represents knowledge as n-tuples p(e1,…,e n-1 ), where p is the predicate, e i is the i-th entity in the tuple. An n-tuple is used to represent resource e i There is a relationship p between entities. Since there are a large number of facts in the real world, it is unrealistic to store all facts in a knowledge hypergraph. Therefore, the biggest challenge to the existing knowledge hypergraph is its serious incompleteness, that is, the links between some entities are missing. Taking Freebase as an example, 61% of the relationships it contains are multi-dimensional relationships, and more than one-third of the entities it stores participate in the composition of multi-dimensional relationships. Faced with the high incompleteness of the knowledge hypergraph, manually adding links between entities is very labor-intensive and material-intensive, so there is a need for an algorithm that automatically infers missing links between entities.

[0004] Knowledge hypergraph representation learning aims to embed entities and relations into continuous low-dimensional vectors for efficient storage and calculation. By using these vector representations, the semantic associations of entities and relations can be effectively represented, and the problems of low computational efficiency and data sparsity can be effectively solved. These characteristics of knowledge representation learning play an important role in the construction, reasoning and application of knowledge hypergraphs. m-TransH is a representative knowledge hypergraph representation learning method that projects entities and relations into the same vector space. The m-TransH model is simple and efficient, and has achieved promising results in link prediction problems. At present, researchers have proposed several enhanced m-TransH models, including RAE and NaLP, to improve the prediction and reasoning capabilities of knowledge hypergraphs. However, there are still two key challenges in knowledge hypergraph embedding methods.

[0005] (1) The results of link prediction are not interpretable. Most existing knowledge graph embedding methods are purely data-driven black box models that cannot clearly indicate the contribution of an entity or relationship to the inference result, nor can they provide any information about the reliability of the prediction. For fields such as banking, medical care, and law where decision-making has a significant impact, it is very important to provide the specific reasons for the inference results. Therefore, how to do this has become an urgent technical issue.

[0006] (2) Embedding methods cannot be combined with domain knowledge of logical rules to complete reasoning. Most current representation learning research focuses on retaining the semantic information of entities and relations to effectively predict missing n-grams. However, one limitation is that they do not take advantage of logical rules, which can compactly encode domain knowledge, which is useful in many applications including explaining reasoning results. Therefore, it is an important direction for future research in knowledge representation learning to synchronize embedding methods with logical rules to complete reasoning in order to simultaneously utilize the semantic information in the embedding space and the domain knowledge in the logical rules.

[0007] In summary, there is an urgent need for a new knowledge hypergraph representation learning method that is interpretable and can simultaneously utilize the semantic information in the embedding space and the domain knowledge in the logical rules to address the two key challenges of the existing technology: the results of link prediction are not interpretable and the embedding method reasoning cannot incorporate domain knowledge. Summary of the invention

[0008] With respect to the above-mentioned prior art, with the development of knowledge hypergraphs, knowledge hypergraph representation learning with interpretability and integration of domain knowledge is an academic frontier issue of artificial intelligence, with very high academic value and potential application value. The purpose of the present invention is to provide an interpretable link prediction method for knowledge hypergraphs, in which the model simultaneously uses a knowledge hypergraph embedding method and a Markov logic network to learn knowledge hypergraph representation and uses logical rules to interpret the reasoning results, thereby improving the representation performance of the knowledge hypergraph while achieving interpretability of the reasoning results.

[0009] In order to solve the above technical problems, the present invention proposes an explainable link prediction method for a knowledge hypergraph, comprising the following steps:

[0010] Step 1: Construct an interpretable knowledge hypergraph representation learning model based on the knowledge hypergraph embedding model and Markov logic network;

[0011] Step 2: Establish joint probabilities for all observable tuples and hidden tuples of the knowledge hypergraph through a Markov logic network, with maximizing the log-likelihood of the observable tuple as the training goal; use a variational EM algorithm to optimize the confidence lower bound of the log-likelihood function, including: firstly performing a variational E-step inference on the probability of the hidden tuple being established, thereby optimizing the parameters of the knowledge hypergraph embedding model, and then performing an M-step, adjusting the logical rule weights of the Markov logic network according to the probability of the hidden tuple being established obtained by the variational E-step inference, and cyclically iterating the variational E-step and the M-step in this order to complete the training and verification of the interpretable knowledge hypergraph representation learning model;

[0012] Step 3: Use the interpretable knowledge hypergraph representation learning model trained and verified in step 2 to perform link prediction on the knowledge hypergraph dataset, that is, take a latent tuple in the knowledge hypergraph dataset as the input of the model, and the output of the model is: the probability value of the latent tuple being true and the contribution of the entities and relationships connected to the latent tuple to the validity of the latent tuple.

[0013] Furthermore, the interpretable link prediction method for knowledge hypergraph described in the present invention comprises:

[0014] The content of step one is: inputting observable tuples of the knowledge hypergraph into the knowledge hypergraph embedding model and the Markov logic network respectively, and at the same time, inputting logical rule data corresponding to the observable tuples of the knowledge hypergraph into the Markov logic network.

[0015] In step 2, the variational EM algorithm consists of a variational E step and an M step, and the variational E step and the M step are iterated in this order to complete the training and verification of the interpretable knowledge hypergraph representation learning model; when executing the variational E step, the knowledge in the logical rules is integrated into the knowledge hypergraph embedding model, and the parameters of the knowledge hypergraph embedding model are optimized; when executing the M step, the semantic information in the embedding space is combined with the logical rules, and the logical rule weights of the Markov logic network are adjusted.

[0016] In the present invention, the content of optimizing the parameters of the knowledge hypergraph embedding model includes:

[0017] 2-1) Adjust the variational distribution optimization function and integrate the knowledge hypergraph embedding model into the variational E-step training;

[0018] 2-2) Use the Markov logic network to obtain the true posterior distribution of the hidden element, and use sampling to optimize the calculation process of the Markov blanket;

[0019] 2-3) Optimize the parameter values ​​of the knowledge hypergraph embedding model by minimizing the KL divergence between the variational distribution and the true posterior distribution.

[0020] In the present invention, the content of adjusting the logic rule weights of the Markov logic network includes:

[0021] 3-1) Using the pseudo-likelihood function as the optimization object, the log-likelihood function is maximized by optimizing the pseudo-likelihood function to adjust the weight value of the logical rule;

[0022] 3-2) Use the stochastic gradient descent method to calculate the gradient of the logic rule and update the weight value.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] (1) The present invention designs an interpretable link prediction method for large-scale knowledge hypergraphs. The method is a knowledge representation learning model constructed based on both a knowledge hypergraph embedding model and a Markov logic network. The variational EM algorithm is used to iterate the variational E step and M step to respectively complete the parameter optimization of the knowledge hypergraph embedding model and the logical rule weight adjustment of the Markov logic network. After iterative training, the joint distribution defined by the two for all tuples converges and tends to be consistent. The logical rules of the Markov logic network can be used to explain the contribution of each entity and relationship of the knowledge hypergraph to the establishment of the reasoning tuple, which effectively improves the performance of link prediction while making the reasoning results interpretable.

[0025] (2) Compared with the pure data-driven knowledge hypergraph representation learning model, the present invention integrates logical rules based on the Markov logic network, so that the model can obtain the entities and relationships associated with the reasoning results in the Markov network through the Markov blanket, and use the logical rule weights related to these entity relationships to explain the origin of the reasoning results. Based on the knowledge hypergraph embedding method, the present invention explores the method of integrating logical rules into the knowledge hypergraph embedding model, fully combining the advantages of the two models, and can simultaneously use the semantic information of the embedding space and the domain knowledge of the logical rules to perform the reasoning work of the hidden tuples, which can better complete the knowledge hypergraph link prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is an example diagram of a knowledge hypergraph, related logic rules and Markov blanket of the present invention;

[0027] Figure 2 is a flowchart of the interpretable knowledge hypergraph representation learning of the present invention;

[0028] Figure 3 It is the experimental result of link prediction of the present invention and related methods in the prior art on the knowledge hypergraph dataset;

[0029] Figure 4-1 and Figure 4-2 It is the experimental result of link prediction on the knowledge graph dataset by the present invention and related methods in the prior art;

[0030] Figure 5-1 and Figure 5-2 The experimental results of link prediction using only the variational E-step and (the present invention) the EM-step on the knowledge hypergraph dataset are combined with the knowledge hypergraph embedding method;

[0031] Figure 6-1 to Figure 6-4 The experimental results of link prediction on the knowledge graph dataset are respectively completed by combining the knowledge hypergraph embedding method with the variational E-step only and the EM-step simultaneously (in the present invention). DETAILED DESCRIPTION

[0032] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but the following embodiments are by no means intended to limit the present invention in any way.

[0033] The present invention proposes an interpretable link prediction method for knowledge hypergraph, which mainly includes:

[0034] Step 1: construct an interpretable knowledge hypergraph representation learning model based on the knowledge hypergraph embedding model and the Markov logic network, including: inputting the observable tuples of the knowledge hypergraph into the knowledge hypergraph embedding model, and simultaneously inputting the observable tuples of the knowledge hypergraph and the logical rule data corresponding to the observable tuples into the Markov logic network.

[0035] Step 2: Train and verify the interpretable knowledge hypergraph representation learning model constructed in step 1, including: establishing joint probabilities for all observable tuples and hidden tuples of the knowledge hypergraph through a Markov logic network, with the goal of maximizing the log-likelihood of the observable tuple. In order to combine the knowledge hypergraph embedding model with the Markov logic network using the variational EM algorithm and iteratively train them simultaneously, we turn to optimize the confidence lower bound of the log-likelihood function.

[0036] The confidence lower bound of the log-likelihood function is optimized by using a variational EM algorithm, which consists of a variational E-step and an M-step. First, the variational E-step is performed to infer the probability of the latent element group, thereby optimizing the parameters of the knowledge hypergraph embedding model, and then the M-step is performed to adjust the logical rule weights of the Markov logic network according to the probability value of the latent element group obtained by the variational E-step inference. The variational E-step and the M-step are iterated in this order to complete the training and verification of the interpretable knowledge hypergraph representation learning model.

[0037] When performing the variational E step, the knowledge in the logic rules is integrated into the knowledge hypergraph embedding model, and the parameters of the knowledge hypergraph embedding model are optimized, including:

[0038] 1) Adjust the variational distribution optimization function and combine it with amortized reasoning so that the knowledge hypergraph embedding model can reason about a single hidden tuple, thereby integrating the knowledge hypergraph embedding model into the variational E-step training;

[0039] 2) Using a Markov logic network to obtain the true posterior distribution of the hidden tuple, and optimizing the calculation process of the Markov blanket by sampling the tuple indicator variable values ​​related to the hidden tuple;

[0040] 3) Use the current parameter values ​​of the knowledge hypergraph embedding model to calculate the true posterior distribution of the tuple, and optimize the parameter values ​​of the knowledge hypergraph embedding model by minimizing the KL divergence between the variational distribution and the true posterior distribution.

[0041] When executing the M step, the semantic information in the embedding space is combined with the logic rules, and the logic rule weights of the Markov logic network are adjusted according to the tuple establishment probability value, including:

[0042] 1) The pseudo-likelihood function is used as the optimization object to avoid calculating the partition function involving a large number of hidden element indicator variable values, and the log-likelihood function is maximized by optimizing the pseudo-likelihood function to adjust the logical rule weight value;

[0043] 2) Use the stochastic gradient descent method to calculate the gradient of the logic rule and update the weight value.

[0044] Step 3: Use the interpretable knowledge hypergraph representation learning model trained and verified in step 2 to perform link prediction on the knowledge hypergraph dataset, that is, take a hidden tuple in the knowledge hypergraph dataset as the input of the model, find all tuples connected to the hidden tuple and related entities and relationships through the Markov blanket of the hidden tuple, calculate the contribution of each to the establishment of the hidden tuple through the logical rule weights, and the output of the model is: the probability value of the establishment of the hidden tuple and the contribution of the entities and relationships connected to the hidden tuple to the establishment of the hidden tuple.

[0045] By utilizing the explainable link prediction method for knowledge hypergraphs proposed in the present invention, it is possible to fully utilize the domain knowledge in the logical rules and the semantic information in the vector space, thereby improving the effect of knowledge hypergraph representation learning.

[0046] Example 1

[0047] The interpretable knowledge hypergraph representation learning model constructed in the present invention is as follows: Figure 1 As shown in the figure, a knowledge hypergraph, related logic rules and example diagrams of Markov blanket are given. Among them, the circle represents an entity, the ellipse in the upper figure represents several n-tuples of the knowledge hypergraph, and the ellipse in the lower figure represents a group. The n-tuple of the knowledge hypergraph consists of multiple entities, among which parentsOf represents the parent-child relationship, couple represents the husband-wife relationship, wasBornIn represents the birthplace relationship, and workAsFor represents the work identity relationship, which are composed of 3, 2, 3, and 3 entities respectively. The rules based on these predicates are shown in the Markov logic network in the middle figure. The Markov logic network consists of logic rules and rule weights. In the variational E step, the knowledge hypergraph embedding method completes the prediction of hidden tuples (such as serveAsFor (LebronJames, Basketball Player, Laker) that does not exist in the knowledge hypergraph) by the embedding vector obtained from the n-tuple on the left. In the M step, the rule weights of the Markov logic network are adjusted with the observable tuples and the hidden tuples predicted by the variational E step as training data. When explaining the reasoning results, the Markov blanket of the reasoning results is used. Taking the latent tuple serveAsFor(Lebron James, Basketball Player, Laker) as an example, the Markov blanket will display all entities connected to the latent tuple. The entities in a logical rule are connected to each other as a group, corresponding to all entities involved in a closed rule. The weights of the logical rules obtained through M-step training can explain the contribution of each related entity and relationship to the validity of the reasoning result.

[0048] Example 2

[0049] The process of learning knowledge hypergraph representation using the explainable connection prediction method proposed in this invention is as follows: Figure 2As shown in Figure 2, the knowledge hypergraph representation learning method process is as follows:

[0050] 1. Building an interpretable knowledge hypergraph representation learning model

[0051] 1-1) Input tuples and rule data, use Markov to establish joint probability and maximize the log-likelihood of the observed tuples.

[0052] The knowledge hypergraph is represented as in ε、 and are respectively a finite set of knowledge hypergraph, entity, relation and observable tuple. i =r(e1, e2, ..., e k ), where r is a relation, each is an entity, k is a non-negative integer number of relation r, and i is the observable tuple index. Each tuple t i With an indicator variable association, Indicates that the tuple is true, This means the tuple is false.

[0053] Given a set of logical rules L, the joint distribution of all tuples can be defined by the following formula (1):

[0054]

[0055] Where p is the joint distribution, Z is the partition function, is the weight value of the i-th logical rule, is the i-th closed rule set The size of b H is a hidden tuple. Through the above formula (1), the problem of predicting whether the hidden variable is true is transformed into inferring the posterior distribution p t (b H |b O ), the training of the Markov logic network is done by maximizing the observable tuple b O The log-likelihood of log p t (b O )Finish.

[0056] 1-2) Optimize the confidence lower bound of the log-likelihood function and introduce the variational EM algorithm.

[0057] In order to combine the knowledge hypergraph embedding model and the Markov logic network at the same time, the confidence lower bound of the log-likelihood in step 1-1) is optimized as shown in formula (2):

[0058]

[0059] Among them, KL calculates the KL divergence between the true posterior and the variational posterior. v With the true posterior p t When they are equal, the confidence lower bound can be effectively optimized by the variational EM algorithm.

[0060] The variational EM algorithm consists of a variational E step and an M step. When executing the variational E step, the true posterior distribution is fixed while the variational distribution is updated to reduce p. v (b H ) and p t (b O , b H ), this process can integrate the knowledge in the logical rules into the knowledge hypergraph embedding model; when executing M steps, the variational distribution is fixed while updating the true posterior distribution to maximize the log-likelihood function under all tuples This process combines semantic information in the embedding space with logical rules.

[0061] 2. Probability of executing variational E-step inference for hidden tuples

[0062] 2-1) Use the knowledge hypergraph embedding model to obtain the variational distribution of hidden units.

[0063] The goal of the variational E step is to infer the latent element b H The true posterior distribution p t (b H |b O ), but the complex graph structure of the knowledge hypergraph makes exact reasoning infeasible. Therefore, the true posterior distribution is approximated by using the mean field variational distribution, making the variational distribution p v (b H ) can perform reasoning for each hidden tuple t independently.

[0064] The method of predicting hidden tuples in knowledge hypergraph embedding model is to learn observable tuples b O The embeddings of entities and relations are given by , and based on these embeddings, the joint distribution of all tuples can be defined as follows:

[0065]

[0066] Bern represents Bernoulli distribution, and the scoring function f calculates the tuple t=r(e1, e2, ..., e based on the relation embedding r and entity embedding e. k ) is the correct probability. By taking the observable tuple as a positive example and the hidden tuple as a negative example, the logarithmic probability log p(b O =1, b H =0) to effectively optimize the model parameters.

[0067] In order to combine the Markov logic network with the knowledge hypergraph embedding model, amortized inference is used to make the variational distribution p v (b H ) is parameterized as the parameters of the knowledge hypergraph embedding model, so that the joint distribution of formula (3) can be combined with the Markov logic network in the variational E step, and the inference formula (4) is as follows:

[0068]

[0069] 2-2) Use Markov logic network to obtain the true posterior distribution of hidden elements

[0070] By minimizing p v (b H ) and p t (b H |b O ), the probability value of the hidden tuple predicted by the Markov logic network is performed through a fixed formula (5):

[0071]

[0072] Where MB(t) is the Markov blanket of tuple t, const is a fixed constant, and any tuple in the closed rule set of any rule that appears at the same time as tuple t can be found in the Markov blanket MB(t).

[0073] The expectation in formula (5) can be obtained by sampling To simplify the calculation, for each tuple t' in the Markov blanket, if t' is observable, then otherwise Take the variational distribution value calculated by the knowledge hypergraph embedding model, so that the variational distribution can be further simplified to

[0074] Through the execution of step 2-1) and this step, the indicator variable value b of each hidden tuple t t Prediction can be performed simultaneously through the knowledge hypergraph embedding model and the Markov logic network. If any t′ connected to the tuple t is a hidden tuple, its indicator variable is desirable, combined with the simplification of the variational distribution It can be seen that the prediction results of the knowledge hypergraph embedding model should be the same as those of the Markov logic network.

[0075] 2-3) Optimize the parameter values ​​of the knowledge hypergraph embedding model.

[0076] The parameter μ of the learning knowledge hypergraph model can be obtained by the objective function O μ conduct:

[0077]

[0078] The objective function can be calculated by the current μ value. And the true posterior distribution is used as the target to update μ to minimize the KL divergence between the variational distribution and the true distribution. In this way, the domain knowledge encoded in the logical rules can be integrated into the knowledge hypergraph embedding model.

[0079] 3. Execute step M to adjust the weight of the logic rule according to the probability value of the tuple

[0080] 3-1) Optimize the pseudo-likelihood function to update the weight value.

[0081] In the M step, in order to solve the partition function in formula (1), we turn to fix the parameters of the knowledge hypergraph embedding model and maximize the logarithmic likelihood to optimize the pseudo-likelihood function to adjust the weight of the logical rule. The pseudo-likelihood function is shown in formula (7):

[0082]

[0083] 3-2) Use stochastic gradient descent to calculate the gradient of the logistic rule weights.

[0084] For the expectation of formula (7) in step 3-1), for the rule l that connects the hidden elements in the Markov blanket, the gradient of its weight can be calculated by stochastic gradient descent of formula (8):

[0085]

[0086] is the rule weight w l If tuple t is observable, then the probability y of tuple t in formula (8) is t =1, otherwise take the variational posterior p v (b t =1), is sampled from the variational posterior, and for each tuple t′ in , if it is observable then Otherwise take

[0087] Finally, for each observable tuple, we try to maximize For each hidden tuple, p v (b t =1) as the target to update the probability value In this way, the semantic information learned by the knowledge hypergraph embedding model can be combined with the logical rules.

[0088] 4. Output the probability of the hidden tuple being established and the contribution of each entity relationship to the establishment of the hidden tuple

[0089] For each predicted tuple t, in any logical rule l, the tuple t′=r(e1, e2, ..., e k ) can be found in the Markov blanket MB(t). All entities and relations appearing in the Markov blanket can be grouped into sets ε′ and sets Tuple Collection It consists of all tuples containing entity e′ in the Markov blanket. The contribution of each entity e′ to tuple t can be calculated by formula (9):

[0090]

[0091] in, A collection of tuples that can be obtained in the same way as above To calculate the contribution of each relationship r'. With the contribution of each entity and relationship, the respective contribution percentage can be obtained by dividing by the sum of the contributions of this type. The contribution of an entity to the prediction result under a specific relationship r'∈l or the contribution of a relationship to the prediction result under a specific rule l can be obtained by the rule weight value of the trained Markov logic network.

[0092] Example 3

[0093] Experimental results of link prediction using the method of the present invention and related methods in the prior art on knowledge hypergraph datasets or knowledge graph datasets.

[0094] The present invention performs link prediction on the knowledge hypergraph datasets JF17K, M-FB15K, FB-AUTO and the knowledge graph datasets FB15k, WN18, FB15k-237, WN18RR.

[0095] See also Figure 3 , on the knowledge hypergraph dataset, m-CP is selected as the embedding model of the knowledge hypergraph. Compared with pure m-CP and other knowledge hypergraph embedding methods, the technical solution of the present invention has achieved better performance in almost all evaluation indicators. The reason is that the knowledge hypergraph embedding method only utilizes the semantic information in the embedding space, while the present invention uses the embedding that further combines the domain knowledge in the logical rules to predict the probability value of the hidden tuple discovered by the Markov logic network, and further updates the weight of the logical rules to achieve better performance. From the results of the FB-AUTO dataset, compared with pure m-CP, the present invention has achieved the same effect. This is mainly related to the size of the FB-AUTO dataset (7 relations, a total of 11213 tuples), and there are no contributing logical rules when searching for hidden tuples. Therefore, the intersection between the test set and the hidden tuple set is empty, which results in the logical rules contained cannot be refined into the knowledge hypergraph embedding, resulting in the same comprehensive effect as the pure embedding method.

[0096] See also Figure 4-1 and Figure 4-2 , on the knowledge graph dataset, m-DistMult is selected as the embedding model of the knowledge hypergraph. Similar to the results on the knowledge hypergraph, the present invention is applied to the knowledge graph, and better results are obtained in the ordinary knowledge graph with binary relations, which proves the effectiveness of the present invention. Since the pure Markov logic network is only applied to binary relations, the present invention only compares the reasoning performance with the pure Markov logic network on the knowledge graph dataset. Similar to the knowledge hypergraph dataset, the experimental results show the high efficiency of the model created in the present invention on these evaluation indicators.

[0097] Figure 5-1 , Figure 5-2 and Figure 6-1 to Figure 6-4 The results of training the present invention using the variational EM algorithm and its variant (variational E-step only) are respectively described. In the variational E-step, the embedding model learns domain knowledge from the logical rules, while in the M-step, the weights of the logical rules can be optimized by the learned embedding. When the present invention combines the same embedding method with the same data set, the effect of using both the variational E-step and the M-step is generally higher than the effect of using only the variational E-step.

[0098] Although the present invention has been described above in conjunction with the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can make many modifications without departing from the purpose of the present invention, all of which are within the protection of the present invention.

Claims

1. An interpretable link prediction method for knowledge hypergraph, characterized in that: The following steps are involved: Step 1: Construct an interpretable knowledge hypergraph representation learning model based on the knowledge hypergraph embedding model and Markov logic network; Step 2: Establish joint probabilities for all observable tuples and hidden tuples of the knowledge hypergraph through a Markov logic network, with maximizing the log-likelihood of observable tuples as the training goal; The variational EM algorithm is used to optimize the confidence lower bound of the log-likelihood function, including: firstly performing variational E-step reasoning on the probability of the hidden element group being established, thereby optimizing the parameters of the knowledge hypergraph embedding model, and then performing M-step, adjusting the logic rule weights of the Markov logic network according to the probability value of the hidden element group being established obtained by variational E-step reasoning, and cyclically iterating the variational E-step and M-step in this order to complete the training and verification of the interpretable knowledge hypergraph representation learning model; Step 3: Use the interpretable knowledge hypergraph representation learning model trained and verified in step 2 to perform link prediction on the knowledge hypergraph dataset, that is, take a latent tuple in the knowledge hypergraph dataset as the input of the model, and the output of the model is: the probability value of the latent tuple being true and the contribution of the entities and relationships connected to the latent tuple to the validity of the latent tuple.

2. The interpretable link prediction method for knowledge hypergraph according to claim 1, characterized in that: The content of step one is: inputting observable tuples of the knowledge hypergraph into the knowledge hypergraph embedding model and the Markov logic network respectively, and at the same time, inputting logical rule data corresponding to the observable tuples of the knowledge hypergraph into the Markov logic network.

3. The interpretable link prediction method for knowledge hypergraph according to claim 1, characterized in that: In step 2, the variational EM algorithm consists of a variational E step and an M step, and the variational E step and the M step are iterated cyclically in this order to complete the training and verification of the interpretable knowledge hypergraph representation learning model; When performing the variational E-step, the knowledge in the logic rules is integrated into the knowledge hypergraph embedding model, and the parameters of the knowledge hypergraph embedding model are optimized; When executing the M step, the semantic information in the embedding space is combined with the logic rules, and the logic rule weights of the Markov logic network are adjusted.

4. The interpretable link prediction method for knowledge hypergraph according to claim 1 or 2, characterized in that: The content of optimizing the parameters of the knowledge hypergraph embedding model includes: 2-1) Adjust the variational distribution optimization function and integrate the knowledge hypergraph embedding model into the variational E-step training; 2-2) Use the Markov logic network to obtain the true posterior distribution of the hidden element, and use sampling to optimize the calculation process of the Markov blanket; 2-3) Optimize the parameter values ​​of the knowledge hypergraph embedding model by minimizing the KL divergence between the variational distribution and the true posterior distribution.

5. The interpretable link prediction method for knowledge hypergraph according to claim 1 or 2, characterized in that: The contents of adjusting the logic rule weights of the Markov logic network include: 3-1) Using the pseudo-likelihood function as the optimization object, the log-likelihood function is maximized by optimizing the pseudo-likelihood function to adjust the weight value of the logical rule; 3-2) Use the stochastic gradient descent method to calculate the gradient of the logic rule and update the weight value.

Citation Information

Patent Citations

  • Intelligent interactive question and answer method, system and device based on Markov logic network

    CN109902165A

  • Relation prediction method combining logic rules and fragmented knowledge

    CN111191460A