Logical inversion method and system for large medical models based on network excitation graph decomposition

Through the method based on network excitation graph decomposition, the problem of difficulty in interpreting the complex logic and multi-hop logic of large medical models in the existing technology is solved, the visual explanation of the model output results is achieved, and the credibility of the model in medical scenarios is improved. .

CN117747124BActive Publication Date: 2024-09-20ZHEJIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410187002.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-20
Publication Date
2024-09-20
Estimated Expiration
2044-02-20

AI Technical Summary

Technical Problem

It is difficult to mine the deep reasoning logic chain or logic network of large medical models with existing technology, resulting in a lack of credible interpretation of model output results in medical scenarios, especially in complex logic and multi-hop logic reasoning. explanation.

Method used

Using a method based on network excitation diagram decomposition, through structure extraction and reference library construction, the network excitation diagram is generated and modified, the probability coefficient vector of the base diagram is calculated, the reasoning logic path is reconstructed, and the visual interpretation of the output results of the large medical model is realized.

Benefits of technology

It achieves refined interpretation of the output results of large medical models, can identify and verify complex logic and multi-hop logic reasoning processes in the model, and improves the interpretability and credibility of the model in medical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117747124B
    Figure CN117747124B
Patent Text Reader

Abstract

The present invention discloses a method and system for logical inversion of a large medical model based on network excitation graph decomposition. Based on network excitation graph decomposition, the network excitation graph of the large medical model in the task process is decomposed into multiple network excitation base graphs by finely segmenting the medical term set and constructing a network excitation base graph library, and the nodes and relationships corresponding to the base graph are mapped to the knowledge graph, so as to reconstruct the reasoning logic path when the large medical model outputs the result, and realize visualized logical inversion of the large medical model. The present invention collects the network excitation graphs generated by the large model for finely distinguished medical entities and relationships, builds a complete reference library, realizes multi-classification judgment and one-time inspection of multiple entities and relationships; maps the nodes and relationships corresponding to the decomposed excitation base graph to the medical knowledge graph, reconstructs the large model thinking reasoning path, explores complex logic and multi-hop logic, and improves the interpretability of the large medical model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical health information technology, and in particular to a large medical model logic inversion method and system based on network excitation graph decomposition. Background Art

[0002] With the advent of big models and their rapid updates and iterations, their ability to solve subjective and complex problems has been continuously highlighted. Compared with traditional artificial intelligence methods that only assist doctors in completing part of the process in medical scenarios, the ultimate goal of applying big models in medical scenarios is to build a big model that is equivalent to doctors in terms of capabilities, and work with doctors to solve all problems in the entire medical process. The combination of big models and medical scenarios has become a research hotspot in the field. Researchers use big models to develop auxiliary diagnosis systems, discover potential diseases, warn of risks in the diagnosis and treatment process, and assist in completing relevant reports.

[0003] The current large models are generally constructed using transformer layers as the basic unit. In order to support the ability to solve subjective and complex problems, the structure and parameters of the large models are designed to be very large and complex. Compared with traditional artificial intelligence methods with certain structures, the generation mechanism of large models is difficult to interpret from a physical level, and due to the complex structure and parameters, the content generated by large models will be mixed with a lot of hallucinations.

[0004] In medical scenarios, safety and reliability are always the most important requirements. Improving the interpretability of large models, especially in medical scenarios, has become the key to mutual trust between humans and machines when large models are used in medical scenarios. Logical inversion is a technology that monitors the internal parameters of the model, reversely deduces the thinking logic in the process of generating output content by the large model, and visualizes it. It can provide a reliable and detailed explanation of the content output by the model.

[0005] Existing technologies use the method of linear artificial tomograph to explain the output of large models to a certain extent. This type of method realizes that large models have large and complex structures, and uses the method of linear artificial tomograph. First, stimuli and tasks are designed, then the neural activity of the large model is collected, and finally a linear model is constructed to classify the neural activity, thus avoiding explaining the output content of the model from the physical structure. However, the above technology can only reflect the large model's understanding of universal concepts through a binary classification method, and cannot be directly applied to the logical inversion of medical large model reasoning.

[0006] Reasoning in the medical field contains a large amount of complex logic and multi-hop logic. Logical inversion of medical reasoning requires more refined conceptual distinctions in order to reconstruct the reasoning path of the large medical model.

