CN115269866A - Knowledge graph complementing method based on double-view hyper-relation embedded framework - Google Patents
Knowledge graph complementing method based on double-view hyper-relation embedded framework Download PDFInfo
- Publication number
- CN115269866A CN115269866A CN202210831885.4A CN202210831885A CN115269866A CN 115269866 A CN115269866 A CN 115269866A CN 202210831885 A CN202210831885 A CN 202210831885A CN 115269866 A CN115269866 A CN 115269866A
- Authority
- CN
- China
- Prior art keywords
- view
- relation
- ontology
- entity
- cross
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
- G06F40/295—Named entity recognition
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Animal Behavior & Ethology (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a knowledge graph complementing method based on a double-view super-relation embedded framework, which comprises the steps of constructing a data set based on a double-view super-relation knowledge graph, wherein the data set comprises an example view set, a body view set and a cross-view link set; inputting the data set into a DH-KG embedded model, wherein the DH-KG embedded model comprises a GRAN encoder, a cross-view link learning network and a joint learning network; performing intra-view hyper-relation learning through a GRAN encoder, performing cross-view contact learning through a hyper-graph field aggregation technology and cross-view loss, and performing joint learning through loss functions respectively corresponding to a joint instance view set, a body view set and a cross-view connection set to obtain a trained DH-KG embedded model; and performing link prediction and entity classification of the knowledge graph through the trained DH-KG embedded model. According to the invention, the hierarchical relationship between the super-relationship and the entity in the knowledge graph is jointly modeled through the double-view structure, so that the tasks of link prediction and entity classification are better carried out.
Description
Technical Field
The invention belongs to the field of information technology and data service.
Background
The knowledge graph is a large-scale semantic network knowledge base, adopts a symbolic knowledge representation mode, utilizes triplets (objects) to describe specific knowledge, represents and stores the specific knowledge in a directed graph mode, and has the advantages of rich semantics, friendly structure, easiness in understanding and the like. Due to the excellent characteristic of expressing the prior knowledge of human beings, the knowledge graph has been widely and successfully applied in the fields of natural language processing, question-answering systems, recommendation systems and the like in recent years. However, knowledge-graphs often suffer from link loss problems, which limit the application of knowledge-graphs to related downstream tasks. To solve this problem, the knowledge-graph completion task takes place at the same time. The completion of the knowledge graph aims to deduce new facts according to the existing facts in the knowledge graph, so that the knowledge graph is more complete. The embedding of the knowledge graph is one of important methods for solving the problem of completion of the knowledge graph, and the entities and the relations in the knowledge graph are embedded into a continuous vector space, so that the structural information in the knowledge graph is kept while calculation is facilitated. Therefore, a good knowledge graph embedding method can greatly help the application of the knowledge graph.
In the real-world knowledge graph, the hierarchical relationship and the hyperrelationship are two important relationships describing facts, and the structures of the relationships are shown in fig. 2 and fig. 3. However, no research is currently directed to jointly modeling these two relationships, resulting in many limitations of the hyper-relational knowledge-graph embedding method in actual embedding.
The existing knowledge graph embedding methods are mainly divided into three types, one type is a single-view triple knowledge graph embedding method, and the traditional knowledge graph embedding method mainly models triple information on a single view; the other type is a single-view hyper-relational knowledge graph embedding method which improves the traditional method and enables the method to be used in a hyper-relational knowledge graph. Facts in the hyperrelational knowledge graph consist of one primary triplet (s, r, o) and its auxiliary key-value pairs (ai: vi), but are still limited to the single view case; the third category is the dual-view triple-atlas-embedding approach, which can jointly model hierarchical and logical information in the view, but cannot be used in the hyper-relational atlas. The latter two methods are improved on the traditional method in a certain aspect, namely the traditional method can be applied to a more realistic hyper-relational knowledge graph and the problem that the traditional method weakens hierarchical information between entities is improved, but the two methods only solve part of problems, and the knowledge graph link prediction and the entity classification tasks are still to be improved.
In order to solve the above problems, the present invention provides a dual-view hyper-relational knowledge graph (DH-KG) embedded structure, as shown in fig. 4, the structure jointly models a hierarchical relationship between a hyper-relation and an entity in a knowledge graph through a dual-view structure, so as to more comprehensively learn a relationship between entities, thereby better performing link prediction and entity classification tasks.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, the first purpose of the invention is to provide a knowledge graph completing method based on a two-view hyper-relation embedding framework, which is used for better performing the tasks of link prediction and entity classification.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for completing a knowledge graph based on a two-view hyper-relationship embedding framework, including:
s101: constructing a data set based on a double-view hyper-relational knowledge graph, wherein the data set comprises an example view set, an ontology view set and a cross-view link set;
s102: inputting the data set into a DH-KG embedding model, wherein the DH-KG embedding model comprises a GRAN encoder, a cross-view link learning network and a joint learning network;
s103: performing intra-view hyper-relation learning through the GRAN encoder, performing cross-view contact learning through a hyper-graph field aggregation technology and cross-view loss, and performing joint learning through loss functions respectively corresponding to a joint instance view set, a body view set and a cross-view connection set to obtain a trained DH-KG embedded model;
s104: and performing link prediction and entity classification of the knowledge graph through the trained DH-KG embedded model.
In addition, the knowledge graph completion method based on the dual-view hyper-relationship embedding framework according to the above embodiment of the present invention may further have the following additional technical features:
further, in an embodiment of the present invention, the constructing a data set based on a two-view hyper-relational knowledge graph includes:
acquiring a super-relation knowledge graph data set, and taking an entity in the super-relation knowledge graph data set as an example view entity set;
acquiring a tail entity set of the instance view entity set according to a first preset relation, wherein the tail entity set is used as an ontology view concept set or a cross-view connection set; acquiring a tail entity set of the ontology view concept set through a second preset relationship, and taking a union of the tail entity set of the ontology view concept set and the ontology view concept set as an ontology view entity set;
acquiring an instance view superrelation fact set from an instance view, and acquiring an instance view relation set from the instance view superrelation fact set; acquiring an ontology view superrelation fact set from an ontology view, and acquiring an ontology view relation set from the ontology view superrelation fact set;
and constructing an instance view according to the instance view entity set, the instance view super-relation fact set and the instance view relation set, constructing an ontology view according to the ontology view entity set, the ontology view super-relation fact set and the ontology view relation set, and generating a data set based on a double-view super-relation knowledge graph according to the instance view, the ontology view and the cross-view connection set.
Further, in an embodiment of the present invention, the performing, by the GRAN encoder, the in-view hyper-relationship learning includes:
and updating entity embedding through the GRAN model, performing entity or relation prediction by using the updated entity embedding, and calculating the loss in each sub-view.
Further, in an embodiment of the present invention, the updating entity embedding through the GRAN model includes:
taking a super-relation fact as a special graph through a GRAN model, and then using a mask learning strategy to construct model input;
learning the heteromorphic graph by GRAN using edge-biased fully-connected attention;
updating all entity embedded vectors of the superrelation facts through a GRAN encoder;
wherein, the node embedding vector GRAN _ E after updating of the l-layer GRAN encoder is:
X(l)=GRAN_E(X(l-1)),
Further, in an embodiment of the present invention, the predicting the entity or the relationship by using the updated entity embedding, and calculating the loss in each sub-view includes:
taking out the node embedding vector h at the MASK position, then carrying out a two-layer linear transformation operation,
wherein, the first and the second end of the pipe are connected with each other,share parameters with the input embedded vector matrix, and it is a parameter that can be self-learned,is the predicted score for all entities, i.e., by v entities in the entire fact;
and adding label smoothing, and obtaining cross entropy loss between a predicted value and a label according to p:
wherein p istIs the value of the predicted first position of the score vector p, ytIs the value of the t-th position of the tag vector y.
Further, in an embodiment of the present invention, the cross-view contact learning through hypergraph domain aggregation technology and cross-view loss includes:
acquiring node embedding of entities in all super-relation facts through the GRAN encoder, and embedding the nodes into an input HGNN hypergraph learning model;
the message passing process from the (k-1) layer to the k-th layer in the HGNN is defined as follows:
U(k)=U(k-1)+σ(WHU(k-1)Θ(k)+b(k)),
wherein the content of the first and second substances,is a transformation matrix of the image data to be transformed,is the bias of the k-th layer, σ is the activation function,is a correlation matrix of the knowledge hypergraph,is a matrix of degrees of the nodes and,is a matrix of degrees of the over-edge,is the output of the k-th layer.
Further, in one embodiment of the present invention, the cross-view loss includes:
mapping the header entity set into the vector space with the ontology view by a mapping operation:
cross-view link loss is defined as follows:
wherein two norms are used to compute the distance deviation, t ', of the entity and concept in the same vector space'sIs tsAnd γ is a boundary parameter.
Further, in an embodiment of the present invention, the joint learning is performed by combining the loss functions corresponding to the instance view set, the ontology view set, and the cross-view connection set, and is represented as:
further, three loss functions are optimized separately using Adam optimizer, where ω distinguishes the learning rate of the in-view and cross-view losses to achieve joint learning.
In order to achieve the above object, a second aspect of the present invention provides an apparatus for knowledge graph completion based on a two-view hyper-relation embedding framework, including the following modules:
the acquisition module is used for constructing a data set based on the double-view hyper-relational knowledge graph, wherein the data set comprises an example view set, a body view set and a cross-view link set;
an input module, configured to input the data set into a DH-KG embedding model, where the DH-KG embedding model includes a GRAN encoder, a cross-view link learning network, and a joint learning network;
the training module is used for carrying out in-view hyper-relation learning through the GRAN encoder, carrying out cross-view contact learning through a hyper-graph field aggregation technology and cross-view loss, and carrying out joint learning through loss functions respectively corresponding to a joint instance view set, a body view set and a cross-view connection set to obtain a trained DH-KG embedded model;
and the output module is used for performing link prediction and entity classification of the knowledge graph through the trained DH-KG embedded model.
Further, in an embodiment of the present invention, the obtaining module is further configured to:
acquiring a super-relation knowledge graph data set, and taking an entity in the super-relation knowledge graph data set as an example view entity set;
acquiring a tail entity set of the instance view entity set according to a first preset relation, wherein the tail entity set is used as an ontology view concept set or a cross-view connection set; acquiring a tail entity set of the ontology view concept set through a second preset relationship, and taking a union of the tail entity set of the ontology view concept set and the ontology view concept set as an ontology view entity set;
acquiring an instance view super-relation fact set from an instance view, and acquiring an instance view relation set from the instance view super-relation fact set; acquiring an ontology view superrelation fact set from an ontology view, and acquiring an ontology view relation set from the ontology view superrelation fact set;
and constructing an instance view according to the instance view entity set, the instance view super-relation fact set and the instance view relation set, constructing an ontology view according to the ontology view entity set, the ontology view super-relation fact set and the ontology view relation set, and generating a data set based on a double-view super-relation knowledge graph according to the instance view, the ontology view and the cross-view connection set.
The knowledge graph completion method based on the double-view hyper-relation embedded framework provided by the embodiment of the invention has the main advantages that: (1) The modeling and reasoning of the multivariate relation fact in the industrial knowledge graph are solved, and a theoretical basis is laid for the novel graph structure of the industrial knowledge graph. (2) The hierarchical structure is applied to a recommendation system and hierarchical decision making, and can be popularized to the fields of medical treatment, electronic commerce, finance, industry and the like which need multilayer knowledge decision making. (3) The cross-view link prediction can be applied to node classification tasks such as paper marking and commodity classification.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a schematic flow chart of a knowledge graph completion method based on a dual-view hyper-relation embedded framework according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a knowledge-graph hyper-relational structure according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating a knowledge-graph hierarchy according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a dual-view superrelationship knowledge-graph provided in the embodiment of the present invention.
FIG. 5 is a general framework diagram of a DH-GE model according to an embodiment of the present invention.
Fig. 6 is a schematic flow chart of a knowledge graph complementing device based on a two-view hyper-relation embedded framework according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
The knowledge-graph completion method based on the dual-view hyper-relationship embedding framework according to the embodiment of the invention is described below with reference to the attached drawings.
Fig. 1 is a schematic flowchart of a knowledge graph completing method based on a dual-view hyper-relation embedded framework according to an embodiment of the present invention.
As shown in FIG. 1, the knowledge graph complementing method based on the dual-view hyper-relation embedding framework comprises the following steps:
s101: constructing a data set based on a double-view hyper-relational knowledge graph, wherein the data set comprises an example view set, a body view set and a cross-view link set;
s102: inputting the data set into a DH-KG embedded model, wherein the DH-KG embedded model comprises a GRAN encoder, a cross-view link learning network and a joint learning network;
s103: performing intra-view hyper-relation learning through a GRAN encoder, performing cross-view contact learning through a hyper-graph field aggregation technology and cross-view loss, and performing joint learning through loss functions respectively corresponding to a joint instance view set, a body view set and a cross-view connection set to obtain a trained DH-KG embedded model;
s104: and performing link prediction and entity classification of the knowledge graph through the trained DH-KG embedded model.
The DH-KG includes two sub-views and a cross-view linkWherein, the example view of one of the sub-viewsFrom a set of instance entities εIA set of instance relationshipsAnd an instance superset of relational facts:(ii) composition, wherein (s, r, o) represents a primary triplet,representing m auxiliary key-value pairs. Similarly, the ontology view setFrom a set of ontological conceptsA ontology relationship setAnd an ontology hyper-relation:and (4) forming. Cross-view chaining setsIs a set of superrelational facts without auxiliary key-value pairs, where hS∈εI,
The purpose of the super relation link prediction is to predict the super relation factThe missing element in (1). The missing element may be s, o, v1,...,vmThe entities in (c) can also be (r, a)1,...,amThe relationship in (c). In the case of the DH-KG,andon the linkThe prediction tasks are hyper-relational link prediction tasks on the instance view and the ontology view respectively.
The entity classification task attempts to predict concepts associated with a given entity. On DH-KG, the entity classification task is the tail concept in the prediction cross-relationship link.
A JW44K-6K data set constructed based on DH-KG, which is a data set extracted from Wikidata, is presented here. The data set consists of 44000 entities of instance views and 6000 concepts of ontology views, wherein rich cross-view connection information and intra-view hyperrelationship facts are contained. The construction of the data set comprises the following four steps:
and S201, filtering the entities in the example view. WD50K hyper-relational knowledge graph data set extracted from Wikidata comprises 50000 entities. First consider an entity in WD50K as the set of entities ε in the instance viewI. The invention regards the entity set as a head entity set, finds a corresponding tail entity set T in Wikidata according to the 'instance _ of' relationship, and finds a tail entity set T according to epsilonI-εID is equal to T to update epsilonITo filter out conceptual entities. Filtered epsilonIThere are 44000 entities.
And S202, screening ontology view concepts. Continue to look for ε through "instance _ of" relationshipIAs a concept set of ontology viewAnd using this fact set as a cross-view connected setThen, epsilonIThe tail entity set Q of (a) is found through the "Subclas _ of" relationship and throughTo find the deeper concepts in the existing concepts of the ontology view, and update the conceptsRepeat thisUntil no further concepts are available to update
And S203, extracting the superrelation facts from the two sub-views respectively. Extracting a set of superrelational facts from an instance viewWherein all entity and auxiliary key-value pairs are from epsilonIObtained in (1). Then, the superrelation fact set is obtained from the ontology view in the same wayWherein all concept and auxiliary key-value pairs are derived fromObtained in (1).
And S204, generating a data set. FromRespectively obtain a relationship setAndand construct instance views therefromAnd body viewFinally, we obtained a DH-KG data set JW44K-6K,
further, in one embodiment of the invention, constructing a data set based on a two-view hyper-relational knowledge graph comprises:
acquiring a super-relation knowledge graph data set, and taking an entity in the super-relation knowledge graph data set as an example view entity set;
acquiring a tail entity set of the instance view entity set according to the first preset relation, wherein the tail entity set is used as an ontology view concept set or a cross-view connection set; acquiring a tail entity set of the ontology view concept set through a second preset relationship, and taking a union of the tail entity set of the ontology view concept set and the ontology view concept set as the ontology view entity set;
acquiring an instance view superrelation fact set from an instance view, and acquiring an instance view relation set from the instance view superrelation fact set; acquiring an ontology view superrelation fact set from an ontology view, and acquiring an ontology view relation set from the ontology view superrelation fact set;
constructing an example view according to the example view entity set, the example view super-relation fact set and the example view relation set, constructing an ontology view according to the ontology view entity set, the ontology view super-relation fact set and the ontology view relation set, and generating a data set based on a double-view super-relation knowledge graph according to the example view, the ontology view and the cross-view connection set.
For representation learning on DH-KG, the first DH-KG embedding model DHGE is proposed, and the overall framework is shown in FIG. 5. The method is composed of a GRAN encoder in one view, and a cross-view link learning and joint learning part by utilizing an HGNN hypergraph learning model. These sections are described in detail below.
In order to perform in-view hyper-relationship learning, the invention uses a GRAN model to update entity embedding, then predicts entities or relationships by using the updated entity embedding, and finally calculates the loss in each sub-view.
GRAN will one super relation factTreated as an anomaly graph, the model input is then constructed using a mask learning strategy. For example:is a training sample that covers the position of the subject. The GRAN then learns the heteromorphic graph using edge biased fully connected attention. We randomly set entities in viewIs embedded intoWhere d is the entity embedding dimension. After learning a batch of samples, the GRAN encoder updates all entity-embedded vectors of superrelationship facts. The node embedding vector (GRAN _ E) after the l-level GRAN encoder updates is:
X(l)=GRAN_E(X(l-1)) (1)
The present invention uses L-level GRAN encoders to update node embedding in instance view and ontology view, respectively. When the updated node is obtained, the node embedding vector h of the [ MASK ] position is taken out, then a two-layer linear transformation operation is carried out,
wherein, the first and the second end of the pipe are connected with each other,share parameters with the input embedded vector matrix, and it is a parameter that can be learned by itself,is the predicted score for all entities, i.e., by v entities in the overall fact. Finally, label smoothing is added, so that cross entropy loss between the predicted value and the label can be obtained according to p:
wherein p istIs the value of the predicted first position of the score vector p, ytIs the value of the t-th position of the tag vector y.
Further, in one embodiment of the present invention, the learning of the super-relation in view by the GRAN encoder includes:
and updating entity embedding through the GRAN model, performing entity or relation prediction by using the updated entity embedding, and calculating the loss in each sub-view.
Further, in one embodiment of the present invention, updating entity embedding by a GRAN model includes:
taking a super-relation fact as a special graph through a GRAN model, and then using a mask learning strategy to construct model input;
learning a heteromorphic graph by GRAN using edge-biased fully-connected attention;
updating all entity embedded vectors of the super-relation facts through a GRAN encoder;
wherein, the node embedding vector GRAN _ E after updating of the l-layer GRAN encoder is:
X(l)=GRAN_E(x(l-1)),
Further, in an embodiment of the present invention, the performing entity or relationship prediction by using the updated entity embedding, and calculating the loss in each sub-view includes:
taking out the node embedding vector h at the MASK position, then carrying out a two-layer linear transformation operation,
wherein the content of the first and second substances,share parameters with the input embedded vector matrix, and it is a parameter that can be learned by itself,is the predicted score for all entities, i.e., by v entities in the entire fact;
and adding label smoothing, and obtaining cross entropy loss between a predicted value and a label according to p:
wherein p istIs the value of the predicted first position of the score vector p, ytIs the value of the t-th position of the tag vector y.
After learning using a GRAN encoder in each sub-view, the present invention learns cross-view connections using hypergraph domain aggregation techniques, and cross-view losses.
Due to the presence of binary or multivariate superrelationsThe fact that each sub-view of the DH-KG can be viewed as a hypergraph consisting of physical nodes and hyper-edges between nodesTo concatenate the information in the two sub-views, the present invention first uses the HGNN to aggregate the node information to which the super-edges are connected. With the GRAN encoder introduced above, we have obtained node embedding of all entities in superrelationship factsAnd serves as an input to the HGNN. The message passing process from the (k-1) layer to the k-th layer in the HGNN is defined as follows:
U(k)=U(k-1)+σ(WHU(k-1)Θ(k)+b(k)) (5)
wherein the content of the first and second substances,is a transformation matrix of the image data to be transformed,is the bias of the k-th layer. σ is the activation function.Is an incidence matrix of the knowledge hypergraph,is a matrix of degrees of the nodes and,is a degree matrix of the overcide.Is the output of the k-th layer. Is composed ofTo further benefit from the relational transformation, the present invention combines the input and output vector representations U = U(0)+U(K)As the final embedded vector.
After using the hypergraph domain polymerization technique separately for the example view and the ontology view, we have obtainedAndconnecting sets H across viewsSIn (2), embedded vector h of head entitySExisting in the embedding vector space of the instance view, can be expressed asAnd the embedded vector t of the tail entitySExists in the embedded vector space of the ontology view and can be expressed asTherefore, in order to make both calculate in the same vector space, the method maps the header entity set into the vector space of the ontology view through the mapping operation:
and defines the cross-view link loss as follows:
the 2 norm is used in the formulation to compute the distance bias of the entity and concept in the same vector space, where t'sIs tsAnd γ is a boundary parameter.
Further, in one embodiment of the invention, the cross-view contact learning through the hypergraph domain aggregation technology and the cross-view loss comprises the following steps:
acquiring node embedding of entities in all super-relation facts through a GRAN encoder, and embedding the nodes into an HGNN hypergraph learning model;
the message passing process from the (k-1) layer to the k-th layer in the HGNN is defined as follows:
U(k)=U(k-1)+σ(WHU(k-1)Θ(k)+b(k)),
wherein, the first and the second end of the pipe are connected with each other,is a transformation matrix of the image data to be transformed,is the bias of the k-th layer, sigma is the activation function,is an incidence matrix of the knowledge hypergraph,is a matrix of degrees of the node(s),is a matrix of degrees of the over-edge,is the output of the k-th layer.
Further, in one embodiment of the present invention, cross-view loss, comprises:
mapping the header entity set into the vector space corresponding to the ontology view by a mapping operation:
cross-view link loss is defined as follows:
wherein two norms are used to compute the distance deviation, t ', of the entity and concept in the same vector space'sIs tsAnd γ is a boundary parameter.
The invention combines three loss functions in example view, ontology view and cross-view connection to design a joint learning loss:
and the invention uses Adam optimizer to optimize three loss functions separately, where ω distinguishes the learning rate of the intra-view and cross-view losses to achieve joint learning.
Further, in an embodiment of the present invention, the joint learning is performed by combining the loss functions corresponding to the instance view set, the ontology view set, and the cross-view connection set, and is expressed as:
further, three loss functions are optimized separately using Adam optimizer, where ω distinguishes the learning rate of the in-view and cross-view losses to achieve joint learning.
The invention provides a knowledge graph complementing method based on a double-view hyper-relation embedded framework, which comprises the following steps that on the first hand, a double-view hyper-relation knowledge graph embedded framework is provided, the framework respectively learns the hyper-relation and the hierarchical relation in the hyper-relation knowledge graph by dividing the hyper-relation fact into an example view and a body view, so that the hyper-relation knowledge graph is closer to the real world situation, and the link prediction and the entity classification task of the knowledge graph are facilitated; the second aspect provides a construction method of a double-view superrelation knowledge graph data set, so that a double-view superrelation knowledge graph framework can be applied to actual life; the third aspect combines the characteristics of GRAN, HGNN and joint learning to construct a first DHGE model which can be used for DH-KG representation learning, and the model has better effect on a DH-KG framework and a general knowledge-graph data set than the existing model.
In order to implement the above embodiment, the invention further provides a knowledge graph spectrum complementing device based on the double-view hyper-relationship embedded framework.
Fig. 6 is a schematic structural diagram of a knowledge graph spectrum complementing device based on a two-view hyper-relation embedded framework according to an embodiment of the present invention.
As shown in fig. 6, the knowledge graph spectrum completion apparatus based on a dual-view hyper-relationship embedded framework includes: the system comprises an acquisition module 100, an input module 200, a training module 300 and an output module 400. Wherein, the first and the second end of the pipe are connected with each other,
the acquisition module is used for constructing a data set based on the double-view hyper-relational knowledge graph, and the data set comprises an example view set, a body view set and a cross-view link set;
the data processing system comprises an input module, a data processing module and a data processing module, wherein the input module is used for inputting a data set into a DH-KG embedded model, and the DH-KG embedded model comprises a GRAN encoder, a cross-view link learning network and a joint learning network;
the training module is used for carrying out in-view hyper-relation learning through a GRAN encoder, carrying out cross-view contact learning through a hyper-graph field aggregation technology and cross-view loss, and carrying out joint learning through loss functions respectively corresponding to a joint instance view set, a body view set and a cross-view connection set to obtain a trained DH-KG embedded model;
and the output module is used for performing link prediction and entity classification of the knowledge graph through the trained DH-KG embedded model.
Further, in an embodiment of the present invention, the obtaining module is further configured to:
acquiring a super-relation knowledge graph data set, and taking an entity in the super-relation knowledge graph data set as an example view entity set;
acquiring a tail entity set of the instance view entity set according to the first preset relation, wherein the tail entity set is used as an ontology view concept set or a cross-view connection set; acquiring a tail entity set of the ontology view concept set through a second preset relationship, and taking a union of the tail entity set of the ontology view concept set and the ontology view concept set as the ontology view entity set;
acquiring an instance view superrelation fact set from an instance view, and acquiring an instance view relation set from the instance view superrelation fact set; acquiring an ontology view superrelation fact set from an ontology view, and acquiring an ontology view relation set from the ontology view superrelation fact set;
and constructing an instance view according to the instance view entity set, the instance view super-relation fact set and the instance view relation set, constructing an ontology view according to the ontology view entity set, the ontology view super-relation fact set and the ontology view relation set, and generating a data set based on the double-view super-relation knowledge graph according to the instance view, the ontology view and the cross-view connection set.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and combined by one skilled in the art without being mutually inconsistent.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Claims (10)
1. A knowledge graph complementing method based on a double-view hyper-relation embedded framework is characterized by comprising the following steps:
constructing a data set based on a double-view hyper-relational knowledge graph, wherein the data set comprises an example view set, an ontology view set and a cross-view link set;
inputting the dataset into a DH-KG embedding model, wherein the DH-KG embedding model comprises a GRAN encoder, a cross-view link learning network and a joint learning network;
performing intra-view hyper-relation learning through the GRAN encoder, performing cross-view contact learning through a hyper-graph field aggregation technology and cross-view loss, and performing joint learning through loss functions respectively corresponding to a joint instance view set, a body view set and a cross-view connection set to obtain a trained DH-KG embedded model;
and performing link prediction and entity classification of the knowledge graph through the trained DH-KG embedded model.
2. The method of claim 1, wherein constructing a data set based on a two-view hyper-relational knowledge graph comprises:
acquiring a super-relation knowledge graph data set, and taking an entity in the super-relation knowledge graph data set as an example view entity set;
acquiring a tail entity set of the instance view entity set according to a first preset relation, wherein the tail entity set is used as an ontology view concept set or a cross-view connection set; acquiring a tail entity set of the ontology view concept set through a second preset relationship, and taking a tail entity set of the ontology view concept set and a union of the ontology view concept set as an ontology view entity set;
acquiring an instance view superrelation fact set from an instance view, and acquiring an instance view relation set from the instance view superrelation fact set; acquiring an ontology view superrelation fact set from an ontology view, and acquiring an ontology view relation set from the ontology view superrelation fact set;
and constructing an instance view according to the instance view entity set, the instance view super-relation fact set and the instance view relation set, constructing an ontology view according to the ontology view entity set, the ontology view super-relation fact set and the ontology view relation set, and generating a data set based on a double-view super-relation knowledge graph according to the instance view, the ontology view and the cross-view connection set.
3. The method of claim 1, wherein said performing, by said GRAN encoder, intra-view hyper-relationship learning comprises:
and updating entity embedding through a GRAN model, performing entity or relationship prediction by using the updated entity embedding, and calculating the loss in each sub-view.
4. The method of claim 3, wherein updating entity embedding via a GRAN model comprises:
taking a super-relation fact as a special graph through a GRAN model, and then using a mask learning strategy to construct model input;
learning the anomaly graph by GRAN using edge-biased fully-connected attention;
updating all entity embedded vectors of the super-relation facts through a GRAN encoder;
wherein, the node embedding vector GRAN _ E after updating of the l-layer GRAN encoder is:
X(l)=GRAN E(X(l-1)),
5. The method according to claim 3, wherein the predicting an entity or a relationship using the updated entity embedding and calculating the loss in each sub-view comprises:
taking out the node embedding vector h at the MASK position, then carrying out a two-layer linear transformation operation,
wherein the content of the first and second substances,share parameters with the input embedded vector matrix, and it is a parameter that can be learned by itself,is the prediction score for all entities, i.e., by v entities in the entire fact;
adding label smoothing, and obtaining cross entropy loss between a predicted value and a label according to p:
wherein p istIs the value of the predicted first position of the score vector p, ytIs the value of the t-th position of the tag vector y.
6. The method of claim 1, wherein the cross-view contact learning through hypergraph domain aggregation techniques and cross-view loss comprises:
acquiring node embedding of entities in all super-relation facts through the GRAN encoder, and embedding the nodes into an input HGNN hypergraph learning model;
the message passing process from the (k-1) layer to the k-th layer in the HGNN is defined as follows:
U(k)=U(k-1)+σ(WHU(k-1)Θ(k)+b(k)),
wherein, the first and the second end of the pipe are connected with each other,is a transformation matrix of the image data to be transformed,is the bias of the k-th layer, σ is the activation function,is a correlation matrix of the knowledge hypergraph,is a matrix of degrees of the nodes and,is a matrix of degrees of the over-edge,is the output of the k-th layer.
7. The method of claim 1 or 6, wherein the cross-view loss comprises:
mapping the header entity set into the vector space corresponding to the ontology view by a mapping operation:
cross-view link loss is defined as follows:
wherein two norms are used to compute a distance bias, t ', of an entity and a concept in the same vector space'sIs tsAnd γ is a boundary parameter.
8. The method according to claim 1, wherein the joint learning is performed by combining the loss functions respectively corresponding to the instance view set, the ontology view set and the cross-view connection set, and is expressed as:
further, adam optimizer is used to optimize three loss functions separately, where ω distinguishes the learning rate of the in-view and cross-view losses to achieve joint learning.
9. A knowledge graph spectrum complementing device based on a double-view hyper-relation embedding framework is characterized by comprising:
the acquisition module is used for constructing a data set based on the double-view hyper-relational knowledge graph, wherein the data set comprises an example view set, a body view set and a cross-view link set;
an input module, configured to input the data set into a DH-KG embedding model, where the DH-KG embedding model includes a GRAN encoder, a cross-view link learning network, and a joint learning network;
the training module is used for carrying out in-view hyper-relation learning through the GRAN encoder, carrying out cross-view contact learning through a hyper-graph field aggregation technology and cross-view loss, and carrying out joint learning through loss functions respectively corresponding to a joint instance view set, a body view set and a cross-view connection set to obtain a trained DH-KG embedded model;
and the output module is used for performing link prediction and entity classification of the knowledge graph through the trained DH-KG embedded model.
10. The apparatus of claim 9, wherein the obtaining module is further configured to:
acquiring a super-relation knowledge graph data set, and taking an entity in the super-relation knowledge graph data set as an example view entity set;
acquiring a tail entity set of the instance view entity set according to a first preset relation, wherein the tail entity set is used as an ontology view concept set or a cross-view connection set; acquiring a tail entity set of the ontology view concept set through a second preset relationship, and taking a union of the tail entity set of the ontology view concept set and the ontology view concept set as an ontology view entity set;
acquiring an instance view superrelation fact set from an instance view, and acquiring an instance view relation set from the instance view superrelation fact set; acquiring an ontology view superrelation fact set from an ontology view, and acquiring an ontology view relation set from the ontology view superrelation fact set;
and constructing an instance view according to the instance view entity set, the instance view super-relation fact set and the instance view relation set, constructing an ontology view according to the ontology view entity set, the ontology view super-relation fact set and the ontology view relation set, and generating a data set based on a double-view super-relation knowledge graph according to the instance view, the ontology view and the cross-view connection set.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210831885.4A CN115269866A (en) | 2022-07-15 | 2022-07-15 | Knowledge graph complementing method based on double-view hyper-relation embedded framework |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210831885.4A CN115269866A (en) | 2022-07-15 | 2022-07-15 | Knowledge graph complementing method based on double-view hyper-relation embedded framework |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115269866A true CN115269866A (en) | 2022-11-01 |
Family
ID=83765335
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210831885.4A Pending CN115269866A (en) | 2022-07-15 | 2022-07-15 | Knowledge graph complementing method based on double-view hyper-relation embedded framework |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115269866A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116579425A (en) * | 2023-07-13 | 2023-08-11 | 北京邮电大学 | Super-relationship knowledge graph completion method based on global and local level attention |
-
2022
- 2022-07-15 CN CN202210831885.4A patent/CN115269866A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116579425A (en) * | 2023-07-13 | 2023-08-11 | 北京邮电大学 | Super-relationship knowledge graph completion method based on global and local level attention |
CN116579425B (en) * | 2023-07-13 | 2024-02-06 | 北京邮电大学 | Super-relationship knowledge graph completion method based on global and local level attention |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111522962B (en) | Sequence recommendation method, device and computer readable storage medium | |
CN110413844A (en) | Dynamic link prediction technique based on space-time attention depth model | |
CN110889015B (en) | Independent decoupling convolutional neural network characterization method for graph data | |
CN112989064B (en) | Recommendation method for aggregating knowledge graph neural network and self-adaptive attention | |
CN112529168A (en) | GCN-based attribute multilayer network representation learning method | |
WO2024032096A1 (en) | Reactant molecule prediction method and apparatus, training method and apparatus, and electronic device | |
CN111967972A (en) | Financial product recommendation method and device | |
CN112541132A (en) | Cross-domain recommendation method based on multi-view knowledge representation | |
Xu et al. | Bipolar fuzzy Petri nets for knowledge representation and acquisition considering non-cooperative behaviors | |
Tian et al. | Knowledge distillation on graphs: A survey | |
CN115221413B (en) | Sequence recommendation method and system based on interactive graph attention network | |
CN115686868B (en) | Cross-node-oriented multi-mode retrieval method based on federated hash learning | |
CN112256870A (en) | Attribute network representation learning method based on self-adaptive random walk | |
Carbone | A framework for enhancing transdisciplinary research knowledge | |
CN115269866A (en) | Knowledge graph complementing method based on double-view hyper-relation embedded framework | |
CN113688253A (en) | Hierarchical perception temporal knowledge map representation learning method | |
CN112508181A (en) | Graph pooling method based on multi-channel mechanism | |
CN113228059A (en) | Cross-network-oriented representation learning algorithm | |
CN116579425B (en) | Super-relationship knowledge graph completion method based on global and local level attention | |
CN117078312A (en) | Advertisement putting management method and system based on artificial intelligence | |
CN114547325B (en) | Probabilistic hypergraph-driven geoscience knowledge graph inference optimization system and method | |
Kang et al. | Interpretability for reliable, efficient, and self-cognitive DNNs: From theories to applications | |
CN114399048A (en) | Graph convolution neural network and type embedding-based education field joint knowledge point prediction method and system | |
CN115631008A (en) | Commodity recommendation method, commodity recommendation device, commodity recommendation equipment and commodity recommendation medium | |
CN112836511A (en) | Knowledge graph context embedding method based on cooperative relationship |
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 |