Self-explaining multi-hop reasoning and dynamic optimization method and system based on knowledge graph

By introducing knowledge graphs and graph convolutional propagation mechanisms into natural language processing models, and combining them with a self-verification process, the problems of unstable interpretation and insufficient robustness in multi-hop reasoning are solved, and interpretable and reliable reasoning results are achieved, which are applicable to fields such as medicine, law, and finance.

CN121189497BActive Publication Date: 2026-04-10BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing self-explanatory natural language processing models suffer from issues such as reasoning degradation, broken reasoning chains, and a lack of dynamic optimization mechanisms in multi-hop reasoning, resulting in unstable explanations and insufficient robustness, making it difficult to guarantee the accuracy and credibility of reasoning in complex scenarios.

Method used

By introducing structured modeling of entity-relationships and graph convolutional propagation mechanisms, combined with self-verification and backoff control processes, a cross-document reasoning path is constructed to achieve dynamic optimization and global consistency constraints. Knowledge graphs are used to enhance the reasoning process, and information propagation and verification are carried out through graph convolutional networks and attention mechanisms.

Benefits of technology

It improves the accuracy and robustness of multi-hop inference, ensures the traceability and transparency of inference results, and is suitable for scenarios with high interpretability requirements such as medical, judicial, and financial fields, thereby enhancing users' trust in the model's prediction results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121189497B_ABST
    Figure CN121189497B_ABST
Patent Text Reader

Abstract

The application discloses a kind of self-explaining multi-hop reasoning and dynamic optimization method based on knowledge graph, comprising the following steps: S1 text preprocessing: obtaining standardized text structure;S2 candidate reason generation: candidate reason is generated using generator-predictor framework, and the subset of reason is obtained using differentiable sampling mechanism;S3 knowledge graph construction: entity and relationship are extracted from candidate reason, and knowledge graph is constructed;S4 graph convolution propagation: graph convolution and attention propagation are performed on knowledge graph, and the weight representation of node and relationship is obtained;S5 self-verification;S6 multi-hop reasoning module: after verification, multi-hop document retrieval and reading comprehension are performed, and candidate answer and its supporting sentence are obtained;S7 final explanation output: output final answer.This method guarantees the accuracy of reasoning while outputting traceable explanation, and improves the robustness and credibility of the system in complex environment through self-verification and rollback iteration.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing and knowledge graph, and particularly relates to a self-explaining multi-hop reasoning and dynamic optimization method and system based on a knowledge graph. BACKGROUND

[0002] In recent years, deep learning has made significant progress in the field of natural language processing, especially the wide application of large pre-training models based on Transformer, BERT, GPT, etc., which has continuously improved the accuracy of tasks such as text classification, question answering and machine translation. However, with the increase in model size and complexity, its "black box" characteristics gradually emerge, and users have difficulty understanding the decision basis of the model, so how to improve the explainability of the model has become a problem to be solved.

[0003] Therefore, the academic community has proposed self-explaining model methods, among which selective rationalization (SR) and multi-hop question answering (MHQA) have received widespread attention. SR attempts to extract some key fragments from the input text as the basis for model decision-making, but is easily affected by pseudo-related features, leading to degeneration of reasons; MHQA supports answers through cross-document and cross-entity reasoning chains, but in complex scenarios, the reasoning chain is prone to breakage or logical inconsistency, affecting reasoning integrity and traceability, but still has the following shortcomings:

[0004] 1. Reason degeneration problem: candidate reasons are easily affected by pseudo-related features, leading to unstable explanation fragments;

[0005] 2. Reasoning chain breakage problem: in the multi-hop reasoning process, the path across documents or cross-entity relationships is prone to interruption, making it difficult to ensure explanation integrity;

[0006] 3. Lack of dynamic optimization mechanism: existing models still output results when evidence is insufficient or reasoning is unreliable, reducing credibility.