[0007] Complex logic and multi-jump logic: that is, in medical reasoning logic, there is not only simple reasoning logic from A to B. The vast majority is complex logic in which A and B work together to derive C, and multi-jump logic from A to B and then to C.

[0008] Refined concept distinction: Linear artificial imaging methods can only show universal concepts such as whether the output of the large model is honest, moral, fair, etc. Universal concepts and binary classification results are not suitable for explaining the output of the large medical model. For universal concepts, such as honesty or not, it is not enough to explain the output of the large medical model, because medical reasoning requires medical knowledge and medical thinking. However, if there is no medical data and medical thinking training when the model is trained or medical reasoning is not used when the model is used, the model will output an honest and correct conclusion that does not conform to medical logic. For simple binary classification results, such as whether the monitoring model output uses medical reasoning, the conclusion given cannot clearly explain the reasoning process of the large medical model and lacks credibility and persuasiveness.

[0009] Therefore, the above-mentioned technology based on linear artificial imaging is difficult to mine the deep reasoning logic chain or logic network of the large medical model, which limits the ability of the constructed system to interpret the output results of the large medical model. Summary of the invention

[0010] The purpose of the present invention is to address the deficiencies of the prior art and to propose a logic inversion method for large medical models based on network excitation graph decomposition.

[0011] The object of the present invention is achieved through the following technical scheme: a medical large model logic inversion method based on network excitation graph decomposition, the method comprising:

[0012] Structural extraction: Extract triple structures from medical terminology data, use triples to build a reasoning logic knowledge graph, and split triples into nodes and relationships;

[0013] Reference library construction: Generate network excitation graphs for each node or relationship multiple times and perform average processing to obtain an excitation base graph, determine the network excitation degree of the excitation base graph, and use the network excitation degree as the excitation feature base graph, correspond the nodes or relationships to the excitation base graph and the excitation feature base graph respectively as a reference graph group, store the reference graph group to construct a reference library;

[0014] Disassemble the network excitation graph generated during the use of the large model: modify the network excitation graph through the reference library, perform similarity screening based on the reference library to obtain a candidate library, and use the candidate library to calculate the base graph probability coefficient vector set of the network excitation graph during the use of the large model. Each base graph probability coefficient vector includes the weight value of each base excitation graph. Substitute the nodes and relationships in each excitation base graph corresponding to the base graph probability coefficient vector set into the reasoning logic knowledge graph to construct an inference subgraph.

[0015] Furthermore, the structure extraction is specifically to extract triple structure through natural language processing technology, construct a reasoning logic knowledge graph through the extracted triples, split the triples into nodes and relationships, and store the medical terminology node set and the medical terminology relationship set in a database.

[0016] Furthermore, generating a network excitation graph specifically includes: presenting the neural activity activation of the large model through the output of the multi-head attention mechanism in the transformer layer, specifically extracting the query parameter matrix of any single attention head , key parameter matrix and the numerical parameter matrix And multiply them with the input matrix to get the query matrix , key matrix and the numerical matrix , according to the query matrix, we get the single attention mechanism head single excitation matrix ; Construct a block matrix for each single attention mechanism head single excitation matrix to obtain the network excitation graph.

[0017] Furthermore, the network excitation degree of the excitation base map is divided into active, general and calm according to a preset network excitation degree threshold, wherein the network excitation degree threshold is divided into a general to active threshold and a calm to general threshold.

[0018] Furthermore, the network excitation graph is modified according to the reference library as follows: identifying the nodes and relationships that already exist in the output text of the large model through context learning, finding the corresponding nodes and relationships in the reference library and calling the associated base graph, thereby superimposing the existing node excitation graph Existing relationship excitation diagram , the network excitation graph Subtract the existing node excitation graph and the existing relationship excitation graph to obtain the modified network excitation graph ; The modified network excitation feature map is obtained by the method of excitation feature base map.

[0019] Furthermore, the specific calculation process of the base map probability coefficient vector is:

