Temporal knowledge graph explainable extrapolation method and system, computer device and medium
By constructing a relation-driven Markov transition matrix and a bidirectional temporal walk strategy, combined with context-aware logical rules, the shortcomings of temporal knowledge graph extrapolation methods in terms of dynamic relation evolution and context awareness are solved, and efficient and interpretable prediction of future events is achieved.
Patent Information
- Application Number
- CN202610300595.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-12
- Publication Date
- 2026-06-05
AI Technical Summary
Existing methods for extrapolating temporal knowledge graphs have shortcomings in modeling dynamic evolution of relationships and context awareness, making it difficult to accurately capture temporal evolution patterns and lacking interpretability.
We construct a relation-driven Markov transition matrix and combine it with a bidirectional temporal walk strategy to mine context-aware logical rules, including precursor rules, bridging rules, and source rules. By guiding the walk path and mining logical rules through the Markov transition matrix, we can improve prediction accuracy and transparency.
It improves the accuracy of future event predictions and the interpretability of the reasoning process, meets the transparency requirements of high-reliability application scenarios such as dynamic decision-making and risk warning, reduces the cost of ineffective computation, and ensures the reliability of prediction results.
Smart Images

Figure CN122154958A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph reasoning technology, and in particular to an interpretable extrapolation method, system, computer device, and medium for time-series knowledge graphs. Background Technology
[0002] Temporal Knowledge Graphs (TKGs), as an important dynamic extension of traditional knowledge graphs, introduce a time dimension and represent dynamically changing knowledge in the form of quadruplets (subject entity, relation, object entity, timestamp). This effectively supports time-sensitive intelligent applications such as event evolution analysis and trend prediction. In Temporal Knowledge Graph Reasoning (TKGR) tasks, the core objective of extrapolation is to predict future events based on historically known facts. This task represents a key technological bottleneck in intelligent analysis within dynamic scenarios.
[0003] Currently, extrapolation methods for temporal knowledge graphs can be mainly divided into three technical approaches: The first approach is based on traditional embedding representations (such as TTransE, TA-DistMult, etc.), which model time information as an additional dimension. Although this approach is simple to implement, it is difficult to capture complex temporal evolution patterns. The second approach is based on neural networks (such as RE-NET, RE-GCN, etc.) and large language models (such as PPT, GenTKG, etc.), which significantly improve prediction performance, but their black-box nature leads to a lack of interpretability in the reasoning process. The third approach is based on logical rules (such as TLogic, TRKG-Miner, etc.), which improves interpretability through explicit rules, but has significant limitations in capturing evolutionary patterns and modeling context.
[0004] However, existing technologies suffer from the following main shortcomings: First, in modeling the dynamic evolution of relationships, existing rule-based methods rely on random walk strategies that only traverse relationships sequentially without establishing probability transition models, making it difficult to accurately capture temporal evolution patterns. Second, in terms of context awareness, existing methods either optimize rule pattern constraints while ignoring the location information of historical events, or fail to fully consider the impact of context on reasoning when incorporating relationship elements. These technical shortcomings hinder further breakthroughs in the prediction accuracy and interpretability of the reasoning process for temporal knowledge graph extrapolation tasks, thus necessitating innovative technical solutions. Summary of the Invention
[0005] The purpose of this invention is to provide an interpretable extrapolation method, system, computer device, and medium for time-series knowledge graphs. By constructing a relation-driven Markov transition matrix to guide bidirectional time-series walks and mining context-aware logical rules, it improves the accuracy of extrapolation predictions while providing a transparent and verifiable reasoning process.
[0006] To achieve the above objectives, this invention provides an interpretable extrapolation method for time-series knowledge graphs, comprising the following steps: Step S1: Based on the facts in the historical time-series knowledge graph, construct a relation-driven Markov transition matrix and calculate the transition probability; Step S2: Starting from the seed edge sampled for a specific relationship, guide the sampling path based on the Markov transition matrix and execute a bidirectional temporal walk strategy; Step S3: Based on the sampling path in step S2, mine context-aware logical rules, including pre-rules, bridging rules and source tracing rules; Step S4: Infer and predict future queries based on context-aware logical rules.
[0007] Preferably, in step S1, the formula for calculating the transition probability is as follows: ; in, express Time relationship To Relationship The transition probability, Indicates the first A timestamp, Represents the set of all relations. Indicates each from The relationships extracted from them Indicates counting.
[0008] Preferably, in step S2, the bidirectional time-series walk strategy includes: Forward sampling: Traversing historical facts in non-decreasing order of timestamps; Reverse sampling: Traversing historical facts in non-increasing order of timestamps; During the walk, the candidate relations are selected based on the transition probabilities in the Markov transition matrix, and only relation edges with transition probabilities greater than zero are retained.
[0009] Preferably, in step S3, for each step feasible edge set The choice of which rule satisfies the constraints corresponding to the context-aware logical rule is as follows: The generation process of the three context-aware logical rules is as follows: The rule form of the leading rule is: ; ; The rule form for bridging is as follows: ; ; The rule form for tracing the source is as follows: ; ; in, Indicates the current sampling step. Indicates the rule length. and These represent the head and tail entities of the current edge, respectively. Indicates the timestamp of the current edge. Indicates the rule header, This means taking numbers from 1 to 1. The rule body is formed by merging edges generated from the inverse relation of the sign relation. Represents a set of entities, where arrive Indicates the set from the 0th entity to the 1st entity. A collection of entities arrive Indicates the time from the 0th timestamp to the 1st timestamp. A timestamp, and , , , Both represent the index subscripts of the walk. Indicates the timestamp of the next hop. Represents the entire time-series knowledge graph. This represents a temporal knowledge graph that excludes the current timestamp as the hop. It indicates a specific relationship; All rules are enforced. And calculate their confidence scores. ,in, For rule confidence, and These represent rule support and rule body support, respectively, which are the number of walks that conform to the rule or the rule body.
[0010] Preferably, step S4 specifically includes: Step S41: Combine the rule set obtained in step S3. The system filters and retains valid rule sets whose rule confidence and rule body support are higher than preset thresholds. ; Step S42, based on future queries timestamps Extracting specific time windows from historical facts Subgraph within ,in, These represent the head entity, relation, and timestamp for future queries, respectively, while the question mark (?) represents the tail entity to be predicted. Step S43: Based on the relationship of future queries In the set of valid rules Find the relevant rule set Using relevant rule sets Each rule in the subgraph The process involves a walk to obtain candidate entities for future queries. For each candidate entity, a time-weighted score is calculated based on the confidence level of the rule and the minimum timestamp of the walk. Step S44: Aggregate scores for all candidates applicable to the same candidate entity based on the Noisy-OR function, and output the candidate entity with the highest score as the final prediction result.
[0011] Preferably, in step S4, the aggregation score is: ; The time-weighted scoring function is: ; in, This represents the aggregate score of the candidate entity. Represents the set of valid rules. This represents each rule in the set of valid rules. This represents the set of candidate entities corresponding to the valid rule set. This represents the candidate entities corresponding to the valid rule set. Representation rules Confidence level, This represents the time-weighted scoring function for candidate entities. Indicates the timestamp of the query event. This indicates the maximum timestamp contained in the sampling path. This indicates the proportion of the score based on the rules to the total score. This represents the weighting parameter.
[0012] This invention also provides an interpretable extrapolation system for time-series knowledge graphs, comprising: The transition matrix construction module is used to construct a relation-driven Markov transition matrix based on facts in a historical time-series knowledge graph and to calculate the transition probabilities. The bidirectional temporal walk module is used to start from the seed edge sampled for a specific relationship, guide the sampling path based on the Markov transition matrix, and execute the bidirectional temporal walk strategy. The rule mining module is used to mine context-aware logical rules based on the sampling path, including leading rules, bridging rules, and tracing rules. The predictive reasoning module is used to infer and predict future queries based on context-aware logical rules.
[0013] Preferably, the predictive inference module includes: The rule filtering unit is used to filter the logical rules and retain the valid rule set whose confidence and support are higher than a preset threshold. The subgraph extraction unit is used to extract subgraphs within a specific time window from historical facts based on the timestamp of future queries; The scoring calculation unit is used to calculate the time-weighted scoring function for each candidate entity based on the effective rule set and subgraph; The aggregation scoring and output unit is used to aggregate scores for all candidates applicable to the same candidate entity based on the Noisy-OR function, and outputs the candidate entity with the highest score as the final prediction result.
[0014] The present invention also provides a computer device including a memory and a processor, the memory being used to store instructions and the processor being used to execute the instructions to implement the above-described interpretable extrapolation method for time-series knowledge graphs.
[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described interpretable extrapolation method for time-series knowledge graphs.
[0016] Therefore, the present invention employs the above-described temporal knowledge graph-based extrapolation method, system, computer equipment, and medium, and the beneficial technical effects are as follows: (1) This invention constructs a relation-driven Markov transition matrix to quantify the temporal conditional transition probability between different relations, replacing the random walk strategy that only traverses in time order in the traditional method. This guides the radial semantic coherence of the relationship evolution direction of the walk, effectively solving the core defect of the existing technology that ignores the dynamic evolution of relations. At the same time, combined with the bidirectional temporal walk strategy, it explores the event evolution trend from the "past → future" direction and extracts historical precursor patterns from the "future → past" direction, comprehensively mining the related information in historical facts, providing richer and higher quality path data for subsequent rule mining, and improving the accuracy of future event prediction from the underlying technical logic.
[0017] (2) By mining context-aware logical rules: leading rules, bridging rules and tracing rules, and giving each type of rule a clear timestamp constraint, the final prediction result is no longer a "black box" output; so that each step of reasoning has a corresponding rule as support, and users can clearly understand how the system derives future conclusions from historical facts, which meets the strict requirements of process transparency for high reliability application scenarios such as dynamic decision-making and risk warning.
[0018] (3) The relation-driven Markov transition matrix can screen candidate relations with high semantic relevance, reduce redundant paths generated by traditional random walks, reduce ineffective computation costs, and improve rule mining efficiency. The initial rule set is filtered by confidence and support thresholds to ensure that the effective rules used for prediction have both semantic rationality and data support. Subsequently, candidate entities are scored based on effective rules and aggregated by Noisy-OR to further ensure the reliability of prediction results and achieve a dual balance between efficient mining and reliable prediction. Attached Figure Description
[0019] Figure 1 This is an overall flowchart of an interpretable extrapolation method for time-series knowledge graphs according to the present invention; Figure 2 The impact of the number of walks and sampling on the number of rules and overall prediction performance; Figure 3 The impact of historical event windows on overall forecasting performance. Detailed Implementation
[0020] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0021] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0022] Example 1 Static knowledge graphs represent facts using triples and are used to model semantic relationships between entities. Temporal knowledge graphs extend the temporal dimension on top of static knowledge graphs and consist of timestamped quadruples (subject entity, relation, object entity, timestamp) facts. They are used to capture the temporal attributes of events and can be decomposed into a series of static knowledge graph snapshots, each containing all facts at a specific time. Temporal knowledge graph reasoning infers missing information based on existing facts. The core tasks are inference and extrapolation. Inference completes the facts within the observation time window, while extrapolation predicts events at future times.
[0023] like Figure 1 As shown, an interpretable extrapolation method for time-series knowledge graphs includes the following steps: Step S1: Based on the facts in the historical time-series knowledge graph, construct a relation-driven Markov transition matrix to quantify the conditional transition probability of different relations at a specific time point.
[0024] The method for constructing the Markov transition matrix is as follows: calculate the transition probability based on the frequency of transitions according to historical facts.
[0025] ; in, express Time relationship To Relationship The transition probability, Indicates the first A timestamp, Represents the set of all relations. Indicates each from The relationships extracted from them Indicates counting.
[0026] Markov transition matrices guide walks to tend towards semantically coherent paths rather than simply chronological order.
[0027] Step S2: Starting from the seed edge in the future query to be predicted, guide the sampling path based on the Markov transition matrix, and execute a bidirectional temporal walk strategy to capture the predecessor and successor dependency patterns of events in the time dimension by sampling the path from historical facts.
[0028] A bidirectional temporal walk strategy is used to capture event dependencies: Forward sampling: Traversing historical facts in non-decreasing order of timestamps; Reverse sampling: Traversing historical facts in non-increasing order of timestamps; During the walk, the candidate relations are selected based on the transition probabilities in the Markov transition matrix, and only relation edges with transition probabilities greater than zero are retained.
[0029] Step S3: Based on the sampling path in step S2, mine context-aware logical rules, including pre-rules for capturing initial triggering events, bridging rules for establishing cross-entity semantic connections, and tracing rules for tracing upstream dependency patterns. Each type of rule contains constraints on its timestamp.
[0030] For each step feasible edge set The choice of which rule satisfies the constraints corresponding to the context-aware logical rule is as follows: The generation process of the three context-aware logical rules is as follows: The rule form of the leading rule is: ; ; The rule form for bridging is as follows: ; ; The rule form for tracing the source is as follows: ; ; in, Indicates the current sampling step. Indicates the length of the rule and These represent the head and tail entities of the current edge, respectively. Indicates the timestamp of the current edge. Indicates the rule header, This means taking numbers from 1 to 1. The rule body is formed by merging edges generated from the inverse relation of the sign relation. Represents a set of entities, where arrive Indicates the set from the 0th entity to the 1st entity. A collection of entities arrive Indicates the time from the 0th timestamp to the 1st timestamp. A timestamp, and , , , Both represent the index subscripts of the walk. Indicates the timestamp of the next hop. Represents the entire time-series knowledge graph. This represents a temporal knowledge graph that excludes the current timestamp as the hop. It indicates a specific relationship.
[0031] All rules are enforced. And calculate their confidence scores. ,in, For rule confidence, and These represent rule support and rule body support, respectively, which are the number of walks that conform to the rule or the rule body.
[0032] Step S4: Infer and predict future queries based on context-aware logical rules.
[0033] Step S41: Obtain the rule set from S3 Filter the rules and retain valid rule sets whose rule confidence and rule body support are higher than preset thresholds. ; Step S42, based on future queries timestamps Extracting specific time windows from historical facts Subgraph within ,in, These represent the head entity, relation, and timestamp for future queries, respectively, while the question mark (?) represents the tail entity to be predicted. Step S43: Based on the relationship of future queries In the set of valid rules Find the relevant rule set Using relevant rule sets Each rule in the subgraph The process involves a walk to obtain candidate entities for future queries. For each candidate entity, a time-weighted score is calculated based on the confidence level of the rule and the minimum timestamp of the walk. Step S44: Aggregate scores for all candidates applicable to the same candidate entity based on the Noisy-OR function, and output the candidate entity with the highest score as the final prediction result.
[0034] The aggregate score is: ; The time-weighted scoring function is: ; in, This represents the aggregate score of the candidate entity. Represents the set of valid rules. This represents each rule in the set of valid rules. This represents the set of candidate entities corresponding to the valid rule set. This represents the candidate entities corresponding to the valid rule set. Representation rules Confidence level, This represents the time-weighted scoring function for candidate entities. Indicates the timestamp of the query event. This indicates the maximum timestamp contained in the sampling path. This indicates the proportion of the score based on the rules to the total score. This represents the weighting parameter, used to reduce the impact of excessive time difference on the overall scoring function.
[0035] The invention will be further illustrated below with specific examples.
[0036] Experiments were conducted on six benchmark datasets: ICEWS14, ICEWS18, ICEWS0515, WIKI, YAGO, and GDELT (parameters of which are shown in Table 1). The extrapolation performance of our method comprehensively outperforms existing techniques (including neural network methods, logical rule methods, and LLM methods). Specifically, the MRR (Mean Reciprocal Ranking) is improved by up to 13.13% compared to the best baseline method, with improvements of 6.37% and 8.72% on the ICEWS14 and GDELT datasets, respectively. These results validate the ability of relation-driven Markov transition matrices to capture dynamic evolution and the advantages of context-aware rules in modeling complex dependencies, effectively addressing the shortcomings of traditional methods that neglect relational semantic transfer and contextual association.
[0037] Table 1. Basic Attributes of the Dataset
[0038] Compared to black-box neural network models (such as RE-NET and HGCT) and hybrid methods lacking transparent paths (such as ALRE-IR), this method provides explicit inference paths through pre-rule, bridging, and tracing rules. As shown in Table 2, in the prediction of queries on the ICEWS14 dataset, the rules form the basis of inference from three perspectives: initial event triggering, cross-entity semantic connection, and upstream dependency tracing. This provides verifiable logical support for the prediction results and meets the interpretability requirements of scenarios such as dynamic decision-making.
[0039] Table 2 Visualization of RCLR Rules
[0040] As shown in Table 3, our proposed method maintains stable performance across datasets at different time scales (15 minutes to 1 year) and across different domains (international relations, general knowledge, global events). On the GDELT dataset with a 15-minute time interval and the WIKI dataset with a 1-year time interval, the MRR reaches 47.62% and 86.85%, respectively, significantly outperforming existing rule-based methods (such as RSRule's 38.9% on GDELT). This is attributed to the bidirectional temporal walk strategy and the time-weighted sampling mechanism, which allows it to adapt to different data densities and temporal distribution characteristics without requiring adjustments to the core framework for specific scenarios.
[0041] By using a relation-driven transition matrix to filter high-probability relational paths, invalid walk sampling is reduced (by approximately 30% less redundant paths compared to TLogic's random walk). Meanwhile, a rule filtering mechanism based on confidence and support ensures that the mined rules are both semantically reasonable and data-supported.
[0042] Table 3 Performance Comparison of RCLR with Advanced Domestic and International Models
[0043] This study compares 12 state-of-the-art TKG extrapolation baseline methods, including neural network-based methods such as TA-DistMult, RE-NET, CyGNet, RE-GCN, and TiRGN; logic rule-based methods such as TLogic, TRKG Miner, TempValid, and RSRule; and LLMs-based methods such as ICL, CoH, and LLM-DR.
[0044] Performance is reported according to standard evaluation metrics: the percentage of correct results in the top 1, 3, and 10 (Hits@1, Hits@3, and Hits@10) and the mean regression ranking (MRR). All metrics are better the higher they are.
[0045] Table 4 Ablation study of RCLR components (ICEWS14)
[0046] Table 4 shows the ablation study of the ICEWS14 dataset to separate and quantify the contribution of each component to the overall model inference performance.
[0047] Ablation studies using ICEWS14 show that removing relation-driven Markov sampling reduces all metrics (MRR by 1.13%, H@1 by 1.38%, H@3 by 1.11%, and H@10 by 0.44%), confirming its effectiveness in capturing temporal relation transformations. In other words, probabilistic relation transformations outperform pure temporal random walks in modeling event evolution.
[0048] Context-aware logical rules, including precursor rules, bridging rules, and origin rules, play complementary roles in temporal reasoning: removing the precursor rule reduces the MRR by 3.29%. This indicates that the precursor rule captures the correlation between previous events and the current prediction, strengthening the logical consistency of temporal reasoning. Removing the bridging rule reduces the MRR by 1.58%, reflecting its role in ensuring the logical continuity of the context. Eliminating the origin rule results in the most significant performance degradation, with the MRR plummeting to 47.97% (a decrease of over 10%). This rule traces the origin and evolution of entity relationships, providing a semantic basis for reasoning and significantly improving the reliability of predictions. These three rules work together to form a stable and feasible reasoning framework.
[0049] like Figure 2 and Figure 3As shown, experimental analysis of the hyperparameters of the algorithm reveals the following: (1) Combining rules of length 1-3 achieves optimal performance, demonstrating the necessity of multi-scale temporal pattern capture; (2) The time window size indicates that the values of all these metrics increase with the increase of the time window size. This suggests that a larger time window allows the model to capture more historical information, which enhances its ability to make accurate predictions in the extrapolation task of temporal knowledge graphs.
[0050] Example 2 A temporal knowledge graph interpretable extrapolation system, comprising: The transition matrix construction module is used to construct relation-driven Markov transition matrices based on facts in historical time-series knowledge graphs. The bidirectional temporal walk module is used to guide the sampling path based on the Markov transition matrix, starting from the seed edge in the future query to be predicted, and to execute the bidirectional temporal walk strategy. The rule mining module is used to mine context-aware logical rules based on the sampling path, including leading rules, bridging rules and tracing rules, where each type of rule contains constraints on its timestamp. The predictive reasoning module is used to infer and predict future queries based on context-aware logical rules.
[0051] The predictive reasoning module includes: The rule filtering unit is used to filter the logical rules and retain the valid rule set whose confidence and support are higher than a preset threshold. The subgraph extraction unit is used to extract subgraphs within a specific time window from historical facts based on the timestamp of future queries; The scoring calculation unit is used to calculate the time-weighted scoring function for each candidate entity based on the effective rule set and subgraph; The aggregation scoring and output unit is used to aggregate scores for all candidates applicable to the same candidate entity based on the Noisy-OR model, and outputs the candidate entity with the highest score as the final prediction result.
[0052] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0053] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0054] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0055] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.
[0056] Therefore, this invention employs the aforementioned temporal knowledge graph interpretable extrapolation method, system, computer device, and medium. By constructing a relation-driven Markov transition matrix to guide bidirectional temporal walks and mining context-aware logical rules, it improves the accuracy of extrapolation prediction while providing a transparent and verifiable reasoning process.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. An interpretable extrapolation method for time-series knowledge graphs, characterized in that, Includes the following steps: Step S1: Based on the facts in the historical time-series knowledge graph, construct a relation-driven Markov transition matrix and calculate the transition probability; Step S2: Starting from the seed edge sampled for a specific relationship, guide the sampling path based on the Markov transition matrix and execute a bidirectional temporal walk strategy; Step S3: Based on the sampling path in step S2, mine context-aware logical rules, including pre-rules, bridging rules and source tracing rules; Step S4: Infer and predict future queries based on context-aware logical rules.
2. The interpretable extrapolation method for time-series knowledge graphs according to claim 1, characterized in that, In step S1, the formula for calculating the transition probability is as follows: ; in, express Time relationship To Relationship The transition probability, Indicates the first A timestamp, Represents the set of all relations. Indicates each from The relationships extracted from them Indicates counting.
3. The interpretable extrapolation method for time-series knowledge graphs according to claim 1, characterized in that, In step S2, the bidirectional time-series walk strategy includes: Forward sampling: Traversing historical facts in non-decreasing order of timestamps; Reverse sampling: Traversing historical facts in non-increasing order of timestamps; During the walk, the candidate relations are selected based on the transition probabilities in the Markov transition matrix, and only relation edges with transition probabilities greater than zero are retained.
4. The interpretable extrapolation method for time-series knowledge graphs according to claim 2, characterized in that, In step S3, for each step feasible edge set The choice of which rule satisfies the constraints corresponding to the context-aware logical rule is as follows: The generation process of the three context-aware logical rules is as follows: The rule form of the leading rule is: ; ; The rule form for bridging is as follows: ; ; The rule form for tracing the source is as follows: ; ; in, Indicates the current sampling step. Indicates the rule length. and These represent the head and tail entities of the current edge, respectively. Indicates the timestamp of the current edge. Indicates the rule header, This means taking numbers from 1 to 1. The rule body is formed by merging edges generated from the inverse relation of the sign relation. Represents a set of entities, where arrive Indicates the set from the 0th entity to the 1st entity. A collection of entities arrive Indicates the time from the 0th timestamp to the 1st timestamp. A timestamp, and , , , Both represent the index subscripts of the walk. Indicates the timestamp of the next hop. Represents the entire time-series knowledge graph. This represents a temporal knowledge graph that excludes the current timestamp as the hop. It indicates a specific relationship; All rules are enforced. And calculate their confidence scores. ,in, For rule confidence, and These represent rule support and rule body support, respectively, which are the number of walks that conform to the rule or the rule body.
5. The interpretable extrapolation method for time-series knowledge graphs according to claim 4, characterized in that, Step S4 specifically includes: Step S41: Combine the rule set obtained in step S3. The system filters and retains valid rule sets whose rule confidence and rule body support are higher than preset thresholds. ; Step S42, based on future queries timestamps Extracting specific time windows from historical facts Subgraph within ,in, These represent the head entity, relation, and timestamp for future queries, respectively, while the question mark (?) represents the tail entity to be predicted. Step S43: Based on the relationship of future queries In the set of valid rules Find the relevant rule set Using relevant rule sets Each rule in the subgraph The process involves a walk to obtain candidate entities for future queries. For each candidate entity, a time-weighted score is calculated based on the confidence level of the rule and the minimum timestamp of the walk. Step S44: Aggregate scores for all candidates applicable to the same candidate entity based on the Noisy-OR function, and output the candidate entity with the highest score as the final prediction result.
6. The interpretable extrapolation method for time-series knowledge graphs according to claim 5, characterized in that, In step S4, the aggregate score is: ; The time-weighted scoring function is: ; in, This represents the aggregate score of the candidate entity. Represents the set of valid rules. This represents each rule in the set of valid rules. This represents the set of candidate entities corresponding to the valid rule set. This represents the candidate entities corresponding to the valid rule set. Representation rules Confidence level, This represents the time-weighted scoring function for candidate entities. Indicates the timestamp of the query event. This indicates the maximum timestamp contained in the sampling path. This indicates the proportion of the score based on the rules to the total score. This represents the weighting parameter.
7. A temporal knowledge graph interpretable extrapolation system, characterized in that, include: The transition matrix construction module is used to construct a relation-driven Markov transition matrix based on facts in a historical time-series knowledge graph and to calculate the transition probabilities. The bidirectional temporal walk module is used to start from the seed edge sampled for a specific relationship, guide the sampling path based on the Markov transition matrix, and execute the bidirectional temporal walk strategy. The rule mining module is used to mine context-aware logical rules based on the sampling path, including leading rules, bridging rules, and tracing rules. The predictive reasoning module is used to infer and predict future queries based on context-aware logical rules.
8. The interpretable extrapolation system for time-series knowledge graphs according to claim 7, characterized in that, The predictive inference module includes: The rule filtering unit is used to filter the logical rules and retain the valid rule set whose confidence and support are higher than a preset threshold. The subgraph extraction unit is used to extract subgraphs within a specific time window from historical facts based on the timestamp of future queries; The scoring calculation unit is used to calculate the time-weighted scoring function for each candidate entity based on the effective rule set and subgraph; The aggregation scoring and output unit is used to aggregate scores for all candidates applicable to the same candidate entity based on the Noisy-OR function, and outputs the candidate entity with the highest score as the final prediction result.
9. A computer device, characterized in that, It includes a memory and a processor, the memory being used to store instructions and the processor being used to execute the instructions to implement the interpretable extrapolation method for time-series knowledge graphs as described in any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the interpretable extrapolation method for time-series knowledge graphs as described in any one of claims 1 to 6.