[0007] Knowledge graph can represent entities and their relationships in a structured way, providing strong support for complex semantic tasks. However, traditional knowledge graph construction relies on manual rules or static statistical methods, making it difficult to meet the complex reasoning needs across documents and domains. Therefore, how to combine knowledge graph and dynamic optimization mechanism to build an explainable and robust multi-hop reasoning method that can guarantee reasoning accuracy, output traceable explanations, and have a dynamic optimization mechanism is a technical problem that needs to be solved in this field.

[0008] To solve the above problems, existing research proposes to introduce a knowledge graph into the self-explaining NLP model (referred to as knowledge graph enhanced reasoning), which explicitly introduces entity and relationship information in the reasoning process, constructs a cross-document and cross-domain knowledge graph, and attempts to alleviate the problems of evidence chain breakage and reason degradation. For example, in the multi-hop question answering task, the model can connect the information scattered in different documents through the "entity-relation-entity" path, thereby generating a relatively complete reasoning chain and improving the explainability of reasoning. However, this method still has the following shortcomings in practical application:

[0009] Problem one: "evidence chain is fragile": the knowledge graph often relies on static extracted entity relationships, if some key entities are not captured or the relationship is missing, the reasoning chain is easy to break, resulting in incomplete model explanation.

[0010] Problem two: "pseudo-relevant reasons": in the selective reasoning step, candidate reasons are easily disturbed by false relevant features, and the generated explanation fragments may not be consistent with the real reasoning process, reducing the stability of the explanation.

[0011] Problem three: "lack of dynamic optimization": existing methods still force to output results when the reasoning evidence is insufficient or the reliability is questionable, lacking self-verification and rollback mechanism, resulting in insufficient reasoning robustness and difficulty for users to trust the output results. SUMMARY

[0012] Based on the shortcomings of existing self-explaining natural language processing models in reason selection degradation, reasoning chain breakage, and lack of dynamic optimization mechanism, the present application proposes a self-explaining multi-hop reasoning and dynamic optimization method based on knowledge graph. This method introduces structured modeling of entities and relationships and graph convolution propagation mechanism, and combines self-verification and rollback control process, realizes dynamic optimization and global consistency constraint of cross-document reasoning path, thereby ensuring the accuracy, traceability and robustness of the reasoning result. It is suitable for complex scenarios such as medical, judicial, financial and other fields that have strict requirements for explainable reasoning.

[0013] The technical solution to achieve the purpose of the present application is: a self-explaining multi-hop reasoning and dynamic optimization method based on knowledge graph, the processing flow includes the following steps:

[0014] Step S1: text preprocessing

[0015] Perform word segmentation, named entity recognition (NER) and keyword extraction on the input natural language text, output standardized text structure, including entity set, candidate relationship set and context window.

[0016] Step S2: candidate reason generation

[0017] Based on the generator-predictor framework, the standardized text is modeled to obtain a candidate reason set; through a differentiable sampling mechanism (such as Gumbel-Softmax), a subset of the candidate set is sampled to output a representative and diverse subset of reasons.

[0018] Step S3: Knowledge graph construction

[0019] The entities and relationships in the candidate reasons are instantiated as knowledge graph nodes and edges, and the supported relationship types include hierarchical relationships, causal relationships, and co-occurrence relationships. The output is a structured knowledge graph G=(V,E).

[0020] Step S4: Graph convolution propagation

[0021] A graph convolution network (GCN) and an attention mechanism (Graph Attention Network, GAT) are applied to the knowledge graph G to iteratively propagate and update node representations and edge weights, output weighted entity embeddings and relationship embeddings, and generate multiple candidate reasoning chains composed of entities and relationships.

[0022] Step S5: Self-verification

[0023] The input candidate reasoning chain is verified for data sufficiency and reasoning reliability:

[0024] Data sufficiency determination: Detect whether the entities and relationships covered by the reasoning chain meet the problem semantic constraints;

[0025] Reasoning reliability determination: Calculate the link consistency score (based on link confidence and semantic similarity).

