Learning method of temporal knowledge graph representation based on temporal features and complex evolution
The TFCE model is used to perform time encoding and evolutionary representation learning on temporal knowledge graphs, which solves the problem of existing methods ignoring temporal dependencies and static attribute limitations, and achieves more accurate temporal knowledge graph prediction effects.
Patent Information
- Application Number
- CN202311606478.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-29
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2043-11-29
AI Technical Summary
Existing temporal knowledge graph representation methods ignore the time dependencies in timestamps, static attributes cannot reflect dynamic changes of entities or relationships, and do not consider the temporal attributes of temporal knowledge graphs, resulting in limited prediction effects.
Propose a temporal knowledge graph representation learning method based on temporal characteristics and complex evolution, use the TFCE model to perform temporal encoding of entities and relationships, combine the perception mechanism and attention network to learn evolutionary representation, use TimeConvTransE and TimeConvTransR for prediction, and optimize model parameters to improve prediction Effect.
Significantly improves the prediction effect of future events, can more accurately capture chronological relationships and dependencies between events, and outperforms the performance of classic and advanced models on multiple data sets.
Smart Images

Figure CN117952198B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of temporal knowledge graph reasoning technology, and in particular to a temporal knowledge graph representation learning method based on time features and complex evolution. Background Art
[0002] Temporal knowledge graphs (TKGs) represent facts about entities and their relations, where each fact is associated with a timestamp. In TKGs, predicting new facts at future timestamps based on observed historical knowledge graphs is very helpful for understanding the underlying factors of events and responding to emerging events. Therefore, reasoning in an extrapolation setting is very important in many practical applications and can provide useful assistance, such as disaster relief and financial analysis.
[0003] Since TKG is essentially a KG sequence, existing methods have three main limitations: (1) they mainly focus on the facts of a given query, while ignoring the temporal dependencies of all facts in each timestamp; (2) static attributes are fixed attributes that do not change over time and cannot reflect the dynamic changes of entities or relationships. They cannot provide sufficient information support for prediction tasks and have certain limitations; (3) most of the current advanced algorithms take into account temporal attributes, that is, dynamic attributes related to time, by capturing the evolution of entities and relationships, but none of them consider the temporal attributes of the timestamps of the temporal knowledge graph itself. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a temporal knowledge graph representation learning method based on time characteristics and complex evolution, which can improve the prediction effect of future events.
[0005] In order to achieve the above object, the technical solution of the present invention is as follows:
[0006] The learning method of temporal knowledge graph representation based on time characteristics and complex evolution includes the following steps:
[0007] Construct a TFCE model, which includes a time feature module, a complex evolution module and two time-embedded decoders, wherein the time feature module is used to perform time encoding on entities and relationships in the knowledge graph, capture the long-distance dependency of time features, and obtain a time embedding matrix; the complex evolution module introduces a perception mechanism and an attention network to respectively learn the evolutionary representations of entities and relationships in the knowledge graph at each timestamp, and update the entity embedding matrix and the relationship embedding matrix; the two time-embedded decoders use TimeConvTransE and TimeConvTransR to simultaneously perform entity prediction and relationship prediction, and output the results through a sigmoid function;
[0008] The data set is input into the TFCE model for training, and the loss function is calculated to update the model parameters with the Adam optimizer. When the loss function continues to decrease until convergence, the optimal TFCE model is obtained;
[0009] The optimal TFCE model is used to predict the corresponding entities or relationships in the temporal knowledge graph.
[0010] Preferably, the processing process of the time feature module specifically includes the following steps:
[0011] Traversing the data set, putting all non-repeated timestamps in the data set into an embedding matrix, and obtaining two different initial time embedding matrices based on the embedding matrix through different learnable parameters;
[0012] The two different initial time embedding matrices are processed by the Transformer encoder and the GRU component is used to further extract long-distance dependencies to obtain two different time embedding matrices.
[0013] Preferably, the processing process of the complex evolution module specifically includes the following steps:
[0014] Get the relation embedding matrix R' at timestamp t-1 in the temporal knowledge graph t-1 , embed the relationship into the matrix R' t-1 It is connected with two different time embedding matrices and uses a multi-layer perception mechanism to learn a low-dimensional representation of the relationship. The specific formula is as follows:
[0015]
[0016] Among them, [;] represents the vector connection operation,
[0017] In order to obtain a relational representation with stronger generalization ability, the randomized relational embedding matrix R is combined with the relational embedding matrix Connect them and use the attention network to weight different parts of the relationship path and capture the key information in the path, as follows:
[0018]
[0019] Among them, g(.) means taking the upper triangular part of the matrix,
[0020] Get the entity embedding matrix H' at timestamp t-1 in the temporal knowledge graph t-1 , concatenate the entity embedding matrix with two different temporal embedding matrices, and then use a multi-layer perception mechanism to learn a low-dimensional representation of the entity:
[0021]
[0022] In order to better capture the structural dependencies between entities and relations, the GRU component is used. The specific formula is as follows:
[0023]
[0024] R t and It is put into GCN as an input parameter, and then the association between entities is captured through facts, and the association between relations is captured through shared entities. The specific formula is as follows:
[0025]
[0026] Where l represents the layer index of KG at timestamp t, l∈[0,w-1], w represents the total number of layers of the current KG, and Indicates the first th Aggregate features and self-loop parameters in the layer, lth th At the layer, the structural dependencies between concurrent facts are captured in a fine-grained manner through translation aggregation and self-loop of entities, relationships, and time. o is the degree of entity o; f(.) is the LeakyReLU activation function,
[0027] Use an attention network to weight different parts of an entity:
[0028]
[0029] After capturing the potential key information of the entity, the static attributes of the knowledge graph are added, and the entity matrix is updated using GRU:
[0030] H t =GRU(H t-1 ,H s )(19).
[0031] Preferably, the relationship is embedded in the matrix R' t-1 Before concatenating the two different time embedding matrices, the following steps are also included:
[0032] Embedding matrix R' for the relation at timestamp t-1 t-1 Perform the operation of removing outliers.
[0033] Preferably, the TimeConvTransE and TimeConvTransR each include a one-dimensional convolutional layer and a fully connected layer.
[0034] Preferably, the loss function is:
[0035] L=u1L e +u2L r+u3L st (29)
[0036] Among them, u1, u2 and u3 are the parameters of the control loss term, L st is the loss function of the static graph constraint component,
[0037]
[0038] Based on the above technical solution, the beneficial effect of the present invention is as follows: the present invention proposes a TFCE model based on a temporal knowledge graph representation learning method under time features and complex evolution, and the model includes a time feature module, a complex evolution module and a decoder embedded in time. Specifically, the TFCE model uses a time feature module to time encode entities and relationships in the knowledge graph and incorporate time information into the representation learning process. By learning the patterns of entities and relationships changing over time, it can help understand and discover the temporal order relationships in the knowledge graph. The complex evolution module learns the evolutionary representations of entities and relationships at each timestamp by recursively modeling the KG sequence. At the same time, the addition of time features can effectively model the temporal dependencies between events so as to more accurately capture the temporal relationships between different timestamps. Finally, a decoder embedded in time is used to process incomplete time series data to complete the reasoning of representation learning. Experimental results on three real-world data sets show that the TFCE model is superior to the current classic and advanced models in terms of prediction effect, prediction time, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a flow chart of a learning method for temporal knowledge graph representation based on time features and complex evolution in one embodiment;
[0040] Figure 2 is a comparison chart of prediction time using different algorithms in one embodiment;
[0041] Figure 3 The performance analysis diagram is a diagram of the change of training data based on the original indicators when different algorithms are used to perform entity prediction tasks on ICESW14s, ICEWS05-15 and ICEWS18 in an embodiment. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0043] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0044] Table 1 Important symbols and their descriptions
[0045]
[0046] like Figure 1 As shown, this embodiment provides a temporal knowledge graph representation learning method based on time features and complex evolution to construct a TFCE model. The model is mainly divided into four parts: a time feature module, a complex evolution module, a decoder embedded in time, and a loss function, wherein:
[0047] Based on the time feature module, the entities and relations in the knowledge graph are temporally encoded, and the time information is incorporated into the representation learning process.
[0048] By learning how entities and relationships change over time, we can help understand and discover temporal order relationships in knowledge graphs. The temporal feature module effectively captures long-distance dependencies through Transformer, and uses GRU to model sequential data and process long-term dependencies. This operation allows the model to better capture long-range dependencies and associations in time series. In order to capture these relationships and better build a model, we first traverse the dataset and put all non-repeating timestamps into a timestamp matrix T. Then, we obtain two different initial time embedding matrices through different learnable parameters. The specific formula is as follows:
[0049]
[0050] in, It is expressed as Hadamard product operation. V1 and V2 represent the initial time embedding matrix, and f(.) represents taking the upper triangular part of the matrix. In order to clear the useless information in the matrix and reduce the computational burden of the model, and represents the learning parameters.
[0051] After obtaining the initial time embedding matrix, it is processed by Transformer to capture long-distance dependencies. The specific formula is as follows:
[0052] V1'=Transformer(V1)(3)
[0053] V2'=Transformer(V2)(4)
[0054] In order to better handle long-term dependencies in time series, the GRU component is used to further extract long-distance dependencies and obtain two different time embedding matrices. The specific formula is as follows:
[0055] V'1 = σ(GRU(V'1)) (5)
[0056] V'2 = σ(GRU(V'2)) (6)
[0057] Where σ(·) is the sigmoid function.
[0058] Based on the complex evolution module, a multi-layer perception mechanism and attention network are added on the basis of the above evolution units.
[0059] At present, many reasoning models of temporal knowledge graphs have evolutionary units, but these evolutionary units often use GCN to capture the internal structural dependencies of KG at each timestamp, or use GRU to capture the sequential patterns of all facts in parallel, or add static graph constraint components to integrate into the evolutionary embedding. The complex evolutionary module adds a multi-layer perception mechanism and an attention network on the basis of the above evolutionary units. The multi-layer perception mechanism learns the low-dimensional representation of entities to mine the structural features hidden in TKG. The attention network weights the different parts of the relationship path to capture the key information in the path. By cleverly adding a multi-layer perception mechanism and an attention network, a more effective entity relationship representation can be obtained.
[0060] Formally, the evolution unit computes the sequence of KGs from the latest m timestamps to a sequence of entity embedding matrices and a set of relationship embedding matrices. In particular, at the first timestamp, the input includes the entity embedding matrix H, the relationship embedding matrix R and the static entity embedding matrix H s Among them, H and R are the randomized entity and relationship embedding matrices, H s It is the entity embedding matrix obtained by corresponding calculation from the static knowledge graph.
[0061] One of the innovations of this method is to perform a series of modeling on the relationship embedding matrix before operating it to mine the structural features hidden in the time series knowledge graph. First, the relationship embedding matrix R' at timestamp t-1 is t-1 Remove outliers to help control the value range and ensure the rationality and stability of the data, thereby improving the performance and robustness of the model. The specific formula is as follows:
[0062] min_val=min(R' t-1 ) (7)
[0063] Among them, min_val takes the relationship embedding matrix R' t-1 Minimum value.
[0064] max_val=max(R' t-1 )(8) Where max_val takes the relation embedding matrix R' t-1 Maximum value.
[0065]
[0066] Among them, clamp(.) is a tensor restriction function, which restricts the tensor to only between the minimum and maximum values.
[0067] To better capture the hidden relationships between timestamps and relations, concatenate the relation embedding matrix with the time embedding matrix:
[0068]
[0069] Among them, [;] represents the vector connection operation, which updates the relation embedding matrix through fusion.
[0070] Then, the relation embedding matrix Use a multi-layer perception mechanism to learn the low-dimensional representation of the relationship. The specific formula is as follows:
[0071]
[0072] Among them, through the multi-layer perception mechanism, the relationship embedding matrix is obtained
[0073] In order to obtain a relational representation with stronger generalization ability, the randomized relational embedding matrix R is combined with the relational embedding matrix Connect it up:
[0074]
[0075] Among them, [;] represents the vector connection operation, g(.) means taking the upper triangular part of the matrix, and updating the relation embedding matrix through connection.
[0076] In order to capture the key information in the path, the TFCE model uses an attention network to weight different parts of the relationship path:
[0077]
[0078] The entity embedding matrix at timestamp t-1 is H' t-1 , in order to better capture the hidden relationship between timestamps and entities, the entity matrix is connected with the time embedding matrix, and then a multi-layer perception mechanism is used to learn a low-dimensional representation of the entity:
[0079]
[0080] Among them, [;] represents the vector concatenation operation, which updates the entity embedding matrix through fusion.
[0081]
[0082] Among them, through the multi-layer perception mechanism, the entity embedding matrix is obtained
[0083] In order to better capture the structural dependencies between entities and relations, the GRU component is used. The specific formula is as follows:
[0084]
[0085] Among them, through GRU, the relationship embedding matrix R is obtained t .
[0086] Next, we will R t and It is put into GCN as an input parameter, and then the association between entities is captured through facts, and the association between relations is captured through shared entities. The specific formula is as follows:
[0087]
[0088] Among them, l represents the layer index of KG at timestamp t, l[0,w-1], and w represents the total number of layers of the current KG. and Indicates the first th Aggregate features and self-loop parameters in the layer. th The structural dependencies between concurrent facts are captured in a fine-grained manner at the layer through translation aggregation and self-loop of entities, relationships, and time. o is the degree of entity o; f(.) is the Leaky ReLU activation function. The self-loop operation can be regarded as the self-evolution of the entity.
[0089] In order to capture the potential key information of the entity itself, the TFCE model uses an attention network to weight different parts of the entity:
[0090]
[0091] After capturing the potential key information of the entity, static attributes are added and the entity matrix is updated using GRU:
[0092] H t =GRU(H t-1 ,H s )(19)
[0093] After obtaining the feature matrices of entities, relations, and time, in order to perform entity prediction and relation prediction simultaneously, this embodiment designs two time embedding decoders, TimeConvTransE and TimeConvTransR. Specifically, the decoder performs four embeddings (entity embedding matrix H t , the relation embedding matrix R t, the concatenation of the temporal embedding matrices V1 and V2) is convolved and the resulting representation is scored. Formally, the convolution operator is computed as follows:
[0094]
[0095] Where c is the number of convolution kernels, K is the number of kernels, n∈{0,...,d}, w c are learnable kernel parameters. t etc. are matrices with hats representing their respective versions of padding. The convolution operation integrates entity, relation, and temporal feature information while maintaining the translational properties of the embedding. Therefore, each convolution kernel forms an output vector can be aligned to obtain the matrix
[0096]
[0097] After nonlinear one-dimensional convolution, the final output of TimeConvTransE is defined as follows:
[0098] φ(H t ,R t ,V1,V2)=Relu(vector(CONVF conv )W)H o,t (twenty one)
[0099] Among them, vector is a feature mapping operator, is a linear transformation matrix. TimeConvTransR calculates the score in the same way, except that R t Replace with
[0100] The work on KG reasoning involves a score function (i.e., decoder) to model the conditional probability vectors in equations (1) and (2), such that the quadruple (s, r, o, t) holds, and its conditional probability vector is:
[0101]
[0102] in, d is the dimension of the embedding.
[0103] In this embodiment, GCN is selected as the decoder. Both TimeConvTransE and TimeConvTransR contain a one-dimensional convolutional layer and a fully connected layer, which are represented by TimeConvTransE(.) and TimeConvTransR(.). Then, the conditional probability vector of all entities is:
[0104]
[0105] Similarly, the conditional probability vector of all relations is:
[0106]
[0107] Among them, θ(.) represents the sigmoid function, and They are head entity s, relation r, and tail entity o in H t and R t In the embedding, V1 and V2 represent the time embedding matrix, and
[0108] The loss function is calculated as:
[0109]
[0110] Where α represents the rate of increase of the angle, y∈[0,1,...,m]. We set the maximum angle between two embeddings of an entity to 180°. Then, the cosine of the angle between the two embeddings of entity i is denoted by
[0111] Therefore, the final loss is:
[0112] L(u1L e +u2L r +u3L st (29)
[0113] Among them, u1, u2 and u3 are parameters that control the loss term.
[0114] During the training process, the Adam optimizer is used to train the model. The reason is that in order to obtain a more accurate representation through learning as quickly as possible during the training process, it is necessary to select an optimizer that can converge quickly. The Adam optimizer takes the mean and variance of the gradient into consideration when updating, which not only converges quickly, but also requires less memory and is easy to adjust. Table 2 shows the training process of the TFCE model.
[0115] Table 2
[0116]
[0117] Experimental Results
[0118] The experimental results of the TFCE model and other benchmark models proposed by the learning method for temporal knowledge graph representation based on temporal features and complex evolution (hereinafter referred to as this method) are summarized in Tables 3 and 4. The best results are shown in bold and the second best results are underlined. Table 3 shows the results of different methods on the entity prediction task. According to the results, we can see that:
[0119] (1) Our methods outperform the corresponding basic static methods. For example, TA-DistMul outperforms DistMult in all metrics. This suggests that incorporating temporal information into the knowledge graph can lead to more accurate representations. However, it should be noted that not all time-aware methods outperform static methods. For example, TTransE fails to outperform RotatE, probably because adding temporal representation to the TransE scoring function destroys the transformation between entities. This illustrates the importance of modeling temporal information in a reasonable way.
[0120] (2) Our method significantly outperforms the baseline method and achieves state-of-the-art results on the MRR metric on all three datasets. Compared with other methods, our method improves the MRR evaluation on each dataset by 7.95%, 11.99%, and 10.44%, respectively, which indicates that the introduction of the temporal feature module, the development of the complex evolution module, and the use of the embedded temporal decoder to model the evolutionary characteristics of TKG can lead to more accurate representation learning.
[0121] (3) The TFCE model is significantly better than the static model because the TFCE model adds a time feature module, which adaptively weights the importance of different time steps in the time series, better captures the long-range dependencies and correlations in the time series, and thus fully mines the time series data.
[0122] (4) The TFCE model is significantly better than the time-aware model because the complex evolution module of the TFCE model not only uses a multi-layer perception mechanism to learn the low-dimensional representation of entities, so that the structural features hidden in TKG are mined, but also uses the attention network to weight different parts of the relationship path, thereby capturing the key information in the path. Therefore, it can more accurately predict the facts of future timestamps and then learn the representation of TKG.
[0123] (5) The TFCE model is significantly better than the most advanced time-aware model because the design of temporal features enables the model to better mine the relationship between entities, relations, and timestamps. At the same time, the use of static graphs and multi-layer attention networks in the complex evolution module is more conducive to the learning of entity evolution embedding, which makes the TFCE model perform better.
[0124] Table 4 shows the prediction results of this method and other existing methods on the relationship prediction task. The best results are shown in bold and the second best results are underlined. Since some methods cannot be directly applied to the relationship prediction task, such as RE-NET and CyGNet, typical methods are selected for comparison. According to the results, this method outperforms the baseline method. In terms of MRR, the results of the TFCE model are 6.49%, 7.48% and 4.74% higher than the state-of-the-art methods on each dataset, respectively, which proves the superiority of the model of this method in relationship prediction. The excellent performance of the TFCE model shows that the comprehensive use of the temporal feature module, the multi-layer perception mechanism in the complex evolution module, the attention network and the embedded time encoder can more accurately learn the temporal knowledge graph representation.
[0125] Table 3
[0126]
[0127]
[0128] Table 4
[0129]
[0130] Comparison of prediction time: In order to study the efficiency of the TFCE model, the entity prediction running time of the TFCE model is compared with the current classic and advanced CyGNet, RE-NET, RE-GCN and TiRGN under the same environment. Among them, RE-GCN is the fastest baseline algorithm and TiRGN is the most advanced baseline algorithm. The five models predict entities under given real historical conditions. Figure 2The results show that the TFCE model is 4.33 times, 29.10 times, and 7.55 times faster than TRGN on ICE14S, ICE05-15, and ICE18, respectively. This is because it takes a long time for TiRGN to extract historical repeated entities and relations from the global historical space, while the TFCE model uses KG sequences as the description for representation learning, and captures the characteristics of entities and relations more quickly and accurately. Therefore, the TFCE model is more efficient than the most advanced baseline model TIRGN; the efficiency of the TFCE model exceeds the current best RE-GCN model. This is because compared with the RE-GCN model, the TFCE model clears useless information in the matrix during the parallel modeling of KG, reducing the computational burden of the model; the TFCE model surpasses RE-NET because the TFCE model replaces the RE-NET method of processing single queries one by one for each timestamp with a complex evolutionary representation learning query method. This representation learning method can more accurately capture the structural dependencies between KGs; in the CyGNet algorithm, reasoning often involves path search operations, that is, starting from the starting entity, finding the target entity through the relationship path. This path search process may require traversing a large number of entities and relationships on a large-scale knowledge graph, increasing the time complexity of the calculation. The TFCE model effectively models the temporal dependencies between events by adding time features, and can capture the temporal relationships between different timestamps more accurately and quickly. In summary, the TFCE model has proven its superiority by comparing the running time of the four most classic and advanced models in the entity prediction task.
[0131] Ablation experiments: In order to eliminate the deviation between training and test results and better understand the effectiveness of different model components in capturing corresponding features, ablation studies were performed. As shown in Tables 5 and 6, the temporal feature module (tf) has the greatest impact on the performance, indicating that capturing long-distance dependencies and associations in time series is crucial for prediction. The complex evolution module (ce) has a certain impact on all datasets, indicating that learning low-dimensional representations of entities through multi-layer perception mechanisms can better mine the structural features hidden in TKG, and thus have a positive effect on the evolutionary representation of entities and relations. Among them, the attention network has a positive impact on the performance, indicating that the network can make the model more effective in processing time series data by weighting different parts of the relationship path, and thus more effectively capture the relationship between different KGs. The decoder (td) embedded in time also has a positive impact on the performance, indicating that the encoder embedded in time can better complete the reasoning of representation learning by processing incomplete time series data. Therefore, the above results further show that the mechanisms adopted by the algorithm of this method are all helpful for prediction.
[0132] Table 5
[0133]
[0134] Table 6
[0135]
[0136] In order to study the impact of the training ratio on the performance of the proposed TFCE framework, the present invention conducts experiments by changing the ratio of training data to the total available data set. This analysis can help the present invention understand the performance changes of the model under different training data amounts. Figure 3 The effect of training ratio on the 7 algorithms and the algorithm proposed in this method is shown in Table 3. TFCE outperforms all algorithms at different training ratios from 60% to 80%, which can help determine the optimal amount of training data required to achieve satisfactory results and guide resource allocation in practical scenarios.
[0137] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A learning method for temporal knowledge graph representation based on time features and complex evolution, characterized by: The steps include: Construct a TFCE model, which includes a time feature module, a complex evolution module and two time-embedded decoders, wherein the time feature module is used to perform time encoding on entities and relationships in the knowledge graph, capture the long-distance dependency of time features, and obtain a time embedding matrix; the complex evolution module introduces a perception mechanism and an attention network to respectively learn the evolutionary representations of entities and relationships in the knowledge graph at each timestamp, and update the entity embedding matrix and the relationship embedding matrix; the two time-embedded decoders use TimeConvTransE and TimeConvTransR to simultaneously perform entity prediction and relationship prediction, and output the results through a sigmoid function; both TimeConvTransE and TimeConvTransR contain a one-dimensional convolutional layer and a fully connected layer; The data set is input into the TFCE model for training, and the loss function is calculated to update the model parameters with the Adam optimizer. When the loss function continues to decrease until convergence, the optimal TFCE model is obtained; Use the optimal TFCE model to predict the corresponding entities or relationships in the time series knowledge graph. Specifically, the processing process of the time feature module includes the following steps: traversing the data set, putting all non-repeated timestamps in the data set into an embedding matrix, and obtaining two different initial time embedding matrices based on the embedding matrix through different learnable parameters; after the two different initial time embedding matrices are processed by the Transformer encoder, the GRU component is used to further extract long-distance dependencies to obtain two different time embedding matrices; The processing process of the complex evolution module specifically includes the following steps: Get the relation embedding matrix R' at timestamp t-1 in the temporal knowledge graph t-1 , embed the relationship into the matrix R' t-1 It is connected with two different time embedding matrices and uses a multi-layer perception mechanism to learn a low-dimensional representation of the relationship. The specific formula is as follows: Among them, [;] represents the vector connection operation, In order to obtain a relational representation with stronger generalization ability, the randomized relational embedding matrix R is combined with the relational embedding matrix Connect them and use the attention network to weight different parts of the relationship path and capture the key information in the path, as follows: Among them, g(.) means taking the upper triangular part of the matrix, Get the entity embedding matrix H' at timestamp t-1 in the temporal knowledge graph t-1 , concatenate the entity embedding matrix with two different temporal embedding matrices, and then use a multi-layer perception mechanism to learn a low-dimensional representation of the entity: In order to better capture the structural dependencies between entities and relations, the GRU component is used. The specific formula is as follows: R t and It is put into GCN as an input parameter, and then the association between entities is captured through facts, and the association between relations is captured through shared entities. The specific formula is as follows: Where l represents the layer index of the knowledge graph KG at timestamp t, l∈[0,w-1], w represents the total number of layers of the current KG, and Indicates the first th Aggregate features and self-loop parameters in the layer, lth th At the layer, the structural dependencies between concurrent facts are captured in a fine-grained manner through translation aggregation and self-loop of entities, relationships, and time. o is the degree of the tail entity o; s is the head entity, r is the relation; f(.) is the Leaky ReLU activation function, ε t Represents the fact set at time t in the temporal knowledge graph; Use an attention network to weight different parts of an entity: After capturing the potential key information of the entity, the static attributes of the knowledge graph are added, and the entity matrix is updated using GRU: H t =GRU(H t-1 ,H s ) (19)。 2. According to claim 1, the learning method for temporal knowledge graph representation based on time features and complex evolution is characterized in that: Before connecting the relation embedding matrix R′t-1 with two different time embedding matrices, the following steps are also included: The outlier removal operation is performed on the relation embedding matrix R′t1 at timestamp t-1.
3. According to claim 1, the learning method for temporal knowledge graph representation based on time features and complex evolution is characterized in that: The loss function is: L=u1L e +u2L r +u3L st (29) Among them, u1, u2 and u3 are the parameters of the control loss term, L st is the loss function of the static graph constraint component, |V|: the size of the entity set,
Citation Information
Patent Citations
Time sequence knowledge graph completion method and system based on time graph convolutional network
CN114780739A
Method for automatically searching time sequence knowledge graph completion model
CN115391553A