[0020] Call the excitation feature base map and the modified network excitation feature map in the reference library Compare and calculate the similarity between the excitation feature graph and each node excitation feature base graph and each relationship excitation feature base graph through the graph similarity algorithm, set the threshold of the two similarities, and store the nodes above the threshold in the candidate node library. In the above example, the relations above the threshold are stored in the candidate relation library. In; the candidate node library and candidate relationship library All network-stimulated base graphs in are merged into a candidate graph library X, where the base graph can be mapped one-to-one with the position and node and relationship names in the candidate graph library X; solve the equation The base map probability coefficient vector W in is the measurement matrix, and each solved base map probability coefficient vector corresponds to the measurement matrix in each formula one by one; the measurement value is obtained by averaging the measurement matrix, and the measurement values ​​are arranged in ascending order and the top indivual, Recommend the number of preset base maps and record all of them in sorted order. Basemap probability coefficient vector and stored as .

[0021] Furthermore, the construction of the reasoning subgraph includes two types: one is to calculate the reasoning path corresponding to each base map probability coefficient vector in the base map probability coefficient vector set; the other is to count the occurrence probability of each node and relationship in the base map probability coefficient vector set, and construct an inference graph in which the occurrence probability is represented by brightness.

[0022] Furthermore, the reasoning path corresponding to each base map probability coefficient vector in the base map probability coefficient vector set is specifically: finding the names of the nodes and relationships corresponding to the positions where the weight of the base map probability coefficient vector is 1; calling the reasoning logic knowledge graph constructed by the triples, finding the positions of the corresponding nodes and relationships in the reasoning logic knowledge graph, and constructing an inference subgraph.

[0023] Furthermore, constructing the reasoning graph with the probability of occurrence represented by brightness is as follows: calculating the average value of all base map probability coefficient vectors in the base map probability coefficient vector set, finding the nodes and relationships corresponding to the positions where the weights are not 0 in the average value of the base map probability coefficient vector; finding the positions of the corresponding nodes and relationships in the reasoning logic knowledge graph, and finding the minimum weight value in the average value of the base map probability coefficient vector and the maximum weight , calculate the weight value corresponding to each node and relationship The weight ratio among all nodes and relationships , weight ratio , as the brightness of nodes and relationships in the reasoning logic knowledge graph, to construct The reasoning subgraph composed of nodes and relationships .

[0024] According to another aspect of the specification, the present invention also provides a medical large model logic inversion system based on network excitation graph decomposition, comprising: a network excitation graph generation module, a reference graph library construction module, a network excitation graph decomposition module, a medical reasoning logic reconstruction module and an interface management module;

[0025] The network excitation graph generation module is used to generate the network excitation graph required in the process of using the network excitation graph decomposition module with reference to the graph library construction module;

[0026] The reference library construction module is used to extract the triple structure of the data of the medical term set, use the triples to construct the reasoning logic knowledge graph, and split the triples into nodes and relationships; generate network excitation graphs for each node or relationship multiple times and perform average processing to obtain an excitation base graph, determine the network excitation degree of the excitation base graph, and use the network excitation degree as the excitation feature base graph, respectively correspond the nodes or relationships with the excitation base graph and the excitation feature base graph as a reference graph group, and store the reference graph group to construct a reference library;

[0027] The network excitation graph decomposition module is used to modify the network excitation graph through a reference image library, perform similarity screening based on the reference image library to obtain a candidate image library, and use the candidate image library to calculate the base image probability coefficient vector set of the network excitation graph during the use of the large model, so as to determine which base images are superimposed to obtain the network excitation graph during the use of the large model;

[0028] The medical reasoning logic reconstruction module is used to substitute the nodes and relationships in each excitation base graph corresponding to the base graph probability coefficient vector set into the reasoning logic knowledge graph to construct a reasoning subgraph;

[0029] The interface management module is used to manage the input and output interfaces appearing in all modules; it includes a parameter setting input interface and a reasoning path output interface connected to the medical reasoning logic reconstruction module.

[0030] Beneficial effects of the present invention:

[0031] By fine-grained splitting of the medical terminology set, stimulating the model with the most basic entities and relationships and building a complete network to stimulate the base library, the problem that existing methods can only perform binary classification judgments without fine-grained distinction is solved. It can also be used to discover whether the most basic medical entities and relationships are used in the process of model generation output content.

[0032] While using the model for output, the network excitation graph is read and decomposed into multiple network excitation base graphs obtained by fine-grained splitting of medical terminology sets according to the reference library. The names of entities and relationships are matched through the base graphs, which solves the problem that existing methods can only perform single-step judgment and realizes a one-time judgment on whether multiple entities and relationships are used.