[0026] If the verification fails, go back to step S2 to regenerate candidate reasons; if the number of iterations exceeds the threshold

[0027] T max , directly output "unable to reliably answer".

[0028] Step S6: Multi-hop reasoning, after verification, use two-stage document retrieval and reading comprehension to obtain candidate answers and supporting sentences;

[0029] Step S7: Final explanation output

[0030] The candidate answer and its supporting reasons are jointly output, and the entity-relation path is displayed through the reasoning chain visualization module, while the contribution weights of nodes and edges are output, forming a traceable and verifiable final explanation result.

[0031] As a preferred solution, in the candidate reason generation in step S2, the candidate reason generation includes a fact generator and a counter-fact generator, both of which constitute a cooperative game mechanism with the discriminator to enhance the distinctiveness and interpretability of the subset of reasons, for enhancing reason diversity and suppressing pseudo-relevance.

[0032] As a preferred solution, in the knowledge graph construction in step S3, the knowledge graph is composed of entity nodes and semantic relationship edges extracted from candidate reasons, and the relationship includes one or more of hierarchical relationship, causal relationship and co-occurrence relationship. The knowledge graph construction process supports cross-document entity alignment and cross-domain relationship extraction, improving the coverage and robustness of the knowledge graph.

[0033] As a preferred solution, a maximum iteration threshold is set in the self-verification process, and if the verification is still not passed after exceeding the threshold, a result of "unable to reliably answer" is directly output.

[0034] As a preferred solution, in the multi-hop reasoning in step S6, the two-stage document retrieval includes:

[0035] First stage: calculate the relevance score of the problem and the candidate document, and select Top-K documents; second stage: refine and score the combination of Top-K documents to obtain a high-quality evidence set.

[0036] Then, based on a multi-task reading comprehension model, perform answer type classification, answer span prediction and supporting sentence prediction, and output the candidate answer and supporting sentence set. As a preferred solution, the reading comprehension in step S6 uses a joint loss function, including answer type classification loss, answer span prediction loss and supporting sentence prediction loss.

[0037] As a preferred solution, in the final explanation output in step S7, the explanation output includes textual explanation, graphical reasoning chain, and contribution visualization of nodes and edges, facilitating users to intuitively check the reasoning process.

[0038] The application also provides a knowledge graph-based self-explaining multi-hop reasoning and dynamic optimization system, comprising

[0039] (1) a text preprocessing module for performing step S1;

[0040] (2) a candidate reason generation module for performing step S2;

[0041] (3) a knowledge graph construction module for performing step S3;

[0042] (4) a graph convolution propagation module for performing step S4;

[0043] (5) a self-verification module for performing step S5;

[0044] (6) a multi-hop reasoning module for performing step S6;

[0045] (7) a final explanation output module for performing step S7.

[0046] As preferred, the self-verification module comprises a data sufficiency determination unit and a reasoning reliability determination unit, and supports a rollback and iteration termination mechanism.

[0047] As preferred, the candidate reason generation module comprises a fact generator, an anti-fact generator, and a discriminator cooperating therewith, for enhancing the explainability of the reason subset through a cooperative game mechanism.

[0048] Compared with the prior art, the present application has the following beneficial effects:

[0049] (1) improved explainability

[0050] Through the multi-hop reasoning mechanism based on the knowledge graph, combined with the explicit output of the reasoning chain and the reason segment, the present application can clearly show the decision basis of the system. Compared with the traditional "black box" deep learning model, the decision path of the present application is transparent and the evidence is traceable, which significantly enhances the trust of the user in the prediction result of the model.

[0051] (2) improved reasoning accuracy and robustness

[0052] The present application introduces a joint propagation mode of graph convolution network (GCN) and attention mechanism on the knowledge graph, which can capture deep semantic relationships and avoid reasoning methods that rely only on surface similarity, thereby improving the accuracy of reasoning. At the same time, through the self-verification and rollback iteration mechanism, the result output is actively blocked when the data is insufficient or the reasoning is unreliable, thereby avoiding the generation of false conclusions, and thus significantly enhancing the robustness of the system in complex task environments.

