Time sequence knowledge graph link prediction method based on KANs
By using the KANs network to extract and predict the characteristics of entities and relationships in the temporal knowledge graph, the challenges of temporal knowledge graphs in processing data sparsity and complex time dependence in the time dimension are solved, and efficient and accurate link prediction is achieved.
Patent Information
- Application Number
- CN202411369576.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
The timing knowledge graph has challenges in dealing with data sparsity and complex time dependence in the time dimension, and existing methods are difficult to effectively combine multiple technologies to form a unified framework, limiting the generalization ability of the model.
This paper proposes a link prediction method for temporal knowledge graphs based on KANs, which extracts the features of entities and relationships through the graph encoding stage, and uses these features for link prediction in the graph decoding stage. This method combines convolutional neural networks and KANs networks to process time series data and capture the time series characteristics of entities and relationships.
This method can effectively process time dependence, improve prediction accuracy and reliability, suitable for complex dynamic scenarios, and reduce calculation costs and time consumption.
Smart Images

Figure CN119357403A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a time series knowledge graph link prediction method based on KANs. Background Art
[0002] With the advent of the big data era, knowledge graphs have gradually become an important tool in various information systems. By modeling entities and relationships in the form of graph structures, it can effectively represent and organize complex knowledge. However, traditional knowledge graphs often ignore time information, which leads to their limitations in dealing with tasks that are sequential or dynamically changing. For example, in the fields of finance, healthcare, supply chain management, etc., the states of entities and relationships often change significantly over time. If these changes in time cannot be captured and modeled, the application effect of knowledge graphs will be limited.
[0003] To solve this problem, the time series knowledge graph came into being. The time series knowledge graph introduces the time dimension to entities and relationships, and can capture the evolution of knowledge and the relationship patterns that change over time. This makes the time series knowledge graph have a wide range of application prospects in tasks that need to consider time dependencies, such as event prediction, financial risk assessment, personalized recommendations, etc.
[0004] Although the concept of temporal knowledge graphs has been proposed, it still faces many challenges in practical applications. First, temporal knowledge graphs need to effectively deal with the problem of data sparsity in the time dimension, because most entities and relationships in the real world do not interact at all time points. Secondly, how to capture and represent complex temporal dependencies in the model, especially dependencies over long time spans, is also a difficult problem. Although existing graph neural networks and embedding learning methods have made significant progress on static knowledge graphs, their performance is still limited when directly applied to temporal knowledge graphs. In addition, the training of temporal knowledge graphs usually requires a large amount of labeled data, but in actual scenarios, it is often very difficult to obtain enough high-quality temporal data, which further limits the generalization ability of the model.
[0005] Currently, the industry and academia have explored a variety of methods in the research of time series knowledge graphs, such as time series modeling based on graph neural networks, time series embedding learning, time-aware attention mechanisms, etc. However, how to effectively combine these technologies to form a unified framework to cope with complex tasks in different fields is still a problem that needs to be solved urgently.
[0006] In summary, with the increasing demand for time series data modeling, studying a time series knowledge graph algorithm that can effectively handle time dependency and has good generalization ability has become an important research direction in the current field of information technology. Summary of the invention
[0007] In view of this, the present invention provides a temporal knowledge graph link prediction method based on KANs, which aims to achieve efficient and accurate link prediction by processing knowledge graph data that changes over time, so as to cope with relationship changes and reasoning requirements in dynamic knowledge graphs.
[0008] The present invention provides a KANs-based temporal knowledge graph link prediction method, which includes a graph encoding stage and a graph decoding stage: the graph encoding stage is used to extract the features of entities and relationships in the temporal knowledge graph; the graph decoding stage is used to perform link classification prediction of entities according to the features of entities and relationships extracted in the graph encoding stage.
[0009] In one implementation, the graph encoding stage extracts features of entities and relationships in the temporal knowledge graph through a graph feature extraction algorithm.
[0010] In another implementation, the graph encoding stage extracts features of entities and relationships in the temporal knowledge graph through a graph feature extraction algorithm, including: inputting graph data of the temporal knowledge graph, generating an entity feature matrix, a relationship feature matrix and an adjacency matrix of the initial time window through a convolutional neural network; realizing the propagation and fusion of local information by combining the adjacency matrix and the entity feature matrix of the initial time window, and inputting the combined generated entity feature matrix into the KANs network for fine-tuning and optimization to obtain an updated entity feature matrix; updating the relationship feature matrix through the updated entity feature matrix and the adjacency matrix to obtain an updated relationship feature matrix; and performing temporal accumulation calculations on the updated entity feature matrix and the updated relationship feature matrix of each time window to obtain the final global temporal entity feature matrix and the global temporal relationship feature matrix.
[0011] In another implementation, the graph decoding stage predicts the linked entities of the knowledge graph in the next time window through a link prediction algorithm based on the global temporal entity feature matrix and the global temporal relationship feature matrix.
[0012] In another implementation, the graph decoding stage predicts the linked entities of the knowledge graph in the next time window through a link prediction algorithm based on the global temporal entity feature matrix and the global temporal relationship feature matrix, including: scoring the entities in triples through the global temporal relationship feature matrix, specifically including: obtaining the score of the triple by calculating the element-by-element product of the head entity feature vector and the relationship feature vector of the global temporal entity feature matrix, and then calculating the inner product with the tail entity feature vector of the global temporal entity feature matrix; scoring all tail entities and selecting the entity with the highest triple score as the prediction result.
[0013] In another implementation, the score of the triple is calculated by performing bilinear operations on the embedding vectors of entities and relations, and the calculation formula is:
[0014]
[0015] in, is the transpose of the embedding vector of the head entity, diiag(e r ) Embed the relation into vector e r Transformed into a diagonal matrix, e t Embedding vector for the tail entity.
[0016] In summary, the present invention is different from the traditional static knowledge graph algorithm. The temporal knowledge graph link prediction algorithm of the present invention can not only handle the dynamic nature of knowledge changes over time, but also capture the changing trends of entities and relationships at different time points. Through modeling in the temporal dimension, the algorithm can effectively capture the temporal characteristics of entities and relationships in the knowledge graph, thereby having higher accuracy and reliability when predicting future relationships. The present invention can better reflect the evolution of relationships between entities over time, rather than treating the entire graph as a static structure. This dynamic modeling method makes the algorithm more accurate in capturing short-term and long-term correlations.
[0017] By combining the time factor, the present invention enables the algorithm to better infer possible future relationship links based on past time series information, reducing the interference of errors and noise. In various time-dependent scenarios, the present invention can significantly improve the prediction effect, especially suitable for fields that rely on historical behavior data. The present invention uses the KANs network to perform smooth fine-tuning operations on features, thereby avoiding the accumulation of large-scale complex calculations, and can achieve convergence with a relatively small number of iterations, reducing computing costs and time consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of the flow structure of a time series knowledge graph link prediction method based on KANs according to an embodiment of the present invention;
[0019] Figure 2 It is a specific process framework diagram of the KANs-based temporal knowledge graph link prediction method of an embodiment of the present invention;
[0020] Figure 3 It is a structural schematic diagram of a graph feature extraction algorithm according to an embodiment of the present invention;
[0021] Figure 4 Schematic diagram of the structure of the link prediction algorithm of the embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.
[0024] Before explaining the KANs-based temporal knowledge graph link prediction method provided by the embodiment of the present invention, the application scenario and implementation environment of the embodiment of the present invention are first introduced.
[0025] With the rapid development of artificial intelligence and data mining technology, graph neural network methods have gradually become an effective means to solve problems in the field of graph knowledge mining. However, traditional static knowledge graph models are only suitable for static relationship prediction and cannot capture the changing patterns of entities and relationships in different time series, resulting in limited adaptability to dynamic systems in reality. When dealing with data scenarios involving time changes, static models cannot accurately predict future link relationships and cannot meet the needs of dynamically changing scenarios. Therefore, there is a growing demand in the industry for more accurate time series knowledge graph link prediction technology to solve these practical challenges.
[0026] In the existing knowledge graph model, there are still certain challenges in processing time series information. Especially in application scenarios with strong time series dynamics, how to simultaneously capture the characteristics of entities and relationships in the knowledge graph that change over time and make effective predictions is the focus of current technology breakthroughs. For example, in the risk monitoring of supply chain finance, the capital flow and transaction behavior of enterprises change significantly over time. The relationship between core enterprises and upstream and downstream suppliers and distributors will continue to change with the progress of transactions, and this change directly affects the financial institutions' assessment of corporate credit and risk. Financial institutions need to accurately monitor and predict these dynamic relationships in order to make more accurate risk assessment decisions. However, the static knowledge graph model cannot effectively capture this dynamic process and it is difficult to meet the needs of real-time and prediction accuracy.
[0027] Furthermore, the application scenarios of time series knowledge graphs require the ability to process massive amounts of historical data and real-time data, and to model data for different time periods. In the scenario of supply chain financial risk monitoring, the behavior data and transaction records of each participating enterprise can constitute the nodes and edges of the time series graph. These time series data often contain complex relationship networks, and the relationships evolve frequently over time. Therefore, graph structure modeling based on time series data can not only help financial institutions understand historical behaviors, but also provide a basis for predicting future risk changes.
[0028] At the same time, financial enterprises not only have different types of data information, but these data will change over time. Traditional static graph models are difficult to adapt to such dynamic changes. For example, when banks review corporate loan applications, they need to consider a variety of factors, such as the company's financial statements, historical transaction records, and the dynamic relationship between upstream and downstream supply chains. These data can be dynamically modeled through time-series knowledge graphs, constructing a graph structure that evolves over time, and using time-series features to predict future changes in relationships between companies, providing an effective basis for risk monitoring and early warning in supply chain finance.
[0029] In addition, in actual application environments, the construction and training of time series knowledge graphs face challenges such as discontinuous data and inconsistent time spans. Many companies only have data within a local time period, and the distribution and collection of data in the entire supply chain are difficult, which in turn affects the effective training of time series models. In this scenario, the time series knowledge graph algorithm not only needs to be able to process discontinuous time data, but also needs to have the ability to process heterogeneous graph data to ensure accurate relationship prediction under various time dimensions.
[0030] Therefore, the present invention provides a time-series knowledge graph link prediction method based on KANs, which is applicable to complex dynamic scenarios such as finance and medical care. The present invention captures the time evolution characteristics of entities and relationships by constructing a time-series graph neural network model, helping enterprises and financial institutions to better predict possible future directions.
[0031] See also Figure 1 The present invention provides a KANs-based temporal knowledge graph link prediction method, which includes a graph encoding stage and a graph decoding stage:
[0032] The graph encoding stage is used to extract the features of entities and relationships in the temporal knowledge graph;
[0033] The graph decoding stage is used to predict the link classification of entities based on the features of entities and relationships extracted in the graph encoding stage.
[0034] In one implementation, the graph encoding stage extracts features of entities and relationships in the temporal knowledge graph through a graph feature extraction algorithm.
[0035] In another implementation, the graph decoding stage predicts the linked entities of the knowledge graph in the next time window through a link prediction algorithm based on the global temporal entity feature matrix and the global temporal relationship feature matrix.
[0036] In this embodiment, the present invention is divided into a graph encoding stage and a graph decoding stage, wherein the graph encoding stage is mainly a graph feature extraction algorithm, which realizes the extraction of entity and relationship features of the time series knowledge graph, facilitating subsequent predictions. The graph decoding stage is mainly a link prediction algorithm for the knowledge graph, which uses the entity and relationship features of the graph encoding stage to realize the prediction of future link entities. The algorithm in this embodiment effectively realizes the accurate prediction of dynamic relationships, and has the advantages of strong data time series modeling capabilities, high adaptability, and high computing efficiency.
[0037] See also Figure 2 This is a specific process framework diagram of the KANs-based temporal knowledge graph link prediction method of an embodiment of the present invention. The graph feature extraction algorithm is used to extract features from known graph data to obtain a relationship feature matrix and an entity feature matrix, and then the connection prediction algorithm is used to realize the prediction of future entities.
[0038] In another implementation, the graph encoding stage extracts features of entities and relationships in the temporal knowledge graph through a graph feature extraction algorithm, including: inputting graph data of the temporal knowledge graph, generating an entity feature matrix, a relationship feature matrix and an adjacency matrix of the initial time window through a convolutional neural network; realizing the propagation and fusion of local information by combining the adjacency matrix and the entity feature matrix of the initial time window, and inputting the combined generated entity feature matrix into the KANs network for fine-tuning and optimization to obtain an updated entity feature matrix; updating the relationship feature matrix through the updated entity feature matrix and the adjacency matrix to obtain an updated relationship feature matrix; and performing temporal accumulation calculations on the updated entity feature matrix and the updated relationship feature matrix of each time window to obtain the final global temporal entity feature matrix and the global temporal relationship feature matrix.
[0039] It should be understood that the graph encoding stage is a graph feature extraction algorithm, through which the graph feature extraction and accumulation are realized to obtain the accumulation result of the time-series graph features, which is convenient for graph decoding to perform calculation prediction.
[0040] The graph feature extraction algorithm constructs a graph convolutional network and a KANs network with multiple pooling layers, performs convolution operations and feature fine-tuning operations on the input time series graph data, and obtains global features with time attributes of the knowledge graph for further prediction.
[0041] Specifically, the graph feature extraction algorithm includes three stages:
[0042] The first stage is to generate the entity feature matrix, relationship feature matrix and adjacency matrix of the initial time window for the convolutional neural network;
[0043] The second stage is the feature extraction operation, which realizes the propagation and fusion of local information by combining the adjacency matrix with the entity feature matrix. The entity feature matrix generated by the combination is then input into KANs for fine-tuning optimization operation calculation to obtain an updated entity feature matrix. The updated entity feature matrix and the adjacency matrix are used to update the relationship feature matrix to obtain an updated relationship feature matrix.
[0044] The third stage is the time series feature accumulation operation, which accumulates and calculates the graph features of each of the above time windows to obtain the final global time series entity feature and relationship feature matrix.
[0045] For example, see Figure 3 , this process is the graph feature extraction stage. An adjacency matrix is generated based on the graph data, where the adjacency matrix represents the connection relationship between nodes in the graph, the initial entity feature matrix contains the initial features of each node, and the initial relationship feature matrix represents the initial features of each edge. The adjacency matrix is normalized to ensure that each node can receive information from its neighboring nodes equally. Then, the node feature matrix generates updated node features by performing matrix multiplication with the normalized adjacency matrix and the learnable weight matrix. This process is equivalent to weighted averaging the features of each node with the features of its neighboring nodes, thereby realizing the extraction and fusion of local features. After this process, a new entity feature matrix is obtained. Because the relationships (edges) in the graph connect the nodes, the connection information is stored in the adjacency matrix, and the node information is stored in the entity feature matrix, so the new entity feature matrix and the adjacency matrix are used to update the relationship feature matrix. Then, the time series information of the entity and relationship feature matrices is accumulated according to the graph data of each time step to obtain the final entity feature matrix and relationship feature matrix.
[0046] In another implementation, the graph decoding stage predicts the linked entities of the knowledge graph in the next time window through a link prediction algorithm based on the global temporal entity feature matrix and the global temporal relationship feature matrix, including: scoring the entities in triples through the global temporal relationship feature matrix, specifically including: obtaining the score of the triple by calculating the element-by-element product of the head entity feature vector and the relationship feature vector of the global temporal entity feature matrix, and then calculating the inner product with the tail entity feature vector of the global temporal entity feature matrix; scoring all tail entities and selecting the entity with the highest triple score as the prediction result.
[0047] It should be understood that the graph decoding stage is a link prediction algorithm, which uses the graph feature extraction algorithm in the graph encoding stage to obtain the time series entity and relationship feature matrix to predict the link entity of the knowledge graph in the next time window;
[0048] The link prediction algorithm constructs a neural network model with a bilinear scoring mechanism, performs feature fusion and relationship scoring operations on the input knowledge graph data, and obtains the similarity score between each pair of entities to facilitate further link prediction.
[0049] Specifically, the link prediction algorithm includes two stages:
[0050] The first stage is the feature scoring operation, which uses the relationship feature matrix to score the entity triples. The specific operation is to calculate the element-by-element product of the head entity feature vector and the relationship feature vector, and then calculate the inner product with the tail entity feature vector to obtain the score of the triple. This scoring mechanism utilizes the interaction between entities and relationships to achieve effective relationship scoring.
[0051] The second stage is the prediction operation, which scores all possible tail entities and selects the entity with the highest score as the prediction result. This operation relies on the calculated entity feature matrix and relationship feature matrix, and adjusts the embedding to improve the prediction accuracy of the model by optimizing the objective function.
[0052] In another implementation, the score of the triple is calculated by performing bilinear operations on the embedding vectors of the entities and relations.
[0053] For example, see Figure 4 This process realizes the prediction of future entities. It uses the entity feature matrix and relationship feature matrix obtained in the previous stage, that is, the final global temporal entity feature and relationship feature matrix, to generate the vector representation corresponding to the head entity and relationship of each triple. The score of the triple is calculated by performing bilinear operations on the embedding vectors of entities and relationships. The calculation formula is:
[0054]
[0055] in, is the transpose of the embedding vector of the head entity, diag(e r ) Embed the relation into vector e r Transformed into a diagonal matrix, e t Embedding vector for the tail entity.
[0056] The above formula indicates that the score of the triple is obtained through bilinear operation between the head entity and the tail entity. In the calculation stage, given an incomplete triple (h, r, ?) or (?, r, t), the model scores all possible tail entities or head entities and selects the entity with the highest score as the prediction result.
[0057] In summary, the present invention is different from the traditional static knowledge graph algorithm. The temporal knowledge graph link prediction algorithm of the present invention can not only handle the dynamic nature of knowledge changes over time, but also capture the changing trends of entities and relationships at different time points. Through modeling in the temporal dimension, the algorithm can effectively capture the temporal characteristics of entities and relationships in the knowledge graph, thereby having higher accuracy and reliability when predicting future relationships. The present invention can better reflect the evolution of relationships between entities over time, rather than treating the entire graph as a static structure. This dynamic modeling method makes the algorithm more accurate in capturing short-term and long-term correlations.
[0058] By combining the time factor, the present invention enables the algorithm to better infer possible future relationship links based on past time series information, reducing the interference of errors and noise. In various time-dependent scenarios, the present invention can significantly improve the prediction effect, especially suitable for fields that rely on historical behavior data. The present invention uses the KANs network to perform smooth fine-tuning operations on features, thereby avoiding the accumulation of large-scale complex calculations, and can achieve convergence with a relatively small number of iterations, reducing computing costs and time consumption.
[0059] It should be noted that the present invention may be a method, a system, an apparatus and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0060] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0061] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0062] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, Python, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0063] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0064] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0065] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0066] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0067] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A time series knowledge graph link prediction method based on KANs, characterized in that: It includes graph encoding stage and graph decoding stage; The graph encoding stage is used to extract the features of entities and relationships in the temporal knowledge graph; The graph decoding stage is used to predict the link classification of entities based on the features of entities and relationships extracted in the graph encoding stage.
2. The method according to claim 1, characterized in that The graph encoding stage extracts the features of entities and relationships in the temporal knowledge graph through a graph feature extraction algorithm.
3. The method according to claim 2, characterized in that The graph encoding stage extracts the features of entities and relationships in the temporal knowledge graph through a graph feature extraction algorithm, including: Input the graph data of the time series knowledge graph, and generate the entity feature matrix, relationship feature matrix and adjacency matrix of the initial time window through the convolutional neural network; By combining the adjacency matrix of the initial time window with the entity feature matrix, the propagation and fusion of local information is realized, and the entity feature matrix generated by the combination is input into the KANs network for fine-tuning and optimization to obtain the updated entity feature matrix; The relationship feature matrix is updated by using the updated entity feature matrix and adjacency matrix to obtain an updated relationship feature matrix; By performing time series accumulation calculation on the updated entity feature matrix and the updated relationship feature matrix in each time window, the final global time series entity feature matrix and global time series relationship feature matrix are obtained.
4. The method according to claim 3, characterized in that: The graph decoding stage predicts the linked entities of the knowledge graph in the next time window through a link prediction algorithm based on the global temporal entity feature matrix and the global temporal relationship feature matrix.
5. The method according to claim 4, characterized in that The graph decoding stage predicts the linked entities of the knowledge graph of the next time window through a link prediction algorithm according to the global temporal entity feature matrix and the global temporal relationship feature matrix, including: The entity is scored as a triplet using the global temporal relationship feature matrix, specifically including: The score of the triple is obtained by calculating the element-by-element product of the head entity feature vector and the relationship feature vector of the global temporal entity feature matrix and then calculating the inner product of the head entity feature vector and the tail entity feature vector of the global temporal entity feature matrix; All tail entities are scored and the entity with the highest triplet score is selected as the prediction result.
6. The method according to claim 5, characterized in that The score of the triple is calculated by performing bilinear operations on the embedding vectors of entities and relations, and the calculation formula is: in, is the transpose of the embedding vector of the head entity, diag(e r ) Embed the relation into vector e r Transformed into a diagonal matrix, e t Embedding vector for the tail entity.
Citation Information
Cited By
Target action prediction method based on time sequence knowledge graph
CN120724294A
Space-time delivery risk modeling method
CN121599493A