Ontology type distance and counterfactual probe method and system for complementing a graph of common sense
By calculating type distances at gaps in the event graph and inserting ontology inference edges, combined with counterfactual probe verification, the problem of credible reasoning completion at gaps in the event graph in existing technologies is solved, achieving the completion of credibility gradients and robustness of conclusions, and preventing cumulative drift.
Patent Information
- Application Number
- CN202611251557.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies for reliable reasoning completion at gaps in the event graph suffer from several problems: hard blocking makes it impossible to distinguish between an uncovered graph and an illegal association; gaps are never completed; type constraint completion mixes up the completed edge and the original edge; there is no chain-level accumulation; there is no robustness verification of the conclusion; and counterfactual reasoning remains at the prediction layer and is not coupled with extrapolation completion.
By loading ontology space, the type distance between events at both ends of the empirical gap is calculated. When the type distance does not exceed the threshold, ontology inference edges are inserted, source categories are labeled and differential acceptance is performed. Counterfactual probes are used to verify the robustness of the conclusions. Type distance and frequency are accumulated along the inference path, and an extrapolation budget is established to prevent cumulative drift.
It achieves reliable reasoning completion at gaps in the logic graph, generates inference edges with source labels and confidence levels, ensures the robustness and reliability of the completion results, prevents cumulative drift, and improves the graph's self-completion capability and the reliability of the conclusions.
Smart Images