[0053] (3) dynamic optimization and path adaptation

[0054] The present application designs a dynamic reasoning path selection and optimization strategy, which can adaptively adjust the reasoning link according to the current reasoning state, ensuring the coherence and logical consistency of the reasoning chain. This mechanism breaks through the traditional static reasoning method based on fixed rules, making the system have task adaptability and cross-domain expansion capability.

[0055] (4) improved practical application value

[0056] The present application not only improves the limitations of existing methods at the theoretical level, but also can be applied in medical question answering, judicial compliance, financial risk control, intelligent command and control, and other scenarios that require high explainability and credibility. By ensuring the transparency, stability and reliability of reasoning, the present application provides important technical support for building a trusted artificial intelligence system. Attached Figure Description

[0057] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein...

[0058] Figure 1 This is a flowchart of a knowledge graph-based self-explanatory multi-hop reasoning and dynamic optimization method according to the present invention.

[0059] Figure 2 This is a schematic diagram of the functional framework of the system of the present invention;

[0060] Figure 3 Detailed design diagrams of the key modules of the system of this invention. Detailed Implementation

[0061] The following is in conjunction with the appendix Figures 1-3 The specific embodiments of the present invention will be described in detail below. It should be understood that the following embodiments are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0062] Example 1: A self-explanatory multi-hop reasoning and dynamic optimization method based on knowledge graphs

[0063] like Figure 1 As shown, the method includes the following steps:

[0064] S1 Text Preprocessing (Tokenization, NER, Keyword Extraction)

[0065] Input: Raw natural language text / question and its context.

[0066] Processing: Chinese word segmentation / English tokenization; named entity recognition (e.g., personal names, place names, drug names, organization names, etc.); keyword / topic term extraction (TF-IDF, TextRank, etc.); text vectorization encoding.

[0067] Output: Standardized text structure (word segmentation sequence, entity list, keyword set, text vector) for use by S2 and S3.

[0068] S2 Candidate Reason Generation (Generator – Predictor + Differentiable)

[0069] Input: The standardized text structure of S1, i.e., the preprocessed text representation.

[0070] deal with:

[0071] 1. The generator outputs a binary mask. Reasons for being nominated:

[0072] 2.

[0073] where ⊙ denotes element-wise multiplication

[0074] 3. To ensure differentiable training, Gumbel-Softmax sampling is introduced:

[0075]

[0076] where is the selection probability, is the noise, is the adjustment parameter,

[0077] Using the generator-predictor cooperation framework, output the candidate reason mask and reason segment; using Gumbel-Softmax for differentiable sampling, screening a high-quality reason subset; can improve the recognition of reasons in the confrontation between double generators (fact / counter-fact) and discriminators; can be selected "reason guider (Rationale Guider) / sampling selector" to stabilize the training.

[0078] Output: candidate reason segments and their confidence scores, which provide the basis for S3 composition and S5 verification.

[0079] S3 Knowledge graph construction (entity and relationship extraction)

[0080] Input: candidate reasons of S2 and entities and keywords of S1;

[0081] Processing: extract entities and semantic relationships (hyponymy, causality, co-occurrence, etc.) from reasons and contexts, construct cross-document / cross-domain knowledge graphs, and store them using triples or adjacency matrices.

[0082] Output: Knowledge graph G=(V,E) (entity nodes and relationship edges) for S4 propagation and S5 self-validation calls.

[0083] S4 Graph Convolution Propagation (GCN + Attention)

[0084] Input: Knowledge graph G=(V,E) of S3, where V is the set of entity nodes and E is the set of relationship edges.

[0085] Processing: Use graph convolution network (GCN) and attention mechanism for global information propagation:

[0086]

[0087] where, represents the representation of the l-th layer node i, W is a learnable weight matrix, For attention weight, defined as:

