CN112348190B - Uncertain knowledge graph prediction method based on improved embedded model SUKE - Google Patents

Uncertain knowledge graph prediction method based on improved embedded model SUKE Download PDF

Info

Publication number
CN112348190B
CN112348190B CN202011159784.4A CN202011159784A CN112348190B CN 112348190 B CN112348190 B CN 112348190B CN 202011159784 A CN202011159784 A CN 202011159784A CN 112348190 B CN112348190 B CN 112348190B
Authority
CN
China
Prior art keywords
confidence
uncertain
score
evaluator
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011159784.4A
Other languages
Chinese (zh)
Other versions
CN112348190A (en
Inventor
汪璟玢
聂宽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuzhou University
Original Assignee
Fuzhou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuzhou University filed Critical Fuzhou University
Priority to CN202011159784.4A priority Critical patent/CN112348190B/en
Publication of CN112348190A publication Critical patent/CN112348190A/en
Application granted granted Critical
Publication of CN112348190B publication Critical patent/CN112348190B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/027Frames

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to an uncertain knowledge graph prediction method based on an improved embedded model SUKE. The SUKE model is proposed based on the existing deterministic embedding model DistMult. The SUKE reserves the structural information and uncertainty information of knowledge, and comprises an evaluator and a confidence generator inside, wherein the evaluator evaluates the rationality of a fact according to the structural characteristics and uncertainty characteristics of the fact, screens out unreasonable facts, and accordingly obtains candidate facts. The latter generates confidence for the candidate facts, indicating the probability of the entity developing a particular relationship. The evaluator defines a structure score and an uncertainty score for each triplet for the factual justification evaluation task. Furthermore, the evaluator introduces unknown facts into the training. A confidence generator generates a confidence for each triplet for the confidence prediction task. The invention can effectively complete the link prediction task of the uncertain knowledge graph.

Description

Uncertain knowledge graph prediction method based on improved embedded model SUKE
Technical Field
The invention relates to the technical field of knowledge representation and reasoning under a knowledge graph, in particular to an uncertain knowledge graph prediction method based on an improved SUKE embedded model.
Background
The uncertain knowledge graph provides a confidence score for each triplet, the confidence reflecting the probability of occurrence of the triplet. In recent years, the development of relationship extraction and crowdsourcing has promoted the construction of large-scale uncertain knowledge graphs, such as ConceptNet, Probase and NELL. Ur et al propose URGE in 2017. URGE proposes a matrix decomposition based approach to embed uncertain networks. But the model only considers node proximity in sparse networks and only learns node embedding. Chen et al, UKGE 2019, which utilizes confidence learning embedding of triples, while introducing the fact that probabilistic soft logic infers it invisible. However, UKGE only uses confidence information to learn embedding, and ignores the structural information of the triples.
Currently, little research is done to embed knowledge maps for uncertainty. Miao et al first proposed the uncertainty inference model IIKE for knowledge graphs in 2015. While IIKE achieves good performance, it considers each triplet in isolation only in calculating its confidence probability score, without taking advantage of the interrelated properties of the knowledge-graph. In the uncertain knowledge graph embedding work, the models with more prominent performances are URGE proposed by hu et al in 2018 and UKGE proposed by chen et al in 2019. The URGE model is designed aiming at the uncertain network, the node embedding is generated by considering the proximity of the nodes, although the URGE model can be popularized to the knowledge graph, the uncertain network is different from the knowledge graph, and the embedding task of the uncertain knowledge graph cannot be well completed. UKGE compares in URGE, and the performance is more outstanding, but the structure information of knowledge is not fully utilized to a certain extent to the UKGE model.
Disclosure of Invention
In view of this, the present invention provides an uncertain knowledge graph prediction method based on an embedded model SUKE, which can effectively complete a link prediction task of an uncertain knowledge graph.
The invention is realized by adopting the following scheme: an uncertain knowledge graph prediction method based on an embedded model SUKE comprises the following steps:
step S1: giving an uncertain knowledge graph, wherein the uncertain knowledge graph internally comprises a plurality of quadruplets (h, r, t, w), wherein h represents a head entity, t represents a tail entity, r represents the relation of the head entity and the tail entity, and w represents the probability of the occurrence relation of the triplets (h, r, t); expanding the number of original quadruplets by a probability soft logic reasoning method defined in a UKGE model; finally, dividing the expanded quadruple into a training set of 60 percent, a verification set of 20 percent and a test set of 20 percent for training the SUKE model; the input of the SUKE model is vector representation of h, r and t, and the vector of the entity and the relation in the knowledge base is pre-trained or randomly initialized by using a TransE algorithm;
step S2: constructing an embedded model SUKE: designing two components of an evaluator and a confidence generator, wherein the evaluator is used for evaluating the rationality of the triples (h, r, t), unreasonable triples are removed through the evaluator, the rational triples are used as candidate sets, and the confidence generator is used for generating confidence for the candidate sets so as to obtain quadruples (h, r, t, w); training an evaluator and a confidence generator through a loss function for subsequent prediction;
step S3: adding the obtained quadruple (h, r, t, w) into the original uncertain knowledge graph; wherein link prediction is defined to predict its missing tail entity and confidence given an incomplete quadruple (h, r,; adding a new quadruple obtained by link prediction into the original uncertain knowledge graph to make the knowledge graph more complete; during prediction, for a triplet (h, r,.
Further, the step S2 specifically includes the following steps:
step S21: calculating triple energy scores through a DistMult model, and respectively obtaining mapping functions of the energy scores to structure scores and uncertain scores through training;
step S22: linearly fusing or multiplicatively fusing the structure score and the uncertainty score to obtain an evaluator score which is used for evaluating the rationality of each triple, wherein reasonable triples can obtain a high evaluator score, and the evaluator score is between 0 and 1;
step S23: giving a triple threshold theta, wherein the value range of theta is 0-1, and judging whether the triple is reasonable or not; if the evaluator score of the triple (h, r, t) is larger than or equal to theta, the triple is considered to be reasonable and is added into the candidate set; otherwise, the operation is unreasonable;
step S24: and generating a confidence coefficient for the triple candidate set obtained in the step S23 through a confidence coefficient generator, wherein the value range of the confidence coefficient is 0-1, and forming a new quadruple (h, r, t, w).
Further, the specific content of step S21 is:
firstly, calculating the energy score of the triplet by adopting a DistMult model;
the energy function of the DistMult model is shown in formula (1);
E(h,r,t)=hTdiag(r)t (1)
wherein diag (r) is a relational diagonal matrix, hTRepresenting the transpose of the head entity vector and t is the tail entity vector representation.
Then, obtaining Q of the triple through different mapping functions and parametersstructureAnd Quncertain
QstructureThe calculation method is shown in formula (2):
Figure BDA0002743797440000041
wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phistructure(. is a mapping function of the triplet energy scores to the structure scores; the mapping function is shown in equation (3):
φstructure(E(h,r,t))=Pstructure·E(h,r,t)+bstructure (3)
wherein P isstructureMapping parameters for energy scores to structure scores, bstructureIs an offset;
Quncertainthe calculation method of (2) is shown in formula (4):
Figure BDA0002743797440000042
wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phiuncertain(. h) is a mapping function of the triplet energy scores to uncertainty scores; the mapping function is shown in equation (5):
φuncertain(E(h,r,t))=Puncertain·E(h,r,t)+buncertain (5)
wherein P isuncertainAs a mapping parameter of energy score to uncertainty score, buncertainIs an offset;
q of positive example triples in training processstructureTrending towards Q of 1, negative example tripletsstructureTends towards 0; q of positive example tripletsuncertainTrend toward true confidence w, Q of negative example triplesuncertainTends towards 0; for the unknown fact inferred by the logic rule, the evaluator score is used for fitting the confidence coefficient of the unknown fact during training;
the loss function of unknown fact participating in training is defined as formula (6)
Figure BDA0002743797440000051
Where RS is a set of unknown facts, QstructureAnd QuncertainStructure score and uncertainty score of unknown facts, respectively; lambda is a dynamic adjustment parameter;
the loss function of the evaluator consists of positive case loss, negative case loss and loss of unknown fact; is defined as formula (7)
ΓEvaluator=ΓposnegUnFacts (7)
Wherein
Figure BDA0002743797440000052
Figure BDA0002743797440000053
ΓposRepresenting positive case loss, ΓnegRepresenting negative example loss, ΓUnFactsRepresents a loss of unknown facts; s is a positive example set, and S' is a negative example set; the negative examples used in training are generated by randomly replacing head and tail entities, and meanwhile, the confidence coefficient of the negative examples is set to be 0; negative examples are shown in equation (10):
S'={(h1,r,t,0)|h1∈ε\h}∪{(h,r,t1,0)|t1∈ε\t} (10)。
further, the specific content of step S22 is:
the linear weighted fusion mode is shown as formula (11):
score_add=α*Qstructure+β*Quncertain (11)
wherein α + β ═ 1;
the multiplicative fusion mode is shown in formula (12):
score_mul=ε+(1-ε)(Qstructure*Quncertain) (12)
wherein epsilon is smooth hyper-parameter, and the meaning of multiplicative fusion mode means QuncertainTo QstructureMake corresponding adjustmentsFinishing; when Q isuncertainLess, Q will be loweredstructureConversely, Q will be increasedstructure(ii) a When a triplet has a higher QstructureAnd QstructureThe calculated score value will be large, and conversely the calculated score value will be small.
Further, the specific content of step S24 is:
the confidence generator generates confidence w for the candidate set by using a formula (4), and the confidence w and the candidate set obtained in the S23 form a new quadruple (h, r, t, w); the confidence generator uses a different mapping function than the evaluator, but the main difference is that only the negative case is used when training the confidence generator.
The loss function of the confidence generator is defined as equation (13)
Figure BDA0002743797440000071
Where S is the positive case set and w is the true confidence of the triplet.
The model total loss function is composed of an estimator loss function and a confidence coefficient loss function and is defined as a formula (14)
Ψ=ΓconfidenceEvaluator (14)
Wherein gamma isconfidenceTo evaluate the loss of the device, ΓconfidenceIs the loss of the confidence generator model.
Compared with the prior art, the invention has the following beneficial effects:
(1) most of the existing expression learning models only consider structural knowledge stored in a knowledge base, so the completion capability of the models is limited, and the algorithm provided by the invention can effectively fuse structural information and uncertain information.
(2) The invention provides an uncertain knowledge map embedding model SUKE, which introduces structural information, uncertain information and unknown facts and can learn better vector representation.
(3) The SUKE internally comprises two components, namely an evaluator and a confidence generator, wherein the evaluator can be used for evaluating the reasonability of uncertain knowledge, the confidence generator is used for complementing the confidence of the triples, and the two components can effectively complete the link prediction task of the uncertain knowledge graph by cooperation.
Drawings
FIG. 1 is a flowchart of a prediction method according to an embodiment of the present invention.
Fig. 2 is a diagram of a SUKE training process according to an embodiment of the present invention.
Detailed Description
The invention is further explained below with reference to the drawings and the embodiments.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
As shown in fig. 1, the present embodiment provides an uncertain knowledge graph prediction method based on an embedded model SUKE, including the following steps:
step S1: giving an uncertain knowledge graph, wherein the uncertain knowledge graph internally comprises a plurality of quadruples (h, r, t and w), wherein h represents a head entity, t represents a tail entity, r represents the relation of the head entity and the tail entity, and w represents the probability of the occurrence of the relation of the triples (h, r and t); expanding the number of original quadruplets by a probability soft logic reasoning method defined in a UKGE model; finally, dividing the expanded quadruple into a training set of 60%, a verification set of 20% and a test set of 20% for training the SUKE model; the input of the SUKE model is vector representation of h, r and t, and a TransE algorithm is used for pre-training or randomly initializing vectors of entities and relations in a knowledge base;
step S2: constructing an embedded model SUKE: designing two components of an evaluator and a confidence generator, wherein the evaluator is used for evaluating the rationality of the triples (h, r, t), unreasonable triples are removed through the evaluator, the rational triples are used as candidate sets, and the confidence generator is used for generating confidence for the candidate sets so as to obtain quadruples (h, r, t, w); training an evaluator and a confidence generator through a loss function for subsequent prediction;
step S3: adding the obtained quadruple (h, r, t, w) into the original uncertain knowledge graph; wherein link prediction is defined to predict its missing tail entity and confidence given an incomplete quadruple (h, r,; adding a new quadruple obtained by link prediction into the original uncertain knowledge graph to make the knowledge graph more complete; during prediction, for a triplet (h, r,.
In this embodiment, the step S2 specifically includes the following steps:
step S21: calculating the triple energy score through a DistMult model, and respectively obtaining a mapping function of the energy score to a structure score and an uncertain score through training;
step S22: carrying out linear fusion or multiplicative fusion on the structure score and the uncertainty score to obtain an evaluator score for evaluating the rationality of each triplet, wherein the reasonable triplets obtain a high evaluator score, and the evaluator score is between 0 and 1;
step S23: giving a triple threshold theta, wherein the value range of theta is 0-1, and judging whether the triple is reasonable or not; if the evaluator score of the triple (h, r, t) is larger than or equal to theta, the triple is considered to be reasonable and is added into the candidate set; otherwise, unreasonable;
step S24: and generating a confidence coefficient for the triple candidate set obtained in the step S23 through a confidence coefficient generator, wherein the value range of the confidence coefficient is 0-1, and forming a new quadruple (h, r, t, w).
In this embodiment, the specific content of step S21 is:
firstly, calculating the energy score of the triad by adopting a DistMult model;
the energy function of the DistMult model is shown in formula (1);
E(h,r,t)=hTdiag(r)t (1)
wherein diag (r) is a relational diagonal matrix, hTRepresenting the transpose of the head entity vector and t is the tail entity vector representation. Then, obtaining Q of the triple through different mapping functions and parametersstructureAnd Quncertain
QstructureThe calculation method is shown in formula (2):
Figure BDA0002743797440000101
wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phistructure(. is a mapping function of the triplet energy scores to the structure scores; the mapping function is shown in equation (3):
φstructure(E(h,r,t))=Pstructure·E(h,r,t)+bstructure (3)
wherein P isstructureMapping parameters for energy score to structure score and bstructureThe bias is obtained by learning;
Quncertainthe calculation method of (2) is shown in formula (4):
Figure BDA0002743797440000102
wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phiuncertain() a mapping function of the triplet energy scores to uncertainty scores; the mapping function is shown in equation (5):
φuncertain(E(h,r,t))=Puncertain·E(h,r,t)+buncertain (5)
wherein P isuncertainAs a mapping parameter of energy score to uncertainty score, buncertainThe bias is obtained by learning;
q of positive example triples in training processstructureTrending towards Q of 1, negative example tripletsstructureTends towards 0; q of positive example tripletsuncertainTrend toward true confidence w, Q of negative example triplesuncertainTends towards 0; for the unknown fact deduced by the logic rule, using an evaluator score to fit the confidence coefficient of the unknown fact during training;
the loss function of unknown fact participating in training is defined as formula (6)
Figure BDA0002743797440000111
Where RS is a set of unknown facts, QstructureAnd QuncertainStructure score and uncertainty score of unknown facts, respectively; lambda is a dynamic adjustment parameter and is obtained through learning;
the loss function of the evaluator consists of positive case loss, negative case loss and loss of unknown fact; is defined as formula (7)
ΓEvaluator=ΓposnegUnFacts (7)
Wherein
Figure BDA0002743797440000112
Figure BDA0002743797440000121
ΓposRepresenting positive case loss, ΓnegRepresenting negative example loss, ΓUnFactsRepresents a loss of unknown facts; s is a positive example set, and S' is a negative example set; the negative examples used in training are generated by randomly replacing head and tail entities, and the confidence level of the negative examples is setSetting to 0; negative examples are shown in equation (10):
S'={(h1,r,t,0)|h1∈ε\h}∪{(h,r,t1,0)|t1∈ε\t} (10)。
in this embodiment, the specific content of step S22 is:
the linear weighted fusion mode is shown as formula (11):
score_add=α*Qstructure+β*Quncertain (11)
wherein α + β ═ 1;
the multiplicative fusion mode is shown in formula (12):
score_mul=ε+(1-ε)(Qstructure*Quncertain) (12)
wherein epsilon is smooth hyper-parameter, and the meaning of multiplicative fusion mode means QuncertainTo QstructureCarrying out corresponding adjustment; when Q isuncertainLess, Q will be loweredstructureConversely, Q will be increasedstructure(ii) a When a triplet has a higher QstructureAnd QstructureThe calculated score value will be large, and conversely the calculated score value will be small.
In this embodiment, the specific content of step S24 is:
the confidence generator generates confidence w for the candidate set by using a formula (4), and the confidence w and the candidate set obtained in the S23 form a new quadruple (h, r, t, w); the confidence generator uses parameters that are different from the mapping function used by the evaluator, with the main difference that only negative examples are used when training the confidence generator.
The loss function of the confidence generator is defined as formula (13)
Figure BDA0002743797440000131
Where S is the positive case set and w is the true confidence of the triplet.
The model total loss function is composed of an estimator loss function and a confidence coefficient loss function and is defined as a formula (14)
Ψ=ΓconfidenceEvaluator (14)
Wherein gamma isconfidenceTo evaluate the loss of the device, ΓconfidenceIs the loss of the confidence generator model.
Preferably, in this embodiment, the prediction task of the uncertain knowledge graph needs to evaluate the reasonableness of the triples and give confidence of the reasonable triples. The embodiment designs two components of an evaluator and a confidence generator based on the existing embedded model. Wherein the evaluator is configured to evaluate the rationality of the triplet: unreasonable triples will be removed by the evaluator model and reasonable triples will be added to the candidate set. The confidence generator is used for generating confidence for the candidate set. Fig. 1 illustrates a process of SUKE for link prediction, and fig. 2 illustrates a training process of SUKE.
Preferably, in this embodiment, the prediction task of the uncertain knowledge-graph requires evaluating the rationality and predicting the confidence of the triple. The prediction task can therefore be decomposed into two subtasks, a factual plausibility assessment task and a confidence prediction task. Therefore, the SUKE model is proposed based on the existing deterministic embedding model DistMult. The SUKE reserves the structural information and uncertainty information of knowledge, and comprises an evaluator and a confidence generator inside, wherein the evaluator evaluates the rationality of a fact according to the structural characteristics and uncertainty characteristics of the fact, screens out unreasonable facts, and accordingly obtains candidate facts. The latter generates a confidence for the candidate fact that represents the probability of the entity having the particular relationship. The evaluator defines a structure score and an uncertainty score for each triplet for the factual justification evaluation task. In addition, the evaluator learns a further enhancement in the ability to distinguish between positive and negative cases using unknown facts inferred by probabilistic soft logic. A confidence generator generates a confidence for each triplet for the confidence prediction task.
Preferably, in order to fully utilize the structural information and the uncertain information of the knowledge, the embodiment decomposes the prediction task of the map of uncertain knowledge into two subtasks, namely a factual rationality assessment task and a confidence degree prediction task. The former evaluates the rationality of the fact according to the structural characteristics and uncertain characteristics of the fact, screens out unreasonable facts, and thereby obtains candidate facts. The latter generates confidence for the candidate facts. To this end, the present embodiment proposes a SUKE model based on an existing deterministic embedding model. The SUKE retains structural information and uncertainty information of knowledge, and includes two components, an evaluator and a confidence generator, inside. The evaluator defines a structure score and an uncertainty score for each triplet for the factual justification evaluation task. Furthermore, the evaluator introduces the fact that the probabilistic soft logic learning is unknown. The confidence generator generates a confidence for each triplet to be used for the confidence prediction task.
Preferably, in the present embodiment, the following definitions are performed:
definition 1 (quadruplet, T) let T ═ h, r, T, w denote a quadruplet, where h denotes a head entity, r denotes a relationship, T denotes a tail entity, and w denotes a confidence. A quadruple may also be referred to as a knowledge or fact.
Definition 2 (entity set, epsilon) sets an entity set epsilon { e1, e 2.
Definition 3 (relationship set, R) sets a relationship set R { R1, R2., rn }, which represents a set of all relationships in a knowledge base.
A 4 (confidence set, W) set confidence set W { W1, W2,.. wn }, representing the set of all confidences in the knowledge base, is defined.
Definition 5 (uncertain knowledge graph, G) G ═ where epsilon represents the set of entities, R represents the set of relationships, and W represents the set of confidences.
Definition 6 (structural score, Q)structure)QstructureObtained by learning the structural score mapping.
Definition 7 (uncertainty score, Q)uncertain)QuncertainObtained by learning the uncertainty score mapping.
(one) evaluator score
SUKE learns one of the energy scores E (h, r, t) to Q, respectivelystructureAnd QuncertainMapping of (2). Firstly, calculating the energy score of the triad through a translation model, and thenThen obtaining the Q of the triple through different mapping functions and parametersstructureAnd Quncertain. Encouraging Q of positive example triples at optimizationstructureTrend toward Q of 1, negative example tripletsstructureTends towards 0; encouraging Q of regular tripletsuncertainTrend toward true confidence w, Q of negative example triplesuncertainTending towards 0.
QstructureThe calculation method is shown in equation 1.
Figure BDA0002743797440000151
Wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phistructure(. h) is a mapping function of the triplet energy scores to the structure scores. The mapping function is shown in equation 2.
φstructure(E(h,r,t))=Pstructure·E(h,r,t)+bstructure (2)
Wherein P isstructureAnd bstructureAre parameters.
QuncertainThe calculation method of (c) is shown in equation 3.
Figure BDA0002743797440000161
Wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phiuncertain(. h) is a mapping function of the triplet energy scores to uncertainty scores. The mapping function is shown in equation 4.
φuncertain(E(h,r,t))=Puncertain·E(h,r,t)+buncertain (4)
Wherein P isuncertainAnd buncertainAre parameters.
The DistMult model is selected by the model to calculate the energy scores of the triples. The DistMult model can complete operation based on a matrix, and has the advantages of small calculation amount and quick operation. (2) The DistMult model is less complex than other models. (3) DistMult achieves better performance in deterministic knowledge graphs than other models. The functional energy of the DistMult model is shown in equation 5.
E(h,r,t)=hTdiag(r)t (5)
Wherein diag (r) is a relational diagonal matrix, hTRepresenting the transpose of the head entity vector and t is the tail entity vector representation.
(1) Fusion mode of structure score and uncertain score
For the fusion mode of the structure score and the uncertain score, two combination modes, namely a linear weighting fusion mode and a multiplicative fusion mode, are mainly considered in the embodiment.
The linear weighted fusion method is shown in equation 6.
score_add=α*Qstructure+β*Quncertain (6)
Wherein alpha + beta is 1, and the values of alpha and beta determine the importance degree of the structure score and the uncertainty score.
When α ═ β ═ 0.5, the structure score and the uncertainty score are as important. In the experiment, the structural score and the uncertainty score were considered to be of equal degree.
The multiplicative fusion method is shown in equation 7.
score_mul=ε+(1-ε)(Qstructure*Quncertain) (7)
Where ε is the smoothing hyperparameter. Multiplicative fusion mode meaning QuncertainTo QstructureAnd performing corresponding adjustment. When Q isuncertainLess, Q will be loweredstructureConversely, Q will be increasedstructure. When a triplet has a higher QstructureAnd QstructureThe calculated score value will be large, and conversely the calculated score value will be small.
(2) Probability soft logic enhancement method
To enhance the learning capabilities of the evaluator, the present embodiment will engage in training with unknown facts in the knowledge graph. By introducing heuristic rules, the probability soft logic defined by UKGE is applied to obtain unknown facts. The rules mined in the uncertainty knowledge graph are inherently uncertain, and the confidence of inferred unknown fact triples is not very accurate. If the confidence of unknown facts is used directly, unnecessary noise is necessarily introduced. Therefore, during training, the confidence of unknown facts is used as the score of the evaluator, and dynamic adjustment parameters are introduced, so that the generalization capability of the model is improved. The loss function of the unknown fact is defined as equation 8.
Figure BDA0002743797440000171
Where RS is a set of unknown facts, QstructureAnd QuncertainThe structure score and uncertainty score of the unknown fact, respectively. And lambda is a dynamic adjustment parameter and is obtained through learning.
(3) Loss of estimator
The loss function of the evaluator consists of positive case loss, negative case loss, and loss of unknown fact.
Defined as equation 9.
ΓEvaluator=ΓposnegUnFacts (9)
Wherein
Figure BDA0002743797440000181
Figure BDA0002743797440000182
ΓposRepresenting positive case loss, ΓnegRepresenting negative example loss, ΓUnFactsRepresenting a loss of unknown facts. S is a positive example set, and S' is a negative example set. Negative examples are generated using random replacement head and tail entities, with the confidence of the negative examples set to 0. Negative example is shown in equation 12.
S'={(h1,r,t,0)|h1∈ε\h}∪{(h,r,t1,0)|t1∈ε\t} (12)
(II) confidence generator
The confidence generator is intended to generate a confidence for the triples. To reduce the complexity and parameters of the model, the confidence generator uses QuncertainTo approximate the confidence values w of the trues of the triples. The confidence generator, unlike the evaluator, can be viewed as a confidence prediction model based on the triplet energy scores. Q of confidence generatoruncertainOne set of parameters is not shared with the evaluator. In addition, the confidence generator does not require negative case triples and unknown fact triples to participate in training.
The loss function of the confidence generator is defined as equation 13.
Figure BDA0002743797440000191
Where S is the positive case set and w is the true confidence of the triplet.
Loss function of model (III)
Since the overall model includes two components, an evaluator and a confidence generator. We will train both components simultaneously, so the loss function of the model is defined as equation (14)
Ψ=ΓconfidenceEvaluator (14)
Wherein gamma isconfidenceTo evaluate the loss of the device, ΓconfidenceIs the loss of the confidence generator model.
Preferably, in the present embodiment, an embedded model SUKE for prediction in the uncertain knowledge graph is provided in the background of the uncertain knowledge graph.
The algorithm provided by the embodiment can fuse the structural information and the uncertain information of the knowledge to obtain knowledge representation.
The representation learning model provided by the embodiment can effectively complete a link prediction task through the evaluator and the confidence generator, and further realize knowledge map completion.
The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.

Claims (1)

1. An uncertain knowledge graph prediction method based on an improved embedded model SUKE is characterized by comprising the following steps: the method comprises the following steps:
step S1: giving an uncertain knowledge graph, wherein the uncertain knowledge graph internally comprises a plurality of quadruples (h, r, t and w), wherein h represents a head entity, t represents a tail entity, r represents the relation of the head entity and the tail entity, and w represents the probability of the occurrence of the relation of the triples (h, r and t); expanding the number of original quadruplets by a probability soft logic reasoning method defined in a UKGE model; finally, dividing the expanded quadruple into a training set of 60 percent, a verification set of 20 percent and a test set of 20 percent for training the SUKE model; the input of the SUKE model is vector representation of h, r and t, and the vector of the entity and the relation in the knowledge base is pre-trained or randomly initialized by using a TransE algorithm;
step S2: constructing an embedded model SUKE: designing two components of an evaluator and a confidence generator, wherein the evaluator is used for evaluating the rationality of the triples (h, r, t), unreasonable triples are removed through the evaluator, the rational triples are used as candidate sets, and the confidence generator is used for generating confidence for the candidate sets so as to obtain quadruples (h, r, t, w); training an evaluator and a confidence generator through a loss function for subsequent prediction;
step S3: adding the obtained quadruple (h, r, t, w) into the original uncertain knowledge graph; wherein link prediction is defined to predict its missing tail entity and confidence given an incomplete quadruple (h, r,; adding a new quadruple obtained by link prediction into the original uncertain knowledge graph to make the knowledge graph more complete; during prediction, for a triplet (h, r,;
the step S2 specifically includes the following steps:
step S21: calculating the triple energy score through a DistMult model, and respectively obtaining a mapping function of the energy score to a structure score and an uncertain score through training;
step S22: linearly fusing or multiplicatively fusing the structure score and the uncertainty score to obtain an evaluator score which is used for evaluating the rationality of each triple, wherein reasonable triples can obtain a high evaluator score, and the evaluator score is between 0 and 1;
step S23: giving a triple threshold theta, wherein the value range of theta is 0-1, and judging whether the triple is reasonable or not; if the evaluator score of the triple (h, r, t) is larger than or equal to theta, the triple is considered to be reasonable and is added into the candidate set; otherwise, unreasonable;
step S24: generating a confidence coefficient for the triple candidate set obtained in the step S23 through a confidence coefficient generator, wherein the value range of the confidence coefficient is 0-1, and forming a new quadruple (h, r, t, w);
the specific content of step S21 is:
firstly, calculating the energy score of the triad by adopting a DistMult model;
the energy function of the DistMult model is shown in formula (1);
E(h,r,t)=hTdiag(r)t (1)
wherein diag (r) is a relational diagonal matrix, hTRepresenting the transposition of the head entity vector, and t is represented by the tail entity vector;
then, obtaining Q of the triple through different mapping functions and parametersstructureAnd Quncertain
QstructureThe calculation method is shown in formula (2):
Figure FDA0003611667520000021
wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phistructure() a mapping function that yields a structure score for the triplet energy score; the mapping function is shown in equation (3):
φstructure(E(h,r,t))=Pstructure·E(h,r,t)+bstructure (3)
wherein P isstructureAs energyMapping parameters of scores to structural scores, bstructureIs an offset; quncertainThe calculation method of (2) is shown in formula (4):
Figure FDA0003611667520000031
wherein E (h, r, t) is the energy score of the triplet obtained by the DistMult model, phiuncertain(. h) is a mapping function of the triplet energy scores to uncertainty scores; the mapping function is shown in equation (5):
φuncertain(E(h,r,t))=Puncertain·E(h,r,t)+buncertain (5)
wherein P isuncertainAs a mapping parameter of energy score to uncertainty score, buncertainIs an offset;
q of positive example triples in training processstructureTrending towards Q of 1, negative example tripletsstructureTends towards 0; q of positive example tripletsuncertainTrend toward true confidence w, Q of negative example triplesuncertainToward a value of 0; for the unknown fact deduced by the logic rule, using an evaluator score to fit the confidence coefficient of the unknown fact during training;
the loss function of unknown fact participating in training is defined as formula (6)
Figure FDA0003611667520000032
Where RS is a set of unknown facts, QstructureAnd QuncertainStructure score and uncertainty score of unknown facts, respectively; lambda is a dynamic adjustment parameter;
the loss function of the evaluator consists of positive case loss, negative case loss and loss of unknown fact; is defined as formula (7)
ΓEvaluator=ΓposnegUnFacts (7)
Wherein
Figure FDA0003611667520000041
Figure FDA0003611667520000042
ΓposRepresenting positive case loss, ΓnegRepresenting negative example loss, ΓUnFactsRepresents a loss of unknown facts; s is a positive example set, and S' is a negative example set; the negative examples used in training are generated by randomly replacing head and tail entities, and meanwhile, the confidence coefficient of the negative examples is set to be 0; negative examples are shown in equation (10):
S'={(h1,r,t,0)|h1∈ε\h}∪{(h,r,t1,0)|t1∈ε\t} (10);
the specific content of step S22 is:
the linear weighted fusion mode is shown as formula (11):
score_add=α*Qstructure+β*Quncertain (11)
wherein α + β ═ 1;
the multiplicative fusion mode is shown in formula (12):
score_mul=ε+(1-ε)(Qstructure*Quncertain) (12)
wherein epsilon is smooth hyper-parameter, and the meaning of multiplicative fusion mode means QuncertainTo QstructureCarrying out corresponding adjustment; when Q isuncertainLess, Q will be loweredstructureConversely, Q will be increasedstructure(ii) a When a triplet has a higher QstructureAnd QstructureThe calculated score value will be large, and conversely, it will be small;
the specific content of step S24 is:
the confidence generator generates confidence w for the candidate set by using a formula (4), and the confidence w and the candidate set obtained in the S23 form a new quadruple (h, r, t, w); however, the mapping function used by the confidence generator is different from the mapping function used by the evaluator, and the main difference is that only a negative example is used when training the confidence generator;
the loss function of the confidence generator is defined as formula (13)
Figure FDA0003611667520000051
Wherein S is a positive example set, and w is the true confidence of the triple;
the model total loss function is composed of an estimator loss function and a confidence coefficient loss function and is defined as a formula (14)
Ψ=ΓconfidenceEvaluator (14)
Wherein gamma isconfidenceTo evaluate the loss of the device, ΓconfidenceIs the loss of the confidence generator model.
CN202011159784.4A 2020-10-26 2020-10-26 Uncertain knowledge graph prediction method based on improved embedded model SUKE Active CN112348190B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011159784.4A CN112348190B (en) 2020-10-26 2020-10-26 Uncertain knowledge graph prediction method based on improved embedded model SUKE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011159784.4A CN112348190B (en) 2020-10-26 2020-10-26 Uncertain knowledge graph prediction method based on improved embedded model SUKE

Publications (2)

Publication Number Publication Date
CN112348190A CN112348190A (en) 2021-02-09
CN112348190B true CN112348190B (en) 2022-06-21

Family

ID=74359024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011159784.4A Active CN112348190B (en) 2020-10-26 2020-10-26 Uncertain knowledge graph prediction method based on improved embedded model SUKE

Country Status (1)

Country Link
CN (1) CN112348190B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529184B (en) 2021-02-18 2021-07-02 中国科学院自动化研究所 Industrial process optimization decision method fusing domain knowledge and multi-source data
CN112836064B (en) * 2021-02-24 2023-05-16 吉林大学 Knowledge graph completion method and device, storage medium and electronic equipment
CN113205082B (en) * 2021-06-22 2021-10-15 中国科学院自动化研究所 Robust iris identification method based on acquisition uncertainty decoupling

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597358A (en) * 2020-07-22 2020-08-28 中国人民解放军国防科技大学 Knowledge graph reasoning method and device based on relational attention and computer equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10423726B2 (en) * 2018-01-10 2019-09-24 International Business Machines Corporation Machine learning to integrate knowledge and natural language processing
US11789991B2 (en) * 2019-01-24 2023-10-17 Accenture Global Solutions Limited Compound discovery via information divergence with knowledge graphs
CN109933674B (en) * 2019-03-22 2021-06-04 中国电子科技集团公司信息科学研究院 Attribute aggregation-based knowledge graph embedding method and storage medium thereof
CN110147450B (en) * 2019-05-06 2021-08-03 北京科技大学 Knowledge complementing method and device for knowledge graph
CN110851613A (en) * 2019-09-09 2020-02-28 中国电子科技集团公司电子科学研究院 Method and device for complementing, deducing and storing knowledge graph based on entity concept
CN110795511A (en) * 2019-10-30 2020-02-14 南京工业大学 Knowledge graph representation method based on cloud model
CN111144570B (en) * 2019-12-27 2022-06-21 福州大学 Knowledge representation method combining logic rules and confidence degrees

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111597358A (en) * 2020-07-22 2020-08-28 中国人民解放军国防科技大学 Knowledge graph reasoning method and device based on relational attention and computer equipment

Also Published As

Publication number Publication date
CN112348190A (en) 2021-02-09

Similar Documents

Publication Publication Date Title
CN112348190B (en) Uncertain knowledge graph prediction method based on improved embedded model SUKE
CN110347847B (en) Knowledge graph complementing method based on neural network
CN111144570B (en) Knowledge representation method combining logic rules and confidence degrees
WO2019218263A1 (en) Extreme learning machine-based extreme ts fuzzy inference method and system
CN110851491B (en) Network link prediction method based on multiple semantic influence of multiple neighbor nodes
CN113780002B (en) Knowledge reasoning method and device based on graph representation learning and deep reinforcement learning
CN110704636A (en) Improved Node2 vec-based knowledge graph vector representation method
CN114969367B (en) Cross-language entity alignment method based on multi-aspect subtask interaction
CN117435715B (en) Question answering method for improving time sequence knowledge graph based on auxiliary supervision signals
Ajoodha et al. Learning the influence structure between partially observed stochastic processes using iot sensor data
CN114662693A (en) Reinforced learning knowledge graph reasoning method based on action sampling
CN115526293A (en) Knowledge graph reasoning method considering semantic and structural information
Borgelt A conditional independence algorithm for learning undirected graphical models
CN110858311B (en) Deep nonnegative matrix factorization-based link prediction method and system
CN113051353A (en) Attention mechanism-based knowledge graph path reachability prediction method
Ajoodha et al. Learning the influence between partially observable processes using score-based structure learning
Sedlak et al. Active Inference on the Edge: A Design Study
Guo et al. A genetic algorithm for tuning variable orderings in Bayesian network structure learning
CN114925190B (en) Mixed reasoning method based on rule reasoning and GRU neural network reasoning
Chun-Feng et al. A novel hybrid method for learning bayesian network
WO2022183403A1 (en) Method and apparatus for visual reasoning
US20240185023A1 (en) Method and apparatus for visual reasoning
Wang et al. Optimization Model of Knowledge Graph Reasoning Process Based on Generative Adversarial Network
Xiao et al. Robot Manipulation Skill Learning Based on Stable Sparse Gaussian Process
CN110941651B (en) Traffic mode selection analysis method based on incomplete population information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant