Knowledge graph induction relation prediction method based on standardized flow
By adopting the standardized flow model Flow-IKGE in the knowledge graph inductive relationship prediction, combining entity initialization and the message delivery mechanism of graph neural network, the problem of existing methods performing poorly when dealing with complex relationships is solved, and better generalization ability and prediction accuracy are achieved.
Patent Information
- Application Number
- CN202510245079.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing inductive relationship prediction methods are prone to overfitting, have limited generalization capabilities, and perform poorly when dealing with complex relationships, especially poorly utilizing embedded information in the knowledge base.
Using the knowledge graph induction relationship prediction method based on standardized flow, the generalization capability and performance of the model are optimized by constructing a standardized flow model Flow-IKGE embedded in inductive knowledge graphs, combining entity initialization and the message delivery mechanism of graph neural networks, and using cascading jump knowledge structure and stream transformation operations.
It improves the fitting ability and prediction accuracy of the model, can better handle complex nonlinear relationships, and enhances the generalization ability of the model, especially when computing resources are limited or large data sets, it can still achieve better results.
Smart Images

Figure CN119721216A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge graph inductive relationship prediction, and in particular to a knowledge graph inductive relationship prediction method based on standardized flow. Background Art
[0002] Existing inductive relationship prediction methods mainly rely on rule-based strategies or strategies that utilize closed subgraphs. Although such methods perform well in some cases, they often face some significant challenges. First, due to their over-reliance on specific patterns in the training data, these methods are prone to overfitting problems, which limits the generalization ability of the model. At the same time, these rule-based or closed subgraph-based methods are insufficient in estimating the uncertainty of predictions, which is crucial because in practical applications, model predictions may be extremely unreliable when there are fewer samples. If this uncertainty cannot be effectively evaluated, it will be difficult to correctly utilize model predictions in decision-making. In addition, existing methods perform poorly when dealing with complex relationships, especially for the poor utilization of embedded information in knowledge bases. In knowledge bases, the complexity of relationships is not only reflected in the direct connections between entities, but also includes indirect relationships connected through various intermediary paths. Ignoring this information means losing potential important knowledge, which greatly limits the performance and application scope of prediction models.
[0003] Therefore, the present invention proposes a knowledge graph induction relationship prediction method based on standardized flow to solve the above problems. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention develops a knowledge graph induction relationship prediction method based on standardized flow, the main purpose of which is to improve the model fitting ability, the accuracy of estimated predictions, and the ability to handle complex relationships.
[0005] The technical solution to the technical problem of the present invention is a knowledge graph induction relationship prediction method based on standardized flow, comprising the following steps: S1, the data exported from the public datasets WN18RR and FB15K-237 are used to construct the dataset; S2. Construct a standardized flow model Flow-IKGE for inductive knowledge graph embedding. Use the embedding learning algorithm and entity initialization module to build an entity initializer. The entity initializer uses the relationship information connected to each entity to initialize the embedding of each entity. Then, the initialized entity is processed through the message passing mechanism of the graph neural network. Each layer of the graph neural network outputs the corresponding feature vector. S3, through the jump knowledge structure based on hidden representation cascade to enhance the model's utilization of information at different levels, improve the generalization ability and performance of the Flow-IKGE model; S4. Construct a series of flow transformation operations to optimize the learning effect of the graph neural network in the Flow-IKGE model by changing the distribution of data, obtain the enhanced feature vector, and calculate the enhanced feature vectors of different entities and the relationship between entities to obtain the relationship score between entities.
[0006] S1 is as follows: The triples in the dataset are The form of storage, where represents the knowledge graph, Represents the head entity, Indicates relationship, Indicates the tail entity, the head entity and tail entity Belongs to entity set ,relation Belongs to a relation set .
[0007] S2 is as follows: Flow-IKGE, a standardized flow model for inductive knowledge graph embedding, combines entity-initialized embedding and graph neural network with standardized flow; S2.1. The original relational moment set in the data set Design a learnable relational domain embedding matrix based on and a learnable relational range embedding matrix ,matrix Contains implicit type features of the head entity, which is used to capture the domain information to which the head entity belongs. The matrix Contains the implicit type feature of the tail entity, which is used to capture the implicit scope or type information of the tail entity, where represents the number of relations, represents the dimension of the embedding; Through knowledge graph embedding learning , and Train to preserve the internal semantics of the relationship For learning relation embeddings, and Used for entity initialization; The initialization calculation formula is as follows: , in, represents the entry relation set of the entity, is the output relation set of the entity, Representing relationships The relational domain embedding, Representing relationships The relational scope embedding, Indicates The initialization result of an entity.
[0008] S2.2, perform initial processing on the initialized entities through the message passing mechanism of the graph neural network; S2.2.1, Initialization result of entities is a feature vector, ,in Represents the dimension of the feature, The entity in the knowledge graph is Node, The neighbor nodes of a node are represented as ,node The eigenvector of , through the learnable weight matrix Perform a linear transformation on the feature vector of each node. Represents the dimension of the transformed feature, and the calculation process is as follows: , , in, represents the bias vector, represents the linear transformation The feature vector of each node, represents the linear transformation The feature vector of each node; S2.2.2. and The node feature vector after the node transformation and , and a learnable weight vector , through the nonlinear activation function Calculate the and The attention coefficient of each node , the calculation process is as follows: , in, express and The series connection, Represents the operation of a nonlinear activation function; S2.2.3. Pass Function will node The sum of the attention coefficients of all neighboring nodes is set to 1, and The attention coefficients of each node and all neighboring nodes are normalized. The calculation process is as follows: , in, Representation Node and its neighbor nodes The attention weights between Indicates The set of neighbor nodes of a node, Represents the index of the neighbor node set; S2.2.4, according to Perform weighted message passing and then pass Function, get Weighted neighbor messages of nodes , the calculation process is as follows: , in, represents the nonlinear activation function Operations; Similarly, we can get the node Neighbor nodes Weighted neighbor messages , the calculation process is as follows: , in, Representation Node Neighbor nodes of Representation Node Neighbor nodes A collection of; S2.2.5. Node Weighted neighbor messages Add to feature vector In the equation, we get the feature vector , the calculation process is as follows: ; S2.2.6. Nodes are mapped using graph neural network RGCN Neighbor nodes Weighted neighbor messages For processing and updating, the number of layers of the graph neural network RGCN is ,set up , nodes corresponding to the first, second, and third layers of the graph neural network RGCN Weighted neighbor messages They are , , , the calculation process is as follows: , , , in, Indicates The type of relationship associated with the weight matrix in the layer network, represents the dimension of the input feature vector, represents the dimension of the output feature vector, represents the bias term, , and They represent the feature vectors output by the first, second, and third layers of the graph convolutional network RGCN respectively; Through the graph convolution network RGCN, the feature vector Perform self-join to preserve nodes The original features of the graph neural network RGCN, the feature vectors corresponding to the first, second and third layers They are , , , the specific formula is as follows: , , , in, Representation Node in front Hidden entity representation in the layer, Indicates that the link The weight matrix of the layer; entity The feature vector finally output by each layer of the graph neural network RGCN is , the specific formula is as follows: , in, Represents the activation function operation.
[0009] S3 is as follows: The cascaded skip knowledge structure JK is used to enhance the integration of feature vector representations at different layers. The JK structure captures information from local to global by combining the outputs of different layers and improves the generalization and expression capabilities of the network. The specific formula is as follows: , in, represents the integrated feature vector, , represents the number of layers of the graph neural network, represents the dimension of the input feature vector, and JK represents the cascade operation along the feature dimension; The integrated feature vector is transformed into Project it into the new representation space to get the final updated feature vector , , Represents the dimension of the output feature vector. The specific formula is as follows: , in, represents the weight tensor in the cascaded skip knowledge structure JK, , represents the bias vector, .
[0010] S4 is as follows: choose Stream transformation, Stream transformation, Any kind of stream transformation on the feature vector The specific calculation is as follows: , in, represents the enhanced feature vector, express Stream transformation, Stream transformation, Any stream transformation operation in stream transformation; Any pair of entities ( ) After the Flow-IKGE model, the entity pair ( ) is mapped to a low-dimensional vector space to obtain the corresponding enhanced feature vector and , the relationship between two entities Get the embedded representation , the relationship between entities is regarded as a vector transformation from one entity to another. The score of the relationship between entities is calculated based on the enhanced feature vectors of the two entities and the embedding of the relationship between the entities. The specific calculation is as follows: , , in, Indicates that the L2 paradigm is used. Representing Entities and Relationship There are multiple relationships between two entities, and the relationship with the highest score is the final prediction result.
[0011] The calculation formula of flow transformation is as follows: , in , , represents three different learnable parameters, represents a nonlinear activation function, represents transpose, express Stream transformation results; The calculation formula of flow transformation is as follows: , in, represents a learnable scaling parameter, represents a learnable translation parameter that guarantees numerical stability, represents the reference point of learnable parameters, express Stream transformation results; The calculation formula of flow transformation is as follows: The feature vector The first dimension to the dimension Copy directly to the output and get the output , the specific formula is as follows: , in, Represents the first dimension to the Dimensional elements; For the feature vector No. Weizhidi dimension Perform scaling and translation transformations to get the output , the specific formula is as follows: , in, Indicates Weizhidi The element of dimension, represents the scaling function implemented by the multilayer perceptron, represents the translation function implemented by the multilayer perceptron, represents element-wise multiplication; Transform the first dimension to the Peace Weizhidi The results of the dimension are spliced to obtain Result of stream transformation , the specific calculation is as follows: .
[0012] The effects provided in the content of the invention are only the effects of the embodiments, rather than all the effects of the invention. The above technical solution has the following advantages or beneficial effects: The present invention proposes a knowledge graph inductive relationship prediction method based on standardized flow. In order to make the inductive relationship prediction method better handle the changes in data distribution and enhance the generalization ability of the model, the present invention uses standardized flow technology to represent complex probability distributions, and accurately calculates the probability density function through the chain rule. Since each step in the standardized flow technology is reversible, it allows direct operation on the latent space, which provides additional flexibility in specific applications. In addition, the weighted aggregation method adopted by the present invention is simple, efficient, and easy to implement, and has better robustness by using the inverse of node associations as attention weights. Therefore, the standardized flow model Flow-IKGE for inductive knowledge graph embedding proposed by the present invention can better handle complex nonlinear relationships and improve the generalization ability of the model. In many scenarios, especially in the case of limited computing resources or large data sets, good results can still be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0014] Figure 1 It is a schematic diagram of the method flow of the present invention.
[0015] Figure 2 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION
[0016] In order to clearly illustrate the technical features of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.
[0017] Example 1 A knowledge graph induction relationship prediction method based on standardized flow is as follows: S1, the data exported from the public datasets WN18RR and FB15K-237 are used to construct the dataset; S2. Construct a standardized flow model Flow-IKGE for inductive knowledge graph embedding. Use the embedding learning algorithm and entity initialization module to build an entity initializer. The entity initializer uses the relationship information connected to each entity to initialize the embedding of each entity. Then, the initialized entity is processed through the message passing mechanism of the graph neural network. Each layer of the graph neural network outputs the corresponding feature vector. S3, through the jump knowledge structure based on hidden representation cascade to enhance the model's utilization of information at different levels, improve the generalization ability and performance of the Flow-IKGE model; S4. Construct a series of flow transformation operations to optimize the learning effect of the graph neural network in the Flow-IKGE model by changing the distribution of data, obtain the enhanced feature vector, and calculate the enhanced feature vectors of different entities and the relationship between entities to obtain the relationship score between entities.
[0018] S1 is as follows: The triples in the dataset are The form of storage, where represents the knowledge graph, Represents the head entity, Indicates relationship, Indicates the tail entity, the head entity and tail entity Belongs to entity set ,relation Belongs to a relation set .
[0019] S2 is as follows: Flow-IKGE, a standardized flow model for inductive knowledge graph embedding, combines entity-initialized embedding and graph neural network with standardized flow; S2.1. The original relational moment set in the data set Design a learnable relational domain embedding matrix based on and a learnable relational range embedding matrix ,matrix Contains implicit type features of the head entity, which is used to capture the domain information to which the head entity belongs. The matrix Contains the implicit type feature of the tail entity, which is used to capture the implicit scope or type information of the tail entity, where represents the number of relations, represents the dimension of the embedding; Through knowledge graph embedding learning , and Train to preserve the internal semantics of the relationship For learning relation embeddings, and Used for entity initialization; The initialization calculation formula is as follows: , in, represents the entry relation set of the entity, is the output relation set of the entity, Representing relationships The relational domain embedding, Representing relationships The relational scope embedding, Indicates The initialization result of an entity.
[0020] S2.2, perform initial processing on the initialized entities through the message passing mechanism of the graph neural network; S2.2.1, Initialization result of entities is a feature vector, ,in The dimension representing the feature, The entity in the knowledge graph is Node, The neighbor nodes of a node are represented as ,node The eigenvector of , through the learnable weight matrix Perform a linear transformation on the feature vector of each node. Represents the dimension of the transformed feature, and the calculation process is as follows: , , in, represents the bias vector, represents the linear transformation The feature vector of each node, represents the linear transformation The feature vector of each node; S2.2.2. and The node feature vector after the node transformation and , and a learnable weight vector , through the nonlinear activation function Calculate the and The attention coefficient of each node , the calculation process is as follows: , in, express and The series connection, Represents the operation of a nonlinear activation function; S2.2.3. Pass Function will node The sum of the attention coefficients of all neighboring nodes is set to 1, and The attention coefficients of each node and all neighboring nodes are normalized. The calculation process is as follows: , in, Representation Node and its neighbor nodes The attention weights between Indicates The set of neighbor nodes of a node, Represents the index of the neighbor node set; S2.2.4, according to Perform weighted message passing and then pass Function, get Weighted neighbor messages of nodes , the calculation process is as follows: , in, represents the nonlinear activation function Operations; Similarly, we can get the node Neighbor nodes Weighted neighbor messages , the calculation process is as follows: , in, Representation Node Neighbor nodes of Representation Node Neighbor nodes A collection of; S2.2.5. Node Weighted neighbor messages Add to feature vector In the equation, we get the feature vector , the calculation process is as follows: ; S2.2.6. Nodes are mapped using graph neural network RGCN Neighbor nodes Weighted neighbor messages For processing and updating, the number of layers of the graph neural network RGCN is ,set up , nodes corresponding to the first, second, and third layers of the graph neural network RGCN Weighted neighbor messages They are , , , the calculation process is as follows: , , , in, Indicates The type of relationship associated with the weight matrix in the layer network, represents the dimension of the input feature vector, represents the dimension of the output feature vector, represents the bias term, , and They represent the feature vectors output by the first, second, and third layers of the graph convolutional network RGCN respectively; Through the graph convolution network RGCN, the feature vector Perform self-join to preserve nodes The original features of the graph neural network RGCN, the feature vectors corresponding to the first, second and third layers They are , , , the specific formula is as follows: , , , in, Representation Node in front Hidden entity representation in the layer, Indicates that the link The weight matrix of the layer; entity The feature vector finally output by each layer of the graph neural network RGCN is , the specific formula is as follows: , in, Represents the activation function operation.
[0021] S3 is as follows: The cascaded skip knowledge structure JK is used to enhance the integration of feature vector representations at different layers. The JK structure captures information from local to global by combining the outputs of different layers and improves the generalization and expression capabilities of the network. The specific formula is as follows: , in, represents the integrated feature vector, , represents the number of layers of the graph neural network, represents the dimension of the input feature vector, and JK represents the cascade operation along the feature dimension; The integrated feature vector is transformed into Project it into the new representation space to get the final updated feature vector , , Represents the dimension of the output feature vector. The specific formula is as follows: , in, represents the weight tensor in the cascaded skip knowledge structure JK, , represents the bias vector, .
[0022] S4 is as follows: choose Stream transformation, Stream transformation, Any kind of stream transformation on the feature vector The specific calculation is as follows: , in, represents the enhanced feature vector, express Stream transformation, Stream transformation, Any stream transformation operation in stream transformation; Any pair of entities ( ) After the Flow-IKGE model, the entity pair ( ) is mapped to a low-dimensional vector space to obtain the corresponding enhanced feature vector and , the relationship between two entities Get the embedded representation , the relationship between entities is regarded as a vector transformation from one entity to another. The score of the relationship between entities is calculated based on the enhanced feature vectors of the two entities and the embedding of the relationship between the entities. The specific calculation is as follows: , , in, Indicates that the L2 paradigm is used. Representing Entities and Relationship There are multiple relationships between two entities, and the relationship with the highest score is the final prediction result.
[0023] The calculation formula of flow transformation is as follows: , in , , represents three different learnable parameters, represents a nonlinear activation function, represents transpose, express Stream transformation results; The calculation formula of flow transformation is as follows: , in, represents a learnable scaling parameter, represents a learnable translation parameter that guarantees numerical stability, represents the reference point of learnable parameters, express Stream transformation results; The calculation formula of flow transformation is as follows: The feature vector The first dimension to the dimension Copy directly to the output and get the output , the specific formula is as follows: , in, Represents the first dimension to the Dimensional elements; For the feature vector No. Weizhidi dimension Perform scaling and translation transformations to get the output , the specific formula is as follows: , in, Indicates Weizhidi The element of dimension, represents the scaling function implemented by the multilayer perceptron, represents the translation function implemented by the multilayer perceptron, represents element-wise multiplication; Transform the first dimension to the Peace Weizhidi The results of the dimension are spliced to obtain Result of stream transformation , the specific calculation is as follows: .
[0024] A validation set was selected to evaluate the model performance, and the prediction accuracy of the Flow-IKGE model on the FB15K-237 dataset was found to be as high as 96.72%. Compared with other existing models, the accuracy was improved by about 2% over the existing models.
[0025] Example 2 In order to verify the effectiveness of the inductive relationship prediction structure based on the standardized flow, an ablation study is conducted to analyze the effectiveness of the standardized flow and weighted aggregation method based on the attention mechanism in the model. Four sets of data are selected from the FB15k-237 dataset to compare the following four models. The comparison results are shown in Table 1. V1, V2, V3, and V4 represent new datasets composed of different data extracted from the FB15k-237 dataset. Selecting multiple datasets can better verify the performance of the model on multiple datasets. The evaluation index H@10 indicates how many proportions of real links appear in the top 10 candidate links predicted by the model in all test instances. H@10 measures the ability of the model to find the correct link in the top 10 recommendations. The compared models are the reference model A Chen et al. proposed the model (MorsE) used for comparison in this paper, model B proposed in this paper with the attention mechanism removed (removing Attention in Flow-IKGE), model C proposed in this paper with the standardized flow removed (removing Flow in Flow-IKGE), model D proposed in this paper with the standardized flow and attention mechanism removed (removing Attention and Flow in Flow-IKGE), and model E proposed in this paper with the standardized flow model (Flow-IKGE) for inductive knowledge graph embedding. It can be seen from the results that both the standardized flow (Flow) and the weighted aggregation method based on the attention mechanism can improve the performance of the model. Specifically, if there is Flow and Attention, the model can better handle more complex relationships, that is, the accuracy of the present invention is higher.
[0026] Table 1 Comparison results between the proposed method and the existing method based on the FB15k-237 dataset Example 3 In the knowledge graph, nodes are connected to each other through edges, such as Figure 2As shown in the figure, "a", "b", "c", "d", and "e" represent entities, and arrows represent relationships. The starting direction of the arrow is the head entity, and the pointing direction is the tail entity. Taking node "a" as an example, node (entity) "a" is connected to nodes (entities) "b", "c", "d", etc. through edges (relationships); after the graph enters the graph neural network through information aggregation, the representation of each node is gradually updated. The graph neural network will embed the relationship between each node and its neighbors into the model, propagate and update through multi-layer networks, and form a new node embedding representation. This representation will make the characteristics of each node not only depend on itself, but also on the information of the neighboring nodes connected to it; the graph generates a new embedding vector through the graph neural network, and the relationship between nodes is captured in a higher dimension to form a new graph embedding table. After aggregating multiple nodes, a global graph representation can be constructed to reflect the complex relationship between nodes; the nodes and edges in the graph are mapped to vector representations, called entity embedding and relationship embedding. Through standardized stream operations, these embeddings can be processed to obtain more optimized feature representations; the scoring formula adopts the calculation idea of TransE, which shows a vector-based scoring calculation method. Figure 2 middle , , Represents the vector representation of the head entity, relationship and tail entity respectively, and calculates the relationship score between the three , and obtain the prediction accuracy.
[0027] Although the above describes the specific implementation mode of the invention in conjunction with the drawings, it is not intended to limit the scope of protection of the invention. Based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.
Claims
1. A knowledge graph induction relationship prediction method based on standardized flow, characterized by: The following steps are involved: S1, the data exported from the public datasets WN18RR and FB15K-237 are used to construct the dataset; S2. Construct a standardized flow model Flow-IKGE for inductive knowledge graph embedding. Use the embedding learning algorithm and entity initialization module to build an entity initializer. The entity initializer uses the relationship information connected to each entity to initialize the embedding of each entity. Then, the initialized entity is processed through the message passing mechanism of the graph neural network. Each layer of the graph neural network outputs the corresponding feature vector. S3, through the jump knowledge structure based on hidden representation cascade to enhance the model's utilization of information at different levels, improve the generalization ability and performance of the Flow-IKGE model; S4. Construct a series of flow transformation operations to optimize the learning effect of the graph neural network in the Flow-IKGE model by changing the distribution of data, obtain the enhanced feature vector, and calculate the enhanced feature vectors of different entities and the relationship between entities to obtain the relationship score between entities.
2. According to the method for predicting knowledge graph induction relationships based on standardized flow in claim 1, it is characterized in that: S1 is as follows: The triples in the dataset are The form of storage, where represents the knowledge graph, Represents the head entity, Indicates relationship, Indicates tail entity, head entity and tail entity Belongs to entity set ,relation Belongs to a relation set .
3. According to claim 2, a knowledge graph induction relationship prediction method based on standardized flow is characterized in that: S2 is as follows: Flow-IKGE, a standardized flow model for inductive knowledge graph embedding, combines entity-initialized embedding and graph neural network with standardized flow; S2.
1. The original relational moment set in the data set Design a learnable relational domain embedding matrix based on and a learnable relational range embedding matrix ,matrix Contains implicit type features of the head entity, which is used to capture the domain information to which the head entity belongs. The matrix Contains the implicit type feature of the tail entity, which is used to capture the implicit scope or type information of the tail entity, where represents the number of relations, represents the dimension of the embedding; Through knowledge graph embedding learning , and Train to preserve the internal semantics of the relationship For learning relation embeddings, and Used for entity initialization; The initialization calculation formula is as follows: , in, represents the entry relation set of the entity, is the output relation set of the entity, Representing relationships The relational domain embedding, Representing relationships The relational scope embedding, Indicates The initialization result of an entity.
4. According to claim 3, a knowledge graph induction relationship prediction method based on standardized flow is characterized by: S2.2, perform initial processing on the initialized entities through the message passing mechanism of the graph neural network; S2.2.1, Initialization result of entities is a feature vector, ,in Represents the dimension of the feature, The entity in the knowledge graph is Node, The neighbor nodes of a node are represented as ,node The eigenvector of , through the learnable weight matrix Perform a linear transformation on the feature vector of each node. Represents the dimension of the transformed feature, and the calculation process is as follows: , , in, represents the bias vector, represents the linear transformation The feature vector of a node, represents the linear transformation The feature vector of each node; S2.2.
2. and The node feature vector after the node transformation and , and a learnable weight vector , through the nonlinear activation function Calculate the and The attention coefficient of each node , the calculation process is as follows: , in, express and The series connection, Represents the operation of a nonlinear activation function; S2.2.
3. Pass Function will node The sum of the attention coefficients of all neighboring nodes is set to 1, and The attention coefficients of each node and all neighboring nodes are normalized. The calculation process is as follows: , in, Representation Node and its neighbor nodes The attention weights between Indicates The set of neighbor nodes of a node, Represents the index of the neighbor node set; S2.2.4, according to Perform weighted message passing and then pass Function, get Weighted neighbor messages of nodes , the calculation process is as follows: , in, represents the nonlinear activation function Operations; Similarly, we can get the node Neighbor nodes Weighted neighbor messages , the calculation process is as follows: , in, Representation Node Neighbor nodes of Representation Node Neighbor nodes A collection of; S2.2.
5. Node Weighted neighbor messages Add to feature vector In the equation, we get the feature vector , the calculation process is as follows: ; S2.2.
6. Nodes are mapped using graph neural network RGCN Neighbor nodes Weighted neighbor messages For processing and updating, the number of layers of the graph neural network RGCN is ,set up , nodes corresponding to the first, second, and third layers of the graph neural network RGCN Weighted neighbor messages They are , , , the calculation process is as follows: , , , in, Indicates The type of relationship associated with the weight matrix in the layer network, represents the dimension of the input feature vector, represents the dimension of the output feature vector, represents the bias term, , and They represent the feature vectors output by the first, second, and third layers of the graph convolutional network RGCN respectively; Through the graph convolutional network RGCN, the feature vector Perform self-join to preserve nodes The original features of the graph neural network RGCN, the feature vectors corresponding to the first, second and third layers They are , , , the specific formula is as follows: , , , in, Representation Node in front Hidden entity representation in the layer, Indicates that the link The weight matrix of the layer; entity The feature vector finally output by each layer of the graph neural network RGCN is , the specific formula is as follows: , in, Represents the activation function operation.
5. According to claim 4, a knowledge graph induction relationship prediction method based on standardized flow is characterized in that: S3 is as follows: The cascaded skip knowledge structure JK is used to enhance the integration of feature vector representations at different layers. The JK structure captures information from local to global by combining the outputs of different layers and improves the generalization and expression capabilities of the network. The specific formula is as follows: , in, represents the integrated feature vector, , represents the number of layers of the graph neural network, represents the dimension of the input feature vector, and JK represents the cascade operation along the feature dimension; The integrated feature vector is transformed into Project it into the new representation space to get the final updated feature vector , , Represents the dimension of the output feature vector. The specific formula is as follows: , in, represents the weight tensor in the cascaded skip knowledge structure JK, , represents the bias vector, .
6. The method for predicting knowledge graph induction relationships based on standardized flow according to claim 5 is characterized in that: S4 is as follows: choose Stream transformation, Stream transformation, Any kind of stream transformation on the feature vector The specific calculation is as follows: , in, represents the enhanced feature vector, express Stream transformation, Stream transformation, Any stream transformation operation in stream transformation; Any pair of entities ( ) After the Flow-IKGE model, the entity pair ( ) is mapped to a low-dimensional vector space to obtain the corresponding enhanced feature vector and , the relationship between two entities Get the embedded representation , the relationship between entities is regarded as a vector transformation from one entity to another. The score of the relationship between entities is calculated based on the enhanced feature vectors of the two entities and the embedding of the relationship between the entities. The specific calculation is as follows: , , in, Indicates that the L2 paradigm is used. Representing Entities and Relationship There are multiple relationships between two entities, and the relationship with the highest score is the final prediction result.
7. The method for predicting knowledge graph induction relationships based on standardized flow according to claim 6 is characterized by: The calculation formula of flow transformation is as follows: , in , , represents three different learnable parameters, represents a nonlinear activation function, represents transpose, express Stream transformation results; The calculation formula of flow transformation is as follows: , in, represents a learnable scaling parameter, represents a learnable translation parameter that guarantees numerical stability, represents the reference point of learnable parameters, express Stream transformation results; The calculation formula of flow transformation is as follows: The feature vector The first dimension to the dimension Copy directly to the output and get the output , the specific formula is as follows: , in, Represents the first dimension to the Dimensional elements; For the feature vector No. Weizhidi dimension Perform scaling and translation transformations to get the output , the specific formula is as follows: , in, Indicates Weizhidi The element of dimension, represents the scaling function implemented by the multilayer perceptron, represents the translation function implemented by the multilayer perceptron, represents element-wise multiplication; Transform the first dimension to the Peace Weizhidi The results of the dimension are spliced to obtain Result of stream transformation , the specific calculation is as follows: 。