Temporal knowledge graph embedding method of first-order vector and second-order multi-vector joint training
Patent Information
- Application Number
- CN202311383741.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2043-10-24
AI Technical Summary
[0007]为此,本发明所要解决的技术问题在于克服现有技术中时态知识图谱嵌入方法无法准确预测相似表达的关系所连接的不同实体的问题
[0038]本发明所述的一阶向量与二阶多向量联合训练的时态知识图谱嵌入方法,提供了一种新的评分函数,包括一阶向量嵌入评分函数与二阶多向量嵌入评分函数。在一阶向量嵌入评分函数与二阶多向量嵌入评分函数中,使用了表达能力更强的克利福德代数计算关系和时间的嵌入,从而提高关系对时间的敏感性。并且,所述一阶向量嵌入评分函数与二阶多向量嵌入评分函数联合使用作为总评分函数,进一步增强了关系对时间的敏感性,提高了时态知识图谱中实体预测结果的准确性。
Smart Images

Figure CN117391194B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph embedding technology, and in particular to a temporal knowledge graph embedding method and apparatus that uses joint training of first-order vectors and second-order multi-vectors. Background Technology
[0002] Against the backdrop of the rapid development of artificial intelligence, knowledge graphs are widely regarded as an important component of AI technologies and systems, and have been widely applied in many fields such as intelligent search, cybersecurity, financial risk control, and e-commerce. Traditional knowledge graphs express real-world concepts, entities, time, and the relationships between them using sets of (entity, relation, entity) or (entity, attribute, attribute value) triples.
[0003] Time is an important attribute of all entities in nature. Many knowledge graphs contain time-stamped knowledge. Therefore, the set of quadruples (head entity, relation, tail entity, time) formed by incorporating time information into triples is called a temporal knowledge graph.
[0004] The knowledge in temporal knowledge graphs is often incomplete. To maximize its value, it needs to continuously absorb new data to improve the knowledge system. In recent years, temporal knowledge graph completion methods have emerged and attracted significant attention from the academic community. These methods model and predict real-world new quadruples based on existing quadruple data in the temporal knowledge graph. After verification, these predicted quadruples can be added to the temporal knowledge graph as a result of its evolution. Temporal knowledge graph completion methods have shown great application potential in tasks such as constructing large-scale knowledge graphs, similarity calculation, relation extraction, and knowledge graph-based question answering.
[0005] Existing technologies generally solve the temporal knowledge graph completion task by designing temporal knowledge graph embedding models. For example, TeRo, ChronoR, and RotateQVS use timestamp-based rotation operations to learn time-sensitive entity and relation embeddings. Niu et al.'s LCGE introduces logical rules to help embed relationships that are related.
[0006] However, existing temporal knowledge graph embedding methods mainly focus on entity embedding, while relation embedding has not received sufficient attention. In temporal knowledge graphs, a relation can connect different entity pairs at different times. Since the same relation has similar expressions, this poses a challenge to accurately predicting the different entities connected by relations with similar expressions in temporal knowledge graphs. Summary of the Invention
[0007] Therefore, the technical problem to be solved by the present invention is to overcome the problem that the temporal knowledge graph embedding method in the prior art cannot accurately predict the different entities connected by similar expressions.
[0008] To address the aforementioned technical problems, this invention provides a temporal knowledge graph embedding method jointly trained by first-order vectors and second-order multi-vectors, comprising:
[0009] S1. Divide the dataset into a training set and a test set, and embed the quadruplets in the training set into a low-dimensional continuous vector space to form the initial embedding vector.
[0010] S2. Divide the training set into positive samples and negative samples, where negative samples are generated by replacing different entities with the original quadruples;
[0011] S3. Input the embedding vectors of positive and negative samples into the scoring function, and use the scoring function to output the scoring value of the entity and the relationship in the quadruple; the scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function, wherein the first-order vector embedding scoring function uses a first-order Clifford algebra to process the relationship and time in the quadruple, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relationship and time in the quadruple;
[0012] S4. Input the embedding vectors of positive and negative samples and their scoring functions into the loss function, calculate the total loss function value, and optimize the embedding vector of the quadruple based on the total loss function value.
[0013] S5. Return to S3 for iterative optimization until the total loss function value is reduced to the minimum, and obtain the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors. Use the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors to complete the temporal knowledge graph.
[0014] In one embodiment of the present invention, the expression for the first-order vector embedding scoring function is:
[0015]
[0016] In this context, Sc represents scalar components as real-valued vectors, d represents dimension, s represents the head entity, r represents the relation, t represents time, o represents the tail entity, and W is a first-order Clifford's algebra. This represents the first-order Clifford product operation.
[0017] In one embodiment of the present invention, the first-order Clifford algebra W r =r0+r1e+r2e+r 12 e, W t =t0+t1e+t2e+t12 e, where r0, r1, r2, r 12 Let t0, t1, t2, t be the fourth-order tensor decomposition of relation r. 12 Let be the fourth-order tensor decomposition of time t, and e be the basis vector.
[0018] In one embodiment of the present invention, the expression for the second-order multi-vector embedding scoring function is:
[0019]
[0020] In this context, Sc represents scalar components as real-valued vectors, d represents dimension, s represents the head entity, r represents the relation, t represents time, o represents the tail entity, and M is a second-order Clifford's algebra. This represents the second-order Clifford product operation.
[0021] In one embodiment of the present invention, the second-order Clifford algebra M r =r0+r1e1+r2e2+r 12 e1e2, M t =t0+t1e1+t2e2+t 12 e1e2, where r0, r1, r2, r 12 Let t0, t1, t2, t be the fourth-order tensor decomposition of relation r. 12 Let e1 and e2 be the fourth-order tensor decomposition of time t, with basis vectors e1e1 = e2e2 = 1 and e1e2 = -e2e1.
[0022] In one embodiment of the present invention, a complex Hermitian operator is used to perform a product operation on the head entity s and the tail entity o to achieve the embedding of the head entity s and the tail entity o.
[0023] In one embodiment of the present invention, the loss function includes a log-softmax loss function and N3 regularization, and the expression is:
[0024]
[0025] Where d represents dimension, s represents fact head entity, r represents relation, t represents time, o represents fact tail entity, ε represents entity set, s' represents prediction head entity, o' represents prediction tail entity, and λ ω represents the weight of N3 regularization, and w represents the first-order Clifford algebra.
[0026] In one embodiment of the present invention, the loss function further includes a temporal relation regularizer for distinguishing identical relationships between adjacent time intervals, expressed as:
[0027]
[0028] Where, n t Indicates the time step. p follows the N3 regularization setting, so p = 3.
[0029] In one embodiment of the present invention, the step of completing the temporal knowledge graph using a temporal knowledge graph embedding model jointly trained with first-order vectors and second-order multi-vectors includes:
[0030] Input the quadruple of the entity to be embedded into the temporal knowledge graph embedding model jointly trained by the first-order vector and the second-order multi-vector, initialize the embedding vector of the quadruple of the entity to be embedded, and input the scoring function.
[0031] The scoring function outputs the score value of the relation between each entity and the quadruple to be embedded in the entity; the scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function, wherein the first-order vector embedding scoring function uses a first-order Clifford algebra to process the relation and time in the quadruple, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relation and time in the quadruple.
[0032] Select the entity with the highest score to embed into the quadruple, and complete the temporal knowledge graph.
[0033] The present invention also provides a temporal knowledge graph embedding device for joint training of first-order vectors and second-order multi-vectors, comprising:
[0034] The initialization module is used to input the quadruples of the entities to be embedded into the temporal knowledge graph embedding model jointly trained by the first-order vector and the second-order multi-vector, initialize the embedding vector of the quadruples of the entities to be embedded, and input the scoring function.
[0035] The scoring module is used to output the score value of the relationship between each entity and the quadruple to be embedded using a scoring function. The scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function. The first-order vector embedding scoring function uses a first-order Clifford algebra to process the relationship and time in the quadruple, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relationship and time in the quadruple.
[0036] The embedding module is used to select the entity with the highest score to embed into the quadruple, thus completing the temporal knowledge graph.
[0037] The technical solution of the present invention has the following advantages compared with the prior art:
[0038] The temporal knowledge graph embedding method jointly trained by first-order vectors and second-order multi-vectors described in this invention provides a novel scoring function, including a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function. In both the first-order vector embedding scoring function and the second-order multi-vector embedding scoring function, the more expressive Clifford algebra is used to calculate the embedding of relations and time, thereby improving the sensitivity of relations to time. Furthermore, the combined use of the first-order vector embedding scoring function and the second-order multi-vector embedding scoring function as the overall scoring function further enhances the sensitivity of relations to time and improves the accuracy of entity prediction results in the temporal knowledge graph.
[0039] In the first-order vector embedding scoring function and the second-order multi-vector embedding scoring function, the complex Hermitian operator is used to calculate the embedding between entities, which can effectively handle the asymmetric relationships in the knowledge graph.
[0040] When training the model used in the temporal knowledge graph embedding method jointly trained by first-order vectors and second-order multi-vectors as described in this invention, an additional temporal relation regularizer is used in the loss function to distinguish the same relations between adjacent times. The optimized loss function shows better optimization effect on the test data, enabling the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors to more accurately distinguish the same relations between entities and the features of different times, and generate more accurate entity prediction results. Attached Figure Description
[0041] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein...
[0042] Figure 1 This is a flowchart of the temporal knowledge graph embedding model trained by jointly training first-order vectors and second-order multi-vectors in an embodiment of the present invention;
[0043] Figure 2 This is a framework diagram of the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors in an embodiment of the present invention. Detailed Implementation
[0044] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0045] Example 1
[0046] Knowledge graph completion tasks involve filling in missing entities in a knowledge graph. For example, a temporal knowledge graph consists of a quadruple (head entity, relation, tail entity, time). The completion task is to predict the missing entity in the quadruple: (head entity, relation, ?, time) or (?, relation, tail entity, time).
[0047] Unlike traditional knowledge graph completion problems, temporal knowledge graph completion places greater emphasis on the timeliness of facts. In temporal knowledge graphs, a relation can connect different entity pairs at different times.
[0048] Temporal knowledge graph embedding technology is a common method for solving temporal knowledge graph completion tasks. It embeds quadruples into a low-dimensional continuous vector space, generating initial embedding vectors, where entities, relations, and time are transformed into vectors corresponding to nodes. These embedding vectors are then input into a temporal knowledge graph embedding model, where a scoring function evaluates the reasonableness of the embedding vectors, thereby generating the optimal embedding for each quadruple and predicting the missing entities within the quadruples.
[0049] When training the temporal knowledge graph embedding model, the loss function value is calculated based on the scoring function, and the embedding vector is optimized in the iteration to minimize the loss function value, thus obtaining the trained temporal knowledge graph embedding model.
[0050] Reference Figure 1 As shown, this embodiment provides a temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors, including:
[0051] S1. Select four widely used benchmark datasets: ICEWS14, ICEWS05-15, YAGO11k, and Wikidata12k. Divide the datasets into training and test sets, and embed the entities and relations of the quadruples in the training set into a low-dimensional continuous vector space to form the initial embedding vectors.
[0052] S2. Divide the training set into positive samples and negative samples, where negative samples are generated by replacing different entities with the original quadruples.
[0053] S3. Reference Figure 2 As shown, the embedding vectors of positive and negative samples are input into the scoring function, and the scoring function is used to output the score value of the entity and the relationship in the quadruple.
[0054] The scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function. The first-order vector embedding scoring function is used to process the first-order Clifford algebra of relations and time in the quadruple, and its expression is:
[0055]
[0056] In this context, Sc represents scalar components as real-valued vectors, d represents dimension, s represents the head entity, r represents the relation, t represents time, o represents the tail entity, and W is a first-order Clifford's algebra. This represents the first-order Clifford product operation.
[0057] First-order Clifford algebra W r =r0+r1e+r2e+r 12 e, W t =t0+t1e+t2e+t 12 e, where r0, r1, r2, r 12 Let t0, t1, t2, t be the fourth-order tensor decomposition of relation r. 12 Let be the fourth-order tensor decomposition of time t, and e be the basis vector.
[0058] The first-order Clifford product operation is as follows:
[0059]
[0060] W r ×W t =r0t0+r1t1+r2t2-r 12 t 12 +(r0t1+r1t0-r2t 12 +r 12 t2)e
[0061] The second-order multi-vector embedding scoring function is used to process the second-order Clifford algebra of relations and time in quadruplets, and its expression is:
[0062]
[0063] Where M is a second-order Clifford algebra, This represents the second-order Clifford product operation.
[0064] Second-order Clifford's Algebra M r =r0+r1e1+r2e2+r 12 e1e2, M t =t0+t1e1+t2e2+t 12 e1e2, where r0, r1, r2, r 12 Let t0, t1, t2, t be the fourth-order tensor decomposition of relation r. 12 Let e1 and e2 be the fourth-order tensor decomposition of time t, with basis vectors e1e1 = e2e2 = 1 and e1e2 = -e2e1.
[0065] The second-order Clifford product operation is as follows:
[0066]
[0067] M r ×2M t =r0t0+r1t1+r2t2-r 12 t 12 +(r0t1+r1t0-r2t 12 +r 12 t2)e1+(r0t2+r1t 12 +r2t0-r 12 t1)e2+(r0t 12 +r1t2-r2t1+r 12 t0)e1e2
[0068] Furthermore, a complex Hermitian operator is used to perform a product operation on the head entity s and the tail entity o to achieve the embedding of the head entity s and the tail entity o.
[0069] The scoring function f = f1 + f2 takes the embedding vector of the quadruple of the entity to be embedded as input into the scoring function and obtains the score value of the relationship between each entity and the quadruple of the entity to be embedded.
[0070] S4. Input the embedding vectors of the positive and negative samples and their scoring functions into the loss function, and calculate the total loss function value.
[0071] The loss function includes the log-softmax loss function and N3 regularization, and its expression is:
[0072]
[0073] Where d represents dimension, s represents fact head entity, r represents relation, t represents time, o represents fact tail entity, ε represents entity set, s' represents prediction head entity, o' represents prediction tail entity, and λ ω Let W represent the weight of N3 regularization, and W represent the first-order Clifford algebra.
[0074] Furthermore, this embodiment of the invention also designs a time relationship regularizer to distinguish the same relationship between adjacent times, the expression of which is:
[0075]
[0076] Where, n t Indicates the time step. p follows the N3 regularization setting, so p = 3.
[0077] Therefore, the total loss function is:
[0078] L = L ω +λ rt L rt
[0079] Where λ rt This represents the coefficient of the time relation regularizer.
[0080] Optimize the embedding vector of quadruples based on the total loss function value.
[0081] S5. Return to S3 for iterative optimization until the total loss function value is reduced to the minimum, and obtain the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors. Use the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors to complete the temporal knowledge graph.
[0082] When testing the temporal knowledge graph embedding model jointly trained by the first-order vector and the second-order multi-vector, a quadruple (head entity, relation, ?, time) of the tail entity to be embedded is input. The model generates a candidate ranking of the predicted tail entity through the score value, and evaluates the candidate ranking through the evaluation indexes MRR and Hits@n, and finally obtains the experimental results.
[0083] MRR provides an indication of performance by calculating the average rank of all correct entities, with higher rank indicating better performance. It measures the relative ranking of correct entities. Hits@n measures the proportion of correct entities ranked in the top n positions, where n can be 1, 3, or 10.
[0084] The experimental results are shown in Tables 1 and 2.
[0085]
[0086] Table 1. Comparison of results between the prior art and the present invention on ICEWS14 and ICEWS05-15.
[0087]
[0088]
[0089] Table 2. Comparison of results between existing technologies and the present invention on YAGO11k and Wikidata12k.
[0090] Experimental results show that, compared with existing technologies on four datasets—ICEWS14, ICEWS05-15, YAGO11k, and Wikidata12k—the method of this invention outperforms existing temporal knowledge graph embedding methods in terms of overall prediction performance.
[0091] Example 2
[0092] In this embodiment, a temporal knowledge graph embedding method jointly trained with first-order vectors and second-order multi-vectors is provided. The method uses a temporal knowledge graph embedding model jointly trained with first-order vectors and second-order multi-vectors to complete the temporal knowledge graph. The steps include:
[0093] Input the quadruple of the entity to be embedded into the temporal knowledge graph embedding model jointly trained by the first-order vector and the second-order multi-vector, initialize the embedding vector of the quadruple of the entity to be embedded, and input the scoring function.
[0094] The scoring function outputs the score value of the relation between each entity and the quadruple to be embedded in the entity; the scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function, wherein the first-order vector embedding scoring function uses a first-order Clifford algebra to process the relation and time in the quadruple, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relation and time in the quadruple.
[0095] Select the entity with the highest score to embed into the quadruple, and complete the temporal knowledge graph.
[0096] The temporal knowledge graph embedding method jointly trained with first-order vectors and second-order multi-vectors provides a novel scoring function, including a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function. In both functions, the more expressive Clifford algebra is used to calculate the embedding of relations and time, respectively, thereby improving the temporal sensitivity of relations. Complex Hermitian operators are used to calculate the embedding between entities, which can handle asymmetric relations in knowledge graphs. The combined use of the first-order vector embedding scoring function and the second-order multi-vector embedding scoring function further enhances the temporal sensitivity of relations.
[0097] Example 3
[0098] This embodiment provides a temporal knowledge graph embedding device jointly trained by first-order vectors and second-order multi-vectors, including:
[0099] The initialization module is used to initialize the embedding vector of the quadruple of the entity to be embedded, and input the scoring function;
[0100] The scoring module is used to output the score value of each entity and the relation in the quadruple to be embedded using a scoring function. The scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function. The first-order vector embedding scoring function uses a first-order Clifford algebra to process the relation and time in the quadruple, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relation and time in the quadruple.
[0101] The embedding module is used to select the entity with the highest score to embed into the quadruple, thus completing the embedding of the temporal knowledge graph.
[0102] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0103] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded vector processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0104] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0105] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0106] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A temporal knowledge graph embedding method jointly trained by first-order vectors and second-order multi-vectors, characterized in that, include: S1. Divide the dataset into a training set and a test set, and embed the quadruplets in the training set into a low-dimensional continuous vector space to form the initial embedding vector. S2. Divide the training set into positive samples and negative samples, where negative samples are generated by replacing different entities with the original quadruples; S3. Input the embedding vectors of positive and negative samples into the scoring function, and use the scoring function to output the scoring value of the entity and the relationship in the quadruple; the scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function, wherein the first-order vector embedding scoring function uses a first-order Clifford algebra to process the relationship and time in the quadruple, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relationship and time in the quadruple; S4. Input the embedding vectors of positive and negative samples and their scoring functions into the loss function, calculate the total loss function value, and optimize the embedding vector of the quadruple based on the total loss function value. S5. Return to S3 for iterative optimization until the total loss function value is reduced to the minimum, and obtain the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors. Use the temporal knowledge graph embedding model jointly trained by first-order vectors and second-order multi-vectors to complete the temporal knowledge graph.
2. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 1, characterized in that, The expression for the first-order vector embedding scoring function is: In this context, Sc represents scalar components as real-valued vectors, d represents dimension, s represents the head entity, r represents the relation, t represents time, o represents the tail entity, and W is a first-order Clifford's algebra. This represents the first-order Clifford product operation.
3. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 2, characterized in that, First-order Clifford algebra W r =r0+r1e+r2e+r 12 e, W t =t0+t1e+t2e+t 12 e, where r0, r1, r2, r 12 Let t0, t1, t2, t be the fourth-order tensor decomposition of relation r. 12 Let be the fourth-order tensor decomposition of time t, and e be the basis vector.
4. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 1, characterized in that, The expression for the second-order multi-vector embedding scoring function is: In this context, Sc represents scalar components as real-valued vectors, d represents dimension, s represents the head entity, r represents the relation, t represents time, o represents the tail entity, and M is a second-order Clifford's algebra. This represents the second-order Clifford product operation.
5. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 4, characterized in that, Second-order Clifford's Algebra M r =r0+r1e1+r2e2+r 12 e1e2, M t =t0+t1e1+t2e2+t 12 e1e2, where r0, r1, r2, r 12 Let t0, t1, t2, t be the fourth-order tensor decomposition of relation r. 12 Let e1 and e2 be the fourth-order tensor decomposition of time t, with basis vectors e1e1 = e2e2 = 1 and e1e2 = -e2e1.
6. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 1, characterized in that, The embedding of head entity s and tail entity o is achieved by multiplying the head entity s and tail entity o using a complex Hermitian operator.
7. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 1, characterized in that, The loss function includes the log-softmax loss function and N3 regularization, and its expression is: Where d represents dimension, s represents fact head entity, r represents relation, t represents time, o represents fact tail entity, ε represents entity set, s′ represents prediction head entity, o′ represents prediction tail entity, and λ ω Let W represent the weight of N3 regularization, and W represent the first-order Clifford algebra.
8. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 7, characterized in that, The loss function also includes a temporal relation regularizer to distinguish identical relationships between adjacent time intervals, expressed as: Where, n t Indicates the time step. p follows the N3 regularization setting, so p = 3.
9. The temporal knowledge graph embedding method for joint training of first-order vectors and second-order multi-vectors according to claim 1, characterized in that, The steps for completing the temporal knowledge graph using the temporal knowledge graph embedding model jointly trained with first-order vectors and second-order multi-vectors include: Input the quadruple of the entity to be embedded into the temporal knowledge graph embedding model jointly trained by the first-order vector and the second-order multi-vector, initialize the embedding vector of the quadruple of the entity to be embedded, and input the scoring function. Use a scoring function to output a score value for the relationship between each entity and the quadruple of the entity to be embedded; The scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function. The first-order vector embedding scoring function uses a first-order Clifford algebra to process the relations and time in the quadruplets, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relations and time in the quadruplets. Select the entity with the highest score to embed into the quadruple, and complete the temporal knowledge graph.
10. A temporal knowledge graph embedding device for joint training of first-order vectors and second-order multi-vectors, characterized in that, include: The initialization module is used to input the quadruples of the entities to be embedded into the temporal knowledge graph embedding model jointly trained by the first-order vector and the second-order multi-vector, initialize the embedding vector of the quadruples of the entities to be embedded, and input the scoring function. The scoring module is used to output the score value of the relationship between each entity and the quadruple to be embedded using a scoring function. The scoring function includes a first-order vector embedding scoring function and a second-order multi-vector embedding scoring function. The first-order vector embedding scoring function uses a first-order Clifford algebra to process the relationship and time in the quadruple, and the second-order multi-vector embedding scoring function uses a second-order Clifford algebra to process the relationship and time in the quadruple. The embedding module is used to select the entity with the highest score to embed into the quadruple, thus completing the temporal knowledge graph.
Citation Information
Patent Citations
Joint knowledge embedded method based on cost sensitive learning
CN106649550A
Time sequence knowledge graph completion method, device and equipment based on convolutional neural network
CN114547347A