[0033] By monitoring the network excitation of large medical models, the potential excitation nodes and relationships when generating output results are separated, and reconstructed based on the separated nodes and relationships in combination with the knowledge graph, we can achieve the inversion of complex logic and multi-hop logic in the reasoning process of large medical models, which is impossible to accomplish with existing methods. The reasoning process is visualized through the knowledge graph and provided to users to judge the rationality of the model output.

[0034] In summary, the present invention is based on network excitation graph decomposition. By finely segmenting the medical terminology set and constructing a network excitation base graph library, the network excitation graph of the medical large model in the task process is decomposed into multiple network excitation base graphs, and the nodes and relationships corresponding to the base graph are mapped to the knowledge graph, thereby reconstructing the reasoning logic path when the medical large model outputs the result, and realizing the logical inversion of the medical large model in a visual way. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flow chart of the logic inversion method of large medical models based on network excitation graph decomposition;

[0036] Figure 2 Composition of a logical inversion system for large medical models based on network excitation graph decomposition;

[0037] Figure 3 Generate a framework for network-inspired graphs;

[0038] Figure 4 Motivating graph decomposition framework for task-generated networks;

[0039] Figure 5 A schematic diagram of a large medical model logic inversion device based on network excitation graph decomposition provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.

[0041] like Figure 1As shown, the present invention provides a method for logical inversion of a large medical model based on network excitation graph decomposition. By finely segmenting the medical terminology set and constructing a network excitation base graph library, the network excitation graph of the large medical model in the task process is decomposed into multiple network excitation base graphs, and the nodes and relationships corresponding to the base graph are mapped to the knowledge graph, thereby reconstructing the reasoning logic path when the large medical model outputs the result, and realizing the logical inversion of the large medical model in a visual way. The method is specifically:

[0042] Structural extraction: Extract triple structures from medical terminology data, use triples to build a reasoning logic knowledge graph, and split triples into nodes and relationships;

[0043] Medical terminology comes from clinical guidelines, terminology libraries such as OMOP (Observation Medical Outcomes Partnership) and SNOMED CT, doctor experience and medical literature. The above texts are extracted by natural language processing (NLP) technology to construct a reasoning logic knowledge graph through the extracted triples. It is used to express reasoning logic, split triples into the most basic nodes and relationships, and collect nodes into medical term node sets. , where each node is denoted by , collect the relations into a medical term relation set , where each relationship is denoted by . Store the constructed medical terminology set in a .csv file or a database such as Oracle.

[0044] Reference library construction: Generate network excitation graphs for each node or relationship multiple times and perform average processing to obtain an excitation base graph, determine the network excitation degree of the excitation base graph, and use the network excitation degree as the excitation feature base graph, correspond the nodes or relationships to the excitation base graph and the excitation feature base graph respectively as a reference graph group, store the reference graph group to construct a reference library;

[0045] Specifically, medical terms are read from .csv files or databases such as Oracle into the large model system, and network excitation diagrams are generated multiple times for each node or relationship. Multiple network excitation diagrams of the same node or relationship are averaged to obtain a network excitation base diagram. And correspond one to one with its nodes or relationships, , The network excitation level is divided into three levels: active, general, and calm; the thresholds between active and general and between general and calm are set as , Since the network excitation graph is a block matrix, for Each of , calculate each The average value and , The two thresholds are compared and assigned values, with a value range of ,use 0 represents the block's neural activity excitation level is calm, 0 represents the block's neural activity excitation level is average, and 1 represents the block's neural activity excitation level is active. This generates a network excitation feature map , . Associate each node or relationship with the network excitation feature graph, network excitation Figure 1 One corresponding, , The node names and their corresponding network excitation feature graphs and network excitation graphs are stored in the database to obtain the node reference library. , is the reference graph group corresponding to the i-th node, . Store the relationship name and its corresponding network excitation feature map and network excitation map into the database to obtain the relationship reference library , is the reference graph group corresponding to the i-th relationship, . Reference Library by Node Reference Library and Relationship Reference Gallery Together, the reference graph library is stored in the database to facilitate the call of the network-inspired graph decomposition module.