[0088]

[0089] where W a ,W b is the projection matrix, d is the dimension of hidden layer.

[0090] Perform graph convolution and attention mechanism on the graph to propagate global information and update node representation, get node / edge weight and context association strength.

[0091] Output: updated node representation, edge weight, candidate reasoning chain (path) score, for S5 verification and S6 reasoning.

[0092] S5 Self-verification module

[0093] Input: S2-S4 output (reasoning fragments, knowledge graph, graph propagation results).

[0094] Processing (decision items):

[0095] 1. Data sufficiency: whether key entities / relationships are complete, whether the graph is connected, and whether the candidate path covers the problem points;

[0096] 2. Reasoning reliability: whether the path confidence exceeds the threshold, whether the attention / edge weight is stable, and whether it is consistent with known constraints.

[0097] Branch: pass (yes): enter S6;

[0098] Fail (no): trigger rollback, preferentially rollback to S2 or S3 or S4 to regenerate / supplement information according to failure reason; at the same time, record the iteration count, if not reach the maximum number, continue to loop, if reach the maximum number, terminate and output "unable to reliably answer".

[0099] Output: verification conclusion (pass / fail), rollback target and iteration status.

[0100] S6 Multi-hop reasoning (document retrieval + reading comprehension)

[0101] Input: high-quality context, candidate path and knowledge graph prompt after S5 passes

[0102] Processing:

[0103] 1. First stage retrieval: calculate the relevance between the question and the candidate document, select Top-K documents, then calculate the relevance between the question Q and the document D k Calculate relevance score:

[0104]

[0105] where is the encoding function, is the cosine similarity.

[0106] 2. Second-stage refinement: Jointly model the selected Top-K document combinations and compute the refinement scores:

[0107]

[0108] where MLP denotes a multi-layer perceptron and [;] denotes vector concatenation.

[0109] 3. Reading comprehension: Predict the answer type, answer start and end positions, and supporting facts, with the loss function defined as:

[0110]

[0111] Output: Candidate answers, supporting facts, and their confidences.

[0112] S7 Final explanation output (answer + reason + reasoning graph visualization)

[0113] Input: Reasoning results from S6 and verification information from S4 / S5.

[0114] Processing / output: Generate the final answer and simultaneously display: ① Reasoning fragments; ② Knowledge graph path / reasoning chain visualization; ③ Node and edge contribution / attention heat map; Form a traceable, self-explanatory result.

[0115] End:

[0116] If S7 is completed, the process ends; if S5 reaches the maximum number of iterations and still fails, output "unable to answer reliably" and end.

[0117] Example 2: Knowledge graph-based self-explaining multi-hop reasoning system function framework

[0118] As Figure 2 shown, Figure 2 corresponds Figure 1The figure shows the structural composition and interaction of the task selector (such as a fast routing method based on LDA and TF-IDF), the candidate reason generation module (such as a generator-predictor combined with a differentiable sampling mechanism), the multi-hop reasoning module (such as a two-stage document retrieval and refinement combined with a joint processing mechanism of reading comprehension), and the explanatory output module (for outputting answers, supporting sentences, and reasoning chain visualization), thereby realizing the specific functions of the method shown in FIG. 1. The functional framework of the system of the present application mainly consists of a task selector, a candidate reason generation module, a multi-hop reasoning module, and an explanatory output module, which are connected to each other and together complete the implementation of the method described in the present application at the system level.

[0119] 1. Task selector

[0120] The system first determines the input task type through the task selector. This module can combine LDA (Latent Dirichlet Allocation) topic modeling and TF-IDF document retrieval mechanism to quickly route the input:

[0121] If the answer to the question can be directly found in the input text, it is classified as a selective reasoning (SR) task;

[0122] If the question needs to be reasoned across multiple documents, it is classified as a multi-hop question answering (MHQA) task.

[0123] This module ensures that different types of questions can be diverted to the appropriate processing path, improving overall reasoning efficiency.

