Artificial intelligence decision-making full-link explainability generation method, system, device, medium and program product
By constructing a domain ontology knowledge graph and a hybrid energy scoring mechanism, natural language explanatory text is generated, which solves the problem of the lack of full-link explanation in AI explanatory technology and improves the understandability and credibility of the explanation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YINYUAN GALAXY (SUZHOU) INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-04-03
- Publication Date
- 2026-07-03
AI Technical Summary
Existing AI interpretability technologies cannot fully explain the entire process from data input to intermediate feature processing and final decision-making. Furthermore, existing methods lack domain knowledge support, making it difficult to form a complete explanation of business logic, resulting in insufficient fidelity and comprehensibility of the explanation.
We construct a domain ontology knowledge graph, and through feature mapping, feature attribution algorithms and hybrid energy scoring mechanisms, we mine key paths and generate natural language explanatory texts. We then combine these explanatory texts with a large language model.
It achieves a complete chain of evidence from input data to decision results, improving the understandability and credibility of the explanation, and allowing non-technical personnel to intuitively grasp the AI decision-making logic.
Smart Images

Figure CN122334529A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of AI technology, specifically to methods, systems, devices, media, and program products for generating interpretability across the entire AI decision-making process. Background Technology
[0002] Current artificial intelligence technology, especially deep learning, has shown excellent application results in many fields, but it suffers from the black box problem, which makes it impossible to effectively explain the logic behind decision-making.
[0003] While numerous attempts have been made to improve AI interpretability, significant shortcomings and deficiencies exist. Feature importance-based explanations can only identify features that significantly contribute to the result, failing to uncover logical connections and causal relationships between features. This makes it difficult to form a complete explanation of business logic, and often remains at the numerical level, lacking domain knowledge support and thus not intuitively understandable to humans. Furthermore, they only explain the final result, failing to cover the entire process from data input to intermediate feature processing and final decision-making. Attention visualization-based explanations indicate the model's focus area by visualizing the distribution of attention weights within the model; however, attention weights are not equivalent to causal contribution, raising serious questions about the fidelity of this method. Randomly perturbing the attention weights results in minimal changes to the model output, demonstrating a lack of causal relationship between attention distribution and decision logic. Post-hoc explanations based on rule extraction approximate the decision logic of a black-box model into a readable rule set by training a surrogate model; however, the approximation accuracy of the surrogate model is limited, and key decision logic is easily lost in complex nonlinear model applications.
[0004] In recent years, some studies have attempted to apply knowledge graphs to the field of AI explanation in order to make up for the shortcomings of existing methods. However, most existing solutions only use knowledge graphs for post-processing modification and do not embed them into the generation process of explanation paths, thus failing to give full play to the semantic support role of knowledge graphs. The generated explanation paths are either faithful to the model but difficult for humans to understand, or semantically fluent but deviate from the actual behavior of the model.
[0005] Therefore, how to overcome the shortcomings of traditional methods with effective methods has become a pressing technical problem that needs to be solved. Summary of the Invention
[0006] In response, this invention provides a method, system, device, medium, and program product for generating interpretable AI decision-making across the entire chain, in order to at least partially solve the aforementioned technical problems.
[0007] This invention provides a method for generating interpretability across the entire AI decision-making process, comprising the following steps:
[0008] S1: Construct a domain ontology knowledge graph for the AI model, which includes a data layer, a concept layer, and a decision layer; the data layer corresponds to the input features of the AI model, the concept layer corresponds to the abstract concepts in the business logic of the AI model, and the decision layer corresponds to the output results of the AI model.
[0009] S2: Map the input features of the AI model to the data layer nodes of the domain ontology knowledge graph, and map the abstract concepts in the business logic of the AI model to the concept layer nodes of the domain ontology knowledge graph;
[0010] S3: Calculate the contribution vector of input features to output results using feature attribution algorithm, select the data layer nodes corresponding to input features whose contribution values exceed the preset threshold as the starting node set, take the decision layer nodes corresponding to the output results as the target nodes, and construct an active subgraph based on the starting node set and the target nodes as the center's neighbor nodes.
[0011] S4: Based on the hybrid energy scoring mechanism, critical path mining is performed in the active subgraph, and the optimal interpretation path from the starting node set to the target node is found using the beam search algorithm;
[0012] S5: Generate natural language explanation text based on the optimal explanation path.
[0013] In one aspect of this application, in step S2, if the input features and / or abstract concepts in the business logic are structured features, a hash lookup table or binning strategy is used for mapping; if the input features and / or abstract concepts in the business logic are unstructured features, vector nearest neighbor retrieval is used for mapping.
[0014] In one aspect of this application, the preset threshold value in step S3 is in the range of 0.05 to 0.3.
[0015] In one aspect of this application, in step S4, the path interpretability score (P) of the hybrid energy scoring mechanism is: , where P represents a candidate path from the set of starting nodes to the target node; This represents the feature importance value of the nth node on path P, where the feature importance value is the result of the feature attribution algorithm of the AI model. The semantic weight represents the r-th edge on path P, where the semantic weight is defined as prior knowledge of the domain ontology knowledge graph. This represents the path length penalty term for path P, the value of which is positively correlated with the number of edges contained in the path; , , These are the feature importance balance coefficient, semantic weight balance coefficient, and length penalty coefficient, respectively.
[0016] In one aspect of this application, in step S4, during the process of using the beam search algorithm to find the optimal interpretation path, the preset number of paths with the highest scores in the hybrid energy scoring mechanism are retained as candidate paths, and the candidate paths follow predefined meta-path constraints; the predefined meta-path constraints are the path patterns from data layer nodes through concept layer nodes to decision layer nodes.
[0017] In one aspect of this application, in step S5, the node sequence and edge relationship on the optimal interpretation path are serialized into a text sequence, and a prompt word containing the text sequence and a preset generation instruction is constructed; the prompt word is then input into a large language model to obtain the natural language interpretation text.
[0018] Another aspect of this application provides an AI decision-making end-to-end interpretability generation system, characterized by comprising the following modules:
[0019] The knowledge graph construction module is used to construct a domain ontology knowledge graph for the AI model. The domain ontology knowledge graph includes a data layer, a concept layer, and a decision layer. The data layer corresponds to the input features of the AI model, the concept layer corresponds to the abstract concepts in the business logic of the AI model, and the decision layer corresponds to the output results of the AI model.
[0020] The feature mapping module is used to map the input features of the AI model to the data layer nodes of the domain ontology knowledge graph, and to map the abstract concepts in the business logic of the AI model to the concept layer nodes of the domain ontology knowledge graph.
[0021] The subgraph construction module is used to calculate the contribution vector of input features to the output result using the feature attribution algorithm, select the data layer nodes corresponding to the input features whose contribution values exceed a preset threshold as the starting node set, take the decision layer nodes corresponding to the output result as the target nodes, and construct an active subgraph based on the starting node set and the target node as the center's neighbor nodes.
[0022] The path mining module is used to mine critical paths in the active subgraph based on the hybrid energy scoring mechanism and to find the optimal explanatory path from the set of starting nodes to the target node using the beam search algorithm.
[0023] The explanation generation module is used to generate natural language explanation text based on the optimal explanation path.
[0024] In another aspect of this application, an electronic device is also provided, the electronic device comprising: at least one processor; a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0025] In another aspect of this application, a computer-readable medium is provided having computer program instructions stored thereon, which can be executed by a processor to implement the method as described in any of the preceding claims.
[0026] In another aspect of this application, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements the method described above.
[0027] The AI decision-making end-to-end interpretability generation method provided in this application transforms the numerical calculations of AI models into entity relationships and logical reasoning chains that conform to human cognition by constructing a domain ontology knowledge graph. This significantly improves the understandability of the explanation, allowing non-technical personnel to intuitively grasp the AI decision-making logic. It also constructs a complete evidence chain from the original input data to the intermediate abstract concepts and finally to the decision result, significantly improving the credibility of the explanation. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0029] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0030] Figure 1 This is a schematic diagram of an AI decision-making end-to-end interpretability generation method provided by an embodiment of the present invention;
[0031] Figure 2 This is a schematic diagram of the structure of an AI decision-making end-to-end interpretability generation system provided in an embodiment of the present invention;
[0032] Figure 3 This is a schematic diagram of the structure of a device provided in an embodiment of the present invention. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] In a typical configuration of this application, the terminal and the service network devices each include one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0035] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0036] Computer-readable media include permanent and non-permanent, removable and non-removable media, which can store information by any method or technology. Information can be computer program instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only optical disc (CD-ROM), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0037] This application proposes a method for generating interpretable AI decision-making across the entire process. The technical solution of this application will be described in detail below with reference to various embodiments.
[0038] like Figure 1 As shown in the figure, this invention discloses a method for generating interpretability across the entire AI decision-making process, comprising the following steps:
[0039] Step S1: Construct a domain ontology knowledge graph for the AI model. The domain ontology knowledge graph includes a data layer, a concept layer, and a decision layer. The data layer corresponds to the input features of the AI model, the concept layer corresponds to the abstract concepts in the business logic of the AI model, and the decision layer corresponds to the output results of the AI model.
[0040] Here, the domain ontology knowledge graph refers to a structured knowledge representation system based on ontology and oriented towards a specific business domain. By defining hierarchical entity nodes, standardized entity relationships, and quantified relationship weights, it expresses the business logic, conceptual associations, and causal rules within the domain in a machine-recognizable and human-understandable graph form. All entity definitions and relationship constructions are based on the specific business scenarios of the domain. In practical applications, the domain ontology knowledge graph can adjust the entity nodes, relationship rules, and weight assignments according to the business needs of different domains such as financial risk control, medical diagnosis, and industrial quality inspection, thus achieving cross-domain migration.
[0041] Specifically, the function of the data layer is to map the input features of the AI model to structured entity nodes in the domain ontology knowledge graph. Each data layer node corresponds to an input feature of the AI model or a preprocessed feature-derived variable. Each data layer node is defined according to a unified standard. Preferably, the data layer node can be a quintuple: data layer node d = (id1, name, type, domain, range), where id1 is the data layer node identifier, using the naming rule of "DL_" prefix plus feature number to ensure the uniqueness and recognizability of the node identifier, such as DL_F001; name is a human-readable feature name, such as age, annual income, etc.; type is the feature data type, including one of Categorical, Continuous, and Binary; domain is the definition of the value range of the input feature; and range is the actual value range of the input feature in the current dataset.
[0042] The concept layer, situated between the data layer and the decision layer, abstracts input feature data into business semantic concepts that conform to human cognition, serving as a semantic bridge connecting the data layer and the decision layer. Each concept layer node is defined according to a unified standard. Preferably, the concept layer node can be a quadruple: concept layer node c = (id2, label, definition, abstraction_level), where id2 is the concept layer node identifier, using the naming rule of "CL_" prefix followed by a number to ensure the uniqueness and recognizability of the node identifier, such as CL_001; label is the natural language concept label; definition is the formal text description of the natural language concept; and abstraction_level is the abstraction level, including L1, L2, and L3, where L1 is the lowest-order concept closest to the data layer, and L3 is the highest-order concept closest to the decision layer.
[0043] The concept layer constructs semantic reasoning relationships from data layer nodes to concept layer nodes, and between different nodes within the concept layer, through threshold triggering rules, combinational logic rules, statistical association rules, and inter-layer causal rules. Specifically, the threshold triggering rules use predicate conditions of data layer node values as triggering criteria, activating the corresponding concept layer node when the condition is met. Thresholds are preferentially determined by industry regulatory standards or empirical values set by business experts; when no prior knowledge is available, they are determined based on statistical methods of training data distribution. The combinational logic rules use AND, OR, and NOT logical operators to achieve logical combinations of multiple data layer or lower-order concept layer conditions, thereby activating the corresponding concept layer node. The statistical association rules are used in scenarios where business rules are difficult to define explicitly. Through statistical analysis of historical data, using mutual information as a correlation metric, they automatically discover the correlation between data layer features and concept layer nodes, establishing a correlation edge when a preset mutual information threshold is reached, and setting the normalized mutual information as the edge weight. The inter-layer causal rules define causal relationships between nodes at different abstract levels within the concept layer. The causal direction is determined based on the ontological definition of the domain knowledge graph, and all causal edges satisfy the directed acyclic graph constraint to avoid cyclic causal chains.
[0044] The decision layer is the top-level architecture of the domain ontology knowledge graph. The nodes of the decision layer correspond to the output categories of the AI model, and causal relationship quantification standards and validity verification criteria are established to judge the strength of the causal influence of the concept layer on the decision layer, so as to ensure the rationality and validity of the causal relationship.
[0045] The causal relationship quantification standard for the decision-making layer employs a method that integrates statistical causal inference and expert knowledge to quantify the causal influence of concept nodes on decision nodes, with values ranging from 0 to 1. The statistical causal inference uses the average causal effect to measure the causal impact of concepts on decisions. Propensity score matching is used to eliminate the influence of confounding variables in the observed data, and the calculated average causal effect is then normalized and used as the data-driven causal weight. The expert knowledge fusion involves domain experts evaluating the causal strength between concepts and decisions using a standardized scoring scale: 1 point indicates extremely weak or no correlation, 2 points indicate weak correlation, 3 points indicate moderate correlation, 4 points indicate strong correlation, and 5 points indicate extremely strong correlation or certain causation. The scoring results are normalized and used as the expert prior weights.
[0046] The final causal weights are obtained through a weighted fusion method, and the fusion coefficient is the confidence coefficient. The confidence coefficient is dynamically adjusted according to the training sample size. The larger the sample size, the higher the proportion of data-driven causal weights, and vice versa.
[0047] All causal edges from the concept layer to the decision layer must pass validity checks, including directional consistency checks, minimum strength checks, and redundancy elimination checks. The directional consistency check requires that the causal direction must be consistent with the business logic, allowing only unidirectional causal edges from the concept layer to the decision layer, and prohibiting reverse causal relationships. The minimum strength check requires that the causal relationship weight reach a preset threshold; causal edges below the threshold are considered noise and are removed. The redundancy elimination check requires that if multiple causal paths point to the same decision node, and the intermediate node of a certain path completely mediates the influence of the initial concept node on the decision node, then the direct causal edge is deleted, and only the indirect path is retained to ensure the integrity of the causal chain.
[0048] After completing the construction of nodes and internal relationships at each level of the data layer, concept layer, and decision layer, semantic weights are assigned to each edge in the domain ontology knowledge graph. The semantic weights represent the strength of the logical relationship represented by the corresponding edge and are assigned based on prior knowledge in the domain.
[0049] Step S2: Map the input features of the AI model to the data layer nodes of the domain ontology knowledge graph, and map the abstract concepts in the business logic of the AI model to the concept layer nodes of the domain ontology knowledge graph;
[0050] In some specific implementations, if the input features and / or abstract concepts in the business logic are structured features, a hash lookup table or binning strategy is used for mapping; if the input features and / or abstract concepts in the business logic are unstructured features, vector nearest neighbor retrieval is used for mapping.
[0051] Here, the hash lookup table is applicable to categorized, structured, discrete features. At the data layer of the domain ontology knowledge graph, a one-to-one corresponding first entity node is pre-created for each different value of the categorized discrete input feature in the AI model. Similarly, at the concept layer, a corresponding second entity node is created for the structured abstract concepts formed based on the categorized discrete features. The hash lookup table establishes a mapping relationship between structured features and the identifiers of the first or second entity nodes.
[0052] The binning strategy first discretizes the continuous input features of the AI model based on the domain's business meaning and actual needs. Binning methods include equal-frequency binning and business-rule binning. Equal-frequency binning divides continuous feature values into several equal-frequency intervals according to quantiles, ensuring that the sample size within each interval is approximately equal. Business-rule binning completes the interval division based on business thresholds set by domain experts. At the data layer, a corresponding third entity node is created for each binned interval. At the concept layer, a corresponding fourth entity node is created for the structured abstract concept formed based on the continuous feature binning results, thereby establishing a mapping relationship between continuous value intervals and the third or fourth entity node.
[0053] For input features that are unstructured in the AI model and abstract concepts that are unstructured in the business logic, a vector nearest neighbor retrieval method is used to complete the mapping. Specifically, a knowledge representation learning algorithm can be used to embed all entity nodes in the data layer and concept layer of the domain ontology knowledge graph into a vector space of a specified dimension, generating vector representations of each entity node and forming a complete knowledge graph entity embedding matrix. Then, the neuron activation vectors of the intermediate layers of the AI model are extracted; these neuron activation vectors are the vector representations of unstructured features in the AI model. Depending on the feature complexity of the actual application scenario, a linear transformation matrix or a multilayer perceptron is selected to construct the mapping function. The constructed mapping function is used to perform a spatial transformation on the neuron activation vectors of the AI model, projecting them into the same vector space as the entity nodes, obtaining the projected vectors of the unstructured features. The cosine similarity between the projected vectors and the entity node vector representations is calculated, and nearest neighbor retrieval is performed based on this similarity, selecting the entity node with the highest similarity value as the matching node. To ensure the effectiveness of the mapping, a similarity mapping threshold is set; the mapping is considered valid only when the highest similarity obtained by the retrieval reaches the similarity mapping threshold. The method for determining the similarity mapping threshold is as follows: At least 500 known feature-aligned samples are extracted from the training data of the AI model as a positive sample set, while an equal number of unaligned sample pairs are randomly sampled as a negative sample set. For each candidate threshold in the candidate threshold set, an F1 score is calculated, and the candidate threshold that maximizes the F1 score is selected as the similarity mapping threshold. The candidate threshold set is {0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90}, and the F1 score is calculated as 2 * Precision * Recall / (Precision + Recall), where Precision is the accuracy and Recall is the recall. In multiple application scenario experiments of this invention, the optimal similarity mapping threshold is typically within the range of 0.65 to 0.80. For domains with clear semantic boundaries, such as financial risk control, the similarity mapping threshold is usually set at 0.70 to 0.75; for domains with ambiguous semantics, such as medical diagnosis, the similarity mapping threshold can be reduced to 0.65 to 0.70 to improve recall.
[0054] The unstructured input features of the AI model are mapped to data layer nodes, and the unstructured abstract concepts in the business logic are mapped to concept layer nodes. If the highest similarity does not reach the similarity mapping threshold, it is determined that the unstructured feature cannot be mapped at this time. Understandably, this can avoid invalid associations from interfering with the subsequent decision interpretation process.
[0055] Step S3: Calculate the contribution vector of the input features to the output results using the feature attribution algorithm, select the data layer nodes corresponding to the input features whose contribution values exceed the preset threshold as the starting node set, and take the decision layer nodes corresponding to the output results as the target nodes. Construct an active subgraph based on the starting node set and the target nodes as the center's neighboring nodes.
[0056] In practice, SHAP (SHapley Additiveex Planations, a model interpretability method based on Shapley values in game theory) or IG (Integrated Gradients) algorithms are used to calculate the contribution vector Φ=[ϕ1,ϕ2,...,ϕ] of the input features to the current output result. n Select the contribution value ϕ i The system identifies n input features that exceed a preset threshold θ, and uses the data layer nodes corresponding to these n input features as the starting node set. The system then uses the decision layer nodes corresponding to the AI model output as the target nodes. Finally, it extracts neighboring nodes within a specified step size, centered on the starting and target nodes, to obtain an active subgraph.
[0057] The preset threshold is used to filter significant features from the feature attribution calculation results. The preset threshold is calculated using the mean and standard deviation of the absolute values of all feature contributions: θ = μ + k·σ, where θ is the preset threshold, μ is the mean of the absolute values of all feature contributions, σ is the standard deviation, and k is a coefficient. When k = 1.0, approximately 15% to 25% of the input features by contribution are retained. Preferably, the preset threshold ranges from 0.05 to 0.3, and the specific value needs to be adjusted according to the business scenario. For scenarios requiring high-precision interpretation, k is set to 1.5 to filter more significant features; for scenarios requiring comprehensive coverage, k is set to 0.5 to include more potentially relevant features.
[0058] Among the features whose contribution values exceed a preset threshold, the n features with the largest absolute SHAP values are further selected as starting nodes, where n∈{2,3,5,8}. When the total number of input features N_feat of the AI model is <20, n=2~3; when 20≤N_feat<100, n=3~5; when N_feat≥100, K=5~8.
[0059] The step size determines the coverage of the active subgraph. The step size can be 1, 2, or 3. A step size of 1 is suitable for simple scenarios where the data layer and decision layer are directly related; a step size of 2 covers the three-layer path of the data layer, concept layer, and decision layer; and a step size of 3 is suitable for complex scenarios where there are multiple levels of abstraction within the concept layer.
[0060] Step S4: Based on the hybrid energy scoring mechanism, perform critical path mining in the active subgraph and use the beam search algorithm to find the optimal interpretation path from the starting node set to the target node;
[0061] In some specific implementations, the path interpretability score (P) of the hybrid energy scoring mechanism is: , where P represents a candidate path from the set of starting nodes to the target node; This represents the feature importance value of the nth node on path P, where the feature importance value is the result of the feature attribution algorithm of the AI model. The semantic weight represents the r-th edge on path P, where the semantic weight is defined as prior knowledge of the domain ontology knowledge graph. This represents the path length penalty term for path P, the value of which is positively correlated with the number of edges contained in the path; , , These are the feature importance balance coefficient, semantic weight balance coefficient, and length penalty coefficient, respectively.
[0062] In practice, , , , , Independent of and Adjustments are made to balance the fidelity and rationality of the explanation, which is a zero-sum game. , , Optimization can be achieved using Bayesian methods based on human evaluation feedback. Specifically, 200 representative decision-making instances are randomly selected from the target application scenario, and 3-5 domain experts are invited to annotate each instance. The annotations include the ideal explanatory path and a score for the path's comprehensibility. Parameter optimization is then transformed into a problem of maximizing the objective function. The objective function is: Where PathHitRate is the matching rate between the system-generated path and the expert-annotated path; AvgUnderstandability is the normalized mean of the expert scores; and AvgPathLength is the reciprocal of the average path length. Subsequently, Gaussian process regression is used as a surrogate model, with Expected Improvement (EI) as the acquisition function. In the parameter space... , , and constraints The search is conducted within the feasible domain.
[0063] For new application scenarios, the optimal parameters of the previous scenario can be used as the initial values for a warm start. After 10 to 20 iterations, the parameters of the new scenario can be converged.
[0064] In some specific implementations, during the process of using the beam search algorithm to find the optimal interpretation path, a preset number of paths with the highest scores in the hybrid energy scoring mechanism are retained as candidate paths, and the candidate paths follow predefined meta-path constraints; the predefined meta-path constraints are the path patterns from data layer nodes through concept layer nodes to decision layer nodes.
[0065] Here, the bundle width in the bundle search algorithm determines the number of candidate paths retained in each search step. The bundle width value needs to balance search quality and computational efficiency. Too small a bundle width can lead to local optima, while too large a bundle width will result in a linear increase in computational overhead, and a large number of low-quality paths will interfere with the ranking. Preferably, the bundle width is 3 when the number of active subgraph nodes is <50; 5 when 50 ≤ number of active subgraph nodes <200; and 8~10 when the number of active subgraph nodes ≥200. The bundle width is dynamically adjusted during the search process. Specifically, if the variance of the scores of all candidate paths in the current step is <0.01, the bundle width is halved to accelerate the search; when the difference in variance between the highest and lowest scoring paths is >1.0, the bundle width is kept unchanged to avoid excessive pruning.
[0066] The meta-path constraints are checked in real time at each step of the bundle search expansion. Specifically, a finite state automaton is maintained, with the state set of the finite state automaton being {S0:Start, S1:DataLayer, S2:ConceptLayer, S3:DecisionLayer, S_err:Error}. Whenever a path expands to a new node, the automaton performs a state transition based on the current state and the hierarchy type of the new node. If the transition enters the S_err state, the candidate path is immediately pruned. Furthermore, the relation type of each edge in the path must be consistent with the relation type of the corresponding position in the meta-path template. The maximum hop count for a path is set to 5. Paths exceeding this length are pruned regardless of their score; understandably, this generates an interpretation that conforms to the simplicity requirements of human cognition.
[0067] Step S5: Generate natural language explanation text based on the optimal explanation path.
[0068] In some specific implementations, the node sequence and edge relationships on the optimal interpretation path are serialized into a text sequence, and prompt words containing the text sequence and preset generation instructions are constructed; the prompt words are then input into a large language model to obtain the natural language interpretation text.
[0069] In practice, all nodes along the optimal explanation path, from the starting node to the target node, can be extracted sequentially, including data layer nodes, concept layer nodes, and decision layer nodes. Each node is described in text form: data layer nodes retain their feature names and corresponding values; concept layer nodes use their corresponding natural language concept tags; and decision layer nodes use the output category of their corresponding AI model. The edge relationships connecting the nodes are extracted, and based on the semantic definition of edges in the knowledge graph, these relationships are transformed into corresponding logically related words or phrases. The transformed node text and edge relationship text are then sequentially concatenated to form a continuous, structured text sequence.
[0070] Based on the serialized text sequence and combined with preset generation instructions, prompt words that meet the input requirements of the large language model are constructed to guide the model in generating high-quality natural language explanation text. Standardized generation instructions can be set according to the expression habits of domain business scenarios, requiring the large language model to generate logically coherent, professionally expressed, and easy-to-understand explanation text based on the input text sequence.
[0071] To verify the effectiveness of this invention, a personal credit risk assessment dataset from a commercial bank was used as an example. This dataset contains 120,000 loan application records with 35 feature dimensions (20 continuous features and 15 discrete features). The results are labeled as approved or rejected, with rejection samples accounting for approximately 28%. The knowledge graph contains 1247 entity nodes: 386 in the data layer, 724 in the concept layer, 137 in the decision layer, and 3856 relationship edges. The accuracy of the explanatory text obtained using the AI decision-making end-to-end interpretability generation method described in this invention was evaluated. Evaluation metrics included path hit rate, semantic consistency, and causal correctness. The evaluation data was based on 500 randomly selected test samples, independently blind-reviewed by five business experts with over five years of credit risk control experience. The evaluation results are shown in Table 1. It can be seen that the explanatory text obtained by the AI decision-making end-to-end interpretability generation method described in this invention has high accuracy.
[0072] Table 1. Explanation of Text Accuracy Assessment Table
[0073] Evaluation indicators definition Test Results Expert Evaluation Path hit rate The proportion of expert-annotated optimal paths in the system's Top-3 paths 87.4% excellent Semantic consistency The proportion of generated explanatory text consistent with path semantic information 93.2% excellent Causal correctness The proportion of paths with correct causal relationships and consistent with business logic 91.6% excellent Comprehensibility score Average expert rating of the comprehensibility of the explanation (on a scale of 1-5) 4.31 points good Loyalty The proportion of the reasons explained that are consistent with the actual maximum contribution characteristics of the model. 89.8% excellent
[0074] To verify the contribution of each core module, an ablation experiment was conducted, and the results are shown in Table 2.
[0075] Table 2 Ablation Experiment Results
[0076] ablation conditions Path hit rate Understandability Loyalty Causal correctness Complete model (method of this invention) 87.4% 4.31 points 89.8% 91.6% Remove numerical contribution terms (α=0) 71.8% 4.12 points 62.3% 89.1% Remove semantic weight terms (β=0) 74.5% 3.24 points 91.2% 72.8% Remove the length penalty term (γ=0) 83.1% 3.65 points 88.4% 87.2% Remove meta-path constraints 76.2% 3.47 points 85.1% 68.3% Replace with greedy search 72.6% 4.08 points 84.7% 86.5%
[0077] Ablation experiments show that fidelity decreased significantly after removing numerical contribution terms, verifying the crucial role of α in maintaining the interpretation's fidelity to the model; understandability and causal correctness decreased significantly after removing semantic weight terms, verifying the crucial role of β in ensuring the rationality of the interpretation; causal correctness decreased the most after removing meta-path constraints, dropping from 91.6% to 68.3%, indicating that meta-path constraints are the most critical mechanism to prevent the generation of meaningless paths that violate causal logic; bundle search significantly improved the path hit rate compared to greedy search, proving the necessity of retaining multiple candidate paths.
[0078] The method of this invention was compared with current mainstream AI interpretability methods, and the comparison results are shown in Table 3. All methods were based on the same credit risk control dataset and AI prediction model, and were evaluated by the same expert team.
[0079] Table 3 Performance Comparison of Different Methods
[0080] method Path hit rate Understandability Causal correctness Loyalty Full-link coverage Average delay SHAP — 2.85 points — 94.1% no 42ms LIME — 2.72 points — 86.3% no 156ms Attention visualization — 2.41 points — 78.5% no 15ms Rule extraction method 62.1% 3.56 points 74.2% 71.8% part 230ms Knowledge graph reasoning (no mixed scoring) 71.3% 3.89 points 82.7% 68.4% yes 135ms Method of the present invention 87.4% 4.58 points 91.6% 89.8% yes 473ms
[0081] As shown in Table 3, compared to the purely numerical interpretation methods of SHAP, LIME, and Attention, this invention significantly improves understandability while maintaining high model fidelity, only slightly lower than SHAP. This indicates that this invention effectively maintains a faithful reflection of the model's computation process while introducing semantic information.
[0082] Compared to rule extraction methods, this invention significantly outperforms traditional methods in path hit rate, causal correctness, and fidelity. Rule extraction methods, relying on posterior approximation of the model, are prone to missing key decision logic in complex nonlinear models.
[0083] Compared to baseline methods for knowledge graph reasoning without hybrid scoring, the hybrid energy scoring mechanism of this invention represents a comprehensive improvement, validating the effectiveness of the scoring strategy that integrates numerical contribution and semantic strength.
[0084] While this invention surpasses other methods in terms of real-time performance, the added latency is used to provide semantic end-to-end interpretation that other methods cannot offer, still within the sub-second range, meeting the needs of online interaction.
[0085] Figure 2 An AI decision-making end-to-end interpretability generation system 200 is illustrated. This device embodiment is similar to... Figure 1 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0086] like Figure 2 As shown, the AI decision-making end-to-end interpretability generation system 200 provided in this application embodiment includes the following modules:
[0087] The knowledge graph construction module 201 is used to construct a domain ontology knowledge graph for the AI model. The domain ontology knowledge graph includes a data layer, a concept layer, and a decision layer. The data layer corresponds to the input features of the AI model, the concept layer corresponds to the abstract concepts in the business logic of the AI model, and the decision layer corresponds to the output results of the AI model.
[0088] The feature mapping module 202 is used to map the input features of the AI model to the data layer nodes of the domain ontology knowledge graph, and to map the abstract concepts in the business logic of the AI model to the concept layer nodes of the domain ontology knowledge graph.
[0089] The subgraph construction module 203 is used to calculate the contribution value vector of the input features to the output results using the feature attribution algorithm, select the data layer nodes corresponding to the input features whose contribution values exceed the preset threshold as the starting node set, take the decision layer nodes corresponding to the output results as the target nodes, and construct an active subgraph based on the starting node set and the target node as the center's neighbor nodes.
[0090] The path mining module 204 is used to mine critical paths in the active subgraph based on the hybrid energy scoring mechanism and to find the optimal explanatory path from the set of starting nodes to the target node using the beam search algorithm.
[0091] The explanation generation module 205 is used to generate natural language explanation text based on the optimal explanation path.
[0092] Based on the same inventive concept, this application also provides an electronic device. The method corresponding to the electronic device can be the method in the foregoing embodiments, and its problem-solving principle is similar to that method. The electronic device provided in this application includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the methods and / or technical solutions of the foregoing embodiments of this application.
[0093] The electronic device can be a user device, or a device formed by integrating user devices and network devices through a network, or it can be an application running on the aforementioned devices. The user device includes, but is not limited to, various terminal devices such as computers, mobile phones, tablets, smartwatches, and wristbands. The network device includes, but is not limited to, network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, and can be used to implement some processing functions when setting an alarm clock. Here, the cloud consists of a large number of hosts or network servers based on cloud computing. Cloud computing is a type of distributed computing, consisting of a virtual computer composed of a group of loosely coupled computer sets.
[0094] Figure 3 The diagram illustrates the structure of an apparatus suitable for implementing the methods and / or technical solutions in the embodiments of this application. The apparatus 300 includes a Central Processing Unit (CPU) 301, which can perform various appropriate actions and processes based on a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage portion 308 into a Random Access Memory (RAM) 303. The RAM 303 also stores various programs and data required for system operation. The CPU 301, ROM 302, and RAM 303 are interconnected via a bus 304. An Input / Output (I / O) interface 305 is also connected to the bus 304.
[0095] The following components are connected to I / O interface 305: an input section 306 including a keyboard, mouse, touchscreen, microphone, infrared sensor, etc.; an output section 307 including a cathode ray tube (CRT), liquid crystal display (LCD), LED display, OLED display, etc., and speakers, etc.; a storage section 308 including one or more computer-readable media such as hard disk, optical disk, magnetic disk, semiconductor memory, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 309 performs communication processing via a network such as the Internet.
[0096] In particular, the methods and / or embodiments in this application can be implemented as computer software programs. For example, the embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 301, it performs the functions defined in the methods of this application.
[0097] Another embodiment of this application provides a computer-readable storage medium having computer program instructions stored thereon, which can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of this application described above.
[0098] Specifically, this embodiment may employ any combination of one or more computer-readable media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0099] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0100] The program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0101] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0102] The flowcharts or block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-specific system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0103] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or page components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0105] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0106] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0107] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
[0109] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a device claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
Claims
1. A method for generating interpretability across the entire AI decision-making process, characterized in that, Includes the following steps: S1: Construct a domain ontology knowledge graph for the AI model, which includes a data layer, a concept layer, and a decision layer; the data layer corresponds to the input features of the AI model, the concept layer corresponds to the abstract concepts in the business logic of the AI model, and the decision layer corresponds to the output results of the AI model. S2: Map the input features of the AI model to the data layer nodes of the domain ontology knowledge graph, and map the abstract concepts in the business logic of the AI model to the concept layer nodes of the domain ontology knowledge graph; S3: Calculate the contribution vector of input features to output results using feature attribution algorithm, select the data layer nodes corresponding to input features whose contribution values exceed the preset threshold as the starting node set, take the decision layer nodes corresponding to the output results as the target nodes, and construct an active subgraph based on the starting node set and the target nodes as the center's neighbor nodes. S4: Based on the hybrid energy scoring mechanism, critical path mining is performed in the active subgraph, and the optimal interpretation path from the starting node set to the target node is found using the beam search algorithm; S5: Generate natural language explanation text based on the optimal explanation path.
2. The AI decision-making end-to-end interpretability generation method according to claim 1, characterized in that, In step S2, if the input features and / or abstract concepts in the business logic are structured features, a hash lookup table or binning strategy is used for mapping; if the input features and / or abstract concepts in the business logic are unstructured features, vector nearest neighbor retrieval is used for mapping.
3. The AI decision-making end-to-end interpretability generation method according to claim 1, characterized in that, In step S3, the preset threshold value ranges from 0.05 to 0.
3.
4. The AI decision-making end-to-end interpretability generation method according to claim 1, characterized in that, In step S4, the path interpretability score (P) of the hybrid energy scoring mechanism is: , where P represents a candidate path from the set of starting nodes to the target node; This represents the feature importance value of the nth node on path P, where the feature importance value is the result of the feature attribution algorithm of the AI model. The semantic weight represents the r-th edge on path P, where the semantic weight is defined as prior knowledge of the domain ontology knowledge graph. This represents the path length penalty term for path P, the value of which is positively correlated with the number of edges contained in the path; , , These are the feature importance balance coefficient, semantic weight balance coefficient, and length penalty coefficient, respectively.
5. The AI decision-making end-to-end interpretability generation method according to claim 1, characterized in that, In step S4, during the process of using the beam search algorithm to find the optimal interpretation path, the preset number of paths with the highest scores in the hybrid energy scoring mechanism are retained as candidate paths, and the candidate paths follow predefined meta-path constraints; the predefined meta-path constraints are the path patterns from data layer nodes through concept layer nodes to decision layer nodes.
6. The AI decision-making end-to-end interpretability generation method according to claim 1, characterized in that, In step S5, the node sequence and edge relationship on the optimal interpretation path are serialized into a text sequence, and a prompt word containing the text sequence and a preset generation instruction is constructed; the prompt word is then input into the large language model to obtain the natural language interpretation text.
7. A system for generating AI decision-making with end-to-end interpretability, characterized in that, Includes the following modules: The knowledge graph construction module is used to construct a domain ontology knowledge graph for the AI model. The domain ontology knowledge graph includes a data layer, a concept layer, and a decision layer. The data layer corresponds to the input features of the AI model, the concept layer corresponds to the abstract concepts in the business logic of the AI model, and the decision layer corresponds to the output results of the AI model. The feature mapping module is used to map the input features of the AI model to the data layer nodes of the domain ontology knowledge graph, and to map the abstract concepts in the business logic of the AI model to the concept layer nodes of the domain ontology knowledge graph. The subgraph construction module is used to calculate the contribution vector of input features to the output result using the feature attribution algorithm, select the data layer nodes corresponding to the input features whose contribution values exceed a preset threshold as the starting node set, take the decision layer nodes corresponding to the output result as the target nodes, and construct an active subgraph based on the starting node set and the target node as the center's neighbor nodes. The path mining module is used to mine critical paths in the active subgraph based on the hybrid energy scoring mechanism and to find the optimal explanatory path from the set of starting nodes to the target node using the beam search algorithm. The explanation generation module is used to generate natural language explanation text based on the optimal explanation path.
8. An electronic device, characterized in that, The electronic device includes: at least one processor; a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 6.
9. A computer-readable medium having computer program instructions stored thereon, characterized in that, The computer program instructions can be executed by a processor to implement the method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.