[0046] Disassemble the network excitation graph generated during the use of the large model: modify the network excitation graph through the reference library, perform similarity screening based on the reference library to obtain a candidate library, and use the candidate library to calculate the base graph probability coefficient vector set of the network excitation graph during the use of the large model. Each base graph probability coefficient vector includes the weight value of each excitation base graph. Substitute the nodes and relationships in each excitation base graph corresponding to the base graph probability coefficient vector set into the reasoning logic knowledge graph to construct an inference subgraph.

[0047] Specifically, Figure 4 As shown in Figure 1, the input text is input into the large model and the output result is generated. At the same time, the network excitation graph Y of this model operation is obtained. Through context learning, the existing nodes and relationships in the output text are identified, the corresponding nodes and relationships are found in the reference library, and the associated base graph is called to superimpose the existing node excitation graph and the existing relationship excitation graph, which are respectively used and It means that the network excitation graph Y is subtracted from the existing node excitation graph and the existing relationship excitation graph to obtain the modified network excitation graph ,Right now , the modified network excitation feature map is generated by the network excitation feature map generation method .

[0048] Preliminary screening of the base maps that may constitute the model network excitation map, calling all network excitation feature maps and network excitation feature maps in the reference library Compare and calculate the excitation feature graph through the graph similarity algorithm With each node excitation feature map Similarity And each relationship excites the feature map Similarity , node similarity and relationship similarity Collectively referred to as similarity. Based on the similarity threshold set by the user , store nodes above the threshold in the candidate node library In the above example, the relationships above the threshold are stored in the candidate relationship In the candidate node library and candidate relationship library All network-stimulated base maps in the image are merged into a candidate image library And ensure that the base map can be passed through the candidate library The positions of the nodes and relationship names correspond one by one, and the equation is solved The coefficient vector in .because The solution is not unique, so we introduce the metric matrix , the equation is modified to , each solved and One-to-one correspondence, through the measurement matrix Take the average value to get the measurement value , the measurement value Sort in ascending order and select the first indivual, The recommended number set for the user, records all in sorted order coefficient vector and stored as .

[0049] for Each of Construct the inference path and find the coefficient vector Take the name of the node and relationship corresponding to the position 1. Call the previously constructed reasoning logic knowledge graph ,exist Find the corresponding nodes and relationships in the graph to build the inference subgraph .

[0050] for Construct an overall reasoning graph to All Take the average value to get the average probability coefficient vector of the base map , The The value is called The average probability coefficient of the base map is recorded as , record all The names of the nodes and relationships of the corresponding base graph, all Will be used to represent the weight values ​​of corresponding nodes and relationships. Call the previously built reasoning logic knowledge graph ,exist Find the corresponding nodes and relationships in the table, and find the minimum weight value and the maximum weight , calculate the weight values ​​corresponding to nodes and relationships The weight ratio among all nodes and relationships , weight ratio , also known as nodes and relationships in the graph The brightness in the image is used to construct the image with different brightness and darkness levels. The reasoning subgraph composed of nodes and relationships .

[0051] like Figure 2 As shown, the present invention provides a medical large model logic inversion system based on network excitation graph decomposition, which includes a network excitation graph generation module, a reference library construction module, a network excitation graph decomposition module, a medical reasoning logic reconstruction module and an interface management module. The specific contents of the modules are as follows:

[0052] Network excitation graph generation module: Figure 3 As shown in the figure, this module monitors the network excitation of the trained large model based on the transformer architecture, and generates a network excitation graph reflecting the neural activity of the large model by capturing and reconstructing multiple outputs of the multi-head attention mechanism in each transformer layer. This module will be used to build a reference gallery and generate network excitation graphs during the use of large models.

[0053] Reference library construction module: The reference library is based on the refined decomposition of medical terms and consists of a reference map group consisting of an excitation base map and an excitation feature base map. The significance of its construction is to provide a basis for the decomposition of the network excitation map obtained by monitoring when the large model is used, and to trace the medical nodes that may be considered during the reasoning of the large model through the selected excitation base map.

[0054] Network excitation graph decomposition module: This module is based on the reference library and disassembles the network excitation graph generated during the use of the large model to obtain a sparse The probability coefficient vector of the base map determines which base maps are superimposed on the network excitation map during the use of the large model.