[0124] 2. Candidate reason generation module (SR path)

[0125] In the SR task, the system generates candidate reasons through a generator-predictor framework, and uses a mask mechanism and a discriminator constraint to ensure that the selected reasons are discriminative and stable. Finally, the reason segment Z is output through the sampling selector and handed over to the predictor to complete the label prediction. This process not only improves decision transparency, but also provides supporting evidence for subsequent explanatory output.

[0126] 3. Multi-hop reasoning module (MHQA path)

[0127] In the MHQA task, the system first uses the document retriever (Retriever) to score and sort the relevance of candidate documents, and then inputs the question and candidate documents into the context encoder (such as BERT). The reader (Reader) extracts the answer segment on this basis and simultaneously outputs the supporting sentences. This module ensures the integrity of the reasoning chain for cross-document questions.

[0128] 4. Explanatory output module

[0129] Regardless of the task type, the system finally outputs include: (1) answer prediction; (2) rationale fragment or supporting sentence; (3) reasoning chain visualization. Combined with the knowledge graph and attention weight, the system can generate traceable and checkable explanation information, significantly enhancing the explainability and application credibility of the model.

[0130] Embodiment 3: Key module design of knowledge graph-based self-explaining multi-hop reasoning system

[0131] As shown in Figure 3 , Figure 3 corresponding Figure 2 to the function modules, the internal structure of the S-Explainer (SR) and S-Explainer (MHQA) two paths is specifically shown, such as the generator-discriminator framework, document sorter, and reading comprehension unit, etc.

[0132] The system mainly includes two sub-modules: S-Explainer (SR) and S-Explainer (MHQA), which correspond to the selective rationalization task and the multi-hop question answering task, respectively, and work together to realize the systematic deployment of the method described in the application.

[0133] 1. Text preprocessing and input

[0134] The system receives input text or questions and performs word segmentation, encoding, and embedding processing. For the SR task, the input is a text sequence , and for the MHQA task, the input is “question + candidate document set”.

[0135] 2. Candidate rationale generation (SR path)

[0136] The system introduces a double generator-discriminator framework: generator 1 and generator 2 model the candidate rationales under different label conditions and generate rationale masks;

[0137] The discriminator distinguishes between the generated rationale and the context, ensuring that the generator learns discriminative features;

[0138] Through the sampling selector (Sampling Selector) and rationale guider (Rationale Guider), the final candidate rationale Z is obtained as the input of the predictor.

[0139] 3. Multi-document retrieval and sorting (MHQA path)

[0140] A pre-trained language model (such as BERT) is used to encode “question + document” to obtain document relevance representation;

[0141] Linear classifier scores documents, outputs relevance label and probability distribution;

[0142] Document ranker filters and ranks candidate documents by relevance scores, keeps the document set most likely to contain answers.

[0143] 4. Document reading and reasoning

[0144] BERT model to obtain joint representation of question and context;

[0145] Reading comprehension module further predicts:

[0146] (1) Answer type (yes / no / text, etc.);

[0147] (2) Answer span (start and end positions in the document);

[0148] (3) Supporting facts, i.e. evidence fragments supporting the answer.

[0149] 5. Self-validation and dynamic optimization

[0150] System performs self-validation on the output results of SR and MHQA two paths, judges whether the data is sufficient and the reasoning is reliable;

[0151] If the validation fails, fall back to the candidate reason generation or document ranking stage and re-execute;

[0152] If multiple iterations still do not meet the conditions, the system terminates and outputs "cannot reliably answer".

[0153] 6. Explanatory output

[0154] The final output of the system includes: (1) answer result; (2) candidate reason text; (3) supporting sentence set; (4) reasoning chain visualization (combined with knowledge graph and attention weight).

[0155] This not only gives the prediction result, but also provides traceable explanation information, enhances the transparency and credibility of the system.

[0156] Figure 3 Backtracking and iteration mechanism

