A knowledge graph-based sample verification result traceability method and system
By constructing a heterogeneous medical knowledge graph and introducing evidence strength and directional identification parameters, the problem of lack of directional modeling and pseudo-causal path identification in existing technologies is solved, and quantifiable and interpretable causal path identification and tracing of specific disease mechanisms is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- COMPREHENSIVE REGIONAL MEDICAL CENTER BENGBU HOSPITAL (THE SECOND AFFILIATED HOSPITAL OF BENGBU MEDICAL UNIVERSITY)
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-09
AI Technical Summary
Existing methods for constructing medical knowledge graphs lack targeted modeling for specific disease mechanism axes, the strength of relational evidence and the direction of regulation are not structured and quantified, sample verification results cannot be embedded into the graph to form traceable evidence nodes, and it is difficult to identify hybrid-driven pseudo-causal paths and quantify the path contribution.
A heterogeneous medical knowledge graph is constructed, with added evidence strength parameters and directional identification parameters. Clinical sample verification results are mapped to sample evidence nodes in the graph. By searching for candidate paths, detecting common parent node structures and backdoor paths, combined with sample hierarchical consistency analysis and path contribution calculation, causal candidate main paths are identified.
It achieves quantitative ranking and credibility correction of candidate mechanism paths in multi-level networks, systematically suppresses spurious causal paths, ensures that path calculation has real evidence support and regulatory logic foundation, and opens up the computational channel between mechanism knowledge and sample data.
Smart Images