Figure CN123159478A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary fields of trusted artificial intelligence, fact graphs, and ontology engineering, specifically to a fact graph completion method and system based on ontology type distance and counterfactual probes. Background Technology
[0002] Large language model-driven intelligent agents rely on event graphs (event evolution graphs) as the basis for reasoning in scenarios such as intelligence analysis, risk assessment, and emergency decision-making. Event graphs use events as nodes and causal, temporal, and conditional relationships between events as edges. However, event graphs are inherently incomplete—historical corpora cannot cover all causal edges, and rare event combinations, emerging scenarios, and long-tail causal relationships often represent gaps in the graph. Existing technologies for completing reasoning gaps in the graph—characterized by credibility gradients, auditability, degradability, and without masquerading as fact—can be categorized into four types.
[0003] The first type of scheme uses a graph of events as a hard path constraint for agent reasoning: each step of the agent's reasoning calculates the set of legal actions for the current position, and the model can only choose the next step from legal outgoing edges. If the event association output by the model has no edge in the graph, it is judged as a deviation and blocked from pulling back to the previous legal node. This type of scheme confuses the lack of graph coverage with the illegality of the association itself, blocking both indiscriminately, causing the agent to frequently pull back at gaps and limiting the depth of reasoning; moreover, blocking is not equivalent to completion, the gap itself is never filled, and the more the graph is used, the more gaps are exposed without ever self-completing. Even if this type of scheme introduces semantic deviation as a fallback, the allowance does not generate any completion edges, does not label the source and confidence level, does not verify the robustness of the conclusion, and does not write back to the graph for reuse, still belonging to read-only constraints.
[0004] The second type of scheme uses type-constrained reasoning graphs to complete and predict missing associations: It introduces type constraints based on the embedding of the reasoning graph, checks whether the event type and relation type are compatible, and scores candidate edges using type hierarchy distance or type compatibility, filtering out missing edges to add to the graph. The limitations of this scheme are: first, the edges generated by the completion are not distinguishable in representation from the original empirical edges in the graph, leading to confusion and illusions in downstream acceptance; second, each candidate edge is scored independently, without accumulating type drift along the reasoning path, making it impossible to detect asymptotic illusions where each step is within the legal nearest neighbor but has accumulated cross-domain information; third, after edge completion, it does not check the robustness of the conclusion's dependence on the premises, and the completion result is directly output.
[0005] The third type of approach, represented by descriptive logic and ontology languages (such as OWL), performs logical deduction at the conceptual level of the ontology. It formalizes domain knowledge into an ontology composed of concepts, attributes, relationships, and axioms, and uses an ontology inference engine to determine the implication between concepts, classify instances, and check consistency. This type of approach deals with the logical relationships between concepts but does not address the causal and temporal evolution between specific event instances. It cannot directly constrain the agent's multi-step reasoning on chains of specific event instances, nor does it actively construct counterfactual scenarios to test the robustness of conclusions.
[0006] The fourth type of approach is represented by counterfactual reasoning graphs: counterfactual perturbations are made to events or relationships in the reasoning graph, and the changes in model predictions are observed to evaluate the robustness of graph embedding models or link prediction models. In this type of approach, both the object of perturbation and the evaluation target remain at the prediction layer rather than the conclusion layer—the perturbation affects events or relationships at the instance layer, and the evaluation focuses on the quality of model predictions. It does not verify how robust a particular reasoning conclusion of the agent is to its ontological premises, nor does it unify counterfactual perturbations and extrapolation completion within the same ontological type space.
[0007] In summary, existing technologies have the following drawbacks in reliable reasoning for completing gaps in the graph: hard blocking cannot distinguish between an uncovered graph and an illegal association, and the gap is never completed; type constraint completion mixes the completed edge with the original edge, lacks chain-level accumulation, and lacks robustness verification of the conclusion; ontology reasoning is detached from instance causal evolution and lacks counterfactual verification; counterfactual reasoning remains at the prediction layer and is not coupled with the same source as extrapolation completion. Summary of the Invention
[0008] The purpose of this invention is to provide a method and system for completing a factual graph using ontology type distance and counterfactual probes. The aim is to transform gaps in the factual graph from read-only blocking to writable completion, allowing the type distance between the events at both ends of the gap in the ontology space to define the completion boundary. If the type distance is within a threshold, ontology inference edges with source labels and confidence levels are generated and written back to the graph; if they cross ontology domains, hard blocking occurs. The invention also addresses how to use the same ontology space for both extrapolation boundary definition and counterfactual probe perturbation, ensuring that completion and verification share the same metric; how to perform conclusion-level robustness verification on conclusions dependent on ontology inference edges; how to make inference edges transparently labeled with source and drive differentiated acceptance rules; and how to use extrapolation budget closure to prevent cumulative drift along ontology neighbors.
[0009] According to one objective of the present invention, the present invention provides a method for completing the factual graph of ontology type distance and counterfactual probes, comprising the following steps: Step S1: Load the ontology space. The ontology space includes a set of event types, subtype relationships between event types, and information content for each event type. The information content is determined based on the instance proportion of each event type and its subtypes in the corpus. The ontology space describes the hierarchy and relationship templates of event types (type layer), while the event graph is the causal evolution of specific events at the instance layer. The ontology space is sparser but more stable than the event graph; therefore, bounded extrapolation can be performed using the type layer at instance gaps in the event graph.
[0010] Step S2: During the process of reasoning along the empirical edges of the event graph by the agent, when the event association output by the reasoning step has neither a direct empirical edge nor an indirect empirical path in the event graph, the reasoning step is marked as an empirical gap, and the event types of the events at both ends of the empirical gap are determined. Gap detection only determines whether there is an edge in the empirical layer of the graph, and does not determine whether the association is legal, thereby decoupling the empirical gap from the illegal association, allowing the gap to have the opportunity to enter the bounded completion process instead of being directly blocked; gap detection adopts a two-level check of direct empirical edges and indirect empirical paths. Associations with only indirect empirical paths are accepted as indirect empirical evidence and do not trigger bounded extrapolation of the ontology. Only associations with no empirical evidence are marked as empirical gaps, avoiding over-completion of associations with indirect empirical evidence.
[0011] Step S3: Calculate the type distance between the event types at both ends of the empirical gap in the ontology space. This type distance is determined based on the depth of the nearest common ancestor (LCA) of the event types at both ends within the type hierarchy, and the individual depths of the event types at both ends. The type distance is calculated using the ontology hierarchy structure instead of vector embedding cosine similarity. Its advantages are: first, it resists literal deception; events that are literally similar but ontologically unrelated may be similar in vector space, but belong to different branches in the ontology hierarchy, have shallow LCAs, and are far apart; second, it is interpretable, allowing auditors to directly see the bifurcation points between the two types; and third, it does not rely on training data, as the ontology hierarchy is a predefined, stable, and reproducible structure.
[0012] Step S4: When the type distance does not exceed the extrapolation threshold, an ontology inference edge is inserted at the empirical gap and written back to the event graph. The confidence of the ontology inference edge decreases as the type distance increases, and the source category is labeled for the ontology inference edge. When the type distance exceeds the extrapolation threshold, it is determined to be cross-ontology domain and cannot be extrapolated, thus blocking the event association. The three-state decision of bounded extrapolation (threshold-based downgraded extrapolation, cross-domain hard blocking, and direct acceptance of empirical edges) has an additional intermediate state of downgraded extrapolation compared to the two-state decision of hard blocking. It carries the ability to complete associations that are not covered by the graph but are legitimate ontologies, so that the completion neither loses information nor allows illusions.
[0013] Step S5: For conclusions supported by ontology inference edges whose source category is ontology derivation, extract the ontology necessary condition types upon which the conclusion depends from the ontology space. Replace the ontology necessary condition types with their nearest neighbor types in the ontology space to construct counterfactual scenarios. Calculate the survival rate of the conclusion under each counterfactual scenario. When the survival rate is lower than a robustness threshold, downgrade the conclusion's acceptance. This counterfactual probe perturbs the necessary conditions of the ontology type layer and determines the robustness of downstream conclusions. It differs from existing counterfactual graph reasoning in perturbing instance-level events and evaluating prediction quality in both the semantic units of the perturbation and the judgment objects, achieving a two-layer leap. The probe perturbation direction is homologous to the type distance metric of bounded extrapolation, sharing the same ontology type space, with consistent metric benchmarks and no drift. The probe perturbation is constrained by ontology legitimacy, only perturbing within the nearest neighbors of legitimate ontologies, and does not perform arbitrary perturbations without constraints.
[0014] Step S6: Accumulate the sum of the type distances of each ontology inference edge along the inference path and the number of ontology inference edges along the inference path. When the sum of the type distances exceeds the chain-level accumulation limit or the number of ontology inference edges exceeds the count limit, the inference result corresponding to the inference path is downgraded as a whole. The chain-level accumulation limit and the count limit constitute the extrapolation budget. The chain-level type distance accumulation captures asymptotic drift at the path level where each step is within the legal nearest neighbor but the accumulation has crossed domains; the count limit and the chain-level accumulation limit correspond to two types of out-of-control modes: over-extrapolation and over-extrapolation.
[0015] Furthermore, the type distance D ( t i , t j Calculate using the following formula: D ( t i , t j )=1-2·depth(LCA( t i , t j )) / [depth( t i )+depth( t j Equation (1) in, t i , t j These represent the event types to which the events at both ends of the empirical gap belong, and LCA ( t i , t j )for t i and t j In the type hierarchy, the least common ancestor, depth(·), is the depth of the event type in the type hierarchy, and the depth of the root event type is 0. In equation (1), the sum of the depths of the two types in the ontology hierarchy is the denominator, twice the depth of the least common ancestor is the numerator, and the proportion of the numerator to the denominator is the type similarity between the two. Subtracting it from 1 gives the type dissimilarity; when the two types are completely identical... D =0, when two types are direct subclasses of each other. D Maximum, close to 1.
[0016] Furthermore, the type distance is weighted by information content to obtain a weighted type distance: D ' ( t i , t j )= D ( t i , t j )·[1+IC(LCA( t i , t j Equation (2) IC( t )=-log P ( t Equation (3) Among them, IC ( t ) is the event type t The information content mentioned above, P ( t ) is the event type t The proportion of instances of the corpus and its subtypes. Information content weighting makes cross-type distances based on rare common ancestors larger, and extrapolation of associations of rare types must be done with more caution.
[0017] Furthermore, the confidence level of the ontology inference edge w infer Calculate using the following formula: w infer = w base ·[1- D ( t i , t j ) / iext Equation (4) in, w base Based on confidence level, i ext The extrapolation threshold is given. Equation (4) uses linear decay instead of step decay, so that the confidence level changes continuously with the strength of the type basis, and avoids the confidence level jump at the level boundary of step decay; the base confidence level is set to a value lower than the confidence level of the empirical edge, so that the confidence weight of the inferred edge does not exceed the empirical edge even when the type distance is 0, and the confidence level is reflected in the confidence level value to make up for the lower confidence level than the empirical edge.
[0018] Furthermore, the source categories include ontology derivation, historical statistics, and instance extraction. Edges derived from ontology are accepted only after passing the counterfactual scenario verification, and their acceptance weight is capped by the extrapolation budget. Edges derived from historical statistics are accepted based on historical co-occurrence statistical confidence. Edges derived from instance extraction are accepted based on empirical evidence, and the acceptance weight of edges derived from instance extraction is higher than that of ontology derivation edges derived from ontology. Source annotation drives the acceptance rules rather than merely recording static metadata, ensuring that completion does not masquerade as fact. Source annotation also drives probe target selection; only ontology derivation edges trigger counterfactual probes, while historical statistics and instance extraction edges already have empirical or statistical backing and do not require probes.
[0019] Further, the nearest neighbor type is an event type in the ontology space whose type distance to the ontology's necessary condition type does not exceed a nearest neighbor threshold, where the nearest neighbor threshold is less than the extrapolation threshold; the survival rate is calculated using the following formula: S = m / | N ( t pre )|;(5) in, t pre This is the necessary condition type for the ontology. N ( t pre ) is the set of the nearest neighbor types, | N ( t pre | represents the number of the nearest neighbor types. m The number of counterfactual scenarios that survive for the conclusion. When the survival rate is not lower than the robustness threshold, the conclusion is deemed robust and accepted normally; when the survival rate is lower than the robustness threshold, the conclusion is downgraded or blocked. The nearest neighbor threshold is less than the extrapolation threshold to ensure that the probe perturbs the premise that it is still a neighbor of the same type, rather than a cross-domain premise.
[0020] Furthermore, the step of downgrading the overall inference results corresponding to the inference path includes: labeling the inference results as having a high extrapolation ratio and accepting them with caution, and outputting the extrapolation budget ratio, wherein the extrapolation budget ratio is calculated using the following formula: B =max( N infer / N max , ΣD / ΣD max (6) in, N infer Infer the number of edges on the ontology along the inference path. N max The maximum number of times is mentioned. ΣD The sum of the type distances of the inferred edges of each ontology along the inference path. ΣD max The chain-level cumulative upper limit is defined. When the number of inference edges exceeds the upper limit, a suggestion is made to add empirical edges to the inference path; when the sum of the type distances exceeds the chain-level cumulative upper limit, it is determined that the inference path has experienced cross-domain drift and the inference direction is replanned. This differentiated handling ensures that the budget closure not only provides a downgrade signal but also the reason for the downgrade, guiding the subsequent correction direction; the extrapolated budget ratio serves as an overall credibility signal, allowing the auditor to judge the degree of dependence of the inference result on the extrapolation based on a single value.
[0021] Furthermore, the ontology space is maintained using a version snapshot mechanism, with each inference bound to an immutable ontology version number. During the inference process, the subtype relationships and the information content remain unchanged. The version evolution of the ontology space occurs between inference tasks, making the extrapolation judgment reproducible. Auditors can review the extrapolation process based on the ontology version number. The mapping from event instances to event types is completed by a type classifier rather than manual annotation, making the ontology coverage far exceed what is manually achievable, supporting long-tail inference.
[0022] This invention also provides a system for inferring and completing gaps in a logic graph, comprising: The ontology space layer is used to load the ontology space, which includes a set of event types, subtype relationships between event types, and information content of each event type. The information content is determined based on the proportion of instances of the event type and its subtypes in the corpus. A gap detector is used to mark the reasoning step as an empirical gap when the event associated with the reasoning step has neither a direct empirical edge nor an indirect empirical path in the empirical graph during the reasoning process of an agent along the empirical edge of the empirical graph, and to determine the event type to which the events at both ends of the empirical gap belong. A type distance metric is used to calculate the type distance between the event types to which the events at both ends of the empirical gap belong in the ontology space. The type distance is determined based on the depth of the nearest common ancestor of the event types to which the events at both ends belong in the type hierarchy and the depth of the event types to which the events at both ends belong. A bounded extrapolator is used to insert an ontology inference edge at the empirical gap and write the ontology inference edge back to the event graph when the type distance does not exceed the extrapolation threshold. The confidence of the ontology inference edge decreases as the type distance increases. When the type distance exceeds the extrapolation threshold, the event association is blocked. An edge labeling and data acquisition tool is used to infer the source category of the edge labels for the ontology and perform differentiated data acquisition according to the source category; A counterfactual probe verifier is used to extract the ontology necessary condition types on which the conclusion depends for being valid from the ontology space, replace the ontology necessary condition types with the nearest neighbor types of the ontology necessary condition types in the ontology space to construct counterfactual scenarios, and count the survival rate of the conclusion under each counterfactual scenario. When the survival rate is lower than a robustness threshold, the conclusion is downgraded and accepted. The extrapolation budget controller is used to accumulate the sum of the type distances of each ontology inference edge along the inference path and the number of ontology inference edges along the inference path. When the sum of the type distances exceeds the chain-level accumulation limit or the number of ontology inference edges exceeds the count limit, the inference result corresponding to the inference path is downgraded as a whole.
[0023] 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 steps of the above-described ontology type distance and counterfactual probe fact graph completion method.
[0024] The present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described ontology type distance and counterfactual probe fact graph completion method.
[0025] The technical solution of this invention defines the completion boundary of empirical gaps by limiting the type distance in the ontology space, upgrading the factual graph from read-only blocking to writable completion. When the distance does not exceed the threshold, inference edges with source annotations and confidence decaying with distance are generated and written back to the graph for reuse. Cross-domain issues are hard blocked, and a confidence gradient is established between full blocking and full trust, enabling the graph to be self-completed in a controlled manner. Counterfactual probes and bounded extrapolations share the same ontology type space, and completion and verification are coupled from the same source and do not drift. The probes perturb the necessary conditions of the type layer and verify the robustness of the conclusion layer, intercepting extrapolations that rely too much on accidental premises. The two-dimensional budget accumulation of chain-level distance and number can capture the asymptotic drift of omissions in unilateral checks. Exceeding the budget results in overall degradation, preventing the accumulation of untrustworthiness. Attached Figure Description
[0026] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram of the structure of the principle graph gap inference and completion system provided in an embodiment of the present invention; Figure 2 A flowchart of the ontology type distance and counterfactual probe map completion method provided in this embodiment of the invention; Figure 3 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0028] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Example 1 like Figure 1 and Figure 2As shown, this embodiment presents a method and system for completing a factual graph using ontology type distance and counterfactual probes. This embodiment addresses the scenario of credible reasoning completion at gaps in the factual graph. The production object is a credible reasoning completion result constrained by type distance in the ontology space. Each completion result includes at least the following fields: reasoning path (a sequence of event nodes, where an ontology inference edge is inserted at the gap), gap location (the reasoning step in which the inference edge is located), inference edge source label (ontology derivation / historical statistics / instance extraction), type distance (the type distance value between the events at both ends of the inference edge), probe robustness determination (whether the conclusion survives under counterfactual perturbation), and extrapolation budget ratio (the ratio of cumulative type distance to the number of extrapolations relative to the budget). The ontology inference edge must satisfy a bounded extrapolation constraint: the type distance between the events at both ends of the gap in the ontology space does not exceed the extrapolation threshold; if the threshold is exceeded, extrapolation is not allowed and the process is hard blocked.
[0030] The system's overall architecture comprises seven parts: ontology space layer, gap detector, type distance metric, bounded extrapolator, inferred edge labeling and acceptance unit, counterfactual probe verifier, and extrapolation budget controller. The overall system architecture is as follows: Figure 1 As shown.
[0031] There are two key trade-offs in the architectural design. First, the rational graph is upgraded from a read-only constraint to a writable completion mechanism—this is the fundamental paradigm difference between this invention and path-constraint-based solutions. Path-constraint-based solutions treat the graph as a read-only constraint: gaps are blocked and bypassed, and the graph itself is never written into the completion mechanism, resulting in an increasing number of gaps. This invention upgrades the graph to writable: gaps are determined by distance from the ontology space type, generating inferred edges that are written back into the graph. The completed edges are labeled with source and confidence, verified by counterfactual probes, and constrained by extrapolation budgets, enabling the graph to self-complete and self-evolve in a controlled manner during the inference process. This paradigm shift from "read-only" to "writable" is the primary innovation of this invention, transforming gaps from "obstacles to be bypassed" into "assets to be completed."
[0032] Secondly, the symmetrical structure of the completion boundary and verification probe in the ontology space is coupled from the same source. The same ontology type space simultaneously plays the dual role of "completion boundary constraint" and "counterfact probe perturbation direction": the type distance metric is used to determine whether the gap can be filled (ontology inference edge is generated only if the distance is ≤ threshold), and it is also used to drive the perturbation direction of the counterfact probe (replacing the ontology necessary condition type of the conclusion with the nearest neighbor type in the type space and seeing if the conclusion collapses). This symmetrical coupling allows completion (edge generation) and verification (conclusion verification) to share the same metric benchmark and not drift from each other. It also ensures that the credibility verification of this invention falls on the conclusion layer (whether the conclusion is stable to the premise) rather than the process layer of path constraint schemes (whether the reasoning follows the graph edge) - the two verification layers are different and complementary rather than overlapping.
[0033] Module Function Description 1. Body Space Layer Responsible for loading and maintaining the ontology space ,in, A collection of event types This is a subtype relationship (type hierarchy). Information content (amount of information) of a certain type. , For type The proportion of instances of rare types and their subtypes in the corpus (rare types have a large amount of information, common types have a small amount of information).
[0034] The ontology space also contains templates for inter-type relationships (which types are allowed to have which relationships, such as "economic event—causal—political event" being a valid template) and a set of necessary conditions for each type (the prerequisite types that must be satisfied for a certain type to exist). Here, the ontology space describes the hierarchy of event types and relationship templates (type layer), not specific event instances (instance layer)—the event graph is the causal evolution of specific events at the instance layer, while the ontology space is the type relationship structure at the type layer. The two are at different levels and are complementary rather than substitutive. The ontology space is sparser but more stable than the event graph (fewer types, more stable relationship templates), therefore, bounded extrapolation can be performed using the type layer at the instance gaps in the event graph. The type hierarchy and information content of the ontology space are the common basis for type distance measurement, extrapolation threshold determination, probe perturbation direction, and budget accumulation—this is the measurement benchmark for the "homogeneous coupling" of this invention.
[0035] There are two design trade-offs in the construction and maintenance of the ontology space. First, the mapping from event instances to event types is done by a type classifier rather than manual annotation—manual annotation can only cover a limited number of events and cannot support long-tail inference; the type classifier can summarize the event types belonging to each node in a massive event graph, making the ontology coverage far exceed what is achievable manually. Second, the ontology space allows incremental evolution but does not allow rewriting during inference—if the ontology type hierarchy is added or deleted during inference, the type distance of the same gap will become unreproducible due to changes in the ontology version, undermining the determinism of extrapolation decisions; therefore, the ontology space adopts a version snapshot mechanism, binding an immutable ontology version number to each inference, and the type hierarchy and information content read during inference remain fixed, with version evolution only occurring between inference tasks. Version snapshots make extrapolation decisions reproducible—the same gap produces the same type distance and the same extrapolation decision under the same ontology version, and the auditor can review the extrapolation process based on the ontology version number.
[0036] 2-Gap Detector Responsible for detecting empirical edge gaps in the agent's reasoning path. When the reasoning path travels along the event graph, if a certain event is associated... Empirical Boundary Sets of the Principle Graph If there is no corresponding edge (neither a direct empirical edge nor an indirect empirical path), then this step is marked as a gap. Gap detection here distinguishes between "empirical gaps" and "illegal gaps"—a gap only indicates that the empirical layer of the graph has no edge, not that the association is necessarily illegal (it could be a legal association of the ontology not covered by the graph). Whether it can be completed is determined by the type distance metric and the bounded extrapolator. Gap detection is the entry point for the completion process. Existing hard-blocking schemes directly block at the gap, while this method enters the type distance metric and bounded extrapolation at the gap, giving the gap a chance to be completed in a bounded manner. Gap detection employs a two-level check (direct empirical edges and indirect empirical paths) instead of a single-level direct check. The design motivation is to distinguish between "completely without empirical evidence" and "with indirect empirical evidence"—associations with only indirect empirical paths are not complete gaps (they have indirect evidence) and can be accepted as indirect empirical evidence without triggering bounded extrapolation of the ontology; only those completely without empirical evidence (neither direct nor indirect evidence) are marked as gaps and enter the ontology completion process, thereby strictly limiting ontology completion to gaps that truly lack empirical evidence and avoiding over-completion of associations with indirect empirical evidence.
[0037] 3 types of distance metrics Responsible for calculating the type distance between the events at both ends of the gap in the ontology space. .event The type is Type distance is defined as: Equation (1) in, for The nearest common ancestor in the ontology type hierarchy. The depth of the type in the ontology hierarchy (the root type has a depth of 0). Similar events Nearest neighbor type Small, cross-ontology types Approaching 1. Here, type distance is calculated using the ontology hierarchy (depth of the nearest common ancestor) instead of vector embedding cosine similarity. The design motivation is to resist semantic deception—vector similarity can be deceived by events that are "literally similar but ontologically unrelated" (e.g., the vectors of "economic sanctions" and "psychological sanctions" may be similar but their ontology domains are different). Ontology hierarchy distance, however, is structural: the shallower the nearest common ancestor of two types (the closer to the root), the earlier they branch in the ontology tree, belonging to different branches, resulting in a larger distance, unaffected by literal similarity. Type distance is the core metric for homologous coupling in this invention—it is used for threshold determination in bounded extrapolation, for nearest neighbor selection in counterfactual probes (perturbing to neighbors with small type distances), and for chain-level accumulation in extrapolation budgets; all three share the same metric benchmark.
[0038] 4 Bounded extrapolators It is responsible for determining whether to insert an inference edge at the gap and the confidence level of the inference edge based on the type distance. If the event type distance at both ends of the gap... (Extrapolation threshold), then insert ontology inference edges. Its confidence level decreases with type distance. (The smaller the distance, the higher the confidence level; the closer to the threshold, the lower the confidence level); if (Cross-ontology domains) extrapolation is not possible, resulting in hard blocking. Here, bounded extrapolation uses type distance as the boundary constraint instead of semantic similarity or infinite extrapolation. The design motivation is to establish a confidence gradient and limit the extrapolation boundary—semantic similarity can be manipulated and is unbounded (how high is enough similarity? There's no clear threshold), while type distance has a clear structural threshold (blocking occurs across domains); hard blocking schemes only have a blocking state at the gap, while this method inserts downgraded inference edges (confidence gradient) within the threshold, and only blocks outside the threshold, thus establishing an intermediate confidence level between "full blocking" and "full trust." The confidence of the inference edge decays with distance, allowing the auditor to judge the confidence level of the inference edge based on distance—inference edges with smaller distances have higher confidence, while those close to the threshold have lower confidence. Compared to the two states of hard blocking (blocking and passing), the three-state decision of bounded extrapolation (threshold-based downgrade extrapolation, cross-domain hard blocking, and direct acceptance of empirical edges) has an additional intermediate state of "downgrade extrapolation". It is this intermediate state that carries the association completion capability of "the graph is not covered but the ontology is legitimate", so that the completion does not lose information or allow illusions, and takes into account both recall and credibility, achieving the best of both worlds.
[0039] 5. Inference Edge Labeling and Acquisition Device This function is responsible for labeling the source categories of ontology inference edges and driving differentiated acceptance rules. Inference edge sources are divided into three categories: ontology derivation (gap points are generated by extrapolating type distance), historical statistics (existing empirical edges in the event graph, with confidence levels determined by historical co-occurrence statistics), and instance extraction (explicit instance edges extracted from authoritative sources). Acceptance rules switch according to the source category: ontology derivation edges must pass counterfactual probe verification before acceptance, and the upper limit of acceptance weight is constrained by the extrapolation budget; historical statistics edges are accepted based on statistical confidence; instance extraction edges are empirically accepted (with the highest acceptance weight). Here, source labeling drives acceptance rules rather than merely recording static metadata. The design motivation is to prevent completion from masquerading as fact—existing event graph completion mixes completed edges with original edges (treating them all as empirical facts). This method uses source category to distinguish acceptance levels (ontology derivation edges must be verified by probes, with acceptance weights lower than empirical edges). Auditors and downstream parties, upon seeing the "ontology derivation" label, know that this step is completion rather than empirical verification and treat it with a lower acceptance level. Source labeling also drives probe target selection—only ontology derivation edges trigger counterfactual probes, while historical statistical edges and instance extraction edges do not require probes (as they already have empirical or statistical backing).
[0040] 6 Counterfact Probe Verifier Responsible for performing conclusion-level robustness verification on conclusions that depend on ontology-inferred edges. For a conclusion supported by a given inference edge, retrieve the ontology necessary condition type of that conclusion from the ontology space. Select in type space Nearest neighbor type (type distance) Using the smaller sibling / neighboring type as the counterfactual perturbation direction, construct a counterfactual scenario: if the premise type Replace with nearest neighbor type The question is whether the conclusion still holds. If the conclusion collapses under a legitimate ontology perturbation (the conclusion does not hold after replacement), it indicates that the extrapolation relies excessively on accidental premises, and should be downgraded or blocked; if the conclusion is robust (it still holds after perturbation), then the extrapolation is credible.
[0041] The counterfactual probe here perturbs the necessary conditions of the ontology type layer and determines the robustness of the downstream conclusion. Its design motivation lies in a two-layered approach: existing counterfactual reasoning graphs perturb events or relationships at the instance layer and evaluate model prediction quality (changes in prediction accuracy), while this method perturbs the necessary condition types at the type layer and verifies the robustness of the downstream reasoning conclusion's dependence on the ontology premise. The perturbed semantic units (type layer and instance layer) and the judgment objects (conclusion robustness and prediction quality) are different. This two-layered approach allows the probe to capture potential problems such as "the completed edges have type basis, but the completed conclusion overly depends on a premise that may not be valid"—simple bounded extrapolation only guarantees type compatibility of edges, not robustness of the conclusion to the premise; the probe fills this gap. The perturbation direction of the counterfactual probe shares the same ontology type space—it is homologous to the type distance metric of bounded extrapolation. This is the other half of the symmetric coupling structure of this invention: bounded extrapolation uses type distance to define the extrapolation boundary, while the counterfactual probe uses type nearest neighbors to construct the perturbation direction. Both are driven by the same type space and have consistent metric benchmarks, preventing the situation where extrapolation uses one set of metrics while the probe uses another set, thus avoiding mutual drift. The probe perturbation is also constrained by ontology legitimacy—it only perturbs within the legitimate ontology nearest neighbors (the nearest neighbor type must be a sibling or adjacent type of the premise type), and does not perform unconstrained arbitrary perturbations. This differs mechanistically from the general adversarial perturbation test (which can perturb in any direction to test model robustness, with different purposes and constraints).
[0042] 7 Extrapolation Budget Controller This function is responsible for accumulating type distance and extrapolation counts along the reasoning path; exceeding the budget results in an overall downgrade. (Accumulated type distance) (The sum of the type distances of all inference edges along a reasoning path), the number of extrapolations. This represents the number of inference edges along the path. The extrapolation budget has two upper limits: a maximum number of iterations. Cumulative upper limit of distance from chain-level type If any dimension exceeds the budget, the overall reasoning result is downgraded to "high extrapolation ratio, cautious acceptance". Here, the extrapolation budget uses chain-level type distance accumulation instead of independent edge scoring. The design motivation is to detect asymptotic drift—completing the event graph by independently evaluating the type compatibility of each candidate edge fails to detect the asymptotic illusion that "every step is within the legal nearest neighbor, but the cumulative drift has shifted from the economic domain to the military domain"; chain-level type distance accumulation sums the ontology drift of the entire reasoning path. Once the cumulative drift exceeds the threshold, the path is judged to have extrapolated too far, resulting in an overall downgrade, capturing the cumulative drift missed by single-edge checks at the path level. The two dimensions of the extrapolation budget (number of times + distance) correspond to two types of loss-of-control modes: number of times out of control is due to excessively frequent extrapolation (too many inference edges and too few empirical edges on the path), and distance out of control is due to excessively far extrapolation (the cumulative drift has crossed domains), each driving downgrade.
[0043] Example 2 Based on Example 1, the system flow is described in this embodiment as follows: The system operates in a closed loop as follows: loading the event graph and ontology space → task input (initial event and inference target) → agent inference along the empirical edges of the event graph → gap detector marks the gap location when encountering a gap → type distance metric calculates the event type distance between the two ends of the gap → bounded extrapolator makes a decision (distance ≤ threshold, insert ontology inference edge and attenuate confidence; cross-domain, hard block) → inference edge labeling and the acceptor labels the source and triggers differentiated acceptance → counterfactual probe verifier performs robustness verification of the ontology inference edge conclusion (perturb nearest neighbor type; collapse, downgrade) → extrapolation budget controller accumulates chain-level type distance and frequency (over-budget, overall downgrade) → outputs reliable inference completion results (including path, gap location, inference edge source and confidence, probe decision, budget percentage). The system process loop is as follows: Figure 2 As shown.
[0044] The closed-loop design of the process has three key points. First, at the gap, bounded extrapolation is used instead of direct blocking (steps 4 to 6) – hard blocking schemes directly block at the gap, while this method measures the type distance at the gap and inserts the inference edge of downgraded acceptance within the threshold, allowing the gap to be filled by bounded means, avoiding the loss of reasonable but rare correlations from a one-size-fits-all blocking. Second, the counterfactual probe and bounded extrapolation share the same type space (steps 6 and 9) – step 6 uses type distance to determine the extrapolation boundary, and step 9 uses type nearest neighbors to construct the probe perturbation direction. Both are driven by the same ontology type space, with consistent measurement benchmarks and no drift. This is the embodiment of the symmetrical coupling structure of this invention in the process. Third, the extrapolation budget is accumulated at the chain level (step 11) – the type distance and number of times are accumulated along the entire inference path, capturing the gradual drift of omissions in unilateral checks at the path level, and the overall downgrade is performed for exceeding the budget instead of allowing independent passage on each side.
[0045] This process involves two gates to ensuring the credibility of the completed edges: bounded extrapolation (steps 6-7) and counterfactual probes (steps 9-10). Bounded extrapolation ensures that the completed edges are based on a certain type (distance constraint), while counterfactual probes ensure that the completed conclusion is robust to the ontological premises (perturbation verification). Both are indispensable—bounded extrapolation alone provides a type basis for the completed edges, but the conclusion may over-rely on accidental premises (e.g., a conclusion might depend on a rare premise type, causing it to collapse when the nearest neighbor is changed); counterfactual probes alone verify the robustness of the conclusion but don't know where to complete the edge or to what degree of credibility. Bounded extrapolation addresses "what to complete and to what degree of credibility," while counterfactual probes address "whether the completed conclusion is robust." Both are driven by the same type of space, forming a symmetrical closed loop. The extrapolation budget (steps 11 to 12) provides a path-level safety net on top of the two: even if each inference edge has a type basis and each conclusion is robust, if the proportion of extrapolation along the entire path is too high (too few empirical edges, too large cumulative type distance), it is still downgraded to cautious acceptance to prevent the cumulative unreliability of "each step is reasonable but the overall extrapolation is too excessive".
[0046] The core algorithms involved in this embodiment include: 1. Gap Detection Algorithm Input: The model output event association for the current inference step. Empirical Boundary Sets of Principle Graphs .
[0047] Step 1: Direct empirical verification and inspection. Does an empirical edge exist in it? If it exists, then this step has empirical evidence and is not a gap.
[0048] Step 2: Indirect empirical path check. If there is no direct edge, check if there is a path from the event graph. arrive The indirect empirical path (reachable via intermediate events along the empirical edge). If an indirect empirical path exists, this step has indirect empirical evidence and is not a gap (but the confidence level is reduced).
[0049] Step 3: Gap Marking. If there is neither a direct empirical edge nor an indirect empirical path, mark this step as an empirical gap, and output the gap location (step sequence) and the events at both ends of the gap. and its types The gap detection here only determines whether there is an edge in the empirical layer of the graph, and does not determine whether the association is legal. Whether the association is legal is determined by the type distance and bounded extrapolation. The design motivation is to decouple the "empirical gap" from the "illegal association", so that the gap has the opportunity to enter the bounded completion process instead of being directly blocked.
[0050] Output: Gap marker (yes / no) and events and types at both ends of the gap. This algorithm makes gap detection the entry point for the completion process; a gap is no longer equivalent to an obstruction.
[0051] 2. Ontology-based distance metric algorithm Input: Event types at both ends of the gap Ontology space .
[0052] Step 1: Locate the nearest common ancestor. At the ontology type level. In the middle, find and most recent common ancestor —that is, simultaneously and The ancestor is the type that is deepest in the hierarchy. The location of the nearest common ancestor here is the basis for subsequent distance calculations. The design motivation is to use the branching point of the types in the hierarchy tree to measure the structural distance between them—the shallower the branching point (the closer to the root), the more different the branches they belong to, and the greater the distance.
[0053] Step 2: Type Depth Calculation. Calculation , , Depth in the ontology hierarchy (The root type depth is 0, and the depth increases by 1 for each subsequent level).
[0054] Step 3: Type distance calculation. According to the formula... Calculate type distance, .
[0055] Step 4: Information Content Weighting (Optional). If you need to differentiate between rare and common types, use information content weighting: This makes the cross-type distance based on rare common ancestors (which contain a lot of information) larger (the association of rare types requires more careful extrapolation). Here, the ontology hierarchy structure is used instead of vector embedding to calculate the distance. The design motivation is to resist semantic deception - vector cosine similarity can be deceived by events that are literally similar but ontologically unrelated. The ontology hierarchy distance is structural, not affected by literal similarity, and the depth of the nearest common ancestor is interpretable (auditors can see the bifurcation point between the two types).
[0056] Output: Type distance This algorithm provides a common metric for extrapolation boundary determination, probe nearest neighbor selection, and budget accumulation. The geometric meaning of the type distance formula is: the sum of the depths of two types in the ontology hierarchy tree is the denominator (the total distance from the root), twice the depth of the nearest common ancestor is the numerator (the shared path length), and the proportion of the numerator to the denominator is the type similarity. Subtracting this from 1 gives the type dissimilarity (distance). This formula guarantees that: two types are completely identical (…). )hour When two types are direct subclasses of each other (the ones that forked earliest); The value is the largest and closest to 1. Compared with vector cosine similarity, ontology-level distance has three mechanistic advantages: First, it is resistant to literal deception (the vectors of "economic sanctions" and "psychological sanctions" may be similar, but in the ontology level they belong to the economic domain and the psychological domain respectively, have a shallow nearest common ancestor, and are far apart); second, it is interpretable (auditors can directly see the bifurcation points of the two types and understand why the distance is this value); third, it does not depend on training data (vector embeddings need to be trained on large-scale corpora and are easily affected by corpus bias, while ontology-level distance is a predefined structure that is stable and reproducible).
[0057] Bounded extrapolation algorithms with three types of distance constraints Input: Events at both ends of the gap and type distance Extrapolation threshold Basic confidence level .
[0058] Step 1: Extrapolation boundary determination. If The types of the two ends of the notch are allowed to be extrapolated within the range of the body; if Cross-domain, cannot be extrapolated, hard blocking. Here, type distance is used for boundary determination instead of semantic similarity. The design motivation is that type distance has a clear structural threshold (blocking when crossing domains), while semantic similarity has no clear threshold boundary (how high is enough cannot be defined).
[0059] Step 2: Inferring edge confidence decay. For gaps that allow extrapolation, insert ontology-inferred edges. Its confidence level —The confidence level is when the distance is 0 (of the same type). When the distance approaches the threshold, the confidence level approaches 0. This approach reduces confidence level with type distance. The design motivation is to make the confidence level of the inferred edge vary with the strength of its type basis—inferred edges with small distances have strong type basis (nearest neighbor type) and high confidence level, while inferred edges with distances close to the threshold have weak type basis (nearby cross-domain) and low confidence level, thus establishing a confidence level gradient.
[0060] Step 3: Inference Edge Source Labeling. Label the inference edges as originating from "Ontology Derivation" (distinguished from "Historical Statistics" and "Instance Extraction"), and attach type distance values. With confidence level This triggers differentiated acceptance rules and counterfactual probe verification. Source labeling is completed synchronously during insertion. The design motivation is to ensure that the completed edge is distinguished from the empirical edge from the generation point onward, and that it is not mixed up. Downstream acceptance rules can be differentiated according to source category.
[0061] Output: Ontology inferred edges (Including source labeling, type distance, and confidence level) or hard blocking decision. This algorithm establishes a bounded extrapolation of the confidence gradient at the gap, expressing an intermediate confidence level between "full blocking" and "full trust". Confidence decay formula. The design motivation for using linear decay instead of stepped decay is to ensure that confidence level changes continuously with the strength of the type criterion. Stepped decay (such as dividing distance into several levels corresponding to a fixed confidence level) would cause a jump in confidence level at the level boundaries (a slight increase in distance would cause a sharp drop in confidence level), while linear decay ensures a smooth transition in confidence level with distance, which is more in line with the intuition that "the weaker the type criterion, the lower the confidence level." Base Confidence Level Set the confidence level to a value lower than that of empirical edges (empirical edges are usually above 0.7, while inferred edges are based on 0.5–0.8 and decrease with distance). This ensures that even when the distance is 0 (of the same type), the confidence weight of the inferred edges does not exceed that of the empirical edges. This reflects the confidence level of "completing the lower confidence level than empirical edges" in terms of the confidence value.
[0062] 4 Counterfactual Ontology Probe Verification Algorithm Input: The conclusion of edge inference based on ontology Types of necessary conditions for conclusions Ontology space .
[0063] Step 1: Extracting necessary conditions. Retrieve the conclusion from the ontology space. The necessary type of ontology on which the establishment depends (That is, the type of premises that must be satisfied for the conclusion to be valid). The necessary condition here is extracted from the ontology definition rather than from the model's self-evaluation. The design motivation is to make the probe disturb the objective ontological premises rather than the premises that the model subjectively believes.
[0064] Step 2: Nearest Neighbor Perturbation Direction Selection. Select from the ontology type space. Nearest neighbor type set (Sibling / neighboring types whose type distance is less than the nearest neighbor threshold) are used as counterfactual perturbation directions. Here, the nearest neighbor selection uses type distance (which is of the same origin as bounded extrapolation). The design motivation is to make the probe perturbation direction and the extrapolation boundary share the same type space metric—this is the embodiment of the symmetrical coupling of this invention: bounded extrapolation uses type distance to define the boundary, and the probe uses type distance to select nearest neighbors, and the two are of the same origin.
[0065] Step 3: Counterfactual scenario construction and conclusion testing. For each nearest neighbor type... "Constructing counterfactual scenarios" if the premise type is replaced with ,in conclusion "Does it still hold true?" examines the survival rate of the conclusion under perturbation. .
[0066] Step 4: Robustness assessment. If the survival rate... (Robust threshold), the conclusion is robust, the extrapolation is reliable, and it is generally accepted; if The conclusion relies excessively on accidental premises (collapses upon changing nearest neighbors), leading to downgraded acceptance or blocking. Here, the evaluation focuses on the robustness of downstream conclusions rather than the model's predictive quality. The design motivation lies in a two-layered approach—existing counterfactual graph reasoning perturbs instance-level events and evaluates prediction accuracy, while this method perturbs necessary conditions at the type level and verifies the robustness of the conclusion's dependence on premises; the evaluation objects differ. Probe perturbations are constrained by ontology legitimacy (perturbations are only within the nearest neighbors of legitimate ontologies, not arbitrary perturbations), differing in purpose and constraints from unconstrained adversarial perturbation testing (perturbations in arbitrary directions to test model robustness). Robustness threshold. Set a tolerance level for "oversensitivity"—the higher the threshold, the more robust the conclusions are to more perturbations and the more rigorous the extrapolation; the lower the threshold, the more sensitive the conclusions are to some premises.
[0067] Output: Probe survival rate Robustness assessment (robust / degradation / blocking). This algorithm verifies the robustness of the extrapolation conclusion to the ontology premises, forming a dual guarantee of reliability with the type basis of bounded extrapolation: "completeness with evidence + robustness of the conclusion".
[0068] 5. Extrapolation Budget Closed-Loop Algorithm Input: Inference path Type distance sequence of all ontology inferred edges Inferring the number of edges Double cap on extrapolation budget and .
[0069] Step 1: Accumulate chain-level type distances. Along the inference path. Sum of type distances of all inferred edges The chain-level accumulation instead of one-sided independent statistics is designed to detect asymptotic drift—one-sided types have small distances (each step is within the legal nearest neighbor), but the accumulation may have drifted from one domain to another. Chain-level accumulation can capture this kind of accumulation drift that one-sided checks miss.
[0070] Step 2: Two-dimensional budget check. Check (Number of times not exceeded) and (Cumulative distance not exceeded). The use of both the number of attempts and the cumulative distance as a limit, rather than a single limit, is designed to distinguish between two types of out-of-control modes: exceeding the number of attempts is due to excessive extrapolation (too many inferred edges, too few empirical edges, and excessive path dependence on completion), and exceeding the cumulative distance is due to excessive extrapolation (the cumulative distance has crossed domains). Both need to be detected separately.
[0071] Step 3: Overall Downgrade for Exceeding Budget. If any dimension exceeds the budget, the inference result of the entire inference path will be downgraded to the "High Extrapolation Ratio, Cautious Acceptance" level, and the extrapolation budget ratio will be marked in the output. This is for the auditor's judgment. Here, the overall downgrade for budget overruns is not done by allowing each side individually or simply stopping the process. The design motivation is to use the extrapolation ratio as a signal of the credibility of the overall reasoning result—even if each inference edge is reasonable individually, an excessively high overall extrapolation ratio means that the conclusion relies too much on completion rather than empirical evidence, and caution should be exercised when accepting it.
[0072] Output: Extrapolation budget percentage and downgrade determination. This algorithm prevents cumulative drift and excessive extrapolation along the nearest neighbor path at the path level, providing a path-level fallback on top of unilateral bounded extrapolation. The upper limit of the number of attempts and the upper limit of the cumulative distance correspond to different downgrade handling—when the number of attempts exceeds the limit (excessive extrapolation), the system prioritizes suggesting supplementary empirical edges rather than directly downgrading the conclusion (because the inferred edges themselves may be reasonable, but the empirical density is insufficient); when the cumulative distance exceeds the limit (extrapolation is too far), the system determines that the path has drifted across domains and the inference direction must be replanned. This differentiated handling ensures that the budget closure loop not only provides a downgrade signal but also the reason for the downgrade (whether it is too frequent or too far), guiding the subsequent correction direction. The extrapolation budget percentage serves as an overall credibility signal, allowing auditors to judge the degree of dependence of the inference result on the extrapolation based on a single value—a percentage close to 0 indicates almost entirely empirical evidence (high credibility), while a percentage close to or exceeding 1 indicates excessive reliance on extrapolation (requiring cautious acceptance), quantifying credibility into an auditable percentage at the path level.
[0073] Key technical parameters table
[0074] The values in the above key technical parameter table are typical implementation values and do not constitute a limitation of the claims. Key parameter selection basis: extrapolation threshold. A threshold of 0.4–0.7 represents a compromise between "active completion" and "strict prevention of cross-domain issues"—if the threshold is too low, only similar events can be extrapolated (few completion opportunities, gaps are still frequently blocked); if it is too high, cross-domain associations are also allowed to be extrapolated (introducing the illusion of cross-domain issues); 0.4–0.7 allows for the extrapolation of nearest neighbor types while blocking cross-domain issues. (Probe nearest neighbor threshold) Setting the threshold to 0.15–0.35 (less than the extrapolation threshold) limits the probe to perturbing only within its closest neighbors—perturbing too far away would cause the perturbation direction to cross domains, losing the semantic meaning of "slightly different premises." A probe nearest neighbor threshold less than the extrapolation threshold ensures that the probe perturbs the premise of "still belonging to the same type of nearest neighbor," rather than the cross-domain premise. Probe robustness threshold. Choosing 0.5–0.8 represents a compromise between "tolerating the sensitivity of the conclusion to some premises" and "requiring the conclusion to be robust to most perturbations"—too low a value results in a conclusion that is only slightly sensitive (insufficient reliability of extrapolation), while too high a value requires the conclusion to be robust to almost all perturbations (overly strict, even reasonable extrapolations are downgraded). Upper limit on the number of extrapolations. Choosing 2–6 limits the extrapolation density of a single path—too many extrapolations lead to excessive path dependency completion (insufficient empirical evidence). Chain-level type cumulative distance upper limit. The value is set to 0.8–2.0 to limit the cumulative drift of the entire path. If the cumulative drift is too large, even if each step is within the nearest neighbor, the whole path will have drifted across domains.
[0075] Example 3 The gaps in the intelligence analysis scenario have extrapolation. This embodiment is applied to an intelligence analysis platform. The platform constructs a trusted intelligent agent to perform multi-step causal reasoning on the path from "a country's technology export controls to global industrial chain restructuring." The platform's event graph covers common causal edges, but the emerging scenario of "technology controls → the rise of overseas alternative supply chains" lacks a corresponding edge in the empirical layer of the graph due to its recent emergence. The intelligent agent is required to perform bounded, trusted extrapolations at this gap, rather than blocking them, and the extrapolation results must be auditable and not fabricated as facts. The platform has constructed an ontology space containing 800 event types, a type hierarchy tree, type relationship templates, and a set of necessary conditions for each type, i.e., | T |=800.
[0076] The parameter configuration in this embodiment is: extrapolation threshold. i ext =0.55; Baseline confidence level w base =0.7; Probe nearest neighbor threshold i nbr =0.25; Probe robustness threshold i rob =0.6; Maximum number of extrapolations N max =4; Maximum cumulative distance of chain-level types ΣD max =1.2. The above values are typical implementation values and do not constitute a limitation on the scope of protection.
[0077] Round 1 (Graph and Ontology Loading, Task Input): The system loads the event graph and ontology space Ont=( T ,Sub,IC); Task input is the start event e 0 = "A certain country imposes export controls on chip technology", inference target e target =“Global semiconductor supply chain restructuring”; Agent initialization inference path π =[ e 0].
[0078] Round 2 (Reasoning along the empirical edge, encountering a gap): The agent advances along the empirical edge of the reasoning graph: "A certain country imposes export controls on chip technology" → "The target country's chip supply is limited" (empirical edge, confidence 0.82) → "The target country seeks independent alternatives" (empirical edge, confidence 0.75). e 2 = "Target country seeks independent alternatives", model selection e 3 = "The rise of overseas alternative supply chains". Gap detectors examine event correlations ( e 2, e 3): The empirical layer of the event graph has no direct empirical edges and no indirect empirical paths, which are marked as empirical gaps. The event types at both ends of the gap are... t 2 = "Technology substitution behavior" t 3 = "Changes in supply chain structure". Hard blocking schemes directly block here, while this method marks the gap and then uses a type distance metric, allowing the gap to be filled in a bounded manner.
[0079] Round 3 (Type Distance Meter): The type distance meter is calculated according to equation (1). D ( t 2, t 3) In the ontology type hierarchy, t 2 = "Technology Substitution Behavior" and t 3 = "Lowest Common Ancestor of Supply Chain Structure Changes" LCA = "Industrial Economic Behavior", depth(LCA) = 3, depth( t 2) = 5, depth( t 3) = 5. Substitute into equation (1): D =1-(2×3) / (5+5)=1-0.6=0.40, belonging to the nearest neighbor type (under the same industrial economic behavior branch).
[0080] Wheel 4 (Bounded Extrapolation Decision): Bounded Extrapolation Decision D =0.40≤ i ext =0.55, extrapolation is allowed. Insert ontology inference edge. r infer ( e 2, e 3) Calculate the confidence level according to formula (4). w infer=0.7×(1-0.40 / 0.55)=0.7×0.273=0.191. The inference edge is labeled with the source = "ontology derivation", with a type distance of 0.40 and a confidence level of 0.191. The gap is neither a block (loss of information) nor a complete trust (illusion), but rather a downgraded inference edge with a confidence level of 0.191 is inserted. The auditor sees that the edge has a confidence level of only 0.191 and the source is ontology derivation, so they know that this is a weakly reliable completion and should be accepted with caution.
[0081] Round 5 (Source Labeling and Acceptance Rules): The inferred edge labeling and acceptance mechanism triggers differentiated acceptance rules based on source category—edges from ontology-derived sources must be verified by a counterfactual probe before they can be accepted; the upper limit of acceptance weight is constrained by the extrapolation budget. The system triggers a counterfactual probe for this inferred edge.
[0082] Round 6 (Counterfactual Probe Verification): The counterfactual probe verifier takes the ontology necessary condition type for the conclusion "the rise of overseas alternative supply chains". t pre =“The target country possesses the foundation for alternative technologies.” (Based on nearest neighbor thresholds in the type space.) i nbr =0.25 Select nearest neighbor type set N ( t pre ), the nearest neighbor types in the set t ' satisfy D ( t pre , t ' If the value is less than or equal to 0.25, the nearest neighbor types are "the target country has partial substitution capabilities" and "the target country relies on third-party technology". Construct counterfactual scenarios: if the premise is replaced with "only partial substitution capabilities", the conclusion is still partially valid; if replaced with "relying on third-party technology", the conclusion is still valid but the degree is reduced; if replaced with "no technological foundation at all", the conclusion collapses. Two of the three counterfactual scenarios survive, and the survival rate is calculated according to formula (5). S =2 / 3=0.67≥ i rob =0.6, the conclusion is robust, the extrapolation is reliable, and it is acceptable (the confidence level remains unchanged at 0.191, but the probe passes).
[0083] Round 6' (Contrast – Hard Blocking of Cross-Domain Gap): As a contrast, suppose the model takes an additional step in this inference to attempt to extrapolate "chip technology control → changes in the religious landscape of the target country". The gap detector also marks the gap, and the type distance metric calculates the type distance between "technology control behavior" and "religious landscape changes". Their nearest common ancestor is the root type "social phenomenon", which has a very shallow depth. D =0.82> i ext=0.55, cross-domain. The bounded extrapolator determines that extrapolation is not possible and is hard blocked, and the model must reselect the inference direction. It can be seen that the nearest neighbor gap within the threshold can be downgraded to complete, while the cross-domain gap is still hard blocked. The bound of the bounded extrapolation is strictly defined by the type distance threshold.
[0084] Round 7 (Extrapolation Budget Accumulation, Path Completion, Output): Extrapolation Budget Controller Accumulation: Number of edges inferred from this path ontology. N infer =1≤ N max =4, cumulative chain-level type distance ΣD =0.40≤ ΣD max =1.2, within budget. The reasoning continues... e target =“Global semiconductor supply chain restructuring”. Output reliable inference completion result: path π It contains one ontology inference edge (labeled source ontology derivation, type distance 0.40, confidence 0.191, probe robustness), and extrapolates the budget ratio according to formula (6). B =max(1 / 4,0.40 / 1.2)=max(0.25,0.33)=0.33, no downgrade.
[0085] The technical performance of this embodiment compared with the two comparative schemes is as follows: For the usability rate of legitimate associations at gaps, the hard blocking scheme is 0% (full blocking), the type-constrained mixed completion scheme is 85%-95% (but mixed acceptance), and this method is 70%-85% (downgraded acceptance); For the acceptance rate of edge patching errors as empirical evidence, the type-constrained mixed completion scheme is 70%-90%, and this method is less than 5%; For the detection rate of over-reliance on extrapolation conclusions, the type-constrained mixed completion scheme is 0% (no verification), and this method is 80%-92%; For the detection rate of asymptotic drift, the type-constrained mixed completion scheme is 0% (no chain-level accumulation), and this method is 85%-95%.
[0086] Example 4 Counterfact probes intercept over-extrapolation On the same platform, an agent infers "financial sanctions by a certain country → regime change in the target country." At a certain gap, the model attempts to extrapolate "financial sanctions → large-scale outflow of scientific and technological talent from the target country → weakening of the regime's foundation." The difference between the types of "financial sanctions" and "outflow of scientific and technological talent" at both ends of the gap is shown in the diagram. D =0.45≤ i ext =0.55 (all belong to the economic-social behavior branch), the bounded extrapolator is inserted into the ontology inference edge, and the confidence level is calculated according to equation (4). w infer =0.7×(1-0.45 / 0.55)=0.128, indicating the source of the ontology derivation, triggering the probe.
[0087] Counterfactual probes draw conclusions about the essential ontological conditions for "the foundation of the regime being shaken." t pre =“The target country’s scientific and technological talent is highly internationalized and mobile.” Selecting a neighboring disturbance: replacing it with “talent mobility is restricted (visa control)”, the conclusion collapses (there is no basis for wavering if talent cannot flow out); replacing it with “talent flow is restricted”, the conclusion is greatly weakened; replacing it with “talent only moves domestically”, the conclusion collapses; replacing it with “talent flows in both directions but the scale shrinks”, the conclusion still holds. Of the four counterfactual scenarios, only one conclusion survives, according to formula (5) survival rate. S =1 / 4=0.25< i rob =0.6, indicating that the conclusion relies too heavily on accidental premises and should be downgraded in its credibility. The bounded extrapolator only saw that the type distance of 0.45 was within the threshold (meaning the edge type basis is valid) and allowed it to proceed. However, the probe further discovered that the conclusion was overly sensitive to the premise of highly internationalized flow, indicating that the extrapolation treated a strong premise that may not be valid as a default condition. The existence of the probe makes the edge basis and the robustness of the conclusion two independent credibility checks. Passing the former does not mean that the latter passes.
[0088] In contrast, without counterfactual probes, the inferred cause-effect type distance, if within the threshold, would be directly accepted, and the conclusion "political instability" would be incorporated into the reasoning chain. However, this conclusion heavily relies on the premise that talent can freely flow out of the target country. If the actual target country has strict visa controls, the conclusion immediately collapses. Furthermore, the conclusion is fluent in language and self-consistent in causal description, making it difficult for manual review to detect its excessive reliance on a potentially invalid premise. In this embodiment, the detection rate of excessive reliance on extrapolated conclusions increases from 0% in the probe-free baseline to 80%-92%. More than 85% of the excessive extrapolations intercepted by the probe are downgraded at the probe stage, preventing them from entering downstream decision-making.
[0089] Example 5 Extrapolation budget closed loop prevents cumulative drift An emergency decision-making platform requires an intelligent agent to reason about the long chain of "natural disaster in a certain area → regional economy → international aid → geopolitical landscape", configured as in Example 1 ( N max =4、 ΣD max =1.2). Round 1 (continuous bounded extrapolation): The agent's reasoning path contains 5 gaps, each through bounded extrapolation, with type distances of 0.30, 0.35, 0.32, 0.38, and 0.40, respectively, none exceeding 1.2. i ext =0.55: Natural disaster → Economic loss ( D =0.30), economic loss → aid needs ( D =0.35), Aid Needs → International Intervention (D =0.32), International Intervention → Geopolitical Impact ( D =0.38), geopolitical influence → reshaping of the global landscape ( D =0.40). The counterfactual probes for each inference edge also pass through. Round 2 (budget accumulation triggers degradation): extrapolation budget controller accumulates, N infer =5> N max =4 (exceeded the limit) ΣD =0.30+0.35+0.32+0.38+0.40=1.75> ΣD max =1.2 (cumulative distance exceeds limit), both dimensions exceed budget, the entire reasoning path is downgraded to high extrapolation ratio and cautious acceptance, and the extrapolation budget ratio is output according to formula (6). B =max(5 / 4,1.75 / 1.2)=max(1.25,1.46)=1.46 (far exceeds 1, marked as high extrapolation ratio).
[0090] In contrast, without an extrapolation budget loop, each inference edge is allowed to proceed step by step because the type distance is within the threshold and the probe passes through. While the entire path appears reasonable at each step, the conclusion, extrapolating from natural disasters to geopolitical restructuring, has zero empirical edges and relies entirely on extrapolation. This has cumulatively drifted from the natural disaster domain to the geopolitical domain. The superposition of neighboring extrapolations at each step creates cross-domain drift that cannot be detected by single-step checks. The downgraded inference result is marked with a high extrapolation ratio, a cautious acceptance ratio, and a budget ratio of 1.46, indicating to the auditor that the conclusion has an excessively high extrapolation ratio and insufficient empirical evidence, requiring additional empirical support or a reduction in the acceptance level. In this embodiment, the cumulative illusion rate caused by gradual drift decreased from 25%-40% without a budget baseline to below 8%.
[0091] Example 6 Parameter settings and system / equipment implementation methods In a typical deployment: Extrapolated threshold i ext =0.55; Baseline confidence level w base =0.7; Probe nearest neighbor threshold i nbr =0.25; Probe robustness threshold i rob =0.6; Maximum number of extrapolations N max =4; Maximum cumulative distance of chain-level types ΣD max =1.2; Number of event types in the ontology space | T |=800. The value range and endpoints of each parameter are shown in the following example: Extrapolated threshold iext The range is 0.4-0.7, with endpoint examples using 0.4 (strictly preventing cross-domain issues, only very close neighbors can be extrapolated), 0.55 (a compromise), and 0.7 (active completion, more completion opportunities); base confidence level. w base The threshold values were set to 0.5-0.8, with endpoint examples using 0.5, 0.7, and 0.8, all lower than the empirical edge confidence scores (which are typically above 0.7). Probe nearest neighbor threshold. i nbr The threshold value is set to 0.15-0.35 and is less than the extrapolation threshold; the endpoint examples are 0.15, 0.25, and 0.35; probe robustness threshold. i rob The value is set to 0.5-0.8, with endpoint examples using 0.5 (tolerating sensitivity of the conclusion to some premises), 0.6 (a compromise), and 0.8 (requiring the conclusion to be robust to most perturbations); the upper limit for the number of extrapolations is also considered. N max Choose 2-6, with endpoint examples being 2, 4, and 6; upper limit of cumulative distance for chain-level types. ΣD max The value is set to 0.8-2.0, with endpoint examples using 0.8, 1.2, and 2.0; the number of event types in the ontology space | T |The range is 50-5000, with endpoint implementations of 50 (single vertical domain), 800 (intelligence analysis domain), and 5000 (open domain).
[0092] The parameters are selected based on the following criteria: if the extrapolation threshold is too low, only events of the same type can be extrapolated, and there are few opportunities for completion; if it is too high, cross-domain associations are also allowed to be extrapolated, introducing the illusion of cross-domain associations. A threshold of 0.4-0.7 allows for extrapolation of nearest neighbor types, but cross-domain associations are blocked. The probe nearest neighbor threshold is lower than the extrapolation threshold, ensuring that the probe perturbation is based on the premise that the events are still of the same type of nearest neighbor, rather than the premise of cross-domain association. If the probe robustness threshold is too low, the conclusion is allowed as soon as it is slightly sensitive, and the extrapolation credibility is insufficient; if it is too high, even reasonable extrapolation is downgraded. The upper limit of the number of times limits the extrapolation density of a single path. The upper limit of chain-level cumulative drift limits the cumulative drift of the entire path.
[0093] The reasoning graph gap inference and completion system in this embodiment is as follows: Figure 2As shown, the system comprises seven parts: an ontology space layer, a gap detector, a type distance metric, a bounded extrapolator, an inference edge labeling and acceptance metric, a counterfactual probe verifier, and an extrapolation budget controller. The ontology space layer loads and maintains the ontology space (including an event type hierarchy tree, inter-type relationship templates, and a set of necessary type conditions); the gap detector detects empirical edge gaps in the inference path; the type distance metric calculates the ontology type distance between the events at both ends of the gap; the bounded extrapolator inserts an inference edge and writes it back to the graph when the distance does not exceed a threshold, and blocks it if it crosses domains; the inference edge labeling and acceptance metric labels the source and drives the acceptance rules; the counterfactual probe verifier perturbs the robustness of the nearest neighbor type verification conclusion; the extrapolation budget controller accumulates the number of iterations and chain-level distances; and finally, it outputs a reliable inference completion result. Each part of the system can be implemented by electronic devices such as servers, computers, and cloud nodes. These electronic devices include memory and processors. The memory stores the computer program, and the processor executes the program to implement the steps of the above method; the computer program can also be stored in a computer-readable storage medium.
[0094] In the above embodiments, alternative implementations of the type distance metric are as follows: In addition to the nearest common ancestor depth metric of Equation (1), at least two alternative schemes can be adopted: First, the information content weighted metric of Equation (2) makes the cross-type distance based on rare common ancestors larger; Second, the metric based on the shortest path length in the type hierarchy, with the normalized number of edges of the shortest path between the two event types in the type hierarchy as the type distance; Third, the transformation metric based on path depth ratio similarity (such as Wu-Palmer similarity), with 1 minus the similarity as the type distance.
[0095] Alternative implementation methods for confidence decay: In addition to the linear decay in equation (4), at least two alternative schemes can be adopted as follows—first, exponential decay, where the confidence level is calculated according to the linear decay. w base · e -k·D calculate, k The first is the attenuation coefficient; the second is the segmented step attenuation, which divides the type distance into several intervals, each interval corresponding to a fixed confidence coefficient.
[0096] Alternative implementation methods for selecting nearest neighbor types: In addition to filtering by type distance not exceeding the nearest neighbor threshold, at least two alternative schemes can be adopted as follows: First, only sibling types of the necessary condition type in the type hierarchy (direct child types of the same parent type) are selected; Second, based on the principle of similar information content, event types at the same level whose information content difference with the necessary condition type does not exceed a set threshold are selected.
[0097] Alternative implementations of type classifiers: The mapping from event instances to event types can be accomplished by at least two alternatives: First, a large language model classifier that generates the event type according to the event description; second, an event embedding clusterer that maps clusters to event types after clustering event text embeddings; and third, a remote supervised classifier that trains a classification model using seed instances with existing ontology type annotations.
[0098] Alternative implementation methods for counterfactual scenario testing: Whether a conclusion survives under nearest-neighbor perturbation can be achieved by at least one of rule matching, ontology inference engine or large language model discrimination. The survival criterion can be a weighted score of the conclusion being fully true or partially true, or a tiered score based on the degree of truth included in the survival rate.
[0099] Those skilled in the art will understand that all or part of the steps in the above embodiments can be implemented by hardware related to computer program instructions. The program can be stored in a computer-readable storage medium, and when executed, it can implement the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, and optical disks.
[0100] This embodiment also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method. The storage medium may be flash memory, read-only memory, random access memory, magnetic disk, or optical disk.
[0101] This specification also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the methods described in the above embodiments.
[0102] This specification also provides a computer device, including a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, implements the methods described above.
[0103] like Figure 3 As shown, the computer device can be a terminal, and it includes a processor, memory, and a communication interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the methods described in the above embodiments.
[0104] This invention upgrades the event graph from read-only constraints to writable completion: at the gap, an ontology inference edge with source label and confidence is generated and written back to the graph, so that the graph can be self-completed and self-evolved in a controlled manner, the gap is no longer bypassed, and the completed edge can be reused in the next inference; the excessive blocking rate is significantly reduced.
[0105] The present invention features a symmetrical structure of completion boundary and verification probe with homogeneous coupling in ontological space: the same ontological type space serves as both the completion boundary and the direction of counterfactual probe perturbation, and the two share the same metric benchmark, forming a symmetrical closed loop, thus preventing the situation where extrapolation uses one set of metrics and the probe uses another set of metrics, resulting in mutual drift.
[0106] The robustness verification of the conclusion layer of the counterfactual probe of this invention: the probe perturbs the necessary conditions of the ontology type layer and verifies the robustness of the downstream conclusion, which is different from the process layer verification of path constraint-type schemes and cannot be substituted for each other; the detection rate of excessive dependence of extrapolated conclusions on accidental premises is significantly improved.
[0107] This invention uses transparent source labeling to drive differentiated acceptance: the acceptance rules switch with the source category, and the rate of false acceptance of edge completion as evidence is reduced to below 5%, so that the completion does not masquerade as fact.
[0108] This invention provides a progressive drift detection for chain-level distance accumulation: it captures cumulative drift missed by one-sided checks at the path level, reducing the cumulative illusion rate caused by progressive drift to below 8%.
[0109] This invention provides a path-level safety net for the extrapolation budget closed loop: a double upper limit on the number of steps and the cumulative distance of the chain-level type; if the budget is exceeded, the entire system is downgraded to cautious acceptance, preventing the accumulation of unreliable data due to reasonable steps but excessive overall extrapolation.
[0110] 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 the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for completing the factual graph of ontology type distance and counterfactual probes, characterized in that, Includes the following steps: Load the ontology space, which includes a set of event types, subtype relationships between event types, and information content for each event type. The information content is determined based on the proportion of instances of the event type and its subtypes in the corpus. During the process of reasoning along the empirical edges of the event graph, when the event association output by the reasoning step has neither a direct empirical edge nor an indirect empirical path in the event graph, the reasoning step is marked as an empirical gap, and the event types of the events at both ends of the empirical gap are determined. Calculate the type distance between the event types to which the events at both ends of the empirical gap belong in the ontology space. The type distance is determined based on the depth of the nearest common ancestor of the event types to which the events at both ends belong in the type hierarchy and the depth of the event types to which the events at both ends belong. When the type distance does not exceed the extrapolation threshold, an ontology inference edge is inserted at the empirical gap and the ontology inference edge is written back to the event graph. The confidence of the ontology inference edge decreases as the type distance increases, and the source category is labeled for the ontology inference edge. When the type distance exceeds the extrapolation threshold, the event association is blocked. For the conclusion supported by the ontology inference edge whose source category is ontology derivation, the ontology necessary condition type on which the conclusion depends is extracted from the ontology space, and the ontology necessary condition type is replaced with the nearest neighbor type of the ontology necessary condition type in the ontology space to construct a counterfactual scenario. The survival rate of the conclusion under each counterfactual scenario is calculated. When the survival rate is lower than the robustness threshold, the conclusion is downgraded and accepted. The sum of the type distances of each ontology inference edge along the inference path and the number of ontology inference edges along the inference path are accumulated. When the sum of the type distances exceeds the chain-level accumulation limit or the number of ontology inference edges exceeds the number of times limit, the inference result corresponding to the inference path is downgraded as a whole. The chain-level accumulation limit and the number of times limit constitute the extrapolation budget.
2. The ontology type distance and counterfactual probe fact graph completion method according to claim 1, characterized in that, The type of distance D ( τ i , τ j Calculate using the following formula: D ( τ i , τ j )=1-2·depth(LCA( τ i , τ j )) / [depth( τ i )+depth( τ j )]; in, τ i , τ j These represent the event types to which the events at both ends of the empirical gap belong, and LCA ( τ i , τ j )for τ i and τ j The lowest common ancestor in the type hierarchy, depth(·) is the depth of the event type in the type hierarchy, and the depth of the root event type is 0; The weighted type distance, obtained by weighting the type distance based on information content, is: D ' ( τ i , τ j )= D ( τ i , τ j )·[1+IC(LCA( τ i , τ j ))]; Among them, IC ( t )=-log P ( t ) is the event type t The information content mentioned above, P ( t ) is the event type t The percentage of instances of the corpus and its subtypes.
3. The ontology type distance and counterfactual probe fact graph completion method according to claim 1, characterized in that, The confidence level of the ontology inferred edges w infer Calculate using the following formula: w infer = w base ·[1- D ( τ i , τ j ) / θ ext ]; in, w base Based on confidence level, θ ext The extrapolated threshold is... D ( τ i , τ j ) represents the event type to which the events at both ends of the empirical gap belong. τ i , τ j The type distance, the base confidence is lower than the confidence of the empirical edges in the principle graph.
4. The ontology type distance and counterfactual probe fact graph completion method according to claim 1, characterized in that, The source categories include ontology derivation, historical statistics, and instance extraction. Edges derived from ontology are accepted only after passing the counterfactual scenario verification, and the upper limit of the acceptance weight is constrained by the extrapolation budget. Edges derived from historical statistics are accepted based on the confidence level of historical co-occurrence statistics. Edges derived from instance extraction are accepted based on empirical edges, and the acceptance weight of edges derived from instance extraction is higher than that of ontology derivation edges derived from ontology.
5. The ontology type distance and counterfactual probe fact graph completion method according to claim 1, characterized in that, The nearest neighbor type is an event type in the ontology space whose type distance to the ontology necessary condition type does not exceed a nearest neighbor threshold, where the nearest neighbor threshold is less than the extrapolation threshold; the survival rate S = m / | N ( τ pre )|, where, τ pre This is the necessary condition type for the ontology. N ( τ pre ) is the set of the nearest neighbor types, | N ( τ pre | represents the number of the nearest neighbor types. m The number of counterfactual scenarios that survive the conclusion; when the survival rate is not lower than the robustness threshold, the conclusion is determined to be robust and accepted normally; when the survival rate is lower than the robustness threshold, the conclusion is downgraded or blocked.
6. The ontology type distance and counterfactual probe fact graph completion method according to claim 1, characterized in that, The step of downgrading the overall inference result corresponding to the inference path includes: marking the inference result as having a high extrapolation ratio and accepting it with caution, and outputting the extrapolation budget ratio, wherein the extrapolation budget ratio is the maximum value among the ratio of the number of ontology inference edges to the upper limit of the number of attempts and the ratio of the sum of the type distances to the upper limit of the chain-level cumulative limit; when the number of ontology inference edges exceeds the upper limit of the number of attempts, prompting to supplement the inference path with empirical edges; when the sum of the type distances exceeds the upper limit of the chain-level cumulative limit, determining that the inference path has experienced cross-domain drift and replanning the inference direction.
7. The ontology type distance and counterfactual probe fact graph completion method according to claim 1, characterized in that, The ontology space is maintained using a version snapshot mechanism. Each inference is bound to an immutable ontology version number. During the inference process, the subtype relationships and the information content remain unchanged. The version evolution of the ontology space occurs between inference tasks. The mapping from event instances to event types is completed by a type classifier.
8. A fact graph gap inference and completion system based on the fact graph completion method of ontology type distance and counterfactual probe as described in any one of claims 1-7, characterized in that, include: The ontology space layer is used to load the ontology space, which includes a set of event types, subtype relationships between event types, and information content of each event type. The information content is determined based on the proportion of instances of the event type and its subtypes in the corpus. A gap detector is used to mark the reasoning step as an empirical gap when the event associated with the reasoning step has neither a direct empirical edge nor an indirect empirical path in the empirical graph during the reasoning process of an agent along the empirical edge of the empirical graph, and to determine the event type to which the events at both ends of the empirical gap belong. A type distance metric is used to calculate the type distance between the event types to which the events at both ends of the empirical gap belong in the ontology space. The type distance is determined based on the depth of the nearest common ancestor of the event types to which the events at both ends belong in the type hierarchy and the depth of the event types to which the events at both ends belong. A bounded extrapolator is used to insert an ontology inference edge at the empirical gap and write the ontology inference edge back to the event graph when the type distance does not exceed the extrapolation threshold. The confidence of the ontology inference edge decreases as the type distance increases. When the type distance exceeds the extrapolation threshold, the event association is blocked. An edge labeling and data acquisition tool is used to infer the source category of the edge labels for the ontology and perform differentiated data acquisition according to the source category; A counterfactual probe verifier is used to extract the ontology necessary condition types on which the conclusion depends for being valid from the ontology space, replace the ontology necessary condition types with the nearest neighbor types of the ontology necessary condition types in the ontology space to construct counterfactual scenarios, and count the survival rate of the conclusion under each counterfactual scenario. When the survival rate is lower than a robustness threshold, the conclusion is downgraded and accepted. The extrapolation budget controller is used to accumulate the sum of the type distances of each ontology inference edge along the inference path and the number of ontology inference edges along the inference path. When the sum of the type distances exceeds the chain-level accumulation limit or the number of ontology inference edges exceeds the count limit, the inference result corresponding to the inference path is downgraded as a whole.
9. 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 steps of the ontology type distance and counterfactual probe fact graph completion method as described in any one of claims 1-7.
10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the ontology type distance and counterfactual probe fact graph completion method as described in any one of claims 1-7.