[0157] Trigger condition: any of the S5 judgment items does not reach the threshold (e.g. graph is not connected, key relationship is missing, path confidence is insufficient).

[0158] Backtracking priority:

[0159] Missing relations / graph not connected → fallback S3 (reconstruct graph, fill in entities / relations if necessary);

[0160] Distorted reasons / insufficient coverage → fallback S2 (re-sample reasons, adjust generation-discriminator adversarial strength / guidance strategy);

[0161] Unstable propagation / abnormal weights → fallback S4 (restart or cool down propagation, limit over-attention / number of update layers);

[0162] If preprocessing quality significantly affects upstream, can backtrack to S1.

[0163] Termination condition: reach set maximum iteration number without passing S5, output "cannot reliably answer".

[0164] Embodiment 4: Application scenarios

[0165] The present application not only proposes a self-explaining multi-hop reasoning method based on a knowledge graph, but also has been implemented as a prototype system with complete functions, which can be put into use in real scenarios and solve practical problems. Specific applications include, but are not limited to, the following aspects:

[0166] (1) Medical question answering: In a medical knowledge base and case records, the present application can automatically retrieve multiple medical documents and medical records according to the questions raised by patients, reason possible causes and treatment plans, and give traceable reasoning chains. For example, when a patient asks "whether a certain drug can cause adverse reactions", the system can not only give an answer, but also mark relevant literature fragments and causal relationship paths, thereby improving the credibility of medical consultation.

[0167] Taking medical treatment as an example: when a doctor inputs "what is the possible cause of adverse reaction B after a patient takes drug A", the system first completes text preprocessing, generates candidate reasons and constructs a knowledge graph, and then performs convolution and attention propagation on the graph, and enters the self-verification link to evaluate data sufficiency and reasoning reliability; if the verification is passed, multi-hop retrieval and reading comprehension are performed to obtain candidate answers and supporting sentences, and finally the "answer + reason fragment + knowledge graph path (reasoning chain)" is output, and the evidence source is gradually marked to help the doctor quickly locate the cause and ensure explainability and checkability. The relevant process is shown in Figure 1 , which successively includes S1 text preprocessing, S2 candidate reason generation, S3 knowledge graph construction, S4 graph convolution propagation, S5 self-verification (including fallback and termination mechanism), S6 multi-hop reasoning, and S7 final explanation output. The internal implementation and module interaction relationship of each step are shown in Figure 2 (task selector, differentiable sampling generator-predictor, multi-stage retrieval and reading comprehension, explanation visualization, etc.).

[0168] Judicial compliance: In the legal regulations and case database, the application can automatically analyze the multi-hop association between legal provisions and cases, output explainable conclusions with evidence chains. For example, when the user asks "whether a certain contract clause violates existing laws", the system will combine the legal provisions and historical cases to output the answer, and at the same time show the reasoning chain and supporting clauses, providing reliable assistance for judicial compliance review.

[0169] Financial risk control: In the financial field, the application can be used to identify risk chains in complex transactions. The system not only identifies suspicious transactions, but also outputs risk reasoning paths and triggered rule logic, helping risk control personnel quickly locate problems.

[0170] Intelligent command and decision support: In the field of national defense, security and emergency decision-making, the application can analyze multi-source intelligence data through knowledge graph construction and self-validation mechanism, generate reliable reasoning chains, and provide explainable decision support for commanders.

[0171] In summary, the application is not only a theoretical framework, but also a prototype system with input processing, logical reasoning, self-validation, rollback optimization and explainable output, which can be applied in medical, judicial, financial and intelligent command fields. Through the system, the transparency and reliability of the reasoning process can be effectively improved, and the landing value of artificial intelligence in key fields can be significantly enhanced.

[0172] The above specific embodiments further illustrate the purpose, technical solutions and advantages of the application. It should be understood that the above description is only a specific embodiment of the application and is not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. within the spirit and principles of the application should be included in the protection scope of the application.

Claims