Figure CN122177419A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph construction technology, specifically to a method and system for tracing the source of sample verification results based on knowledge graphs. Background Technology
[0002] Severe acute pancreatitis (SAP) is a type of acute inflammatory disease with a high mortality rate. Its pathological progression involves complex inflammatory cascades, multi-organ dysfunction, and immune imbalance. Recent studies have shown that pyroptosis, as an important mechanism of amplified inflammation, plays a crucial role in the progression of SAP. Simultaneously, the molecular chaperone protein HSPA8 plays an important role in protein homeostasis regulation, autophagy regulation, and inflammatory signal transduction, and may participate in the pyroptosis regulatory network. However, the occurrence and development of SAP involves not only molecular-level regulation but is also closely related to multidimensional clinical variables such as clinical stage, inflammatory markers, immune cell ratios, and treatment exposure. With the development of biomedical databases and high-throughput detection technologies, constructing a domain knowledge graph that integrates multi-level entity relationships between "genes—molecular pathways—cellular processes—clinical indicators—disease outcomes" has become an important technological direction for revealing complex disease mechanisms and achieving precision medicine.
[0003] However, existing methods for constructing medical knowledge graphs mostly focus on general disease networks, lacking targeted modeling strategies for specific disease scenarios (such as SAP) and specific molecular mechanism axes (such as HSPA8-pyroptosis). On the one hand, existing graphs typically do not structurally quantify the evidence strength and regulatory direction of relational edges, making it difficult to distinguish the weights of evidence from different sources within the graph and failing to truly reflect the degree of evidence accumulation. On the other hand, sample-level clinical validation results usually exist only as statistical results, failing to form sample evidence nodes connected to the graph structure, thus failing to achieve a traceable mapping from specific samples to molecular mechanism paths. Furthermore, existing path analysis methods mostly focus on shortest paths or network topology analysis, failing to consider the common causal structures and backdoor path problems formed by potential confounding factors (such as inflammation degree, infection status, treatment intervention, etc.), making it difficult to distinguish between true causal chains and pseudo-causal associations. Moreover, the lack of a comprehensive evaluation mechanism that combines sample stratified consistency analysis with path marginal contribution measurement makes it impossible to quantitatively rank and correct the credibility of candidate mechanism paths in the multi-level network of "SAP-pyroptosis-HSPA8-clinical indicators". Therefore, there is an urgent need for a domain knowledge graph construction and sample verification result tracing method for specific disease mechanism scenarios, so as to achieve structured, interpretable and quantifiable causal path identification. Summary of the Invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by this invention is that existing methods for constructing medical knowledge graphs and analyzing disease associations lack directional modeling for specific disease mechanism axes, have unstructured and unquantified relationship evidence strength and regulatory direction, cannot embed sample verification results into the graph to form traceable evidence nodes, and have difficulty identifying hybrid-driven pseudo-causal paths and quantifying path contribution.
[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a method for tracing the source of sample verification results based on a knowledge graph, comprising: constructing a heterogeneous medical knowledge graph, and attaching evidence strength parameters and directional identification parameters to each relation edge; mapping clinical sample verification results to sample evidence nodes in the graph, and establishing evidence association edges between sample evidence nodes and corresponding gene entities and phenotype entities; performing candidate path search in the medical knowledge graph with the target gene entity as the starting point and the target phenotype entity as the ending point, generating multiple candidate explanation paths, and constructing a set of potential confounding candidate nodes; performing common parent node structure detection and backdoor path detection on each candidate path; performing sample hierarchical consistency analysis and path contribution calculation on the candidate paths that pass the confounding detection, obtaining the causal candidate main path and the corresponding path contribution value, and outputting the tracing result containing confounding node identifiers and path evidence chains.
[0007] As a preferred embodiment of the knowledge graph-based sample verification result tracing method described in this invention, the construction of the heterogeneous medical knowledge graph includes: standardizing entities from literature databases, pathway databases, and clinical data, uniformly encoding them, and establishing nodes; establishing directed relation edges for the regulatory relationships between entities; assigning an evidence strength parameter to each relation edge according to the level and quantity of evidence sources, the evidence strength parameter being weighted and accumulated based on evidence type weight and evidence credibility, and then normalized; simultaneously setting a directional identifier parameter for each relation edge to identify positive regulation, negative regulation, or no clear direction relationship; when multiple source relationships exist for the same entity pair, merging the multiple relationships, updating the final weight value of the corresponding relation edge according to the evidence accumulation result, and storing it in the graph database.
[0008] As a preferred embodiment of the knowledge graph-based sample verification result tracing method described in this invention, the mapping to sample evidence nodes in the graph includes: generating a unique identifier for each sample; standardizing the sample's gene expression value, pyroptosis index value, and clinical outcome index to convert data from different sources into comparable deviation values; triggering an evidence node generation mechanism when the deviation value of a certain indicator exceeds a deviation threshold to create a corresponding sample evidence node in the graph; establishing evidence association edges between the sample evidence node and the corresponding gene entity and phenotypic entity; determining the weight of the evidence association edges based on the deviation magnitude of the sample indicator and the credibility of the data source; when multiple abnormal indicators exist in the same sample, comprehensively calculating the deviation degree of each indicator to form an overall sample strength value, and determining whether to mark the sample as a high-confidence tracing sample based on the overall strength value.
[0009] As a preferred embodiment of the knowledge graph-based sample verification result tracing method described in this invention, the following steps are included: performing a candidate path search, starting from the target gene entity and ending at the target phenotype entity, in a directed path search with a limited path length in the knowledge graph; calculating the path weight for each searched path, where the path weight is obtained by accumulating the evidence strength parameters of each relation edge in the path step by step; removing paths whose overall weight is lower than the path weight threshold; simultaneously verifying the consistency of path directions based on the directional identifiers of relation edges, and attenuating the path weight when there are directional conflicts in the path; and finally retaining candidate interpretation paths with weights that meet the requirements and consistent directions.
[0010] As a preferred embodiment of the knowledge graph-based sample verification result tracing method described in this invention, the following steps are included: performing common parent node structure detection and backdoor path detection: identifying nodes in the graph that simultaneously point to both the target gene entity and the target phenotype entity, and including the corresponding nodes in a potential confounding candidate node set; for each candidate path, detecting whether a common causal structure is derived from the confounding node; cumulatively evaluating the strength of the relationship between the confounding node and the target gene and target phenotype, and generating a confounding risk score based on the cumulative results; when the confounding risk score exceeds the confounding risk threshold, marking the corresponding path as a pseudo-causal high-risk path; simultaneously constructing a backdoor path set, and adjusting the weights of paths that can be blocked by observed variables to reduce the corresponding causal credibility.
[0011] As a preferred embodiment of the knowledge graph-based sample verification result tracing method described in this invention, the sample stratification consistency analysis includes: stratifying the samples according to observable clinical variables in potential confounding candidate nodes; recalculating the association degree between the target gene and the target phenotype in each stratified subsample set; comparing the consistency between the stratification results and the overall sample results; when the association direction is reversed or the association strength decreases significantly after stratification, performing confidence decay processing on the corresponding candidate path; and increasing the causal confidence weight of the corresponding path when all stratification results remain consistent and stable.
[0012] As a preferred embodiment of the knowledge graph-based sample verification result tracing method described in this invention, the path contribution calculation includes: evaluating the marginal impact of each candidate path set that passes the confounding detection on the target phenotype change; calculating the independent contribution value of the path by comparing the change in the prediction result when the corresponding path is included with and without the corresponding path; normalizing and sorting the contribution values of each path; determining the path as a causal candidate main path when the contribution value of a certain path exceeds the main path threshold; and generating a tracing result report outputting the path node sequence, confounding node identifier, and path contribution ranking information.
[0013] As a preferred embodiment of the knowledge graph-based sample verification result tracing system of the present invention, the system includes: a knowledge graph construction module, a path detection module, and a result tracing module; the knowledge graph construction module is used to construct a heterogeneous medical knowledge graph, and to attach evidence strength parameters and directional identification parameters to each relation edge, mapping the clinical sample verification results to sample evidence nodes in the graph, and establishing evidence association edges between sample evidence nodes and corresponding gene entities and phenotype entities; the path detection module is used to perform candidate path search in the medical knowledge graph with the target gene entity as the starting point and the target phenotype entity as the ending point, generating multiple candidate explanation paths, and constructing a set of potential confounding candidate nodes, and performing common parent node structure detection and backdoor path detection on each candidate path; the result tracing module is used to perform sample hierarchical consistency analysis and path contribution calculation on the candidate paths that pass the confounding detection, to obtain the causal candidate main path and the corresponding path contribution value, and output the tracing result containing the confounding node identifier and the path evidence chain.
[0014] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement a method for tracing the source of sample verification results based on a knowledge graph.
[0015] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of a knowledge graph-based sample verification result tracing method.
[0016] The beneficial effects of this invention are as follows: The knowledge graph-based sample verification result tracing method provided by this invention introduces evidence strength parameters and directional identification parameters into a heterogeneous medical knowledge graph, enabling quantifiable expression and directional constraints on multi-source biological relationships, thus providing path calculation with real evidence support and a regulatory logic foundation. Simultaneously, it maps clinical sample verification results to sample evidence nodes and establishes evidence association edges, allowing abnormal HSPA8 expression, deviations in pyroptosis indicators, and changes in clinical outcomes to be directly embedded in the graph structure and participate in path reasoning, opening up the computational channel between mechanistic knowledge and sample data. Through common parent node structure detection and backdoor path identification mechanisms, it systematically suppresses potentially confounded pseudo-causal paths, and combines sample stratified consistency analysis and path marginal contribution calculation to achieve stability correction and quantitative ranking of candidate mechanism paths. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is an overall flowchart of a sample verification result tracing method based on knowledge graph provided in Embodiment 1 of the present invention.
[0019] Figure 2 This is a flowchart of a knowledge graph-based sample verification result tracing method for confounding detection provided in Embodiment 2 of the present invention. Detailed Implementation
[0020] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0021] Example 1, referring to Figures 1-2 As an embodiment of the present invention, a method for tracing the source of sample verification results based on knowledge graphs is provided, comprising:
[0022] S1: Construct a heterogeneous medical knowledge graph and attach evidence strength parameters and directional identification parameters to each relation edge. Map the clinical sample verification results to sample evidence nodes in the graph and establish evidence association edges between sample evidence nodes and corresponding gene entities and phenotype entities.
[0023] Furthermore, constructing a heterogeneous medical knowledge graph involves standardizing entities from literature databases, pathway databases, and clinical data, uniformly encoding them, and establishing nodes; establishing directed relation edges for the regulatory relationships between entities; assigning an evidence strength parameter to each relation edge based on the level and quantity of evidence sources, with the evidence strength parameter being weighted and accumulated according to the evidence type weight and evidence credibility, and then normalized; simultaneously setting a directional identifier parameter for each relation edge to identify positive regulation, negative regulation, or no clear direction relationship; when multiple source relationships exist for the same entity pair, the multiple relationships are merged, and the final weight value of the corresponding relation edge is updated according to the evidence accumulation result before being stored in the graph database.
[0024] It should also be noted that a preferred scheme for constructing a heterogeneous medical knowledge graph specifically includes the following: the collected raw data includes three categories: literature database data, pathway database data, and clinical data. Entities from these three types of data are uniformly extracted into a heterogeneous entity set and standardized. Entity types include at least: gene / protein entities, cellular process entities, inflammatory factor entities, immune cell entities, clinical phenotype entities, laboratory indicator entities, treatment exposure entities, and outcome entities. To avoid duplicate graph construction caused by homonyms, abbreviation conflicts, or cross-database synonyms, a unified coding rule is used to generate a unique identifier for each entity. Let the entity set be denoted as... Any entity node is represented as Map the target gene HSPA8 as a unique gene node. Based on reported regulatory, binding, participation, promotion, and inhibition relationships in literature and pathway databases, as well as structured relationships such as "association / indication / exposure effect" in clinical data, a set of directed relation edges is constructed between entity nodes. Any relation edge is represented as ,in For the source entity node, For the target entity node, The relationship type is defined (e.g., facilitating, inhibiting, binding, participating, related, etc.). This embodiment prioritizes creating directed edges for biological relationships with directionality, such as "facilitating / inhibiting / upregulating / downregulating / degrading / activating," etc. To enable the knowledge graph to support sample-level source tracing, an evidence strength parameter is introduced for each edge, reflecting the strength of support for the relationship across multiple source data. For any relationship edge... The strength of its evidence is defined as The sources of evidence are categorized into several sets of evidence types. For example: literature evidence, pathway database evidence, experimental data evidence, clinical statistical evidence, etc. For each edge... The number of evidence items and their credibility scores are obtained from various types of evidence, and then weighted and accumulated. First, the strength of unnormalized evidence is calculated. :
[0025]
[0026] in: Represents a set of evidence types; Indicates the evidence type index; Indicate the type of evidence Weighting coefficients; Representing relation edges In terms of evidence type The cumulative credibility value is determined by at least the number of evidence items and the credibility of individual evidence items (e.g., peer-reviewed journals for literature, authoritative databases for access databases, and sample size and statistical significance for clinical cases).
[0027] To make the strength of evidence comparable across different edges, edge weights within the same relation type or the same local subgraph are normalized. Taking uniform normalization of all edges as an example, the final strength of evidence parameter is obtained. :
[0028]
[0029] in, Represents the set of directed edges. Inner edge index; This represents the maximum value of the unnormalized evidence strength for all edges, used to... Constrained to The range facilitates the gradual accumulation of subsequent path weights.
[0030] For each relation edge Set directional indicator parameters This is used to identify the direction of control reflected by the edge. Directional identification parameter. The values are defined as follows:
[0031] : Indicates a positive regulatory or promoting relationship (e.g., "promoting pyroptosis", "upregulating inflammatory factors", "activating inflammasomes", etc.);
[0032] : Indicates a negative regulatory or inhibitory relationship (e.g., "inhibit pyroptosis", "downregulate inflammatory factors", "inhibit inflammasomes", etc.);
[0033] : Indicates no clear directional relationship or only statistical correlation (e.g., "related" or "accompanying").
[0034] For explicit "promote / inhibitory" relationships extracted from literature or pathway databases, values can be directly assigned; for clinically statistically relevant relationships, the default value is 0, and the statistical direction (e.g., positive or negative correlation) is additionally recorded in the edge attribute as auxiliary information, but this does not change the... The value selection rules are set to ensure the feasibility of subsequent direction consistency checks.
[0035] When the same entity pair When multiple source relationships appear across different data sources (e.g., associations between multiple documents, multiple pathway database entries, or different clinical cohorts), these relationships are merged. The merging process begins by sorting by relationship type. With directional identification parameters Aggregate the data; if the directions are consistent, then adjust the corresponding unnormalized evidence strength. Accumulate and then normalize and update. If the directions are inconsistent, they will be retained as separate edges to avoid mixing promoting and inhibiting caustic decay into an uninterpretable single edge in SAP scenarios. After the update is complete, the node set will be... With edge set Including edge attributes Store in the graph database.
[0036] It should be noted that the sample evidence nodes mapped into the atlas include: generating a unique identifier for each sample; standardizing the sample's gene expression values, pyroptosis index values, and clinical outcome indicators to convert data from different sources into comparable deviation values; triggering an evidence node generation mechanism when the deviation value of a certain indicator exceeds a deviation threshold, creating a corresponding sample evidence node in the atlas; establishing evidence association edges between the sample evidence node and the corresponding gene entity and phenotypic entity; determining the weight of the evidence association edges based on the deviation magnitude of the sample indicator and the credibility of the data source; when multiple abnormal indicators exist in the same sample, comprehensively calculating the deviation of each indicator to form the overall sample strength value, and determining whether to mark the sample as a high-confidence traceability sample based on the overall strength value.
[0037] It should also be noted that a preferred scheme for establishing evidence association edges between sample evidence nodes and corresponding gene entities and phenotypic entities specifically includes generating a unique identifier for each clinical sample. subscript This serves as the sample index. The sample must contain at least three types of observable variables: HSPA8 expression-related variables (e.g., peripheral blood qPCR expression or transcriptome expression), denoted as... ; where subscript HSPA8 is a fixed representation; the set of pyrolysis index variables (e.g., IL-1β, IL-18, GSDMD cleavage fragments, Caspase-1 activity, LDH, etc.) is denoted as HSPA8. ;in The index is the indicator number; clinical outcome or severity variables (such as SAP classification, organ failure, ICU admission, length of hospital stay, survival outcome, etc.) are also indexed by... Indicate and through Differentiate between specific indicators. To transform data from different sources into comparable deviation values, apply the same standardization strategy to each type of indicator to obtain the degree of deviation. The degree of deviation can be characterized by the central tendency and dispersion relative to the control or reference cohort:
[0038]
[0039] in, Indicates sample In terms of indicators The degree of deviation; Indicates sample The original measurement value; Indicators Mean in a reference population (e.g., healthy controls or baseline cohort); Indicators Standard deviation in the reference population.
[0040] For HSPA8 expression variables, i.e. ,get ;when When the value is negative and the absolute value is large, it corresponds to the sample characteristic of "significant deviation from low HSPA8 expression", which is convenient to use in conjunction with the pyroptosis progression index for source tracing.
[0041] Set deviation threshold This is used to determine whether a certain indicator constitutes anomalous evidence requiring tracing at the sample level. When the following conditions are met... When this occurs, the evidence node generation mechanism is triggered. After triggering, sample evidence nodes are created in the graph. subscript Fixed representation sample Evidence nodes. In the SAP scenario, HSPA8 ( ) and at least one pyrolysis indicator (a certain As one of the joint triggering conditions: when When the expression is significantly negative (low) and at least one pyroptosis indicator deviates to a threshold, sample evidence nodes are generated first to ensure that the evidence nodes are consistent with the research objective of "clarifying the correlation between HSPA8 and SAP pyroptosis progression".
[0042] After creating the sample evidence nodes, establish evidence association edges with the corresponding gene entity nodes and phenotype entity nodes, respectively. For HSPA8, establish evidence association edges. connect and Establish evidence-related edges for pyrolysis-related phenotypes (e.g., "pyrolysis progression" entity nodes). connect With the target phenotype entity node ,in Fixed representations of target phenotypes, such as "Apox progression" or "SAP severity / outcome." Evidence association edges are used to explicitly link "sample-level observations" to "knowledge-level structures," allowing subsequent path searches to originate from... arrive Simultaneously utilize knowledge edges and sample evidence edges.
[0043] To quantify the contribution of sample evidence to source tracing, weights are assigned to the evidence association edges. For the samples... With indicators The evidence edge is defined with weight as... The deviation is determined by both the magnitude of the deviation and the reliability of the data source, and is expressed as:
[0044]
[0045] in, Indicates sample In indicators The weight of the evidence edge formed above; Indicators The data source credibility coefficient is used to reflect the reliability of different data sources such as qPCR, ELISA, WB, and clinical records in the SAP scenario (e.g., the same indicator can be tested on different platforms with different data sources). ); This indicates the magnitude of the deviation, reflecting the intensity of the anomaly. For HSPA8, the evidence edge weight is... This weight can be directly used as input for the subsequent accumulation of path weights, ensuring that the more significant the sample anomaly and the more credible the source, the greater its proportion in the source tracing.
[0046] When multiple outlier indicators exist in the same sample, an overall sample strength value needs to be generated to screen for high-confidence source tracing samples. Let the sample... The set of abnormal indicators is Define the overall intensity value of the sample. To comprehensively represent the degree of deviation of each abnormal indicator, it is expressed as:
[0047]
[0048] in, Indicates sample Overall strength value; Indicates the sample in the index The degree of deviation; This indicates a traversal of the set of abnormal indicators for this sample. A threshold for overall intensity is set. When satisfied At that time, the sample Marked as high-confidence source tracing samples, and in the sample evidence node This tag should be written into the attributes. In SAP scenarios, further requirements can be made. Must include (That is, it must include HSPA8) and the ID of at least one pyroptosis-related indicator to ensure that the selected samples are strongly correlated with "clarifying the progression of HSPA8 and SAP pyroptosis". The graph database also contains: a knowledge layer graph structure with evidence strength parameters and directional identification parameters. And evidence layer nodes and evidence association edges related to the sample (e.g. , , and their weights ).
[0049] It should also be noted that by combining "constructing a heterogeneous medical knowledge graph + edge evidence strength parameters and directional identification parameters + sample evidence node mapping and evidence association edges," the problem of how to place multi-source heterogeneous medical knowledge and sample-level verification results into the same computable space is solved, ensuring that subsequent inferences are both quantifiable and traceable. Existing technologies often either remain at the static association representation of general knowledge graphs, making it difficult to express "differences in evidence strength" and "regulatory direction"; or they only perform statistical correlation at the sample data level, failing to structurally link "abnormal evidence of a specific sample" to the mechanism network, resulting in source tracing only providing generalized conclusions and failing to form a "sample-evidence-mechanism chain." By unifying entity encoding, topological mismatches caused by cross-database synonyms are avoided; by using evidence strength parameters, comparable accumulation of evidence from different sources and at different levels is achieved, giving subsequent path weights an interpretable numerical basis; by using directional identification parameters, criteria are provided for consistency of causal directions; and by using sample evidence nodes and evidence association edges, sample-level facts such as low HSPA8 expression, deviation of pyrolysis index, and abnormal outcome index are transformed into traceable evidence in the graph, thereby connecting "mechanism knowledge" and "sample verification" into isomorphic computational objects.
[0050] S2: In the medical knowledge graph, starting from the target gene entity and ending with the target phenotype entity, perform candidate path search to generate multiple candidate interpretation paths, construct a set of potential mixed candidate nodes, and perform common parent node structure detection and backdoor path detection on each candidate path.
[0051] Furthermore, the candidate path search includes: performing a directed path search with a limited path length in the graph, starting from the target gene entity and ending at the target phenotype entity; calculating the path weight for each searched path, which is obtained by accumulating the evidence strength parameters of each relation edge in the path step by step; removing paths whose overall weight is lower than the path weight threshold; verifying the consistency of path directions based on the directional identifiers of relation edges, and reducing the path weight when there are directional conflicts in the path; and finally retaining candidate explanatory paths with weights that meet the requirements and consistent directions.
[0052] It should also be noted that a preferred approach to performing candidate path search specifically includes setting a maximum path length. This is used to limit the number of entity nodes or relation edges in a path, avoiding excessively long and uninterpretable paths. (Target gene entity nodes) Starting from (HSPA8), with the target phenotype entity node As the endpoint, in the map A directed path search is performed. The path search can employ depth-first search, breadth-first search, or cost-based heuristic search. This embodiment uses a "directed constraint + length constraint" as the minimum implementation requirement: only paths reachable from the starting point along the edge direction to the ending point are retained, and the number of edges does not exceed a certain limit. The paths obtained from the search are denoted as a set. Any path is represented as subscript This is the path index, representing the candidate path number. Path Composed of a sequence of nodes and a sequence of edges, it is represented as:
[0053]
[0054] in, Representing a path Upper One node; Indicates the position index within the path; Representing a path The number of edges (i.e., the number of nodes minus one) satisfies .
[0055] To make the paths usable for source tracing and ranking, this embodiment performs a process for each candidate path. Calculate the path weight. The path weight reflects the overall support of the path formed by the cumulative strength of evidence from the knowledge edges, and is at least related to the strength of evidence parameters of each edge on the path. There is a monotonic relationship. Using a product-based accumulation method and scaling with path length, it can be expressed as:
[0056]
[0057] in, Indicate candidate path Path weights; Representing a path upper node Pointing to node The Edge; Representing an edge Evidence edge weights.
[0058] When there are low-evidence-strength edges in the path, the path weight will decrease significantly; when the path is connected by multiple high-evidence-strength edges, the path weight will remain relatively high.
[0059] Set path weight threshold .when If the evidence supporting a particular path is insufficient, it is removed from the candidate set. Remove from the list. The set of paths retained is denoted as... It satisfies that the weight of all paths is not lower than the threshold.
[0060] Because the graph contains both clearly directional control edges ( ) and related edges with unclear directions ( The mere existence of a path is insufficient to support a causal candidate explanation. Therefore, this embodiment performs directional consistency checks on the path and reduces the path weight when a directional conflict is detected. First, the path is defined. Directional conflict count This is used to count the number of edges within a path that contradict the assumption of the main direction. It includes all edges in the path... Edges are considered directional constraint edges. A conflict is counted when a directional constraint edge and its adjacent constraint edge are logically non-concatenable within the path. This non-concatenation includes at least the following: at the same intermediate node, the preceding constraint edge represents strong inhibition and the following constraint edge represents strong promotion, and their relationship type is marked as mutually exclusive. The mutual exclusion rule can be configured in the relation type metadata during graph construction. After obtaining the conflict count, the attenuation factor is calculated as follows:
[0061]
[0062] in, Representing a path Directional conflict count; This represents the attenuation coefficient of a single collision, satisfying... This is used to control the decay of path confidence with each directional conflict. This represents the overall path attenuation factor.
[0063] Based on this, the path weight after direction verification is represented as follows:
[0064]
[0065] in This is the path weight after direction consistency verification. If If the path is incorrect, it will also be eliminated. The final set of candidate explanation paths is denoted as . , It is the input for subsequent promiscuous detection.
[0066] It should be noted that the common parent node structure detection and backdoor path detection include: identifying nodes in the graph that simultaneously point to the target gene entity and the target phenotype entity, and including the corresponding nodes in a potential confounding candidate node set; for each candidate path, detecting whether there is a common causal structure derived from the confounding node; cumulatively evaluating the strength of the relationship between the confounding node and the target gene and the target phenotype, and generating a confounding risk score based on the cumulative results; when the confounding risk score exceeds the confounding risk threshold, the corresponding path is marked as a high-risk pseudo-causal path; at the same time, a backdoor path set is constructed, and the weights of paths that can be blocked by observed variables are adjusted to reduce the corresponding causal confidence.
[0067] It should also be noted that the reference Figure 2 A preferred scheme for performing common parent node structure detection and backdoor path detection specifically includes, in the graph Search for nodes that meet the following conditions : There are edges Make And there exists an edge Make All nodes that meet the conditions are grouped into a potential mixed candidate node set. , represented as:
[0068]
[0069] in, Indicates a potentially mixed candidate node; subscript Indicates a mixed candidate index; and These are directed edges from the hybrid candidate nodes to the HSPA8 nodes and the target phenotype nodes, respectively. Further type constraints are imposed to prioritize entity types that better conform to SAP's definition of heterogeneity, such as "clinical covariates / treatment exposure / inflammatory status / immune cells," in order to reduce noisy nodes.
[0070] For each candidate path Identify its relevant mixed subsets When a mixed node has a direct incoming or outgoing edge connection to any node in the path, it is associated with the path: if and With any node on the path There exists a directly related edge (in any direction) or with If the edges share a common parent node, then... Included In medical knowledge graphs, the association between HSPA8 and the target phenotype may be driven by third-party variables, such as inflammatory status, treatment exposure, or changes in immune cells. These variables simultaneously affect both target gene expression and disease phenotype, thus forming a "common cause structure" in the graph structure. If this structure is not identified, graph path reasoning may misjudge a common cause-driven correlation as a causal relationship. Therefore, it is necessary to detect this structure and quantify its confounding risk, and to cumulatively evaluate the strength of the relationship between confounding nodes and the target phenotype for each candidate path. Based on its related hybrid subset Calculate the confounding risk score The confounding risk score is used to measure the simultaneous driving strength of the common cause structure on both HSPA8 and the target phenotype. In an executable implementation, for each confounding candidate node... The strength of the two direct edges between HSPA8 and the target phenotype is taken. and And perform multiplication and accumulation to reflect that strong connectivity constitutes strong hybridity, expressed as:
[0071]
[0072] in, Indicate candidate path Hybrid risk score; The parameter representing the edge evidence strength of the hybrid node pointing to HSPA8; This parameter represents the edge evidence strength parameter pointing from the promiscuous node to the target phenotype. A promiscuous risk threshold is set. .when At that time, candidate paths Mark as a high-risk path with spurious causation and record the marking attributes. ;when When this happens, mark it as a candidate path for passing the confounding screening and record it. Furthermore, to ensure the sustainable use of this mark, As an attribute of the path object, it is written back to the graph database or the source calculation cache.
[0073] Common parent node detection can reveal typical heterogeneous structures, but backdoor paths may still exist, causing the association between HSPA8 and the phenotype to be transmitted through non-causal pathways. To address this, a set of backdoor paths is constructed, and weight adjustments are performed on paths blocked by observable variables to reduce their causal reliability.
[0074] In this embodiment, the backdoor path is defined as: from arrive An undirected reachable path whose first segment does not follow the path... It doesn't start from the outward direction, but rather through a certain direction. Entering via an inbound edge or a bypass derived from a hybrid node The neighborhood of the region forms a non-causal propagation pathway. At least the following construction method should be used: first, take all directly pointed to... The set of incoming neighbor nodes and with The node in the code is used as the backdoor entry node, and then the length is constrained. The search proceeds from the entry node to... The path is used to obtain the set of backdoor paths. Any one of the backdoor paths is denoted as... subscript This is the backdoor path index.
[0075] To determine whether the backdoor path can be blocked by observed variables, sample evidence nodes are used. The clinical covariate information carried is mapped to the evidence-related edge. The set of observable variable entities is defined as... It includes at least: entity nodes corresponding to clinical variables in the graph and in high-confidence source samples (from...). Variables that are recorded or mappable in the atlas (labels). Examples include treatment exposure nodes, infection status nodes, sampling time window nodes, and immune cell ratio nodes. In an executable implementation, if a clinical variable appears in the sample evidence node attributes and can be mapped to an atlas node, then the corresponding atlas node is included. .
[0076] For each candidate path It detects whether it shares critical intermediate nodes or heterogeneous entry structures with certain backdoor paths, and determines whether there are blocking nodes. Located in the back door path If such a candidate path exists, it is considered that its explanation may be explained by the observed variables through a backdoor pathway, and its causal reliability needs to be reduced. Introducing a backdoor can block the penalty factor. Its value is monotonically related to the number of blockable backdoor paths. Let... Representation and path Let be a set of related backdoor paths (e.g., shared nodes or shared entry points). Indicates that it can be The number of blocked backdoor paths is represented as:
[0077]
[0078] in, Indicates the backdoor penalty factor; This represents the penalty coefficient corresponding to a single blockable backdoor path, satisfying... ; Indicates and A set of related and observable variables The number of blocked backdoor paths. Weights are used to verify the direction of candidate paths based on this. Further adjustments are made as follows:
[0079]
[0080] in This represents the path weight after detection via common parent node and backdoor detection, used for sample stratification consistency analysis and path contribution calculation. If... If the path is positive, it will be removed after the backdoor detection; otherwise, it will be retained and written back to the path object property.
[0081] It should also be noted that by combining "candidate path search + path weight accumulation and direction consistency verification + construction of a set of potentially confounding candidate nodes + detection of common parent node structure and backdoor path detection," the problem of how to systematically identify and suppress potentially confounding pseudo-causal paths in path reasoning of knowledge graphs is solved, thus elevating the output path from a reachable path to a quasi-causal candidate mechanism chain. Traditional graph path search (shortest path, random walk, embedding similarity) often assumes that "the existence of a path is meaningful." However, in SAP clinical scenarios, variables such as treatment intervention, infection status, inflammation intensity, and sampling time window often simultaneously affect HSPA8 expression and pyroptosis / outcome, thus forming a large number of pseudo-paths on the graph that are "seemingly coherent but actually driven by common causes." These pseudo-paths are not simple noise; they often have strong statistical correlation and high topological reachability, making them difficult to filter using thresholds or topological indicators alone. By introducing common parent node structure detection, nodes that "simultaneously point to HSPA8 and phenotype" are explicitly defined as heterogeneous candidates, and a heterogeneous risk score is formed by cumulative evaluation based on edge evidence strength, making heterogeneous identification a computable process. Furthermore, by introducing backdoor path set and observation variable blocking logic, the backdoor idea in causal inference is applied to the graph structure, and the paths that can be explained by the observation variables are weighted and penalized, thereby completing the systematic screening of pseudo-causal paths at the structural level.
[0082] S3: Perform sample stratified consistency analysis and path contribution calculation on the candidate paths that pass the confounding detection to obtain the causal candidate main paths and their corresponding path contribution values, and output the source tracing results including confounding node identifiers and path evidence chains.
[0083] Furthermore, the sample stratification consistency analysis includes: stratifying the samples based on observable clinical variables among potential confounding candidate nodes; recalculating the association between the target gene and the target phenotype in each stratified subsample set; comparing the consistency between the stratification results and the overall sample results; performing confidence decay on the corresponding candidate path when the association direction is reversed or the association strength decreases significantly after stratification; and increasing the causal confidence weight of the corresponding path when all stratification results remain consistent and stable.
[0084] It should also be noted that a preferred approach to stratified consistency analysis specifically includes first selecting a high-confidence source sample set from all samples to ensure the stability and interpretability of the statistical association. The high-confidence source sample set is defined as: satisfying... samples The set formed by them is denoted as .
[0085] Subsequently, the stratification variables are determined: the stratification variables must come from the set of observable variables. And at the sample evidence node There are corresponding values, meaning they can be seen at the sample layer and mapped to graph nodes. To ensure relevance to the path, this embodiment assigns values to each path. Further extract the hierarchical variable subset related to it. The extraction rule is: if a certain variable node With mixed sets If a variable has a direct connection, or a direct connection to any intermediate node in the path, it is considered that the variable may drive the correlation fluctuations of the path, and is included in the calculation. Each path has its own list of candidate hierarchical variables, avoiding redundancy and noise caused by blindly hierarchizing all variables.
[0086] For any hierarchical variable Read sample evidence nodes The sample values of this variable will be It is divided into several sub-sample sets.
[0087] like If the classification is binary (e.g., "whether infected" or "whether exposed to a certain type of treatment"), then it is divided into two subsets.
[0088] like For continuous variables (such as the proportion of a certain immune cell, inflammation intensity index, etc.), they are divided into multiple subsample sets according to preset quantiles or clinically commonly used threshold intervals.
[0089] Set a minimum sample size constraint: If the sample size of a certain subset is less than the preset lower limit, the subset will not participate in the consistency determination, thus avoiding false reversals caused by extremely small samples.
[0090] In the overall set Above, the overall correlation between the degree of HSPA8 deviation and the degree of phenotypic deviation is calculated and denoted as . This calculation uses and Therefore, it is not affected by the original units of measurement. The corresponding hierarchical correlation degree is also calculated for each hierarchical subset. Here Used to distinguish between "stratified variables" and "stratified intervals / categories". Consistency issues are categorized into two triggering conditions: direction reversal trigger: if a certain stratification exists that makes... and If the signs are opposite, the hierarchical variable is considered to potentially drive spurious correlations or Simpson inversions, and the corresponding path needs to be downweighted; this determination is expressed as:
[0091]
[0092] Significant decrease in strength trigger: If the correlation strength after stratification is significantly less than the overall strength, it is represented as follows:
[0093]
[0094] This suggests that the overall correlation may be primarily caused by certain hierarchical mixing, and the corresponding paths also need to be downweighted; among them To maintain a proportional threshold for intensity. For each path. Count the number of triggers (i.e., the number of strata that reversed or significantly decreased). Convert this number to a consistency factor. For path weights Perform interpretable corrections:
[0095]
[0096] And update the weights after path hierarchical correction:
[0097]
[0098] Updated The path object properties are written back as input for subsequent path contribution calculations. If a path is stable across multiple key layers (i.e....), then... ),but This path will not be demoted.
[0099] It should be noted that the path contribution calculation includes: evaluating the marginal impact of each candidate path that passes the confounding detection on the target phenotype change; calculating the independent contribution value of each path by comparing the change in prediction results when the corresponding path is included with and without the corresponding path; normalizing and ranking the contribution values of each path; when the contribution value of a path exceeds the main path threshold, the path is determined as a causal candidate main path; and generating a source tracing result report output containing path node sequences, confounding node identifiers, and path contribution ranking information.
[0100] It should also be noted that a preferred scheme for calculating path contribution specifically includes defining a prediction score function based on path weight aggregation. ,in This represents a subset of paths participating in the prediction. In a minimum feasible implementation, Take the sum or weighted sum of the path weights, and use the weights after hierarchical correction. As input, it is represented as:
[0101]
[0102] in, This indicates that only the set of paths is considered. At that time, for the target phenotype The prediction results. For each path Calculate its independent contribution value , represented as:
[0103]
[0104] in, This indicates the definition of a set of full paths. This indicates removing a path from the set. The final set of paths is used to calculate the total contribution. Represented as:
[0105]
[0106] And received normalization contribution , represented as:
[0107]
[0108] Then press Sort the paths from highest to lowest contribution to form a path contribution ranking list. Set a primary path threshold. ,when At that time, the path Marked as a causal candidate main path and its marking is written back to the path object property for use in the generation of the tracing report and subsequent calls. The tracing report is written to the results storage module and compared with the corresponding sample set. The ID list is associated and saved, so that subsequent samples can be traced to see which samples support the main path, thus completing the closed loop of tracing the source of sample verification results.
[0109] It should also be noted that the combination of "sample stratification consistency analysis + path contribution calculation + main path determination and source tracing report output" solves the problem of how to couple candidate mechanism paths at the structural level with heterogeneous evidence at the sample level in a closed loop, maintain conclusion stability under different clinical stratification conditions, and achieve quantifiable attribution ranking of multiple candidate paths. In the SAP-pyroptosis-HSPA8 study, different patient strata (treatment exposure, infection status, immune ratio, sampling window, etc.) are prone to reversal of correlation direction or attenuation of intensity (typically the Simpson effect), resulting in conclusions that are "overall significant but stratified unstable" and cannot be used for mechanism explanation or translational decision-making. Structural confounding detection alone is insufficient to guarantee the robustness of the sample layer. Therefore, this step combines observable stratified variables with a high-confidence source sample set, recalculates HSPA8-phenotypic associations in each stratified subset, and uses reversal / significant decrease as trigger conditions to decay the confidence of the corresponding path, achieving secondary correction of structural paths at the sample level. Based on this, the marginal contribution is calculated by the predicted change magnitude of "including the path and not including the path", so that the importance of the path is no longer determined solely by topology or edge weight, but by its independent increment in phenotypic explanation. This allows for attribution ranking and determination of the dominant path in mechanism networks with multiple paths.
[0110] Example 2, an embodiment of the present invention, provides a sample verification result tracing system based on knowledge graph, including a knowledge graph construction module, a path detection module, and a result tracing module.
[0111] The knowledge graph construction module is used to construct a heterogeneous medical knowledge graph, and to attach evidence strength parameters and directional identification parameters to each relation edge. It maps the clinical sample verification results to sample evidence nodes in the graph and establishes evidence association edges between sample evidence nodes and corresponding gene entities and phenotype entities. The path detection module is used to perform candidate path search in the medical knowledge graph with the target gene entity as the starting point and the target phenotype entity as the ending point, generate multiple candidate explanatory paths, construct a set of potential confounding candidate nodes, and perform common parent node structure detection and backdoor path detection on each candidate path. The result tracing module is used to perform sample hierarchical consistency analysis and path contribution calculation on the candidate paths that pass the confounding detection, obtain the causal candidate main path and the corresponding path contribution value, and output the tracing results including confounding node identifiers and path evidence chains.
Claims
1. A method for tracing the source of sample verification results based on knowledge graphs, characterized in that, include: Construct a heterogeneous medical knowledge graph and attach evidence strength parameters and directional identification parameters to each relation edge. Map the clinical sample verification results to sample evidence nodes in the graph and establish evidence association edges between sample evidence nodes and corresponding gene entities and phenotype entities. In the medical knowledge graph, candidate path search is performed starting from the target gene entity and ending at the target phenotype entity to generate multiple candidate interpretation paths. A set of potential mixed candidate nodes is constructed, and common parent node structure detection and backdoor path detection are performed on each candidate path. The candidate paths that pass the confounding detection are subjected to sample stratified consistency analysis and path contribution calculation to obtain the causal candidate main paths and their corresponding path contribution values. The tracing results, which include confounding node identifiers and path evidence chains, are output.
2. The method for tracing the source of sample verification results based on knowledge graphs as described in claim 1, characterized in that: The construction of the heterogeneous medical knowledge graph includes... Entities from literature databases, pathway databases, and clinical data are standardized, uniformly coded, and nodes are established. Establish directed edges for the regulatory relationships between entities; Each relation edge is assigned an evidence strength parameter based on the level and quantity of evidence sources. The evidence strength parameter is weighted and accumulated according to the evidence type weight and the evidence credibility, and then normalized. At the same time, a directional labeling parameter is set for each relationship edge to identify positive control, negative control, or no clear direction relationship; When the same entity pair has multiple source relationships, the multiple relationships are merged, and the final weight values of the corresponding relationship edges are updated based on the accumulated evidence and then stored in the graph database.
3. The method for tracing the source of sample verification results based on knowledge graphs as described in claim 2, characterized in that: The mapping to sample evidence nodes in the graph includes A unique identifier is generated for each sample, and the gene expression values, pyroptosis index values, and clinical outcome indicators of the samples are standardized to transform data from different sources into comparable deviation values. When the deviation value of a certain indicator exceeds the deviation threshold, the evidence node generation mechanism is triggered to create a corresponding sample evidence node in the graph. Each sample evidence node establishes an evidence association edge with its corresponding gene entity and phenotype entity. The weights of the evidence-related edges are determined based on the deviation of the sample indicators and the credibility of the data sources; When multiple abnormal indicators exist in the same sample, the deviation of each indicator is calculated to form the overall strength value of the sample, and the overall strength value is used to determine whether the sample should be marked as a high-confidence traceability sample.
4. The method for tracing the source of sample verification results based on knowledge graphs as described in claim 3, characterized in that: The execution candidate path search includes, Starting from the target gene entity and ending at the target phenotype entity, a directed path search with a limited path length is performed in the graph; For each path obtained from the search, a path weight is calculated. The path weight is obtained by accumulating the evidence strength parameters of each relation edge in the path step by step. If the overall weight of a path is lower than the path weight threshold, it will be removed. At the same time, the consistency of the path direction is checked based on the directional identifier of the relation edge, and the path weight is reduced when there is a directional conflict in the path. Finally, candidate interpretation paths that meet the weight requirements and are consistent in direction are retained.
5. The method for tracing the source of sample verification results based on knowledge graphs as described in claim 4, characterized in that: The execution of common parent node structure detection and backdoor path detection includes, Identify nodes in the graph that point to both the target gene entity and the target phenotype entity, and include the corresponding nodes in a set of potential mixed candidate nodes; For each candidate path, check whether there is a common cause structure derived from the hybrid nodes; The strength of the relationship between confounding nodes and target genes and target phenotypes is cumulatively assessed, and a confounding risk score is generated based on the cumulative results; When the confounding risk score exceeds the confounding risk threshold, the corresponding path will be marked as a high-risk path of pseudo-causality. Simultaneously, a set of backdoor paths is constructed, and the weights of paths that can be blocked by observed variables are adjusted to reduce the corresponding causal confidence.
6. The method for tracing the source of sample verification results based on knowledge graphs as described in claim 5, characterized in that: The stratified consistency analysis of the samples includes, The samples were stratified based on observable clinical variables among potential confounding candidate nodes; The association between the target gene and the target phenotype was recalculated in each stratified subsample set; Compare the consistency between the stratification results and the overall sample results; When the association direction is reversed or the association strength decreases significantly after stratification, the confidence decay process is applied to the corresponding candidate path. When the results of each layer remain consistent and stable, the causal credibility weight of the corresponding path is increased.
7. The method for tracing the source of sample verification results based on knowledge graphs as described in claim 6, characterized in that: The path contribution calculation includes, For each candidate path that passes the confounding detection, assess the marginal impact on the target phenotypic change. The independent contribution value of a path is calculated by comparing the magnitude of change in prediction results when the corresponding path is included versus when it is not. The contribution values of each path are normalized and sorted. When the contribution value of a certain path exceeds the threshold of the main path, the path is identified as a causal candidate main path; It also generates a tracing result report that includes path node sequences, mixed node identifiers, and path contribution ranking information.
8. A knowledge graph-based sample verification result tracing system, employing the knowledge graph-based sample verification result tracing method as described in any one of claims 1 to 7, characterized in that: It includes a knowledge graph construction module, a path detection module, and a result tracing module; The knowledge graph construction module is used to construct a heterogeneous medical knowledge graph, and to add evidence strength parameters and directional identification parameters to each relation edge, to map the clinical sample verification results to sample evidence nodes in the graph, and to establish evidence association edges between sample evidence nodes and corresponding gene entities and phenotype entities. The path detection module is used to perform candidate path search in the medical knowledge graph, starting from the target gene entity and ending at the target phenotype entity, to generate multiple candidate interpretation paths, and to construct a set of potential mixed candidate nodes. It also performs common parent node structure detection and backdoor path detection on each candidate path. The result tracing module is used to perform sample hierarchical consistency analysis and path contribution calculation on the candidate paths that pass the confounding detection, obtain the causal candidate main path and the corresponding path contribution value, and output the tracing result containing the confounding node identifier and the path evidence chain.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the knowledge graph-based sample verification result tracing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the knowledge graph-based sample verification result tracing method as described in any one of claims 1 to 7.