[0055] Medical reasoning logic reconstruction module: This module inherits the network excitation graph decomposition module and candidate gallery , the knowledge graph subgraph is reconstructed by the nodes and relationships selected by the probability coefficient vector of the base graph, which can be Each of The corresponding reasoning path is, ; can also be statistics The occurrence probability of each node and relationship in the is used to construct an overall reasoning graph with the occurrence probability represented by brightness.

[0056] Interface management module: This module aims to manage the input and output interfaces that appear in all modules, so that each module can be integrated into an easy-to-use system. It includes knowledge graphs, reference libraries, large models that can be monitored, parameter setting input interfaces, and reasoning path output interfaces that connect to network excitation graph decomposition modules. Through the reasoning path output interface, the reasoning path is output according to the recommended order of sorting, providing users with a way to judge whether the output of the large model conforms to the medical reasoning logic.

[0057] Corresponding to the aforementioned embodiment of a method for logical inversion of a large medical model based on network excitation graph decomposition, the present invention also provides an embodiment of a device for logical inversion of a large medical model based on network excitation graph decomposition.

[0058] See also Figure 5 An embodiment of the present invention provides a medical large model logic inversion device based on network excitation graph decomposition, including a memory and one or more processors, wherein the memory stores executable code, and when the processor executes the executable code, it is used to implement a medical large model logic inversion method based on network excitation graph decomposition in the above embodiment.

[0059] An embodiment of a medical large model logic inversion device based on network excitation graph decomposition provided by the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the internal memory for execution. From a hardware perspective, if Figure 5As shown, it is a hardware structure diagram of a medical large model logic inversion device based on network excitation graph decomposition provided by the present invention, in which any device with data processing capability is located, except Figure 5 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.

[0060] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0061] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0062] An embodiment of the present invention further provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, a logic inversion method of a large medical model based on network excitation graph decomposition in the above embodiment is implemented.

[0063] The computer-readable storage medium may be an internal storage unit of any device with data processing capability described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0064] The present invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the medical large model logic inversion method based on network excitation graph decomposition.

[0065] The above embodiments are used to illustrate the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.

Claims