1. A knowledge graph-based self-explaining multi-hop reasoning and dynamic optimization method, characterized in that: The method comprises the following steps: S1 text preprocessing: performing word segmentation, named entity recognition and keyword extraction on the input text to obtain a standardized text structure; S2 candidate reason generation: outputting a set of candidate reasons for the input text through a generator-predictor framework, and obtaining a subset of reasons using a differentiable sampling mechanism; S3 knowledge graph construction: constructing a knowledge graph based on the entities and relationships extracted from the candidate reasons; S4 graph convolution propagation: performing global information propagation on the knowledge graph using a graph convolution network and an attention mechanism to generate a candidate reasoning chain composed of entities and relationships; S5 self-verification: verifying the candidate reasoning chain to determine data sufficiency and reasoning reliability; if the verification fails, return to the candidate reason generation step and re-execute; if the maximum number of iterations is reached and the verification still fails, output "unable to reliably answer"; S6 multi-hop reasoning: after the verification passes, use a two-stage document retrieval and reading comprehension method to obtain candidate answers and supporting sentences; S7 final explanation output: output the answer result, supporting reasons, and graphical explanation of the reasoning chain. 2.The knowledge graph based self-explaining multi-hop reasoning and dynamic optimization method of claim 1, wherein: In step S2, candidate reason generation, the candidate reason generation includes a fact generator and a counter-fact generator, which form a cooperative game mechanism with a discriminator to enhance the distinctiveness and interpretability of the subset of reasons. 3.The knowledge graph based self-explaining multi-hop reasoning and dynamic optimization method of claim 1, wherein: In step S3, knowledge graph construction, the knowledge graph is composed of entity nodes and semantic relationship edges extracted from the candidate reasons, and the relationship includes one or more of hierarchical relationship, causal relationship and co-occurrence relationship. 4.The knowledge graph based self-explaining multi-hop reasoning and dynamic optimization method of claim 1, wherein: In step S5, self-verification, a maximum iteration threshold is set in the self-verification process, and if the threshold is exceeded and the verification still fails, the result "unable to reliably answer" is directly output. 5.The knowledge graph based self-explaining multi-hop reasoning and dynamic optimization method of claim 1, wherein: In step S6, multi-hop reasoning, the two-stage document retrieval includes: first stage: calculate the relevance score of the problem and the candidate document, select Top-K documents; second stage: refine and score the combination of Top-K documents to obtain a high-quality evidence set.

6. The knowledge graph-based self-explaining multi-hop reasoning and dynamic optimization method according to claim 1, wherein in step S6, multi-hop reasoning, the reading comprehension uses a joint loss function, including answer type classification loss, answer span prediction loss and supporting sentence prediction loss.

7. The knowledge graph based self-explaining multi-hop reasoning and dynamic optimization method according to claim 1, characterized in that: In step S7, final explanation output, the explanation output includes text explanation, graphical reasoning chain, and visualization of the contribution of nodes and edges.

8. The system for performing the knowledge graph based self-explaining multi-hop reasoning and dynamic optimization method of any one of claims 1-7, wherein, It comprises: (1) a text preprocessing module for performing step S1; (2) a candidate reason generation module for performing step S2; (3) a knowledge graph construction module for performing step S3; (4) a graph convolution propagation module for performing step S4; (5) a self-verification module for performing step S5; (6) a multi-hop reasoning module for performing step S6; (7) a final explanation output module for performing step S7.

9. The system of claim 8, wherein: The self-verification module includes a data sufficiency determination unit and a reasoning reliability determination unit, and supports a rollback and iteration termination mechanism.

10. The system of claim 8, wherein: The candidate reason generation module comprises a fact generator, an anti-fact generator and a discriminator cooperating therewith, for enhancing the explainability of the reason subset through a cooperative game mechanism.

Citation Information

Patent Citations

  • Knowledge graph triple verification method based on multi-hop reasoning

    CN118569367A

  • Knowledge graph-based traffic engineering large model intelligent question-answering system and method

    CN120407752A