1. A method for logical inversion of large medical models based on network excitation graph decomposition, characterized in that: The method includes: Structural extraction: extracting the triple structure of the data of the medical term set, using the triples to build a reasoning logic knowledge graph, and splitting the triples into nodes and relationships; the structural extraction specifically involves extracting the triple structure through natural language processing technology, building a reasoning logic knowledge graph through the extracted triples, splitting the triples into nodes and relationships, and storing the medical term node set and the medical term relationship set in the database; Reference library construction: Generate network excitation graphs for each node or relationship multiple times and perform average processing to obtain an excitation base graph, determine the network excitation degree of the excitation base graph, and use the network excitation degree as the excitation feature base graph. Correspond the nodes or relationships to the excitation base graph and the excitation feature base graph as a reference graph group, store the reference graph group to build a reference graph library; Generate network excitation graphs specifically include: presenting the neural activity activation of the large model through the output of the multi-head attention mechanism in the transformer layer, specifically extracting the query parameter matrix of any single attention head Key Parameters Matrix and the numerical parameter matrix And multiply them with the input matrix respectively to get the query matrix Q l,h , key matrix K l,h and the numerical matrix V l,h , according to the query matrix, we get the single attention mechanism head single excitation matrix The obtained single attention mechanism head single excitation matrix is ​​used to construct a block matrix to obtain a network excitation map; the network excitation degree of the excitation base map is divided into active, general and calm according to a preset network excitation degree threshold, wherein the network excitation degree threshold is divided into a general to active threshold and a calm to general threshold; The network excitation graph is modified according to the reference library. Specifically, the existing nodes and relationships in the output text of the large model are identified through context learning, the corresponding nodes and relationships are found in the reference library, and the associated base graph is called to obtain the existing node excitation graph NodeN by superposition. exist and the existing relationship excitation graph RelN exist , subtract the existing node excitation graph and the existing relationship excitation graph from the network excitation graph Y to obtain the modified network excitation graph The modified network excitation feature map is obtained by the method of excitation feature base map; Disassemble the network excitation graph generated during the use of the large model: modify the network excitation graph through the reference library, perform similarity screening based on the reference library to obtain a candidate library, use the candidate library to calculate the base graph probability coefficient vector set of the network excitation graph during the use of the large model, each base graph probability coefficient vector includes the weight value of each base excitation graph, substitute the nodes and relationships in each excitation base graph corresponding to the base graph probability coefficient vector set into the reasoning logic knowledge graph to construct an inference subgraph; The specific calculation process of the base map probability coefficient vector is: Call the excitation feature base map and the modified network excitation feature map in the reference library Compare and calculate the similarity between the excitation feature graph and each node excitation feature base graph and each relationship excitation feature base graph through the graph similarity algorithm, set the threshold of the two similarities, and store the nodes above the threshold in the candidate node library NodeN cand In the process, the relations above the threshold are stored in the candidate relation library Rel cand In; the candidate node library NodeN cand and candidate relation library Rel cand All network-stimulated base graphs in are merged into a candidate graph library X, where the base graph can be mapped one-to-one with the position and node and relationship names in the candidate graph library X; solve the equation The probability coefficient vector W of the base map in R route is the measurement matrix, and each solved base map probability coefficient vector corresponds to the measurement matrix in each formula one by one. The measurement value is obtained by averaging the measurement matrix, and the measurement values ​​are sorted in ascending order and the first k are selected, where k is the preset recommended number of base maps. All k base map probability coefficient vectors W are recorded in sorted order and stored as The construction of the inference subgraph includes two methods: one is to calculate the inference path corresponding to each base map probability coefficient vector in the base map probability coefficient vector set; the other is to count the occurrence probability of each node and relationship in the base map probability coefficient vector set, and construct an inference graph in which the occurrence probability is represented by brightness; The specific reasoning path corresponding to each base map probability coefficient vector in the base map probability coefficient vector set is as follows: finding the names of the nodes and relationships corresponding to the positions where the weight of the base map probability coefficient vector is 1; calling the reasoning logic knowledge graph constructed by the triples, finding the positions of the corresponding nodes and relationships in the reasoning logic knowledge graph to construct a reasoning subgraph; The specific steps of constructing the reasoning graph with brightness as the probability of occurrence are as follows: Calculate the average value of all base map probability coefficient vectors in the base map probability coefficient vector set, find the nodes and relationships corresponding to the positions where the weights are not 0 in the average value of the base map probability coefficient vector; Find the positions of the corresponding nodes and relationships in the reasoning logic knowledge graph, and find the minimum weight value in the average value of the base map probability coefficient vector and the maximum weight Calculate the weight value corresponding to each node and relationship The weight ratio among all nodes and relationships The weight ratio r∈[0,1] is used as the brightness of nodes and relationships in the reasoning logic knowledge graph, thereby constructing a network composed of different brightness levels r i The reasoning subgraph KG composed of nodes and relationships sub .

2. A medical large model logic inversion system based on network excitation graph decomposition for implementing the method described in claim 1, characterized in that: include: Network excitation graph generation module, reference image library construction module, network excitation graph decomposition module, medical reasoning logic reconstruction module and interface management module; The network excitation graph generation module is used to generate the network excitation graph required in the process of using the network excitation graph decomposition module with reference to the graph library construction module; The reference library construction module is used to extract the triple structure of the data of the medical term set, use the triples to build the reasoning logic knowledge graph, and split the triples into nodes and relationships; Generate a network excitation graph for each node or relationship multiple times and perform average processing to obtain an excitation base graph, determine the network excitation degree of the excitation base graph, and use the network excitation degree as an excitation feature base graph, correspond the node or relationship to the excitation base graph and the excitation feature base graph respectively as a reference graph group, store the reference graph group and build a reference graph library; The network excitation graph decomposition module is used to modify the network excitation graph through a reference image library, perform similarity screening based on the reference image library to obtain a candidate image library, and use the candidate image library to calculate the base image probability coefficient vector set of the network excitation graph during the use of the large model, so as to determine which base images are superimposed to obtain the network excitation graph during the use of the large model; The medical reasoning logic reconstruction module is used to substitute the nodes and relationships in each excitation base graph corresponding to the base graph probability coefficient vector set into the reasoning logic knowledge graph to construct a reasoning subgraph; The interface management module is used to manage the input and output interfaces appearing in all modules; it includes a parameter setting input interface and a reasoning path output interface connected to the medical reasoning logic reconstruction module.